Commit 403ba0c8 authored by Bostjan Pintar's avatar Bostjan Pintar
Browse files

New Spatem tests

parent db871991
......@@ -395,7 +395,7 @@ module ItsSpatem_TestCases {
* @see ETSI TS 103 191-2 v1.2.5 TP_IS_TLM_GEN_MSGF_BV_08
* @reference CEN ISO/TS 19091 [4], clause 6.7.11
*/
testcase TC_IS_TLM_GEN_MSGF_BV_08 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
testcase TC_IS_TLM_GEN_MSGF_BV_08 () runs on ItsMtc {
f_IS_TLM_GEN_MSGF_BV_08();
......@@ -459,7 +459,7 @@ module ItsSpatem_TestCases {
* @see ETSI TS 103 191-2 v1.2.5 TP_IS_TLM_GEN_MSGF_BV_09
* @reference CEN ISO/TS 19091 [4], clauses 6.7.13, 6.7.14
*/
testcase TC_IS_TLM_GEN_MSGF_BV_09 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
testcase TC_IS_TLM_GEN_MSGF_BV_09 () runs on ItsMtc {
f_IS_TLM_GEN_MSGF_BV_09();
......@@ -506,7 +506,7 @@ module ItsSpatem_TestCases {
* @see ETSI TS 103 191-2 v1.2.5 TP_IS_TLM_GEN_MSGF_BV_10
* @reference CEN ISO/TS 19091 [4], clauses G.5.1.4 and G.8.2.5.2
*/
testcase TC_IS_TLM_GEN_MSGF_BV_10 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
testcase TC_IS_TLM_GEN_MSGF_BV_10 () runs on ItsMtc {
f_IS_TLM_GEN_MSGF_BV_10();
......@@ -561,7 +561,7 @@ module ItsSpatem_TestCases {
* @see ETSI TS 103 191-2 v1.2.5 TP_IS_TLM_GEN_MSGF_BV_12
* @reference CEN ISO/TS 19091 [4], clauses 6.7.16
*/
testcase TC_IS_TLM_GEN_MSGF_BV_11 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
testcase TC_IS_TLM_GEN_MSGF_BV_11 () runs on ItsMtc {
f_IS_TLM_GEN_MSGF_BV_11();
......@@ -621,7 +621,7 @@ module ItsSpatem_TestCases {
* @see ETSI TS 103 191-2 v1.2.5 TP_IS_TLM_GEN_MSGF_BV_12
* @reference CEN ISO/TS 19091 [4], clauses 6.7.18
*/
testcase TC_IS_TLM_GEN_MSGF_BV_12 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
testcase TC_IS_TLM_GEN_MSGF_BV_12 () runs on ItsMtc {
f_IS_TLM_GEN_MSGF_BV_12();
......@@ -682,7 +682,7 @@ module ItsSpatem_TestCases {
* @see ETSI TS 103 191-2 v1.2.5 TP_IS_TLM_GEN_MSGF_BV_13
* @reference CEN ISO/TS 19091 [4], clauses 6.7.19
*/
testcase TC_IS_TLM_GEN_MSGF_BV_13 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
testcase TC_IS_TLM_GEN_MSGF_BV_13 () runs on ItsMtc {
f_IS_TLM_GEN_MSGF_BV_13();
......@@ -734,7 +734,7 @@ module ItsSpatem_TestCases {
* @see ETSI TS 103 191-2 v1.2.5 TP_IS_TLM_GEN_MSGF_BV_13
* @reference CEN ISO/TS 19091 [4], clauses 6.7.20, 6.7.21
*/
testcase TC_IS_TLM_GEN_MSGF_BV_14 () runs on ItsMapemSpatem system ItsMapemSpatemSystem {
testcase TC_IS_TLM_GEN_MSGF_BV_14 () runs on ItsMtc {
f_IS_TLM_GEN_MSGF_BV_14();
......
......@@ -293,6 +293,7 @@ module ItsSpatem_TpFunctions {
function f_IS_TLM_GEN_MSGF_BV_05_MAPEM () runs on ItsMapemSpatem {
// Local variables
var MapemInd v_mapem;
var IntersectionReferenceID v_id;
// Preamble
f_prInitialState();
......@@ -316,6 +317,9 @@ module ItsSpatem_TpFunctions {
)),
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);
......@@ -344,10 +348,891 @@ module ItsSpatem_TpFunctions {
mw_spatemPdu(
mw_spatem_intersections(
{mw_IntersectionState(
-, //IntersectionReferenceID p_id
-, //IntersectionReferenceID p_id
-, //MsgCount p_revision
-, //IntersectionStatusObject p_status
{mw_movementState(?)} //MovementList p_states with signalGroup
)}
)
)
)) {
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();
} // End of function f_IS_TLM_GEN_MSGF_BV_05_SPATEM
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_06
*/
function f_IS_TLM_GEN_MSGF_BV_06 () runs on ItsMtc {
// Local variables
var ItsMapemSpatem v_mapem;
var ItsMapemSpatem 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_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_06_MAPEM());
v_spatem.start(f_IS_TLM_GEN_MSGF_BV_06_SPATEM());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // End of function f_IS_TLM_GEN_MSGF_BV_06
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_06_SPATEM
*/
function f_IS_TLM_GEN_MSGF_BV_06_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(
-,
-,
-,
{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_06_MAPEM
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_06
*/
function f_IS_TLM_GEN_MSGF_BV_06_SPATEM () runs on ItsMapemSpatem {
// Local variables
// Preamble
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(startTLMService));
// 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_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();
} // End of function f_IS_TLM_GEN_MSGF_BV_06_SPATEM
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_07
*/
function f_IS_TLM_GEN_MSGF_BV_07 () runs on ItsMtc {
// 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;
}
// 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_07_MAPEM());
v_spatem.start(f_IS_TLM_GEN_MSGF_BV_07_SPATEM());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // End of function f_IS_TLM_GEN_MSGF_BV_07
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_07_MAPEM
*/
function f_IS_TLM_GEN_MSGF_BV_07_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_07_MAPEM
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_07_SPATEM
*/
function f_IS_TLM_GEN_MSGF_BV_07_SPATEM () runs on ItsMapemSpatem {
// Local variables
// Preamble
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(startTLMService));
// 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_movementState( //MovementList p_states
?,//SignalGroupID,
{mw_movementEvent( //MovementEventList,
-,
* //timing
)}
)}
)}
)
)
)) {
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();
} // End of function f_IS_TLM_GEN_MSGF_BV_07_SPATEM
/**
* @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;
// 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();
// Preamble
// 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());
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// Cleanup
f_cf02Down();
} // End of function f_IS_TLM_GEN_MSGF_BV_08
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_08_MAPEM
*/
function f_IS_TLM_GEN_MSGF_BV_08_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_08_MAPEM
/**
* @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_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(startTLMService));
// 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_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();
} // End of function f_IS_TLM_GEN_MSGF_BV_08_SPATEM
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_09
*/
function f_IS_TLM_GEN_MSGF_BV_09 () runs on ItsMtc {
// 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;
}
// 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_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_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_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(startTLMService));
// 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_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();