Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/**
* @author ETSI
* @version $URL$
* $Id$
* @desc A collection of time handling functions which may be useful in
* the implementation of any TTCN-3 test suite.
* @remark End users should be aware that any changes made to the in
* definitions this module may be overwritten in future releases.
* End users are encouraged to contact the distributers of this
* module regarding their modifications or additions so that future
* updates will include your changes.
*/
module LibCommon_Time {
group timeLibModuleParameters {
/**
* @desc Time to control PTC.stop
* @remark PICS/PIXIT Reference: XXX
*/
modulepar float PX_TDONE := 120.0;
/**
* @desc Time to control the reception of a message
* @remark PICS/PIXIT Reference: XXX
*/
modulepar float PX_TAC := 30.0;
/**
* @desc Time to control that IUT sends nothing
* @remark PICS/PIXIT Reference: XXX
*/
modulepar float PX_TNOAC := 10.0;
/**
* @desc Time to control that IUT reacts prior to Upper Tester action
* @remark PICS/PIXIT Reference: XXX
*/
modulepar float PX_TWAIT := 120.0;
/**
* @desc Time to control sending in loops
* @remark PICS/PIXIT Reference: XXX
*/
modulepar float PX_LOOP := 1.0;
} // end group timeLibModuleParameters
group sleeping {
/**
* @desc The invocation of this function will cause a test component
* to sleep (or wait) for a specified amount of time.
* Defaults may interrupt this sleep if activated.
* @see LibCommon_Time.f_sleepIgnoreDef
* @param p_duration Amount of time that the test component should wait.
*/
function f_sleep ( in float p_duration ) {
timer t;
if (p_duration <= 0.0) {return}
t.start( p_duration );
t.timeout;
}
/**
* @desc The invocation of this function will cause a test component
* to sleep (or wait) for a specified amount of time.
* This function ignores any active defaults, i.e., the function
* will always wait the specified amount of time.
* @param p_duration Amount of time that the test component should wait.
*/
function f_sleepIgnoreDef ( in float p_duration ) {
timer t;
if (p_duration <= 0.0) {return}
t.start( p_duration );
alt {
[] t.timeout {}
[else] {repeat}
} // end alt
}
} // end group sleeping
} // end module LibCommon_Time