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));
// 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(
)
)
)) {
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 {
var MapemInd v_mapem;
var SpatemInd v_spatem;
// 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 MAPEM sent
f_awaitMapeMessage(
mw_mapemInd(
mw_mapemPdu(
mw_mapem(
{
mw_intersectionGeometry(
-, -, -,
?
)
}
))),
v_mapem
);
f_awaitSpateMessage(
mw_spatemInd(
mw_spatemPdu(
mw_defaultSpatem
)),
v_spatem
);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatem_intersections(
{mw_IntersectionState(
v_mapem.msgIn.map_.intersections[0].id, //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
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
// Local variables
var MapemInd v_mapem;
var SpatemInd v_spatem;
// 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));
// Wait for MAPEM sent
f_awaitMapeMessage(
mw_mapemInd(
mw_mapemPdu(
mw_mapem(
{
mw_intersectionGeometry(
-, -, -,
{ *, mw_roadLane(-, mw_laneAttributes_crosswak), * }
)
}
))),
v_mapem
);
log("######################## ", v_mapem);
// Wait for SPATEM sent
f_awaitSpateMessage(
mw_spatemInd(
mw_spatemPdu(
mw_defaultSpatem
)),
v_spatem
);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatem_intersections(
{mw_IntersectionState(
v_mapem.msgIn.map_.intersections[0].id, //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));
f_poDefault();
f_cfDown();
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;
}
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
// 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;
}
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
// 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;
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
// 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;
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_PEDESTRIAN_MANOEUVRES)) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION AND PICS_SPATEM_PEDESTRIAN_MANOEUVRES required for executing the TC ***");
// 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_13_MAPEM());
v_spatem.start(f_IS_TLM_GEN_MSGF_BV_13_SPATEM());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_13_MAPEM
function f_IS_TLM_GEN_MSGF_BV_13_MAPEM () runs on ItsMapemSpatem {
// Local variables
var MapemInd v_mapem;
// Preamble
f_awaitMapeMessage(
mw_mapemInd(
mw_mapemPdu(
mw_mapem(
{mw_intersectionGeometry(
-,
-,
{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);
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_13_SPATEM
function f_IS_TLM_GEN_MSGF_BV_13_SPATEM () runs on ItsMapemSpatem {
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
// Wait for SPATEM sent
tc_ac.start(2.0);
// 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_movementEvent( //MovementEventList,
-,
-,//timing
{mw_advisorySpeed( //speeds
greenwave,//type (greenwave (1))
? //speed
)}
)}
)}
)) {
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_EGRESS_QUEUE)) {
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_14_MAPEM());
v_spatem.start(f_IS_TLM_GEN_MSGF_BV_14_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_14_MAPEM
Bostjan Pintar
committed
*/
function f_IS_TLM_GEN_MSGF_BV_14_MAPEM () runs on ItsMapemSpatem {
// Local variables
var MapemInd v_mapem;
Bostjan Pintar
committed
// Preamble
f_prInitialState();
f_awaitMapeMessage(
mw_mapemInd(
mw_mapemPdu(
mw_mapem(
{mw_intersectionGeometry(
-,
-,
{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
Bostjan Pintar
committed
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_14_SPATEM
Bostjan Pintar
committed
*/
function f_IS_TLM_GEN_MSGF_BV_14_SPATEM () runs on ItsMapemSpatem {
Bostjan Pintar
committed
Bostjan Pintar
committed
// Preamble
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
Bostjan Pintar
committed
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
// Wait for SPATEM sent
tc_ac.start(2.0);
// Test Body
tc_ac.start;
Bostjan Pintar
committed
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatem_intersections(
?, //IntersectionReferenceID p_id
-, //MsgCount p_revision
-, //IntersectionStatusObject p_status
-,
{mw_connectionManeuverAssist_queueAndAvailableStorageLength}
)}
)
)
)) {
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);
}
}
Bostjan Pintar
committed
//f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
Bostjan Pintar
committed
} // End of group spateMessageFormat
Bostjan Pintar
committed
/**
* @desc TP Function for f_IS_TLM_GEN_EVGN_BV_01
*/
function f_IS_TLM_GEN_EVGN_BV_01() runs on ItsMapemSpatem {
// Local variables
Bostjan Pintar
committed
// Test control
if (not PICS_SPATEM_GENERATION) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
Bostjan Pintar
committed
// Test component configuration
f_cfUp();
Bostjan Pintar
committed
// Preamble
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatemWellFormatted
))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received well-formed SPATEM. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_defaultSpatem
))) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received a SPATEM with incorrect information. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
Bostjan Pintar
committed
// Postamble
//f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
f_poDefault();
f_cfDown();
Bostjan Pintar
committed
} // End of function f_IS_TLM_GEN_EVGN_BV_01
/**
* @desc TP Function for f_IS_TLM_GEN_EVGN_BV_02
*/
function f_IS_TLM_GEN_EVGN_BV_02() runs on ItsMapemSpatem {
// Local variables
var SpatemInd v_spatem;
// 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_utTriggerEvent(m_utTriggerEvent(spatProfile0));
f_awaitSpateMessage(
mw_spatemInd(
mw_spatemPdu(
mw_spatemWellFormatted
)
),
v_spatem
);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utTriggerEvent(m_utTriggerEvent(spatProfile0)); // FIXME Add parameters to update default profile or create a MamSpatUpdate message
tc_ac.start;
alt {
[] mapemSpatemPort.receive(v_spatem) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: The same SPATEM was received. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatemWellFormatted
))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received a new well-formed SPATE message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_defaultSpatem
))) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received a SPATEM with incorrect information. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] 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_EVGN_BV_02
/**
* @desc TP Function for f_IS_TLM_GEN_EVGN_BV_03
*/
function f_IS_TLM_GEN_EVGN_BV_03() runs on ItsMapemSpatem {
// Local variables
Bostjan Pintar
committed
// Test control
if (not PICS_SPATEM_GENERATION) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
setverdict(inconc);
stop;
}
Bostjan Pintar
committed
// Test component configuration
f_cfUp();
Bostjan Pintar
committed
// Preamble
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
//f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
mapemSpatemPort.clear;
tc_noac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_defaultSpatem
))) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: No more SPATEM messages were expected. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: TLM Service terminated. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poDefault();
f_cfDown();
Bostjan Pintar
committed
} // End of function f_IS_TLM_GEN_EVGN_BV_03
/**
* @desc TP Function for f_IS_TLM_GEN_EVGN_BV_04
*/
function f_IS_TLM_GEN_EVGN_BV_04() runs on ItsMapemSpatem {
// Local variables
var SpatemInd 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;
}
Bostjan Pintar
committed
// Test component configuration
f_cfUp();
// Preamble
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
f_awaitSpateMessage(
mw_spatemInd(
mw_spatemPdu(
mw_defaultSpatem
)
),
v_spatem
);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utTriggerEvent(m_utTriggerEvent(spatProfile0)); // FIXME Add parameters to update default profile or create a MamSpatUpdate message
tc_ac.start;
alt {
[] mapemSpatemPort.receive(v_spatem) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: A different SPATE message was expected. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatemWellFormatted
))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received a new well-formed SPATE message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_defaultSpatem
))) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Received a SPATEM with incorrect information. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] 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_EVGN_BV_04
group spateCommunication {
Bostjan Pintar
committed
/**
* @desc TP Function for f_IS_TLM_GEN_COM_BV_01
*/
function f_IS_TLM_GEN_COM_BV_01 () runs on ItsMapemSpatem {
// Local variables
if (not PICS_SPATEM_GENERATION) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
// Test component configuration
f_cfUp();
// Preamble
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatem_with_region_id
))) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Successfully received MAPEM using GBC. ***");
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_COM_BV_01
/**
* @desc TP Function for f_IS_TLM_GEN_COM_BV_02_01
*/
function f_IS_TLM_GEN_COM_BV_02_01 () runs on ItsMapemSpatem {
// Local variables
const UInt8 c_gnNhBtpB := 2;
if (not PICS_SPATEM_GENERATION) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
// Test component configuration
f_cfUp();
// Preamble
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemIndWithGnParameters(
mw_spatemPdu,
c_gnNhBtpB
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected SPATEM encapsultated in BTP-B packet received. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] mapemSpatemPort.receive(mw_spatemIndWithGnParameters(mw_spatemPdu(mw_defaultSpatem), omit)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: no GN NH information in SpatemInd ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
[] mapemSpatemPort.receive(mw_spatemInd(mw_spatemPdu(mw_defaultSpatem))) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected SPATEM received, but not encapsulated in BTP-B packet ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] 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_COM_BV_02_01
/**
* @desc TP Function for f_IS_TLM_GEN_COM_BV_02
*/
function f_IS_TLM_GEN_COM_BV_02 () runs on ItsMapemSpatem {
// Local variables
const UInt16 c_gnNhBtpBPort := 2004;
if (not PICS_SPATEM_GENERATION) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
// Test component configuration
f_cfUp();
// Preamble
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemIndWithBtpParameters(
mw_spatemPdu,
c_gnNhBtpBPort,
0
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected SPATEM encapsultated in BTP packet with port value 2004 received. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] mapemSpatemPort.receive(mw_spatemInd(mw_spatemPdu(mw_defaultSpatem))) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected SPATEM received, but not addressed to the correct destination port. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] 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_COM_BV_02
/**
* @desc TP Function for f_IS_TLM_GEN_COM_BV_03
*/
function f_IS_TLM_GEN_COM_BV_03 () runs on ItsMapemSpatem {
// Local variables
const UInt8 c_gnHtGbc := 4;
Bostjan Pintar
committed
if (not PICS_SPATEM_GENERATION) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION required for executing the TC ***");
// Test component configuration
f_cfUp();
// Preamble
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemIndWithGnParameters(
mw_spatemPdu(
mw_spatemWellFormatted
),
-,
c_gnHtGbc
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected SPATEM encapsulated in GBC packet received. ***");
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
[] mapemSpatemPort.receive(
mw_spatemIndWithGnParameters(
mw_spatemPdu(
mw_spatemWellFormatted
),
-,
omit
)) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Eno GN HT information in SpatemInd. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatemWellFormatted
))) {
tc_ac.stop;
log("*** " & testcasename() & ": FAIL: Expected SPATEM received, but not encapsulated in GBC packet. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] 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_COM_BV_03
} // End of group spateCommunication
} // End of group spateMessageDissemination
Bostjan Pintar
committed
group spateSecurityParameters {
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
/**
* @desc TP Function for TC_IS_TLM_GEN_SEC_BV_01
*/
function f_IS_TLM_GEN_SEC_BV_01 () runs on ItsMapemSpatem {
// Local variables
var SpatemInd v_spatem;
// Test control
if (not PICS_SPATEM_GENERATION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_awaitSpateMessage(
mw_spatemInd(
mw_spatemPdu(
mw_defaultSpatem
)
),
v_spatem
);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemIndWithSecurityParameters(
mw_spatemPdu,
-,
c_its_aid_SPAT
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected secured SPATEM received. ***");
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_poDefault();
f_cfDown();
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
} // End of function f_IS_TLM_GEN_SEC_BV_01
/**
* @desc TP Function for TC_IS_TLM_GEN_SEC_BV_02
*/
function f_IS_TLM_GEN_SEC_BV_02 () runs on ItsMapemSpatem {
// Local variables
var SpatemInd v_spatem;
// Test control
if (not PICS_SPATEM_GENERATION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_awaitSpateMessage(
mw_spatemInd(
mw_spatemPdu(
mw_defaultSpatem
)
),
v_spatem
);
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemIndWithSecurityParameters(
mw_spatemPdu,
-,
c_its_aid_SPAT
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected secured SPATEM received. ***");
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_poDefault();
f_cfDown();
} // End of function f_IS_TLM_GEN_SEC_BV_02
/**
* @desc TP Function for TC_IS_TLM_GEN_SSP_BV_01
*/
function f_IS_TLM_GEN_SSP_BV_01 () runs on ItsMapemSpatem {
// Local variables
var SpatemInd v_spatem;
// Test control
if (not PICS_SPATEM_GENERATION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
Bostjan Pintar
committed
// Preamble
f_prInitialState("CERT_SPAT_SSP_NONE");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemIndWithSecurityParameters(
mw_spatemPdu,
oct2bit('010000'O),
c_its_aid_SPAT
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected secured SPATEM received. ***");
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_poDefault();
f_cfDown();
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
} // End of function f_IS_TLM_GEN_SSP_BV_01
/**
* @desc TP Function for TC_IS_TLM_GEN_SSP_BV_02
*/
function f_IS_TLM_GEN_SSP_BV_02 () runs on ItsMapemSpatem {
// Local variables
var SpatemInd v_spatem;
// Test control
if (not PICS_SPATEM_GENERATION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState("CERT_SPAT_SSP_ALL");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemIndWithSecurityParameters(
mw_spatemPdu,
oct2bit('018000'O),
c_its_aid_SPAT
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected secured SPATEM received. ***");
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_poDefault();
f_cfDown();
} // End of function f_IS_TLM_GEN_SSP_BV_02
/**
* @desc TP Function for TC_IS_TLM_GEN_SSP_BO_03
*/
function f_IS_TLM_GEN_SSP_BO_03 () runs on ItsMapemSpatem {
// Local variables
var SpatemInd v_spatem;
// Test control
if (not PICS_SPATEM_GENERATION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
Bostjan Pintar
committed
// Preamble
f_prInitialState("CERT_SPAT_SSP_NONE");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemIndWithSecurityParameters(
mw_spatemPdu,
oct2bit('010000'O),
c_its_aid_SPAT
)) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: Unexpected secured SPATEM received. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: No SPAT message received. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poDefault();
f_cfDown();
} // End of function f_IS_TLM_GEN_SSP_BO_03
/**
* @desc TP Function for TC_IS_TLM_GEN_SSP_BV_04
*/
function f_IS_TLM_GEN_SSP_BV_04 () runs on ItsMapemSpatem {
// Local variables
var SpatemInd v_spatem;
// Test control
if (not PICS_SPATEM_GENERATION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState("CERT_SPAT_SSP_ALL");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemIndWithSecurityParameters(
mw_spatemPdu,
oct2bit('014000'O),
c_its_aid_SPAT
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected secured SPATEM received. ***");
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_poDefault();
f_cfDown();
} // End of function f_IS_TLM_GEN_SSP_BV_04
/**
* @desc TP Function for TC_IS_TLM_GEN_SSP_BO_05
*/
function f_IS_TLM_GEN_SSP_BO_05 () runs on ItsMapemSpatem {
// Local variables
var SpatemInd v_spatem;
// Test control
if (not PICS_SPATEM_GENERATION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
Bostjan Pintar
committed
// Preamble
f_prInitialState("CERT_SPAT_SSP_NONE");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemIndWithSecurityParameters(
mw_spatemPdu,
oct2bit('010000'O),
c_its_aid_SPAT
)) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: Unexpected secured SPATEM received. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: No SPAT message received. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
// Postamble
f_poDefault();
f_cfDown();
} // End of function f_IS_TLM_GEN_SSP_BO_05
/**
* @desc TP Function for TC_IS_TLM_GEN_SSP_BV_06
*/
function f_IS_TLM_GEN_SSP_BV_06 () runs on ItsMapemSpatem {
// Local variables
var SpatemInd v_spatem;
// Test control
if (not PICS_SPATEM_GENERATION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState("CERT_SPAT_SSP_ALL");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemIndWithSecurityParameters(
mw_spatemPdu,
oct2bit('012000'O),
c_its_aid_SPAT
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected secured SPATEM received. ***");
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_poDefault();
f_cfDown();
} // End of function f_IS_TLM_GEN_SSP_BV_06
/**
* @desc TP Function for TC_IS_TLM_GEN_SSP_BV_07
*/
function f_IS_TLM_GEN_SSP_BV_07 () runs on ItsMapemSpatem {
// Local variables
var SpatemInd v_spatem;
// Test control
if (not PICS_SPATEM_GENERATION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
Bostjan Pintar
committed
// Preamble
f_prInitialState("CERT_SPAT_SSP_ALL");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
Bostjan Pintar
committed
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemIndWithSecurityParameters(
mw_spatemPdu,
oct2bit('012000'O),
c_its_aid_SPAT
)) {
tc_ac.stop;
log("*** " & testcasename() & ": PASS: Expected secured SPATEM received. ***");
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_poDefault();
f_cfDown();
Bostjan Pintar
committed
} // End of function f_IS_TLM_GEN_SSP_BV_07
/**
* @desc TP Function for TC_IS_TLM_GEN_SSP_BO_08
*/
function f_IS_TLM_GEN_SSP_BO_08 () runs on ItsMapemSpatem {
// Local variables
var SpatemInd v_spatem;
// Test control
if (not PICS_SPATEM_GENERATION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
Bostjan Pintar
committed
// Preamble
f_prInitialState("CERT_SPAT_SSP_NONE");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
Bostjan Pintar
committed
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemIndWithSecurityParameters(
mw_spatemPdu,
oct2bit('010000'O),
c_its_aid_SPAT
)) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: Unexpected secured SPATEM received. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: No SPAT message received. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poDefault();
f_cfDown();
Bostjan Pintar
committed
} // End of function f_IS_TLM_GEN_SSP_BO_08
/**
* @desc TP Function for TC_IS_TLM_GEN_SSP_BO_09
*/
function f_IS_TLM_GEN_SSP_BO_09 () runs on ItsMapemSpatem {
// Local variables
var SpatemInd v_spatem;
// Test control
if (not PICS_SPATEM_GENERATION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
Bostjan Pintar
committed
// Preamble
f_prInitialState("CERT_SPAT_SSP_NONE");
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
Bostjan Pintar
committed
f_utTriggerEvent(m_utTriggerEvent(spatProfile0));
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemIndWithSecurityParameters(
mw_spatemPdu,
oct2bit('010000'O),
c_its_aid_SPAT
)) {
tc_noac.stop;
log("*** " & testcasename() & ": FAIL: Unexpected secured SPATEM received. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
[] tc_noac.timeout {
log("*** " & testcasename() & ": PASS: No SPAT message received. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
}
// Postamble
f_poDefault();
f_cfDown();
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
} // End of function f_IS_TLM_GEN_SSP_BO_09
/**
* @desc TP Function for TC_IS_TLM_GEN_RATE_BV_01
*/
function f_IS_TLM_GEN_RATE_BV_01() runs on ItsMapemSpatem {
// Local variables
var SpatemInd v_spatem;
timer t_minTransInterval := PICS_T_GEN_SPATEM_MIN * 0.90;
timer t_maxTransInterval := PICS_T_GEN_SPATEM_MAX * 1.10;
// Test control
if (not PICS_SPATEM_GENERATION or not PICS_SPATEM_TRANSMISSION_RATE) {
log("*** " & testcasename() & ": PICS_SPATEM_GENERATION and PICS_SPATEM_TRANSMISSION_RATE required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_awaitSpateMessage(
mw_spatemInd(
mw_spatemPdu(
mw_defaultSpatem
)
),
v_spatem
);
t_minTransInterval.start;
t_maxTransInterval.start;
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu
)) {
tc_ac.stop;
if (t_minTransInterval.running) {
log("*** " & testcasename() & ": PASS: Successfully received SPATEM PDU header. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} else {
log("*** " & testcasename() & ": FAIL: SPAT message was received before t_minTransInterval expiry. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
}
[] t_minTransInterval.timeout {
repeat;
}
[] t_maxTransInterval.timeout {
log("*** " & testcasename() & ": FAIL: SPAT message was not received within the t_minTransInterval/t_maxTransInterval expiration ***");
f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_error);
}
[] tc_ac.timeout {
log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
}
}
// Postamble
f_poDefault();
f_cfDown();
Bostjan Pintar
committed
} // End of function f_IS_TLM_GEN_RATE_BV_01
}// end group spateSecurityParameters
group spateMessageProcessing {
Bostjan Pintar
committed
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
/**
* @desc TP Function for f_IS_TLM_RCV_MSGF_BV_01
*/
function f_IS_TLM_RCV_MSGF_BV_01 () runs on ItsMapemSpatem {
// Local variables
var SpatemReq v_spatemReq;
var integer i;
if (not PICS_SPATEM_RECEPTION) {
log("*** " & testcasename() & ": PICS_SPATEM_RECEPTION required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_spatemReq := valueof(m_spatemReq(m_spatemPdu(m_defaultSpatem)));
mapemSpatemPort.send(v_spatemReq) ;
f_sleep(PX_TAC);
for (i := 0; i < lengthof(vc_utSpatemEvents) and not match (valueof(v_spatemReq.msgOut) , vc_utSpatemEvents[i].spateMsg); i := i + 1) {
// empty on purpose
}
if (i < lengthof(vc_utSpatemEvents) ) {
log("*** " & testcasename() & ": PASS: SPATEM was transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} else {
log("*** " & testcasename() & ": FAIL: SPATEM was not transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
Bostjan Pintar
committed
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
// Postamble
f_poDefault();
f_cfDown();
} // End of function f_IS_TLM_RCV_MSGF_BV_01
/**
* @desc TP Function for TC_IS_TLM_RCV_SEC_BV_01
*/
function f_IS_TLM_RCV_SEC_BV_01 () runs on ItsMapemSpatem {
// Local variables
var SpatemReq v_spatemReq;
var integer i;
if (not PICS_SPATEM_RECEPTION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_RECEPTION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_spatemReq := valueof(m_spatemReq(m_spatemPdu(m_defaultSpatem)));
mapemSpatemPort.send(v_spatemReq) ;
f_sleep(PX_TAC);
for (i := 0; i < lengthof(vc_utSpatemEvents) and not match (v_spatemReq.msgOut , vc_utSpatemEvents[i].spateMsg); i := i + 1) {
// empty on purpose
}
if (i < lengthof(vc_utSpatemEvents) ) {
log("*** " & testcasename() & ": PASS: SPATEM was transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} else {
log("*** " & testcasename() & ": FAIL: SPATEM was not transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
Bostjan Pintar
committed
// Postamble
f_poDefault();
f_cfDown();
Bostjan Pintar
committed
} // End of function f_IS_TLM_RCV_SEC_BV_01
/**
* @desc TP Function for TC_IS_TLM_RCV_SEC_BO_01
*/
function f_IS_TLM_RCV_SEC_BO_01 () runs on ItsMapemSpatem {
// Local variables
var SpatemReq v_spatemReq;
if (not PICS_SPATEM_RECEPTION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_RECEPTION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
Bostjan Pintar
committed
// Test component configuration
f_cfUp("TLM_RCV_SEC_BO_01");
Bostjan Pintar
committed
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
Bostjan Pintar
committed
// Test Body
v_spatemReq := valueof(m_spatemReq(m_spatemPdu(m_defaultSpatem)));
mapemSpatemPort.send(v_spatemReq) ;
Bostjan Pintar
committed
f_sleep(PX_TAC);
if (0 == lengthof(vc_utSpatemEvents) ) {
log("*** " & testcasename() & ": PASS: SPATEM was not transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} else {
log("*** " & testcasename() & ": FAIL: SPATEM was transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
Bostjan Pintar
committed
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
// Postamble
f_poDefault();
f_cfDown();
} // End of function f_IS_TLM_RCV_SEC_BO_01
/**
* @desc TP Function for TC_IS_TLM_RCV_SSP_BV_01
*/
function f_IS_TLM_RCV_SSP_BV_01 () runs on ItsMapemSpatem {
// Local variables
var SpatemReq v_spatemReq;
var integer i;
if (not PICS_SPATEM_RECEPTION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_RECEPTION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_spatemReq := valueof(m_spatemReq(
m_spatemPdu(
m_spatem(
{m_intersection}
)
)
));
mapemSpatemPort.send(v_spatemReq) ;
f_sleep(PX_TAC);
for (i := 0; i < lengthof(vc_utSpatemEvents) and not match (v_spatemReq.msgOut , vc_utSpatemEvents[i].spateMsg); i := i + 1) {
// empty on purpose
}
if (i < lengthof(vc_utSpatemEvents) ) {
log("*** " & testcasename() & ": PASS: SPATEM was transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} else {
log("*** " & testcasename() & ": FAIL: SPATEM was not transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
Bostjan Pintar
committed
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
// Postamble
f_poDefault();
f_cfDown();
} // End of function f_IS_TLM_RCV_SSP_BV_01
/**
* @desc TP Function for TC_IS_TLM_RCV_SSP_BO_02
*/
function f_IS_TLM_RCV_SSP_BO_02 () runs on ItsMapemSpatem {
// Local variables
var SpatemReq v_spatemReq;
var integer i;
if (not PICS_SPATEM_RECEPTION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_RECEPTION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_spatemReq := valueof(m_spatemReq(
m_spatemPdu(
m_spatem(
{m_intersection}
)
)
));
mapemSpatemPort.send(v_spatemReq) ;
f_sleep(PX_TAC);
for (i := 0; i < lengthof(vc_utSpatemEvents) and not match (v_spatemReq.msgOut , vc_utSpatemEvents[i].spateMsg); i := i + 1) {
// empty on purpose
}
if(lengthof(vc_utSpatemEvents)==0) {
log("*** " & testcasename() & ": PASS: SPATEM was NOT transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: SPATEM was transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
Bostjan Pintar
committed
// Postamble
f_poDefault();
f_cfDown();
Bostjan Pintar
committed
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
} // End of function f_IS_TLM_RCV_SSP_BO_02
/**
* @desc TP Function for TC_IS_TLM_RCV_SSP_BV_03
*/
function f_IS_TLM_RCV_SSP_BV_03 () runs on ItsMapemSpatem {
// Local variables
var SpatemReq v_spatemReq;
var integer i;
if (not PICS_SPATEM_RECEPTION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_RECEPTION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_spatemReq := valueof(m_spatemReq(
m_spatemPdu(
m_spatem(
{m_intersection_regional}
)
)
));
mapemSpatemPort.send(v_spatemReq) ;
f_sleep(PX_TAC);
for (i := 0; i < lengthof(vc_utSpatemEvents) and not match (v_spatemReq.msgOut , vc_utSpatemEvents[i].spateMsg); i := i + 1) {
// empty on purpose
}
if (i < lengthof(vc_utSpatemEvents) ) {
log("*** " & testcasename() & ": PASS: SPATEM was transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} else {
log("*** " & testcasename() & ": FAIL: SPATEM was not transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
Bostjan Pintar
committed
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
// Postamble
f_poDefault();
f_cfDown();
} // End of function f_IS_TLM_RCV_SSP_BV_03
/**
* @desc TP Function for TC_IS_TLM_RCV_SSP_BO_04
*/
function f_IS_TLM_RCV_SSP_BO_04 () runs on ItsMapemSpatem {
// Local variables
var SpatemReq v_spatemReq;
var integer i;
if (not PICS_SPATEM_RECEPTION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_RECEPTION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_spatemReq := valueof(m_spatemReq(
m_spatemPdu(
m_spatem(
{m_intersection_regional}
)
)
));
mapemSpatemPort.send(v_spatemReq) ;
f_sleep(PX_TAC);
for (i := 0; i < lengthof(vc_utSpatemEvents) and not match (v_spatemReq.msgOut , vc_utSpatemEvents[i].spateMsg); i := i + 1) {
// empty on purpose
}
if(lengthof(vc_utSpatemEvents)==0) {
log("*** " & testcasename() & ": PASS: SPATEM was NOT transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: SPATEM was transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
Bostjan Pintar
committed
// Postamble
f_poDefault();
f_cfDown();
Bostjan Pintar
committed
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
} // End of function f_IS_TLM_RCV_SSP_BO_04
/**
* @desc TP Function for TC_IS_TLM_RCV_SSP_BV_05
*/
function f_IS_TLM_RCV_SSP_BV_05 () runs on ItsMapemSpatem {
// Local variables
var SpatemReq v_spatemReq;
var integer i;
if (not PICS_SPATEM_RECEPTION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_RECEPTION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_spatemReq := valueof(m_spatemReq(
m_spatemPdu(
m_spatem(
{m_intersection_maneuverAssistList(
{ m_connectionManeuverAssist(2) }
)}
)
)
));
mapemSpatemPort.send(v_spatemReq) ;
f_sleep(PX_TAC);
for (i := 0; i < lengthof(vc_utSpatemEvents) and not match (v_spatemReq.msgOut , vc_utSpatemEvents[i].spateMsg); i := i + 1) {
// empty on purpose
}
if (i < lengthof(vc_utSpatemEvents) ) {
log("*** " & testcasename() & ": PASS: SPATEM was transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} else {
log("*** " & testcasename() & ": FAIL: SPATEM was not transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
Bostjan Pintar
committed
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
// Postamble
f_poDefault();
f_cfDown();
} // End of function f_IS_TLM_RCV_SSP_BV_05
/**
* @desc TP Function for TC_IS_TLM_RCV_SSP_BO_06
*/
function f_IS_TLM_RCV_SSP_BO_06 () runs on ItsMapemSpatem {
// Local variables
var SpatemReq v_spatemReq;
var integer i;
if (not PICS_SPATEM_RECEPTION or not PICS_IS_IUT_SECURED) {
log("*** " & testcasename() & ": PICS_SPATEM_RECEPTION and PICS_IS_IUT_SECURED required for executing the TC ***");
setverdict(inconc);
stop;
}
// Test component configuration
f_cfUp();
// Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
v_spatemReq := valueof(m_spatemReq(
m_spatemPdu(
m_spatem(
{m_intersection_maneuverAssistList(
{ m_connectionManeuverAssist(2) }
)}
)
)
));
mapemSpatemPort.send(v_spatemReq) ;
f_sleep(PX_TAC);
for (i := 0; i < lengthof(vc_utSpatemEvents) and not match (v_spatemReq.msgOut , vc_utSpatemEvents[i].spateMsg); i := i + 1) {
// empty on purpose
}
if(lengthof(vc_utSpatemEvents)==0) {
log("*** " & testcasename() & ": PASS: SPATEM was NOT transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
}
else {
log("*** " & testcasename() & ": FAIL: SPATEM was transmitted to upper layer***");
f_selfOrClientSyncAndVerdict(c_tbDone, e_error);
}
Bostjan Pintar
committed
// Postamble
f_poDefault();
f_cfDown();
} // End of function f_IS_TLM_RCV_SSP_BO_06
} // End of group spateMessageProcessing
} // End of module ItsSpatem_TpFunctions