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
/**
* @author ETSI / STF422_EETS
* @version $URL:$
* $Id:$
* @desc FAST networking & transport layer protocol (ISO 29281-2) functions
*/
module LibItsFntp_Functions {
// Libcommon
import from LibCommon_Sync all;
import from LibCommon_VerdictControl {
type FncRetCode
};
import from LibCommon_Time {
function f_sleepIgnoreDef
};
import from LibCommon_BasicTypesAndValues {
type UInt16
};
// LibIts
// import from CITSapplMgmtApplReg language "ASN.1:1997" { // TODO To be removed
// type ITSaid
// };
import from CALMmanagement language "ASN.1:1997" {
type StationID, ITS_scuId;
};
import from CALMiitsscu language "ASN.1:1997" {
type
IIC_Request, IIC_Response
};
import from CALMllsap language "ASN.1:1997" {
type
EUI64, IN_SAPaddress, LLserviceAddr, Link_ID, AccessParameters
};
import from CALMfntp language "ASN.1:1997" all;
import from LibItsMgt_Functions {
altstep
a_mgtMNSapPortDefault, a_mgtSapAwaitFWTupdate
};
import from CALMfsap language "ASN.1:1997" {
type
CTX, SAM
};
import from LibItsFsap_Templates {
template
m_sam, m_ctx
};
import from LibItsFntp_TypesAndValues {
const c_portDyn, c_portNon;
type AcFntpPrimitive
};
import from LibItsFntp_Templates all;
import from LibItsFntp_Pixits all;
import from LibItsFntp_Pics {
modulepar PICS_ITS_S_INW;
};
import from LibItsCommon_TypesAndValues {
type UtCommandConfirm
};
import from LibItsCommon_Functions {
function
f_utInitializeIut,
f_utCommandRequestConfirm, f_utCommandRequestWithoutConfirm
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
};
import from LibIts_Interface all;
group fntpConfigurationFunctions {
/**
* @desc This configuration features:
* <li>Host and Router are combined (see ISO/WD 29281-2 - Figure 1 - Implementation architecture I)</li>
* <li>MGT1 IISC Port (IISC/LAN) is not used</li>
*/
function f_cf01Up() runs on ItsNt {
// Sanity check
if (PICS_ITS_S_INW) {
log("*** f_cf01Up: ERROR: PICS_ITS_S_INW shall not be required for executing the TC ***");
stop;
}
// Map
map(self:acPort, system:acPort);
map(self:utPort, system:utPort);
map(self:mgtMNSapPort, system:mgtMNSapPort);
map(self:fntpPort, system:fntpPort);
// Connect
f_connect4SelfOrClientSync();
// Set processing on shutdown
activate(a_cf01Down());
// Initialize the component
f_initialiseComponent("cf01Up");
// Initialze the IUT
f_initialState();
} // End of function f_cf01Up
/**
* @desc This configuration features:
* <li>Host and Router are separated (see ISO/WD 29281-2 - Figure 3 - Implementation architecture II & III)</li>
* <li>MGT1 IISC Port (IISC/LAN) is not used</li>
*/
function f_cf02Up() runs on ItsNt {
// Sanity check
if (not(PICS_ITS_S_INW)) {
log("*** f_cf02Up: ERROR: PICS_ITS_S_INW required for executing the TC ***");
stop;
}
vc_commandRef := 0;
vc_pduCounter := 0;
// Map
map(self:acPort, system:acPort);
map(self:utPort, system:utPort);
map(self:mgtMNSapPort, system:mgtMNSapPort);
map(self:fntpPort, system:fntpPort);
// Connect
f_connect4SelfOrClientSync();
// Set processing on shutdown
activate(a_cf02Down());
// Initialize the component
f_initialiseComponent("cf02Up");
// Initialze the IUT
f_initialState();
} // End of function f_cf02Up
/**
* @desc Deletes configuration cf01
*/
function f_cf01Down() runs on ItsNt {
deactivate;
// Unmap
unmap(self:acPort, system:acPort);
unmap(self:utPort, system:utPort);
unmap(self:mgtMNSapPort, system:mgtMNSapPort);
unmap(self:fntpPort, system:fntpPort);
// Disconnect
f_disconnect4SelfOrClientSync();
} // end f_cf01Down
function f_cf02Down() runs on ItsNt {
deactivate;
// Unmap
unmap(self:acPort, system:acPort);
unmap(self:utPort, system:utPort);
unmap(self:fntpPort, system:fntpPort);
// Disconnect
f_disconnect4SelfOrClientSync();
} // end f_cf02Down
/**
* @desc Behavior function for initializing component's variables and tables
* @param p_componentName Name of the component
*/
function f_initialiseComponent(in charstring p_componentName) runs on ItsNt {
// Initialize variables
vc_componentName := p_componentName;
vc_portNumber := { portLong := c_portNon };
vc_scuId := 255;
// Set defaults
activate(a_fntpDefault()); // Default for Fntp module
activate(a_mgtMNSapPortDefault()); // Default for MGT module / MF-SAP port
} // end f_initialiseComponent
} // End of group fntpConfigurationFunctions
group preambles {
/**
* @desc Brings the IUT into an initial state.
*/
function f_initialState() runs on ItsNt {
f_utInitializeIut(m_fntpInitialize);
f_sleepIgnoreDef(PX_WAIT_FOR_IUT_READY); // Wait until the IUT is in a stable situation (beaconing...)
} // End of function f_initialState
Loading full blame...