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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
module LibItsDccFunctions {
// Libcommon
import from LibCommon_Sync all;
import from LibCommon_VerdictControl all;
// LibIts
import from LibItsDcc_Templates all;
import from LibItsDcc_Pixits all;
import from LibItsDcc_Pics all;
import from LibItsDcc_TestSystem all;
group dccConfigurationFunctions {
/**
* @desc Setups default configuration
*/
function f_cfUp() runs on ItsDcc {
map(self:utPort, system:utPort);
map(self:inPort, system:inPort);
f_connect4SelfOrClientSync();
} // end f_cfUp
/**
* @desc Deletes default configuration
*/
function f_cfDown() runs on ItsDcc {
unmap(self:utPort, system:utPort);
unmap(self:inPort, system:inPort);
f_disconnect4SelfOrClientSync();
} // end f_cfDown
} // end of dccConfigurationFunctions
/**
* @desc Upper tester functions
*/
group utFuntions {
/**
* @desc Requests to bring the IUT in an initial state
* @param p_init The initialisation to trigger.
*/
function f_utInitializeIut(template (value) UtInitialize p_init) runs on ItsDcc {
utPort.send(p_init);
tc_wait.start;
alt {
[] utPort.receive(UtResult:true) {
tc_wait.stop;
log("*** f_utInitializeIut: INFO: IUT initialized ***");
}
[] utPort.receive {
tc_wait.stop;
log("*** f_utInitializeIut: INFO: IUT could not be initialized ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_wait.timeout {
log("*** f_utInitializeIut: INFO: IUT could not be initialized in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
repeat;
}
}
}
/**
* @desc Triggers event on the radio interface
* @param p_trigger The event to trigger.
*/
function f_utTriggerEvent(template (value) UtTrigger p_trigger) runs on ItsDcc {
utPort.send(p_trigger);
alt {
[] utPort.receive(UtResult:true) {
tc_wait.stop;
log("*** f_utTriggerEvent: INFO: Event sccessfully triggered ***");
}
[] utPort.receive {
tc_wait.stop;
log("*** f_utTriggerEvent: INFO: Event could not be triggered ***");
f_selfOrClientSyncAndVerdict("error", e_error);
}
[] tc_wait.timeout {
log("*** f_utTriggerEvent: INFO: Event could not be triggered in time ***");
f_selfOrClientSyncAndVerdict("error", e_timeout);
}
[else] { // Shortcut defaults
repeat;
}
}
}
/**
* @desc Capture the next event sent to the Upper Tester
* @param p_event Receive template of the expected event
* @param p_result Return the value of the received event if template matchs
*/
function f_utCommandIndication(
in template UtCommandIndication p_event,
out UtCommandIndication p_result
) runs on ItsDcc {
tc_wait.start;
alt {
// [] utPort.receive(p_event) -> value p_result {
// tc_wait.stop;
// }
[] utPort.receive {
tc_wait.stop;
log("*** f_utCommandIndication: INFO: Another event indicated at application layer, repeating check ***");
}
[] tc_wait.timeout {
log("*** f_utCommandIndication: ERROR: Timeout while waiting for event check result ***");
}
} // end of 'alt' statement
} // End of function f_utCommandIndication
} // End of group utFunctions
} // End of module LibItsDcc_Functions