Commit 6348fc18 authored by Yann Garcia's avatar Yann Garcia
Browse files

Resolve merge conflict in ItsSpatem_TpFunctions

parents c08f1aaa d27f7fe9
......@@ -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();
......
......@@ -382,113 +382,119 @@ module ItsSpatem_TpFunctions {
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_08
*/
function f_IS_TLM_GEN_MSGF_BV_08 () runs on ItsMapemSpatem {
// TODO
} // End of function f_IS_TLM_GEN_MSGF_BV_08
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_09
*/
function f_IS_TLM_GEN_MSGF_BV_09 () runs on ItsMapemSpatem {
// TODO
} // End of function f_IS_TLM_GEN_MSGF_BV_09
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_10
*/
function f_IS_TLM_GEN_MSGF_BV_10 () runs on ItsMapemSpatem {
function f_IS_TLM_GEN_MSGF_BV_08 () runs on ItsMtc {
// Local variables
var ItsMapemSpatem v_mapem;
var ItsMapemSpatem v_spatem;
// TODO
// 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();
} // End of function f_IS_TLM_GEN_MSGF_BV_10
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_11
*/
function f_IS_TLM_GEN_MSGF_BV_11 () runs on ItsMapemSpatem {
// Preamble
// TODO
// 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());
} // End of function f_IS_TLM_GEN_MSGF_BV_11
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_12
*/
function f_IS_TLM_GEN_MSGF_BV_12 () runs on ItsMapemSpatem {
// Synchronization
f_serverSync2ClientsAndStop({c_prDone, c_tbDone});
// TODO
// Cleanup
f_cf02Down();
} // End of function f_IS_TLM_GEN_MSGF_BV_12
} // End of function f_IS_TLM_GEN_MSGF_BV_08
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_13
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_08_MAPEM
*/
function f_IS_TLM_GEN_MSGF_BV_13 () runs on ItsMapemSpatem {
// TODO
function f_IS_TLM_GEN_MSGF_BV_08_MAPEM () runs on ItsMapemSpatem {
// Local variables
var MapemInd v_mapem;
var IntersectionReferenceID v_id;
} // End of function f_IS_TLM_GEN_MSGF_BV_13
/**
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_14
*/
function f_IS_TLM_GEN_MSGF_BV_14 () runs on ItsMapemSpatem {
// 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);
// TODO
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
} // End of function f_IS_TLM_GEN_MSGF_BV_14
} // End of group spateMessageFormat
group spateEventGeneration {
} // End of function f_IS_TLM_GEN_MSGF_BV_08_MAPEM
/**
* @desc TP Function for f_IS_TLM_GEN_EVGN_BV_01
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_08_SPATEM
*/
function f_IS_TLM_GEN_EVGN_BV_01() runs on ItsMapemSpatem {
function f_IS_TLM_GEN_MSGF_BV_08_SPATEM () 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);
f_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(startTLMService));
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Wait for SPATEM sent
tc_ac.start(2.0);
// Test Body
tc_ac.start;
alt {
[] mapemSpatemPort.receive(
mw_spatemInd(
mw_spatemPdu(
mw_spatemWellFormatted
))) {
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 well-formed SPATEM. ***");
log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
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);
......@@ -498,68 +504,127 @@ module ItsSpatem_TpFunctions {
// Postamble
f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
f_poDefault();
f_cfDown();
} // End of function f_IS_TLM_GEN_EVGN_BV_01
} // End of function f_IS_TLM_GEN_MSGF_BV_08_SPATEM
/**
* @desc TP Function for f_IS_TLM_GEN_EVGN_BV_02
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_09
*/
function f_IS_TLM_GEN_EVGN_BV_02() runs on ItsMapemSpatem {
function f_IS_TLM_GEN_MSGF_BV_09 () runs on ItsMtc {
// Local variables
var SpatemInd v_spatem;
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 ***");
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_cfUp();
// 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_utTriggerEvent(m_utTriggerEvent(startTLMService));
f_awaitSpateMessage(
mw_spatemInd(
mw_spatemPdu(
mw_spatemWellFormatted
)
),
v_spatem
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
f_utTriggerEvent(m_utTriggerEvent(spatemNewContent));
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
))) {
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 a new well-formed SPATE message. ***");
log("*** " & testcasename() & ": PASS: Successfully received SAPTEM PDU header. ***");
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);
......@@ -569,116 +634,243 @@ module ItsSpatem_TpFunctions {
// Postamble
f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
f_poDefault();
f_cfDown();
} // End of function f_IS_TLM_GEN_EVGN_BV_02
} // End of function f_IS_TLM_GEN_MSGF_BV_09_SPATEM
/**
* @desc TP Function for f_IS_TLM_GEN_EVGN_BV_03
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_10
*/
function f_IS_TLM_GEN_EVGN_BV_03() runs on ItsMapemSpatem {
function f_IS_TLM_GEN_MSGF_BV_10 () 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 ***");
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_cfUp();
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_prInitialState();
f_utTriggerEvent(m_utTriggerEvent(startTLMService));
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(startTLMService));
// Wait for SPATEM sent
tc_ac.start(2.0);
// Test Body
f_utTriggerEvent(m_utTriggerEvent(stopTLMService));
mapemSpatemPort.clear;
tc_noac.start;
tc_ac.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. ***");
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();
f_cfDown();
} // End of function f_IS_TLM_GEN_EVGN_BV_03
} // End of function f_IS_TLM_GEN_MSGF_BV_10_SPATEM
/**
* @desc TP Function for f_IS_TLM_GEN_EVGN_BV_04
* @desc TP Function for TC_IS_TLM_GEN_MSGF_BV_11
*/
function f_IS_TLM_GEN_EVGN_BV_04() runs on ItsMapemSpatem {
function f_IS_TLM_GEN_MSGF_BV_11 () runs on ItsMtc {
// Local variables
var SpatemInd v_spatem;
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 ***");
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_cfUp();
// 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