Newer
Older
/**
Bostjan Pintar
committed
* @author ETSI STF517 /TTF002
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsMapemSpatem/ItsSpatem_TpFunctions.ttcn $
* $Id: ItsSpatem_TpFunctions.ttcn,v 1.4 2018/12/06 17:59:36 dte Exp $
* @desc SPATEM TP functions
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
module ItsSpatem_TpFunctions {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_Sync all;
import from LibCommon_VerdictControl all;
import from LibCommon_Time all;
// LibItsCommon
import from LibItsCommon_Functions all;
import from LibItsCommon_TypesAndValues all;
// LibIts
import from ITS_Container language "ASN.1:1997" all;
import from MAPEM_PDU_Descriptions language "ASN.1:1997" all;
import from SPATEM_PDU_Descriptions language "ASN.1:1997" all;
import from DSRC language "ASN.1:1997" all;
// LibItsMapemSpatem
import from LibItsMapemSpatem_TestSystem all;
import from LibItsMapemSpatem_Functions all;
import from LibItsMapemSpatem_Templates all;
import from LibItsMapemSpatem_TypesAndValues all;
import from LibItsMapemSpatem_Pics all;
group spateMessageDissemination {
group spateMessageFormat {
/**
Bostjan Pintar
committed
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_01
*/
Bostjan Pintar
committed
function f_IS_TLM_GEN_MSGF_BV_01 () runs on ItsMapemSpatem {
// Local variables
// Test control
if (not PICS_SPATEM_GENERATION) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
//f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
f_poDefault();
f_cfDown();
Bostjan Pintar
committed
} // End of function f_IS_TLM_GEN_MSGF_BV_01
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_02
*/
function f_IS_TLM_GEN_MSGF_BV_02 () runs on ItsMapemSpatem {
// Local variables
// Test control
if (not PICS_SPATEM_GENERATION) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
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
// Wait for SPATEM sent
tc_ac.start(2.0);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatem_intersections(
{mw_IntersectionState(
?, //IntersectionReferenceID p_id
-, //MsgCount p_revision
-, //IntersectionStatusObject p_status
- //MovementList p_states
)}
)
)
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
//f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
Bostjan Pintar
committed
} // End of function f_IS_TLM_GEN_MSGF_BV_02
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_03
*/
function f_IS_TLM_GEN_MSGF_BV_03 () runs on ItsMapemSpatem {
// Local variables
// Test control
if (not PICS_SPATEM_GENERATION) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
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
// Wait for SPATEM sent
tc_ac.start(2.0);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatem_intersections(
{mw_IntersectionState(
-, //IntersectionReferenceID p_id
?, //MsgCount p_revision
-, //IntersectionStatusObject p_status
- //MovementList p_states
)}
)
)
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
//f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
Bostjan Pintar
committed
} // End of function f_IS_TLM_GEN_MSGF_BV_03
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_04
*/
function f_IS_TLM_GEN_MSGF_BV_04 () runs on ItsMapemSpatem {
// Local variables
// Test control
if (not PICS_SPATEM_GENERATION) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
// Wait for SPATEM sent
tc_ac.start(2.0);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatem_intersections(
{mw_IntersectionState_moyAndTimeStamp}
)
)
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
//f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
Bostjan Pintar
committed
} // End of function f_IS_TLM_GEN_MSGF_BV_04
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_05
*/
function f_IS_TLM_GEN_MSGF_BV_05 () runs on ItsMapemSpatem {
// Local variables
// Test control
if (not PICS_SPATEM_GENERATION) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
// Wait for SPATEM sent
tc_ac.start(2.0);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatem_intersections(
{mw_IntersectionState(
-, //IntersectionReferenceID p_id
-, //MsgCount p_revision
-, //IntersectionStatusObject p_status
)}
)
)
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
//f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
Bostjan Pintar
committed
Bostjan Pintar
committed
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_06
*/
function f_IS_TLM_GEN_MSGF_BV_06 () runs on ItsMapemSpatem {
// Local variables
// Test control
if (not PICS_SPATEM_GENERATION) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Preamble
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
// Wait for SPATEM sent
tc_ac.start(2.0);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatem_intersections(
{mw_IntersectionState(
?, //IntersectionReferenceID p_id
-, //MsgCount p_revision
-, //IntersectionStatusObject p_status
{mw_movementState(
?,//SignalGroupID,
? //MovementEventList,
)} //MovementList p_states
)}
)
)
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
//f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
Bostjan Pintar
committed
Bostjan Pintar
committed
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_07
*/
function f_IS_TLM_GEN_MSGF_BV_07 () runs on ItsMapemSpatem {
Bostjan Pintar
committed
Bostjan Pintar
committed
} // End of function f_IS_TLM_GEN_MSGF_BV_07
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_08
*/
function f_IS_TLM_GEN_MSGF_BV_08 () runs on ItsMtc {
// Local variables
var ItsMapemSpatem v_mapem;
var ItsMapemSpatem v_spatem;
Bostjan Pintar
committed
// Test control
if (not (PICS_SPATEM_GENERATION)) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf02Up();
Bostjan Pintar
committed
Bostjan Pintar
committed
// Start components
v_mapem := f_getComponent(c_compMap);
v_spatem := f_getComponent(c_compSpat);
v_mapem.start(f_IS_TLM_GEN_MSGF_BV_08_MAPEM());
v_spatem.start(f_IS_TLM_GEN_MSGF_BV_08_SPATEM());
Bostjan Pintar
committed
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
Bostjan Pintar
committed
Bostjan Pintar
committed
Bostjan Pintar
committed
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_08_MAPEM
Bostjan Pintar
committed
*/
function f_IS_TLM_GEN_MSGF_BV_08_MAPEM () runs on ItsMapemSpatem {
// Local variables
var MapemInd v_mapem;
var IntersectionReferenceID v_id;
Bostjan Pintar
committed
// Preamble
f_prInitialState();
f_awaitMapeMessage(
mw_mapemInd(
mw_mapemPdu(
mw_mapem(
{mw_intersectionGeometry(
?,//IntersectionReferenceId
-,
-,
{mw_roadLane(
-,//laneID
?,//laneAttributes
-,//p_ingressApproach
-,//egressApproach
? //connectsTo
)}
)}
)
)),
v_mapem
);
v_id := v_mapem.msgIn.map_.intersections[0].id;
log("IntersectionReferenceID = ", v_id);
Bostjan Pintar
committed
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
Bostjan Pintar
committed
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_08_SPATEM
*/
function f_IS_TLM_GEN_MSGF_BV_08_SPATEM () runs on ItsMapemSpatem {
// Local variables
// Preamble
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatem_intersections(
{mw_IntersectionState(
?, //IntersectionReferenceID p_id
-, //MsgCount p_revision
-, //IntersectionStatusObject p_status
{mw_movementState(
?,//SignalGroupID,
{mw_movementEvent( //MovementEventList,
-,
mw_timeChangeDetails( //timing
? //minEndTime
)
)}
)} //MovementList p_states
)}
)
)
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
//f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
f_poDefault();
/**
*/
// Local variables
var ItsMapemSpatem v_mapem;
var ItsMapemSpatem v_spatem;
// Test control
if (not (PICS_SPATEM_GENERATION and PICS_SPATEM_HAS_TIMING)) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION AND PICS_SPATEM_HAS_TIMING required for executing the TC ***");
setverdict(inconc);
stop;
}
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
// Test component configuration
f_cf02Up();
// Preamble
// Start components
v_mapem := f_getComponent(c_compMap);
v_spatem := f_getComponent(c_compSpat);
v_mapem.start(f_IS_TLM_GEN_MSGF_BV_09_MAPEM());
v_spatem.start(f_IS_TLM_GEN_MSGF_BV_09_SPATEM());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // End of function f_IS_TLM_GEN_MSGF_BV_09
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_09_MAPEM
*/
function f_IS_TLM_GEN_MSGF_BV_09_MAPEM () runs on ItsMapemSpatem {
// Local variables
var MapemInd v_mapem;
var IntersectionReferenceID v_id;
// Preamble
f_awaitMapeMessage(
mw_mapemInd(
mw_mapemPdu(
mw_mapem(
{mw_intersectionGeometry(
?,//IntersectionReferenceId
-,
-,
{mw_roadLane(
-,//laneID
?,//laneAttributes
-,//p_ingressApproach
-,//egressApproach
? //connectsTo
)}
)}
)
)),
v_mapem
);
v_id := v_mapem.msgIn.map_.intersections[0].id;
log("IntersectionReferenceID = ", v_id);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} // End of function f_IS_TLM_GEN_MSGF_BV_09_MAPEM
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_09_SPATEM
*/
function f_IS_TLM_GEN_MSGF_BV_09_SPATEM () runs on ItsMapemSpatem {
// Local variables
// Preamble
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatem_intersections(
{mw_IntersectionState(
?, //IntersectionReferenceID p_id
-, //MsgCount p_revision
-, //IntersectionStatusObject p_status
{mw_movementState( //MovementList p_states
?,//SignalGroupID,
{mw_movementEvent( //MovementEventList,
-,
mw_timeChangeDetails( //timing
?, //minEndTime
*, //startTime
? //nextTime
)
)}
)}
)}
)
)
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
//f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
f_poDefault();
/**
*/
// Local variables
var ItsMapemSpatem v_mapem;
var ItsMapemSpatem v_spatem;
// Test control
if (not (PICS_SPATEM_GENERATION and PICS_SPATEM_PRIORITIZATION)) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION AND PICS_SPATEM_PRIORITIZATION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cf02Up();
// Preamble
// Start components
v_mapem := f_getComponent(c_compMap);
v_spatem := f_getComponent(c_compSpat);
v_mapem.start(f_IS_TLM_GEN_MSGF_BV_10_MAPEM());
v_spatem.start(f_IS_TLM_GEN_MSGF_BV_10_SPATEM());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // End of function f_IS_TLM_GEN_MSGF_BV_10
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_10_CAM
*/
function f_IS_TLM_GEN_MSGF_BV_10_MAPEM () runs on ItsMapemSpatem {
// Local variables
var MapemInd v_mapem;
var IntersectionReferenceID v_id;
// Preamble
f_awaitMapeMessage(
mw_mapemInd(
mw_mapemPdu(
mw_mapem(
{mw_intersectionGeometry(
?,//IntersectionReferenceId
-,
-,
{mw_roadLane(
-,//laneID
?,//laneAttributes
-,//p_ingressApproach
-,//egressApproach
? //connectsTo
)}
)}
)
)),
v_mapem
);
v_id := v_mapem.msgIn.map_.intersections[0].id;
log("IntersectionReferenceID = ", v_id);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} // End of function f_IS_TLM_GEN_MSGF_BV_10_MAPEM
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_10_SPATEM
*/
function f_IS_TLM_GEN_MSGF_BV_10_SPATEM () runs on ItsMapemSpatem {
// Local variables
// Preamble
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
// Test Body
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatem_intersections(
{mw_IntersectionState_regional(
?, //IntersectionReferenceID p_id
-, //MsgCount p_revision
-, //IntersectionStatusObject p_status
-,
? //regional
)}
)
)
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
//f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
f_poDefault();
/**
*/
// Local variables
var ItsMapemSpatem v_mapem;
var ItsMapemSpatem v_spatem;
// Test control
if (not (PICS_SPATEM_GENERATION and PICS_SPATEM_PEDESTRIAN_MANOEUVRES)) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION AND PICS_SPATEM_PEDESTRIAN_MANOEUVRES required for executing the TC ***");
setverdict(inconc);
stop;
}
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
// Test component configuration
f_cf02Up();
// Preamble
// Start components
v_mapem := f_getComponent(c_compMap);
v_spatem := f_getComponent(c_compSpat);
v_mapem.start(f_IS_TLM_GEN_MSGF_BV_11_MAPEM());
v_spatem.start(f_IS_TLM_GEN_MSGF_BV_11_SPATEM());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // End of function f_IS_TLM_GEN_MSGF_BV_11
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_11_MAPEM
*/
function f_IS_TLM_GEN_MSGF_BV_11_MAPEM () runs on ItsMapemSpatem {
// Local variables
var MapemInd v_mapem;
var IntersectionReferenceID v_id;
// Preamble
f_awaitMapeMessage(
mw_mapemInd(
mw_mapemPdu(
mw_mapem(
{mw_intersectionGeometry(
?,//IntersectionReferenceId
-,
-,
{mw_roadLane(
-,//laneID
?,//laneAttributes
-,//p_ingressApproach
-,//egressApproach
? //connectsTo
)}
)}
)
)),
v_mapem
);
v_id := v_mapem.msgIn.map_.intersections[0].id;
log("IntersectionReferenceID = ", v_id);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} // End of function f_IS_TLM_GEN_MSGF_BV_11_MAPEM
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_11_SPATEM
*/
function f_IS_TLM_GEN_MSGF_BV_11_SPATEM () runs on ItsMapemSpatem {
// Local variables
// Preamble
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatem_intersections(
{mw_IntersectionState_maneuverAssistList(
?, //IntersectionReferenceID p_id
-, //MsgCount p_revision
-, //IntersectionStatusObject p_status
-,
{mw_connectionManeuverAssist(
?, // connectionID
? // pedBicycleDetect
)}
)}
)
)
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
//f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
f_poDefault();
/**
*/
// Local variables
var ItsMapemSpatem v_mapem;
var ItsMapemSpatem v_spatem;
if (not (PICS_SPATEM_GENERATION and PICS_SPATEM_HAS_OPTIMAL_SPEED)) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION AND PICS_SPATEM_PEDESTRIAN_MANOEUVRES required for executing the TC ***");
// Test component configuration
// Preamble
// Start components
v_mapem := f_getComponent(c_compMap);
v_spatem := f_getComponent(c_compSpat);
v_mapem.start(f_IS_TLM_GEN_MSGF_BV_12_MAPEM());
v_spatem.start(f_IS_TLM_GEN_MSGF_BV_12_SPATEM());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // End of function f_IS_TLM_GEN_MSGF_BV_12
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_12_MAPEM
*/
function f_IS_TLM_GEN_MSGF_BV_12_MAPEM () runs on ItsMapemSpatem {
// Local variables
var MapemInd v_mapem;
var IntersectionReferenceID v_id;
// Preamble
f_prInitialState();
f_awaitMapeMessage(
mw_mapemInd(
mw_mapemPdu(
mw_mapem(
{mw_intersectionGeometry(
?,//IntersectionReferenceId
-,
-,
{mw_roadLane(
-,//laneID
?,//laneAttributes
-,//p_ingressApproach
-,//egressApproach
? //connectsTo
)}
)}
)
)),
v_mapem
);
v_id := v_mapem.msgIn.map_.intersections[0].id;
log("IntersectionReferenceID = ", v_id);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} // End of function f_IS_TLM_GEN_MSGF_BV_12_MAPEM
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_12_SPATEM
*/
function f_IS_TLM_GEN_MSGF_BV_12_SPATEM () runs on ItsMapemSpatem {
// Local variables
// Preamble
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatem_intersections(
{mw_IntersectionState(
?, //IntersectionReferenceID p_id
-, //MsgCount p_revision
-, //IntersectionStatusObject p_status
{mw_movementState( //MovementList p_states
?,//SignalGroupID,
{mw_movementEvent( //MovementEventList,
-,
-,//timing
{mw_advisorySpeed( //speeds
(ecoDrive, transit),//type (ecoDrive (2) or transit (3))
? //speed
)}
)}
)}
)) {
tc_ac.stop;