Hi Theo,
Thanks for the reply. I will try what you suggested. But when I was trying to write external C++ code for other functionality I was facing lot of problems with it. So I would have preferred this functionality in ttcn3 itself.
But since this functionality is not available in ttcn3 I will look into that again.
Also to write an external function do we have write the header file too or it will get automatically generated?
Thank You,
Br.
Vishwanath S Bhat
________________________________
From: active_ttcn3 : mts stf133 ttcn version 3 - active members only [
This email address is being protected from spambots. You need JavaScript enabled to view it.] On Behalf Of Theofanis Vassiliou-Gioles
Sent: Tuesday, April 20, 2010 3:32 PM
To:
This email address is being protected from spambots. You need JavaScript enabled to view it.
Subject: Re: How to get system time
Dear Vishwanath S Bath,
two things I would like to mention here: In my understand random does not equal to uniqueness. Just because something is random this does not meant that it will not occur a second time. I think lot of scientific paper has been produced to show what a good random number generator is and what not. However uniqueness was never a criteria ;-)
Now, if you would like the feature for a unique number just use your favorite implementation and integrate it via the external function mechanism provide in TTCN-3.
So let's assume you have a library in C that does the job, just declare in your ttcn-3 script.
external function uniqueNumber() return integer;
And then implement in the PA the triExternalFunction() operation.
So you get exactly the functionality that you require.
Best regards, Theo
Theofanis Vassiliou-Gioles
Testing Technologies IST GmbH
Michaelkirchstraße 17/18
10179 Berlin, Germany
Phone +49 30 726 19 190 Email
This email address is being protected from spambots. You need JavaScript enabled to view it.<
This email address is being protected from spambots. You need JavaScript enabled to view it.>
Fax +49 30 726 19 19 20 Internet
www.testingtech.com<
www.testingtech.com>
UPCOMING EVENTS
April 26, Schloß-Steinhöfel-Seminar
"Innovationen in Markt und Forschung"
www.asqf.de/fachgruppentermine-anzeige/e...nhoefel-seminar.html<
www.asqf.de/fachgruppentermine-anzeige/e...nhoefel-seminar.html>
May 25-27, TETRA World Congress
Singapore
www.tetraworldcongress.com<
www.tetraworldcongress.com>
June 8-10, TTCN-3 User Conference
China, Beijing
www.ttcn3-asiaforum.com/T3UC2010/en/index.asp<
www.ttcn3-asiaforum.com/T3UC2010/en/index.asp>
Geschäftsführung: Theofanis Vassiliou-Gioles, Stephan Pietsch
Handelsregister HRB 77805,
Amtsgericht Charlottenburg Ust ID Nr.: DE 813 143 070
This e-mail may contain confidential and privileged material for
the sole use of the intended recipient. Any review, use,
distribution or disclosure by others is strictly prohibited. If you
are not the intended recipient (or authorized to receive for the
recipient), please contact the sender by reply e-mail and delete
all copies of this message.
Am 20.04.2010 um 10:46 schrieb Vishwanath Subraya Bhat:
Hi,
Anyone knows like how to read current system time in milliseconds using ttcn3?
I want to use unique random number each time in my script. But rnd function won't guarantee the uniqueness. It may and it has generated same values. So I think to guarantee unique random number each time is to use system time.
If anyone knows how to get system time in milliseconds or has a better idea to generate a unique random number please let me know.
Thanks in advance,
Best Regards,
Vishwanath S Bhat
________________________________
"DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus."
________________________________
"DISCLAIMER: This message is proprietary to Aricent and is intended solely for the use of the individual to whom it is addressed. It may contain privileged or confidential information and should not be circulated or used for any purpose other than for what it is intended. If you have received this message in error, please notify the originator immediately. If you are not the intended recipient, you are notified that you are strictly prohibited from using, copying, altering, or disclosing the contents of this message. Aricent accepts no responsibility for loss or damage arising from the use of the information transmitted by this email including damage from virus."