![]() |
![]() |
![]() |
![]() |
![]() |
Timers
For both the realtime and the discrete time simulation, the implementation of the TTCN Exerciser has 64 bit timers. Time is kept as the difference from the timers expiration time and the last time the current time was updated. In realtime mode, the time is updated in the snapshot function. With discrete time simulation, the time is updated at the timeout command. With the 64 bit implementation and the constraint that the resolution is 1 ns, the consequences are that:
- No period of less than 1 ns can be measured.
- The maximum period that can be measured is more than 2 billion seconds, or some 65 years.
Hopefully, this resolution is sufficient for most applications. There are some aspects of discrete simulation that are well worth a special note:
- Discrete time simulation assumes that no processing time is required for executing TTCN and that there is no delay due to messaging and scheduling overhead in concurrent TTCN. This is not entirely true. Apart from this, it is in many cases sufficient for testing a test script in a non-realtime environment.
- Discrete time simulation also expires timers at the exact right time (from the testers aspect, not in a realtime aspect). In many cases, a test process cannot be scheduled at exactly the time when a timer expires, and consequently there is normally a lag in a real-time tester. This lag should normally be accounted for by the test designer in determining timer durations.
Runtime Timer Errors and Warnings
With the timer implementation, there are also some conditions that may be reported in the conformance log:
- READTIMER of a timer that is not currently running. This condition will make the readtimer call return 0 and also produce a message in the conformance log.
- START of a timer with a ps resolution will result in the timer to get an approximate expiration time. This expiration time is the duration of the timer / 1000 ns. In effect this is too early. If the unit of a timer cannot be determined, it is assumed to be seconds. This condition should normally not appear, but will result in a message in the log and possibly also test case termination.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |