/** * @author ETSI / STF449 * @version $URL$ * $Id$ * @desc DENM Testcases (TS 102 869-2 V<2.1.1> (<2012-09>)) * */ module ItsDenm_TestCases { // LibCommon import from LibCommon_Sync all; import from LibCommon_Time all; import from LibCommon_VerdictControl all; // LibIts import from LibItsCommon_Functions all; import from LibItsCommon_TypesAndValues all; import from LibItsDenm_TestSystem all; import from LibItsDenm_Functions all; import from LibItsDenm_Templates all; import from LibItsDenm_TypesAndValues all; import from DENM_PDU_Descriptions language "ASN.1:1997" all; import from ITS_Container language "ASN.1:1997" all; // 5.2.1 group denMessageTransmission { // 5.2.1.1 group denMessageFormat { /** * @desc Check that protocolVersion is set to 1 and messageID is set to 1 *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT receives an AppDENM_Trigger request from the application layer
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing ITS PDU header,
           *                  containing protocolVersion
           *                      indicating value 1
           *                  and containing messageID
           *                      indicating value 1
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSGF/BV-01, ETSI EN 302 637-3, Annex B.1 */ testcase TC_DEN_MSGF_BV_01() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm, mw_anyStationId, c_protocolVersionDenm, c_messageId ) ) ) { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect header information. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_MSGF_BV_01 /** * @desc Check that sent DENM contains at least one 'trace' DE *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT receives an AppDENM_Trigger request from the application layer
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing location container
           *                  containing at least one 'trace'
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSGF/BV-02, ETSI EN 302 637-3, clause 6.1.3.2 */ testcase TC_DEN_MSGF_BV_02() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_anyDenmMgmtCon, -, mw_denmLocationWithTrace({ ?, * }) ) ) ) ) { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect location container information. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_MSGF_BV_02 } // end denMessageFormat // 5.2.1.2 group denEventGeneration { /** * @desc Check that DEN Basic Service generates a new DENM on reception of a valid AppDENM_Trigger request *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT receives an AppDENM_Trigger request from the application layer
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-01, ETSI EN 302 637-3, clause 6.1.2.1 */ testcase TC_DEN_EVGN_BV_01() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_anyDenmPdu( mw_itsPduHeader, mw_denm (mw_anyDenmMgmtCon) ) ) ) { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect header and management information. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_EVGN_BV_01 /** * @desc Check that a new ActionID value is assigned for each generated DENM *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated several events
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT is requested to generate a new event
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing management container
           *                  containing actionID
           *                      indicating an unused value
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-02, ETSI EN 302 637-3, clause 6.1.1 */ testcase TC_DEN_EVGN_BV_02() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainerList v_situations := { m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), m_situation(c_causeAccident, c_subCauseCode_Unavailable), m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) }; var boolean v_success := true; var ActionIDList v_actionIds; var DenmInd v_denmInd; var integer i; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) { f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta)); f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID; } f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta)); f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); v_actionIds[lengthof(v_actionIds) - 1] := v_denmInd.msgIn.denm.management.actionID; //check the action id for (i := 0; i < lengthof(v_actionIds) - 1; i:=i + 1) { if (v_actionIds[lengthof(v_actionIds) - 1].sequenceNumber == v_actionIds[i].sequenceNumber) { v_success := false; } } if (v_success==true) { log("*** " & testcasename() & ": PASS: actionID field indicating unused value. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } else { log("*** " & testcasename() & ": FAIL: actionID field indicating used value. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } // Postamble for (i := 0; i < lengthof(v_actionIds); i:=i + 1) { f_poCancelEvent(e_iut, v_actionIds[i]); } f_cfDown(); } // end TC_DEN_EVGN_BV_02 /** * @desc Check that newly created ActionID contains the originator ITS-S ID *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT is requested to generate a new event
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing management container
           *                  containing actionID
           *                      containing originatorStationID
           *                          indicating its own StationID
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-03, ETSI EN 302 637-3, clause 6.1.1 */ testcase TC_DEN_EVGN_BV_03() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; var DenmInd v_denmInd; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtConWithActionID( mw_actionId(f_getIutStationId()) ) ) ) ) ) { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_EVGN_BV_03 /** * @desc Check that Cause and subcause values included in DENM as provided by application *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT receives an AppDENM_trigger request from the application layer
           *              containing situation container
           *                  containing eventType
           *                      containing causeCode
           *                          indicating Value1
           *                      containing subCauseCode
           *                          indicating Value2
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing situation container
           *                  containing eventType
           *                      containing causeCode
           *                          indicating Value1
           *                      containing subCauseCode
           *                          indicating Value2
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-04, ETSI EN 302 637-3, clause 7.1.3 */ testcase TC_DEN_EVGN_BV_04() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; var DenmInd v_denmInd; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_anyDenmMgmtCon, v_situation ) ) ) ) { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_EVGN_BV_04 /** * @desc Check that referenceTime is set to to the current time when generating a DENM for a new event *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated several events
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT is requested to generate a new event
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing management container
           *                  containing referenceTime
           *                      indicating CLT
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-05, ETSI EN 302 637-3, clause 8.1.1.2 */ testcase TC_DEN_EVGN_BV_05() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainerList v_situations := { m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), m_situation(c_causeAccident, c_subCauseCode_Unavailable), m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) }; var ActionIDList v_actionIds; var DenmInd v_denmInd; var integer i; var TimestampIts v_timestampIts; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); v_timestampIts := f_getCurrentTime(); for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) { f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta)); f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID; } f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtConWithReferenceTime( mw_timestampIts_withDelta(v_timestampIts) ) ) ) ) ) -> value v_denmInd { tc_ac.stop; v_actionIds[lengthof(v_actionIds)] := v_denmInd.msgIn.denm.management.actionID; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble for (i := 0; i < lengthof(v_actionIds); i:=i + 1) { f_poCancelEvent(e_iut, v_actionIds[i]); } f_cfDown(); } // end TC_DEN_EVGN_BV_05 /** * @desc Check that on startup, sequenceNumber is initialized with latest used value *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated several events
           *      and the IUT having generated its last DENM
           *          containing management container
           *              containing actionID
           *                  containing sequenceNumber
           *                      indicating SEQ1
           *      and the IUT having been restarted
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT is requested to generate a new event
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing management container
           *                  containing actionID
           *                      containing sequenceNumber
           *                          indicating SEQ1 + 1
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-06, ETSI EN 302 637-3, clause 8.1.1.1 */ testcase TC_DEN_EVGN_BV_06() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainerList v_situations := { m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), m_situation(c_causeAccident, c_subCauseCode_Unavailable), m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) }; var SequenceNumber v_sequenceNumber; var ActionIDList v_actionIds; var DenmInd v_denmInd; var integer i; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) { f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta)); f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID; } //save the last sequence number v_sequenceNumber := v_denmInd.msgIn.denm.management.actionID.sequenceNumber; //Restart the IUT f_utInitializeIut(m_denmInitialize); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtConWithActionID( mw_actionId(-, f_increaseSequenceNumber(v_sequenceNumber)) ) ) ) ) ) -> value v_denmInd { tc_ac.stop; v_actionIds[lengthof(v_actionIds)] := v_denmInd.msgIn.denm.management.actionID; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble for (i := 0; i < lengthof(v_actionIds); i:=i + 1) { f_poCancelEvent(e_iut, v_actionIds[i]); } f_cfDown(); } // end TC_DEN_EVGN_BV_06 /** * @desc Check that sequenceNumber is incremented and set to an unused value each time an event is detected *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated several events
           *      and the IUT having generated its last DENM
           *          containing management container
           *              containing actionID
           *                  containing sequenceNumber
           *                      indicating SEQ1
           *      and no active event being associated with sequenceNumber SEQ1 + 1
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT is requested to generate a new event
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing management container
           *                  containing actionID
           *                      containing sequenceNumber
           *                          indicating SEQ1 + 1
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-07, ETSI EN 302 637-3, clauses 6.1.1, 8.1.1.1 */ testcase TC_DEN_EVGN_BV_07() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainerList v_situations := { m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), m_situation(c_causeAccident, c_subCauseCode_Unavailable), m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) }; var SequenceNumber v_sequenceNumber; var ActionID v_actionId; var DenmInd v_denmInd; var integer i; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) { f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta)); f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); f_poCancelEvent(e_iut, v_denmInd.msgIn.denm.management.actionID); } //save the last sequence number v_sequenceNumber := v_denmInd.msgIn.denm.management.actionID.sequenceNumber; f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtConWithActionID( mw_actionId(-, f_increaseSequenceNumber(v_sequenceNumber)) ) ) ) ) ) -> value v_denmInd { tc_ac.stop; v_actionId := v_denmInd.msgIn.denm.management.actionID; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_EVGN_BV_07 /** * @desc Check that sequenceNumber is incremented and set to an unused value each time an event is detected *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated several events
           *      and the IUT having generated its last DENM
           *          containing management container
           *              containing actionID
           *                  containing sequenceNumber
           *                      indicating SEQ1
           *      and an active event being associated with sequenceNumber SEQ1 + 1
           *      and no active event being associated with sequenceNumber SEQ1 + 2
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT is requested to generate a new event
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing management container
           *                  containing actionID
           *                      containing sequenceNumber
           *                          indicating SEQ1 + 2
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-08, ETSI EN 302 637-3, clauses 6.1.1, 8.1.1.1 */ testcase TC_DEN_EVGN_BV_08() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var SequenceNumber v_firstSequenceNumber; var DenmInd v_denmInd; var integer i; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); v_firstSequenceNumber := v_denmInd.msgIn.denm.management.actionID.sequenceNumber; for (i := 1; i < 65535; i := i + 1) { f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); f_poCancelEvent(e_iut, v_denmInd.msgIn.denm.management.actionID); } f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtConWithActionID( mw_actionId(-, f_increaseSequenceNumber(v_firstSequenceNumber)) ) ) ) ) ) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_poCancelEvent(e_iut, m_actionId(v_firstSequenceNumber)); f_poCancelEvent(e_iut, m_actionId(f_increaseSequenceNumber(v_firstSequenceNumber))); f_cfDown(); } // end TC_DEN_EVGN_BV_08 /** * @desc Check that the sequence number restarts from 0 when it reaches its range limit *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated several events
           *      and the IUT having generated its last DENM
           *          containing management container
           *              containing actionID
           *                  containing sequenceNumber
           *                      indicating 65535
           *      and no active event being associated with sequenceNumber 0
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT is requested to generate a new event
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing management container
           *                  containing actionID
           *                      containing sequenceNumber
           *                          indicating 0
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-09, ETSI EN 302 637-3, clause 6.1.1 */ testcase TC_DEN_EVGN_BV_09() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var SequenceNumber v_firstSequenceNumber, v_lastSequenceNumber; var DenmInd v_denmInd; var integer i; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); v_firstSequenceNumber := v_denmInd.msgIn.denm.management.actionID.sequenceNumber; f_poCancelEvent(e_iut, v_denmInd.msgIn.denm.management.actionID); v_lastSequenceNumber := v_firstSequenceNumber; while (v_lastSequenceNumber!=65535) { f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); v_lastSequenceNumber := v_denmInd.msgIn.denm.management.actionID.sequenceNumber; f_poCancelEvent(e_iut, v_denmInd.msgIn.denm.management.actionID); } f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtConWithActionID( mw_actionId(-, 0) ) ) ) ) ) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_poCancelEvent(e_iut, m_actionId(0)); f_cfDown(); } // end TC_DEN_EVGN_BV_09 } // end denEventGeneration // 5.2.1.3 group denEventUpdate { /** * @desc Check that DEN Basic Service generates an update DENM on reception of a valid AppDENM_update request *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated an event
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT receives an AppDENM_update request from the application layer
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVUP/BV-01, ETSI EN 302 637-3, clause 6.1.2.2 */ testcase TC_DEN_EVUP_BV_01() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; var DenmInd v_denmInd; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); v_actionId := v_denmInd.msgIn.denm.management.actionID; f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_anyDenmPdu( mw_itsPduHeader, mw_denm (mw_anyDenmMgmtCon) ) ) ) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_EVUP_BV_01 /** * @desc Check that the actionID is not changed by DENM update *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated an event
           *          containing management container
           *              containing actionID
           *                  indicating ACTION_ID1
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT receives an AppDENM_update request associated with ACTION_ID1 from the application layer
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing management container
           *                  containing actionID
           *                      indicating ACTION_ID1
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVUP/BV-02, ETSI EN 302 637-3, clauses 6.1.2.2, 8.1.1.1 */ testcase TC_DEN_EVUP_BV_02() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; var DenmInd v_denmInd; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); v_actionId := v_denmInd.msgIn.denm.management.actionID; f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_anyDenmPdu( mw_itsPduHeader, mw_denm ( mw_denmMgmtConWithActionID( v_actionId ) ) ) ) ) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_EVUP_BV_02 /** * @desc Check that referenceTime is updated and superior to previous value for each DENM update *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated an event
           *          containing management container
           *              containing actionID
           *                  indicating ACTION_ID1
           *              containing referenceTime
           *                  indicating REFERENCETIME1
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT receives an AppDENM_update request associated with ACTION_ID1 from the application layer
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing management container
           *                  containing actionID
           *                      indicating ACTION_ID1
           *                  and containing referenceTime
           *                      indicating REFERENCETIME2 > REFERENCETIME1
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVUP/BV-03, ETSI EN 302 637-3, clause 6.1.2.2 */ testcase TC_DEN_EVUP_BV_03() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var TimestampIts v_referenceTime1; var ActionID v_actionId; var DenmInd v_denmInd; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); v_actionId := v_denmInd.msgIn.denm.management.actionID; v_referenceTime1 := v_denmInd.msgIn.denm.management.referenceTime; f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_anyDenmPdu( mw_itsPduHeader, mw_denm ( mw_denmMgmtCon( v_actionId ) ) ) ) ) -> value v_denmInd { tc_ac.stop; if(v_denmInd.msgIn.denm.management.referenceTime > v_referenceTime1) { log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } else { log("*** " & testcasename() & ": FAIL: ReferenceTime not updated correctly ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_EVUP_BV_03 /** * @desc Check that DEN Basic Service does not send any update DENM if actionID is not in originator ITS-S message table *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated an event
           *      and the IUT not having sent event being associated with actionID ACTION_ID1
           *          containing originatorStationID
           *              indicating its own stationID
           *          and containing sequenceNumber
           *              indicating SEQ1
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT is requested to update an event associated to ACTION_ID1
           *      }
           *      then {
           *          the IUT does not send send any DENM for this event
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVUP/BV-05, ETSI EN 302 637-3, clause 8.1.2 */ testcase TC_DEN_EVUP_BV_04() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; var DenmInd v_denmInd; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); v_actionId := v_denmInd.msgIn.denm.management.actionID; f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; f_utUpdateEvent(m_utUpdateEvent(m_actionId(f_increaseSequenceNumber(v_actionId.sequenceNumber), f_getIutStationId()), v_situation)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_anyDenmPdu( mw_itsPduHeader, mw_denm ( mw_denmMgmtCon( m_actionId( f_increaseSequenceNumber(v_actionId.sequenceNumber), f_getIutStationId() ) ) ) ) ) ) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received updated DENM for the actionId which is not in originator ITS-S message table. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": PASS: No DENM was sent. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_EVUP_BV_05 } // end denEventUpdate // 5.2.1.4 group denEventTermination { /** * @desc Check that DEN Basic Service generates a cancellation DENM when application indicates the * premature termination of an event for which it is the originator *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated an event
           *          containing management container
           *              containing actionID
           *                  indicating ACTION_ID1
           *              and containing validityDuration
           *                  indicating DURATION_1
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT receives an AppDENM_termination request associated to ACTION_ID1 from the application layer
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing management container
           *                  containing actionID
           *                      indicating ACTION_ID1
           *                  and containing isCancellation
           *                     indicating value TRUE
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-01, ETSI EN 302 637-3, clauses 6.1.2.4, 8.1.1.2 */ testcase TC_DEN_EVTR_BV_01() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; var DenmInd v_denmInd; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta, c_validityDuration_10sec)); f_awaitDenMessage( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon( mw_anyActionId, -, -, -, c_validityDuration_2sec ) ) ) ), v_denmInd ); v_actionId := v_denmInd.msgIn.denm.management.actionID; f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body f_utTerminateEvent(m_utEventCancellation(v_actionId)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm ( mw_denmMgmtCon( v_actionId, -, -, true ) ) ) ) ) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_cfDown(); } // end TC_DEN_EVTR_BV_01 /** * @desc Check that DEN Basic Service generates a negation DENM when application indicates the * premature termination of an event for which it is not the originator *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having received an event
           *          containing management container
           *              containing actionID
           *                  indicating ACTION_ID1
           *                      containing originatorStationID
           *                          indicating stationID different from its own stationID
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT receives an AppDENM_termination request associated to ACTION_ID1 from the application layer
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing management container
           *                  containing actionID
           *                      indicating ACTION_ID1
           *                  and containing isNegation
           *                      indicating value TRUE
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-02, ETSI EN 302 637-3, clause 6.1.2.4 */ testcase TC_DEN_EVTR_BV_02() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; var DenmInd v_denmInd; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) ); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body f_utTerminateEvent(m_utEventCancellation(v_actionId)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm ( mw_denmMgmtCon( v_actionId, -, true ) ) ) ) ) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_cfDown(); } // end TC_DEN_EVTR_BV_02 /** * @desc Check that referenceTime is set to the latest value received for this event in negation DENM *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having received an event
           *          containing management container
           *              containing actionID
           *                  indicating ACTION_ID1
           *                      containing originatorStationID
           *                          indicating stationID different from its own stationID
           *              and containing referenceTime
           *                  indicating REFERENCETIME1
           *      and the IUT having received an event
           *          containing management container
           *              containing actionID
           *                  indicating ACTION_ID1
           *              and containing referenceTime
           *                  indicating REFERENCETIME2 > REFERENCETIME1
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT receives an AppDENM_termination request associated to ACTION_ID1 from the application layer
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing management container
           *                  containing actionID
           *                      indicating ACTION_ID1
           *                  and containing referenceTime
           *                      indicating value REFERENCETIME2
           *                  and containing isNegation
           *                      indicating value TRUE
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-03, ETSI EN 302 637-3, clauses 6.1.2.4, 8.1.1.2 */ testcase TC_DEN_EVTR_BV_03() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var TimestampIts v_referenceTime1 := f_getCurrentTime(); var TimestampIts v_referenceTime2; var ActionID v_actionId; var DenmInd v_denmInd; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId, -, -, -, -, -, v_referenceTime1 ), v_situation, m_denmLocation_zeroDelta ) ); v_referenceTime2 := f_getCurrentTime(); v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId, -, -, -, -, -, v_referenceTime2 ), v_situation, m_denmLocation_zeroDelta ) ); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body f_utTerminateEvent(m_utEventCancellation(v_actionId)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm ( mw_denmMgmtCon( v_actionId, v_referenceTime2, true ) ) ) ) ) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_cfDown(); } // end TC_DEN_EVTR_BV_03 /** * @desc Check that situation container and location container are not present in cancellation DENM *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated an event
           *          containing management container
           *              containing actionID
           *                  indicating ACTION_ID1
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT receives an AppDENM_termination request associated to ACTION_ID1 from the application layer
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing management container
           *                  containing actionID
           *                      indicating ACTION_ID1
           *                  and containing isCancellation
           *                      indicating value TRUE
           *              and not containing situation container
           *              and not containing location container
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-04, ETSI EN 302 637-3, clause 7.1 */ testcase TC_DEN_EVTR_BV_04() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; var DenmInd v_denmInd; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta, c_validityDuration_10sec)); f_awaitDenMessage( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon( mw_anyActionId ) ) ) ), v_denmInd ); v_actionId := v_denmInd.msgIn.denm.management.actionID; f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body f_utTerminateEvent(m_utEventCancellation(v_actionId)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm ( mw_denmMgmtCon( v_actionId, -, -, true ), omit, omit ) ) ) ) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_cfDown(); } // end TC_DEN_EVTR_BV_04 /** * @desc Check that situation container and location container are not present in negation DENM *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having received an event
           *          containing management container
           *              containing actionID
           *                  indicating ACTION_ID1
           *                      containing originatorStationID
           *                          indicating stationID different from its own stationID
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT receives an AppDENM_termination request associated to ACTION_ID1 from the application layer
           *      }
           *      then {
           *          the IUT sends a valid DENM
           *              containing management container
           *                  containing actionID
           *                      indicating ACTION_ID1
           *                  and containing isNegation
           *                      indicating value TRUE
           *              and not containing situation container
           *              and not containing location container
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-05, ETSI EN 302 637-3, clause 7.1 */ testcase TC_DEN_EVTR_BV_05() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; var DenmInd v_denmInd; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) ); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body f_utTerminateEvent(m_utEventCancellation(v_actionId)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm ( mw_denmMgmtCon( v_actionId, -, true ), omit, omit ) ) ) ) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_cfDown(); } // end TC_DEN_EVTR_BV_05 /** * @desc Check that DEN Basic Service does not send any termination DENM if actionID is not in * originator ITS-S message table or receiver ITS-S message table *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated several events
           *      and the IUT not having send event being associated with ACTION_ID1
           *          containing originatorStationID
           *              indicating its own stationID
           *          and containing sequenceNumber
           *              indicating SEQ1
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT is requested to terminate an event associated to ACTION_ID1
           *              containing originatorStationID
           *                  indicating its own stationID
           *              and containing sequenceNumber
           *                  indicating SEQ1
           *      }
           *      then {
           *          the IUT does not send send any termination DENM for this event
           *      }
           *  }
           *  NOTE: Event associated to ACTION_ID1 cannot be present in receiver ITS-S message 
           *        table as its stationID is IUT’s stationID (see TP/DEN/EVTR/BV-07)
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-06, ETSI EN 302 637-3, clauses 8.1.2 */ testcase TC_DEN_EVTR_BV_06() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainerList v_situations := { m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), m_situation(c_causeAccident, c_subCauseCode_Unavailable), m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) }; var ActionID v_unknownActionId; var ActionIDList v_actionIds := {mw_actionId(f_getIutStationId()), mw_actionId(f_getIutStationId())}; var DenmInd v_denmInd; var integer i; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); for (i := 0; i < lengthof(v_situations); i:=i + 1) { f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta)); f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID; } f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_unknownActionId := m_actionId( f_increaseSequenceNumber( v_actionIds[lengthof(v_actionIds)].sequenceNumber ), f_getIutStationId() ); f_utTerminateEvent(m_utEventCancellation(v_unknownActionId)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_anyDenmPdu( mw_itsPduHeader, mw_denm ( mw_denmMgmtCon(v_unknownActionId) ) ) ) ) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received termination DENM for the unknown actionId. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": PASS: No termination DENM was sent. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } } // Postamble for (i := 0; i < lengthof(v_situations); i:=i + 1) { f_poCancelEvent(e_iut, v_actionIds[i]); } f_cfDown(); } // end TC_DEN_EVTR_BV_06 /** * @desc Check that DEN Basic Service does not send any termination DENM if actionID is not in * originator ITS-S message table or receiver ITS-S message table *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having received several events
           *      and the IUT not having received event being associated with ACTION_ID1
           *          containing originatorStationID
           *              indicating STATION_ID1 different from its own stationID
           *          and containing sequenceNumber
           *              indicating SEQ1
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT is requested to terminate an event associated to ACTION_ID1
           *              containing originatorStationID
           *                  indicating STATION_ID1
           *              and containing sequenceNumber
           *                  indicating SEQ1
           *      }
           *      then {
           *          the IUT does not send send any termination DENM for this event
           *      }
           *  }
           *  NOTE: Event associated to ACTION_ID1 cannot be present in originator ITS-S message table as its 
           *        stationID is not IUT’s stationID (see TP/DEN/EVTR/BV-06)
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-07, ETSI EN 302 637-3, clauses 8.1.2 */ testcase TC_DEN_EVTR_BV_07() runs on ItsDenm system ItsDenmSystem { // Local constants const SequenceNumber v_initialSequenceNumber := 0; // Local variables var template (value) SituationContainerList v_situations := { m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), m_situation(c_causeAccident, c_subCauseCode_Unavailable), m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) }; var SequenceNumber v_sequenceNumber := v_initialSequenceNumber; var ActionID v_unknownActionId; var ActionIDList v_actionIds := {mw_actionId(f_getIutStationId()), mw_actionId(f_getIutStationId())}; var DenmInd v_denmInd; var integer i; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); for (i := 0; i < lengthof(v_situations); i:=i + 1) { v_sequenceNumber := f_increaseSequenceNumber(v_sequenceNumber); v_actionIds[i] := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId(v_sequenceNumber) ), v_situations[i], m_denmLocation_zeroDelta ) ); } f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_unknownActionId := m_actionId( f_increaseSequenceNumber( v_actionIds[lengthof(v_actionIds)].sequenceNumber ), f_getTsStationId() ); f_utTerminateEvent(m_utEventCancellation(v_unknownActionId)); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_anyDenmPdu( mw_itsPduHeader, mw_denm ( mw_denmMgmtCon(v_unknownActionId) ) ) ) ) -> value v_denmInd { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received termination DENM for the unknown actionId. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": PASS: No termination DENM was sent. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } } // Postamble for (i := 0; i < lengthof(v_situations); i:=i + 1) { f_poCancelEvent(e_ets, v_actionIds[i]); } f_cfDown(); } // end TC_DEN_EVTR_BV_07 } // end denEventTermination // 5.2.1.5 group denMessageRepetition { /** * @desc Check that DEN Basic Service repeats DENM transmission according to transmissionInterval * parameter provided by application *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated an event
           *          containing management container
           *              containing actionID
           *                  indicating ACTION_ID1
           *              and containing validityDuration
           *                  indicating DURATION_1
           *              and containing transmissionInterval
           *                  indicating INTERVAL_1
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT is alerted of expiration of the time associated with INTERVAL_1
           *      }
           *      then {
           *          the IUT repeats the transmission of the valid DENM associated with ACTION_ID1
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-01, ETSI EN 302 637-3, clause 6.1.2.3 */ testcase TC_DEN_EVRP_BV_01() runs on ItsDenm system ItsDenmSystem { // Local constants const ValidityDuration c_validityDuration := c_validityDuration_10sec; const TransmissionInterval c_transmissionInterval := c_transmissionInterval_1sec; const float c_lowerTransmissionInterval := int2float(c_transmissionInterval)*0.95; const float c_upperTransmissionInterval := int2float(c_transmissionInterval)*1.05; const ValidityDuration c_repetitionDuration := c_validityDuration; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var template (present) DenmInd v_expectedDenmInd := mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon( mw_actionId, -, -, -, c_validityDuration, c_transmissionInterval ) ) ) ); var ActionID v_actionId; var DenmInd v_denmInd; // Local timers timer t_repetition; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_validityDuration, c_transmissionInterval, c_repetitionDuration ) ); f_awaitDenMessage(v_expectedDenmInd, v_denmInd); t_repetition.start(2.0 * int2float(c_transmissionInterval/1000)); v_actionId := v_denmInd.msgIn.denm.management.actionID; v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body alt { [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { if (match(t_repetition.read*1000.0, (c_lowerTransmissionInterval..c_upperTransmissionInterval))) { t_repetition.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } else { t_repetition.stop; log("*** " & testcasename() & ": FAIL: Received expected DENM, interval was not correct. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { t_repetition.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] t_repetition.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_EVRP_BV_01 /** * @desc Check that the repeated DENM is always the most up-to-date message *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated an event
           *          containing management container
           *              containing actionID
           *                  indicating ACTION_ID1
           *              and containing validityDuration
           *                  indicating DURATION_1
           *              and containing transmissionInterval
           *                  indicating INTERVAL_1
           *      and the IUT having generated an update of the event associated with ACTION_ID1 modifying partly the event
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT is alerted of expiration of the time associated with INTERVAL_1
           *      }
           *      then {
           *          the IUT repeats the transmission of the valid DENM associated with ACTION_ID1
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-02, ETSI EN 302 637-3, clause 6.1.2.3 */ testcase TC_DEN_EVRP_BV_02() runs on ItsDenm system ItsDenmSystem { // Local constants const ValidityDuration c_validityDuration := c_validityDuration_10sec; const TransmissionInterval c_transmissionInterval := c_transmissionInterval_5sec; const ValidityDuration c_repetitionDuration := c_validityDuration; const float c_lowerTransmissionInterval := int2float(c_transmissionInterval)*0.95; const float c_upperTransmissionInterval := int2float(c_transmissionInterval)*1.05; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var template (present) DenmInd v_expectedDenmInd := mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon( mw_actionId, -, -, -, c_validityDuration, c_transmissionInterval ) ) ) ); var ActionID v_actionId; var DenmInd v_denmInd; // Local timers timer t_repetition; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_validityDuration, c_transmissionInterval, c_repetitionDuration ) ); f_awaitDenMessage(v_expectedDenmInd, v_denmInd); v_actionId := v_denmInd.msgIn.denm.management.actionID; v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; //update event after 1 second tc_noac.start(1.0); tc_noac.timeout; v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation)); v_expectedDenmInd.msgIn.denm.situation := v_situation; f_awaitDenMessage(v_expectedDenmInd, v_denmInd); t_repetition.start(2.0 * int2float(c_transmissionInterval/1000)); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body alt { [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { if (match(t_repetition.read*1000.0, (c_lowerTransmissionInterval..c_upperTransmissionInterval))) { t_repetition.stop; log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } else { t_repetition.stop; log("*** " & testcasename() & ": FAIL: Received expected DENM, interval was not correct. ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { t_repetition.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] t_repetition.timeout { log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); f_selfOrClientSyncAndVerdict("error", e_timeout); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_EVRP_BV_02 /** * @desc Check that DEN Basic Service stops retransmitting DENM after event’s validityDuration * expiration *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having generated an event
           *          containing management container
           *              containing actionID
           *                  indicating ACTION_ID1
           *              and containing validityDuration
           *                  indicating DURATION_1
           *              and containing transmissionInterval
           *                  indicating INTERVAL_1
           *      and the IUT having repeated (one or more) the transmission of the valid DENM associated with ACTION_ID1
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT is alerted of expiration of the time associated with DURATION_1
           *      }
           *      then {
           *          the IUT stops the retransmission of the most up-to-date valid DENM associated with ACTION_ID1
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-03, ETSI EN 302 637-3, clauses 6.1.2.4, 8.1.2 */ testcase TC_DEN_EVRP_BV_03() runs on ItsDenm system ItsDenmSystem { // Local constants const ValidityDuration c_validityDuration := c_validityDuration_10sec; const TransmissionInterval c_transmissionInterval := c_transmissionInterval_4sec; const ValidityDuration c_repetitionDuration := c_validityDuration; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var template (present) DenmInd v_expectedDenmInd := mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon( mw_actionId, -, -, -, c_validityDuration, c_transmissionInterval ) ) ) ); var ActionID v_actionId; var DenmInd v_denmInd; var integer i; // Local timers timer t_validity; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_validityDuration, c_transmissionInterval, c_repetitionDuration ) ); f_awaitDenMessage(v_expectedDenmInd, v_denmInd); t_validity.start(1.5 * int2float(c_validityDuration)); v_actionId := v_denmInd.msgIn.denm.management.actionID; v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; //await retransmitted DENM message based on the transmission interval in between the validity duration for (i:=0; i<(c_validityDuration/(c_transmissionInterval/1000)); i:=i+1) { f_awaitDenMessage(v_expectedDenmInd, v_denmInd); } f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body alt { [] t_validity.timeout { log("*** " & testcasename() & ": PASS: Retransmission of DENM stopped successfully. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { t_validity.stop; log("*** " & testcasename() & ": FAIL: Retransmission of DENM was not stopped. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { t_validity.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_EVRP_BV_03 /** * @desc Check that DEN Basic Service stops retransmitting DENM after event’s repetitionDuration * expiration *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having received an AppDENM_trigger request from application layer
           *          containing repetitionDuration
           *              indicating DURATION_2
           *      and the IUT having generated an event
           *          containing management container
           *              containing actionID
           *                  indicating ACTION_ID1
           *              and containing validityDuration
           *                  indicating DURATION_1 > DURATION_2
           *              and containing transmissionInterval
           *                  indicating INTERVAL_1
           *      and the IUT having repeated (one or more) the transmission of the valid DENM associated with ACTION_ID1
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT is alerted of expiration of the time associated with DURATION_2
           *      }
           *      then {
           *          the IUT stops the retransmission of the most up-to-date valid DENM associated with ACTION_ID1
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-04, ETSI EN 302 637-3, clause 8.1.2 */ testcase TC_DEN_EVRP_BV_04() runs on ItsDenm system ItsDenmSystem { // Local constants const ValidityDuration c_validityDuration := c_validityDuration_10sec; const TransmissionInterval c_transmissionInterval := c_transmissionInterval_2sec; const ValidityDuration c_repetitionDuration := c_repetitionDuration_5sec; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var template (present) DenmInd v_expectedDenmInd := mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon( mw_actionId, -, -, -, c_validityDuration, c_transmissionInterval ) ) ) ); var ActionID v_actionId; var DenmInd v_denmInd; var integer i; // Local timers timer t_repetition; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_validityDuration, c_transmissionInterval, c_repetitionDuration ) ); f_awaitDenMessage(v_expectedDenmInd, v_denmInd); t_repetition.start(1.5 * int2float(c_repetitionDuration)); v_actionId := v_denmInd.msgIn.denm.management.actionID; v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; //await retransmitted DENM message based on the transmission interval in between the repetition duration for (i:=0; i<(c_repetitionDuration/(c_transmissionInterval/1000)); i:=i+1) { f_awaitDenMessage(v_expectedDenmInd, v_denmInd); } f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body alt { [] t_repetition.timeout { log("*** " & testcasename() & ": PASS: Retransmission of DENM stopped successfully. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { t_repetition.stop; log("*** " & testcasename() & ": FAIL: Retransmission of DENM was not stopped. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { t_repetition.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_EVRP_BV_04 /** * @desc Check that DEN Basic Service does not repeat transmission of DENM if transmissionInterval is * not provided by application *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having received an AppDENM_trigger request from application layer
           *          not containing transmissionInterval
           *      and the IUT having generated an event
           *          containing management container
           *              containing actionID
           *                  indicating ACTION_ID1
           *              and containing validityDuration
           *                  indicating DURATION_1
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT has detected that transmissionInterval is not provided for the event associated with ACTION_ID1
           *      }
           *      then {
           *          the IUT does not repeat the transmission of the valid DENM associated with ACTION_ID1
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-05, ETSI EN 302 637-3, clause 8.1.2 */ testcase TC_DEN_EVRP_BV_05() runs on ItsDenm system ItsDenmSystem { // Local constants const ValidityDuration c_validityDuration := c_validityDuration_10sec; const ValidityDuration c_repetitionDuration := c_validityDuration; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var template (present) DenmInd v_expectedDenmInd := mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon( mw_actionId, -, -, -, c_validityDuration ) ) ) ); var ActionID v_actionId; var DenmInd v_denmInd; var integer i; // Local timers timer t_validity; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_validityDuration, omit, //no transmissionInterval c_repetitionDuration ) ); f_awaitDenMessage(v_expectedDenmInd, v_denmInd); t_validity.start(1.5 * int2float(c_validityDuration)); v_actionId := v_denmInd.msgIn.denm.management.actionID; v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body alt { [] t_validity.timeout { log("*** " & testcasename() & ": PASS: No retransmission of DENM occured as expected. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { t_validity.stop; log("*** " & testcasename() & ": FAIL: Unexpected retransmission of DENM occured. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { t_validity.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_EVRP_BV_05 /** * @desc Check that DEN Basic Service does not repeat transmission of DENM if repetitionDuration is * not provided by application *
        
           * PICS Selection: none 
           * Initial conditions:
           *  with {
           *      the IUT being in the "initial state"
           *      and the IUT having received an AppDENM_trigger request from application layer
           *          not containing repetitionDuration
           *      and the IUT having generated an event
           *          containing management container
           *              containing actionID
           *                  indicating ACTION_ID1
           *              and containing validityDuration
           *                  indicating DURATION_1
           *              and containing transmissionInterval
           *                  indicating INTERVAL_1
           *  }
           * Expected behaviour:
           *  ensure that {
           *      when { 
           *          the IUT has detected that repetitionDuration is not provided for the event associated with ACTION_ID1
           *      }
           *      then {
           *          the IUT does not repeat the transmission of the valid DENM associated with ACTION_ID1
           *      }
           *  }
           * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-06, ETSI EN 302 637-3, clause 6.1.2.3 */ testcase TC_DEN_EVRP_BV_06() runs on ItsDenm system ItsDenmSystem { // Local constants const ValidityDuration c_validityDuration := c_validityDuration_10sec; const TransmissionInterval c_transmissionInterval := c_transmissionInterval_2sec; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var template (present) DenmInd v_expectedDenmInd := mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon( mw_actionId, -, -, -, c_validityDuration, c_transmissionInterval ) ) ) ); var ActionID v_actionId; var DenmInd v_denmInd; var integer i; // Local timers timer t_validity; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_validityDuration, c_transmissionInterval, omit //no repetitionDuration ) ); f_awaitDenMessage(v_expectedDenmInd, v_denmInd); t_validity.start(1.5 * int2float(c_validityDuration)); v_actionId := v_denmInd.msgIn.denm.management.actionID; v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body alt { [] t_validity.timeout { log("*** " & testcasename() & ": PASS: No retransmission of DENM occured as expected. ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { t_validity.stop; log("*** " & testcasename() & ": FAIL: Unexpected retransmission of DENM occured. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { t_validity.stop; log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); f_selfOrClientSyncAndVerdict("error", e_error); } } // Postamble f_poCancelEvent(e_iut, v_actionId); f_cfDown(); } // end TC_DEN_EVRP_BV_06 } // end denMessageRepetition } // end denMessageTransmission // 5.2.2 group denMessageReception { /** * @desc Check that receiver ITS-S transmits DENM to application if it concerns an unknown ActionID * and if it is not a termination DENM *
         * PICS Selection: none
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *      and the IUT not having send DENM
         *          containing management container
         *              containing actionID
         *                  indicating ACTION_ID1
         *      and the IUT not having received DENM
         *          containing management container
         *              containing actionID
         *                  indicating ACTION_ID1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the IUT receives a DENM that is not a termination
         *              containing management container
         *                  containing actionID
         *                      indicating ACTION_ID1
         *      }
         *      then {
         *          the IUT transmits the DENM content to upper layer
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-01, ETSI EN 302 637-3, clause 8.3.2 */ testcase TC_DEN_MSRV_BV_01() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; var integer i; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) ); f_sleep(PX_TAC); for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID); i:=i+1) { // empty on purpose } if(i < lengthof(vc_utEvents)) { log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } else { log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_MSRV_BV_01 /** * @desc Check that receiver ITS-S transmits DENM to application if it concerns a known ActionID * and referenceTime is greater than highest value received for this ActionID *
         * PICS Selection: none
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *      and the IUT having received DENM
         *          containing management container
         *              containing actionID
         *                  indicating ACTION_ID1
         *              and containing referenceTime
         *                  indicating  REFERENCETIME_1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the IUT receives a DENM
         *              containing management container
         *                  containing actionID
         *                      indicating ACTION_ID1
         *                  and containing referenceTime
         *                      indicating REFERENCETIME_2 greater than REFERENCETIME_1

         *      }
         *      then {
         *          the IUT transmits the DENM content to upper layer
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-02, ETSI EN 302 637-3, clause 8.3.2 */ testcase TC_DEN_MSRV_BV_02() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem); var TimestampIts v_referenceTime2; var ActionID v_actionId; var integer i; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId ), v_situation1, m_denmLocation_zeroDelta ) ); f_sleep(1.0); v_referenceTime2 := f_getCurrentTime(); v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( v_actionId, -, -, -, -, -, v_referenceTime2 ), v_situation2, m_denmLocation_zeroDelta ) ); f_sleep(PX_TAC); for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID) and vc_utEvents[i].denMsg.denm.management.referenceTime != v_referenceTime2; i:=i+1) { // empty on purpose } if(i < lengthof(vc_utEvents)) { log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } else { log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_MSRV_BV_02 /** * @desc Check that receiver ITS-S discards termination DENM if it concerns an unknown ActionID *
         * PICS Selection: none 
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *      and the IUT having received several events
         *      and the IUT not having received DENM
         *          containing actionID
         *              indicating ACTION_ID1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the IUT receives a termination DENM
         *              containing actionID
         *                  indicating ACTION_ID1
         *      }
         *      then {
         *          the IUT discards the DENM
         *          and the IUT does not forward the DENM content to upper layer
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-03, ETSI EN 302 637-3, clause 8.3.2 */ testcase TC_DEN_MSRV_BV_03() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; var integer i; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId, -, true ), v_situation, m_denmLocation_zeroDelta ) ); f_sleep(PX_TNOAC); for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID); i:=i+1) { // empty on purpose } if(i < lengthof(vc_utEvents)) { log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } else { log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_MSRV_BV_03 /** * @desc Check that receiver ITS-S discards termination DENM if it concerns an unknown ActionID *
         * PICS Selection: none 
         * Initial conditions:
         *  with {
         *      and the IUT having received several events
         *      and the IUT not having received DENM
         *          containing actionID
         *              indicating ACTION_ID1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the IUT receives a termination DENM
         *              containing actionID
         *                  indicating ACTION_ID1
         *      }
         *      then {
         *          the IUT discards the DENM
         *          and the IUT does not forward the DENM content to upper layer
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-04, ETSI EN 302 637-3, clause 8.3.2 */ testcase TC_DEN_MSRV_BV_04() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId, v_actionIdIut; var integer i; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionIdIut := f_sendDenMessage( m_denm( m_denmMgmtCon( m_actionId( f_increaseSequenceNumber(v_actionId.sequenceNumber) ), true ), v_situation, m_denmLocation_zeroDelta ) ); f_sleep(PX_TNOAC); for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID); i:=i+1) { // empty on purpose } if(i < lengthof(vc_utEvents)) { log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } else { log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } // Postamble f_poCancelEvent(e_iut, v_actionIdIut); f_cfDown(); } // end TC_DEN_MSRV_BV_04 /** * @desc Check that receiver ITS-S discards DENM if referenceTime is lower than highest value received for this ActionID *
         * PICS Selection: none
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *      and the IUT having received DENM
         *          containing management container
         *              containing actionID
         *                  indicating ACTION_ID1
         *              and containing referenceTime
         *                  indicating REFERENCETIME_1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the IUT receives a DENM
         *              containing management container
         *                  containing actionID
         *                      indicating ACTION_ID1
         *                  and containing referenceTime
         *                      indicating REFERENCETIME_2 lower than REFERENCETIME_1
         *      }
         *      then {
         *          the IUT discards the DENM
         *          and the IUT does not forward the DENM content to upper layer
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-05, ETSI EN 302 637-3, clause 8.3.2 */ testcase TC_DEN_MSRV_BV_05() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem); var TimestampIts v_referenceTime1 := f_getCurrentTime(); var TimestampIts v_referenceTime2 := v_referenceTime1 - 1000; var ActionID v_actionId; var integer i; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId, -, -, -, -, -, v_referenceTime1 ), v_situation1, m_denmLocation_zeroDelta ) ); f_sleep(1.0); v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( v_actionId, -, -, -, -, -, v_referenceTime2 ), v_situation2, m_denmLocation_zeroDelta ) ); f_sleep(PX_TNOAC); for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID) and vc_utEvents[i].denMsg.denm.management.referenceTime != v_referenceTime2; i:=i+1) { // empty on purpose } if(i < lengthof(vc_utEvents)) { log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } else { log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_MSRV_BV_05 /** * @desc Check that receiver ITS-S discards DENM if referenceTime is equal to highest * received value and detectionTime is not more recent *
         * PICS Selection: none
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *      and the IUT having received DENM
         *          containing management container
         *              containing actionID
         *                  indicating ACTION_ID1
         *              and containing referenceTime
         *                  indicating REFERENCETIME_1
         *              and containing detectionTime
         *                  indicating TIME_1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the IUT receives a DENM
         *              containing management container
         *                  containing actionID
         *                      indicating ACTION_ID1
         *                  and containing referenceTime
         *                      indicating REFERENCETIME_1
         *                  and containing detectionTime
         *                      indicating TIME_2 not more recent than TIME_1
         *      }
         *      then {
         *          the IUT discards the DENM
         *          and the IUT does not forward the DENM content to upper layer
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-06, ETSI EN 302 637-3, clause 8.3.2 */ testcase TC_DEN_MSRV_BV_06() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem); var template (value) DecentralizedEnvironmentalNotificationMessage v_denm; var TimestampIts v_detectionTime1 := f_getCurrentTime(); var TimestampIts v_detectionTime2 := v_detectionTime1 - 1000; var TimestampIts v_referenceTime1 := v_detectionTime1; var ActionID v_actionId; var integer i; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_denm := m_denm( m_denmMgmtCon( m_tsActionId, -, - ,- ,-, v_detectionTime1, v_referenceTime1 ), v_situation1, m_denmLocation_zeroDelta ); v_actionId := f_sendDenMessage(v_denm); f_sleep(1.0); v_detectionTime2 := v_denm.management.detectionTime - 1000; v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( v_actionId, -, - ,- ,-, v_detectionTime2, v_referenceTime1 ), v_situation2, m_denmLocation_zeroDelta ) ); f_sleep(PX_TNOAC); for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID) and vc_utEvents[i].denMsg.denm.management.detectionTime != v_detectionTime2; i:=i+1) { // empty on purpose } if(i < lengthof(vc_utEvents)) { log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } else { log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_MSRV_BV_06 /** * @desc Check that receiver ITS-S transmits DENM to application if it concerns a known ActionID and referenceTime * is equal to highest received value and detectionTime is more recent *
         * PICS Selection: none
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *      and the IUT having received DENM
         *          containing management container
         *              containing actionID
         *                  indicating ACTION_ID1
         *              and containing referenceTime
         *                  indicating REFERENCETIME_1
         *              and containing detectionTime
         *                  indicating TIME_1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the IUT receives a DENM
         *              containing management container
         *                  containing actionID
         *                      indicating ACTION_ID1
         *                  and containing referenceTime
         *                      indicating REFERENCETIME_1
         *                  and containing detectionTime
         *                      indicating TIME_2 more recent than TIME_1
         *      }
         *      then {
         *          the IUT transmits the DENM content to upper layer
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-07, ETSI EN 302 637-3, clause 8.3.2 */ testcase TC_DEN_MSRV_BV_07() runs on ItsDenm system ItsDenmSystem { // Local variables var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem); var template (value) DecentralizedEnvironmentalNotificationMessage v_denm; var TimestampIts v_detectionTime2 := f_getCurrentTime(); var TimestampIts v_detectionTime1 :=v_detectionTime2 - 1000; var TimestampIts v_referenceTime1 := v_detectionTime2; var ActionID v_actionId; var integer i; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_denm := m_denm( m_denmMgmtCon( m_tsActionId, -, - ,- ,-, v_detectionTime1, v_referenceTime1 ), v_situation1, m_denmLocation_zeroDelta ); v_actionId := f_sendDenMessage(v_denm); f_sleep(1.0); v_detectionTime2 := v_denm.management.detectionTime + 1000; v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( v_actionId, -, - ,- ,-, v_detectionTime2, v_referenceTime1 ), v_situation2, m_denmLocation_zeroDelta ) ); f_sleep(PX_TAC); for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID) and vc_utEvents[i].denMsg.denm.management.detectionTime != v_detectionTime2; i:=i+1) { // empty on purpose } if(i < lengthof(vc_utEvents)) { log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } else { log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_MSRV_BV_07 } // end denMessageReception // 5.2.3 group denKeepAliveForwarding { /** * @desc Check that forwarder ITS-S forwards DENM if no DENM with same ActionId has been received during forwarding delay *
         * PICS Selection: PICS_KAF 
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *          and the IUT having received a DENM
         *              containing actionID
         *                  indicating ACTION_ID1
         *              and containing transmissionInterval
         *                  indicating TRANS_INTERVAL1
         *              and containing validityDuration
         *                  indicating value more than 3 times greater than TRANS_INTERVAL1
         *          and the IUT having starting timer T_Forwarding for this DENM
         *          and the IUT not having received further DENM 
         *              containing actionID
         *                  indicating ACTION_ID1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the timer T_Forwarding expires
         *      }
         *      then {
         *          the IUT reconstructs and sends the DENM associated to ACTION_ID1
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-01, ETSI EN 302 637-3, clause 8.2.2 */ testcase TC_DEN_KAFW_BV_01() runs on ItsDenm system ItsDenmSystem { //Local constants const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; // Local timers timer t_forwarding := 2.0 * int2float(c_transmissionInterval) / 1000.0; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId, -, -, c_transmissionInterval * 3, c_transmissionInterval ), v_situation, m_denmLocation_zeroDelta ) ); t_forwarding.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(v_actionId) ) ) ) ) { if(t_forwarding.running) { t_forwarding.stop; log("*** " & testcasename() & ": FAIL: IUT re-forwarded the packet too early ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } else { tc_ac.stop; log("*** " & testcasename() & ": PASS: DENM re-forwarded ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } } [] t_forwarding.timeout { tc_ac.start; log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***"); repeat; } [] tc_ac.timeout { log("*** " & testcasename() & ": FAIL: DENM was not forwarded ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_KAFW_BV_01 /** * @desc Check that forwarder ITS-S forwards DENM if no DENM with same ActionId and referenceTime greater * or equal to the last received DENM has been received during forwarding delay *
         * PICS Selection: PICS_KAF 
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *      and the IUT having received a DENM
         *          containing actionID
         *              indicating ACTION_ID1
         *          and containing transmissionInterval
         *              indicating TRANS_INTERVAL1
         *          and containing referenceTime
         *              indicating REFERENCETIME_1
         *          and containing validityDuration
         *              indicating value more than 3 times greater than TRANS_INTERVAL1
         *      and the IUT having starting timer T_Forwarding for this DENM
         *      and the IUT having received DENM
         *          containing actionID
         *              indicating ACTION_ID1
         *          and containing referenceTime
         *              indicating value REFERENCETIME_2 < REFERENCETIME_1
         *      and the IUT not having received further DENM 
         *          containing actionID
         *              indicating ACTION_ID1
         *          and containing referenceTime
         *              indicating value REFERENCETIME_3 > REFERENCETIME_1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the timer T_Forwarding expires
         *      }
         *      then {
         *          the IUT reconstructs and sends the DENM associated to ACTION_ID1
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-02, ETSI EN 302 637-3, clause 8.2.2 */ testcase TC_DEN_KAFW_BV_02() runs on ItsDenm system ItsDenmSystem { //Local constants const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var TimestampIts v_referenceTime1 := f_getCurrentTime(); var TimestampIts v_referenceTime2 := v_referenceTime1 - 1000; var ActionID v_actionId; // Local timers timer t_forwarding := 2.0 * int2float(c_transmissionInterval) /1000.0; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId, -, -, c_transmissionInterval * 3, c_transmissionInterval, -, v_referenceTime1 ), v_situation, m_denmLocation_zeroDelta ) ); t_forwarding.start; f_sleep(5.0); v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId, -, -, c_transmissionInterval * 3, c_transmissionInterval, -, v_referenceTime2 ), v_situation, m_denmLocation_zeroDelta ) ); alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(v_actionId, v_referenceTime1) ) ) ) ) { if(t_forwarding.running) { t_forwarding.stop; log("*** TC_DEN_KAFW_BV_02: INFO: IUT re-forwarded the packet too early ***"); } else { tc_ac.stop; log("*** TC_DEN_KAFW_BV_02: PASS: DENM re-forwarded ***"); } f_clientSyncAndVerdict(c_tbDone, e_success); } [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(v_actionId) ) ) ) ) { tc_ac.stop; t_forwarding.stop; log("*** " & testcasename() & ": FAIL: IUT re-forwarded wrong version of DENM ***"); } [] t_forwarding.timeout { tc_ac.start; log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***"); repeat; } [] tc_ac.timeout { log("*** " & testcasename() & ": FAIL: DENM was not forwarded ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_KAFW_BV_02 /** * @desc Check that forwarding delay is set to min(2*transmissionInterval + rnd(0, 150ms), validityDuration) *
         * PICS Selection: PICS_KAF 
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *      and the IUT having received a DENM
         *          containing actionID
         *              indicating ACTION_ID1
         *          and containing transmissionInterval
         *              indicating TRANS_INTERVAL1
         *          and containing validityDuration
         *              indicating value DURATION_1 more than 3 times greater than TRANS_INTERVAL1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the timer T_Forwarding expires
         *      }
         *      then {
         *          the IUT reconstructs and sends the DENM associated to ACTION_ID1 at a point of time corresponding to
         *          min ( 2*transmissionInterval + rnd ( 0, 150ms ), validityDuration )
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-03, ETSI EN 302 637-3, clause 8.2.1.4 */ testcase TC_DEN_KAFW_BV_03() runs on ItsDenm system ItsDenmSystem { //Local constants const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; // Local timers timer t_forwardingMin := 2.0 * int2float(c_transmissionInterval) / 1000.0; timer t_forwardingMax := 2.0 * int2float(c_transmissionInterval) / 1000.0 + 0.15; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId, -, -, c_transmissionInterval * 3, c_transmissionInterval ), v_situation, m_denmLocation_zeroDelta ) ); t_forwardingMin.start; t_forwardingMax.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(v_actionId) ) ) ) ) { t_forwardingMax.stop; if(t_forwardingMin.running) { t_forwardingMin.stop; log("*** " & testcasename() & ": FAIL: IUT re-forwarded the packet too early ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } else { log("*** " & testcasename() & ": PASS: DENM re-forwarded correctly ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } } [] t_forwardingMin.timeout { log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***"); repeat; } [] t_forwardingMax.timeout { log("*** " & testcasename() & ": FAIL: DENM was not forwarded on time ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_KAFW_BV_03 /** * @desc Check that Forwarder ITS-S replaces the ITS PDU header of forwarded DENMs *
         * PICS Selection: PICS_KAF 
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *      and the IUT having received a DENM
         *          containing actionID
         *              indicating ACTION_ID1
         *          and containing transmissionInterval
         *              indicating TRANS_INTERVAL1
         *          and containing validityDuration
         *              indicating value more than 3 times greater than TRANS_INTERVAL1
         *      and the IUT having starting timer T_Forwarding for this DENM
         *      and the IUT not having received further DENM 
         *          containing actionID
         *              indicating ACTION_ID1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the timer T_Forwarding expires
         *      }
         *      then {
         *          the IUT reconstructs and sends the DENM associated to ACTION_ID1
         *              containing ITS PDU header
         *                  containing StationID
         *                      indicating its own stationID
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-04, ETSI EN 302 637-3, clause 8.2.1.6 */ testcase TC_DEN_KAFW_BV_04() runs on ItsDenm system ItsDenmSystem { //Local constants const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId, -, -, c_transmissionInterval * 3, c_transmissionInterval ), v_situation, m_denmLocation_zeroDelta ) ); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(v_actionId) ), f_getIutStationId() ) ) ) { tc_ac.stop; log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct stationID ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(v_actionId) ), mw_anyStationId ) ) ) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect stationID ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); f_clientSyncAndVerdict(c_tbDone, e_timeout); } } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_KAFW_BV_04 /** * @desc Check that forwarder ITS-S does not change actionID *
         * PICS Selection: PICS_KAF 
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *      and the IUT having received a DENM
         *          containing actionID
         *              indicating ACTION_ID1
         *          and containing transmissionInterval
         *              indicating TRANS_INTERVAL1
         *          and containing validityDuration
         *              indicating value more than 3 times greater than TRANS_INTERVAL1
         *      and the IUT having starting timer T_Forwarding for this DENM
         *      and the IUT not having received further DENM 
         *          containing actionID
         *              indicating ACTION_ID1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the timer T_Forwarding expires
         *      }
         *      then {
         *          the IUT reconstructs and sends the DENM 
         *              containing management container
         *                  containing actionID
         *                      indicating ACTION_ID1
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-05, ETSI EN 302 637-3, clause 8.2.1.1 */ testcase TC_DEN_KAFW_BV_05() runs on ItsDenm system ItsDenmSystem { //Local constants const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId, -, -, c_transmissionInterval * 3, c_transmissionInterval ), v_situation, m_denmLocation_zeroDelta ) ); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(v_actionId) ) ) ) ) { tc_ac.stop; log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct actionID ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(mw_anyActionId) ) ) ) ) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect actionID ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); f_clientSyncAndVerdict(c_tbDone, e_timeout); } } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_KAFW_BV_05 /** * @desc Check that forwarder ITS-S does not change referenceTime *
         * PICS Selection: PICS_KAF 
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *      and the IUT having received a DENM
         *          containing actionID
         *              indicating ACTION_ID1
         *          and containing transmissionInterval
         *              indicating TRANS_INTERVAL1
         *          and containing validityDuration
         *              indicating value DURATION_1 more than 3 times greater than TRANS_INTERVAL1
         *          and containing referenceTime
         *              indicating REFERENCETIME_1
         *      and the IUT having starting timer T_Forwarding for this DENM
         *      and the IUT not having received further DENM 
         *          containing actionID
         *              indicating ACTION_ID1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the timer T_Forwarding expires
         *      }
         *      then {
         *          the IUT reconstructs and sends the DENM associated to ACTION_ID1
         *              containing management container
         *                  containing referenceTime
         *                      indicating REFERENCETIME_1
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-06, ETSI EN 302 637-3, clause 8.2.1.2 */ testcase TC_DEN_KAFW_BV_06() runs on ItsDenm system ItsDenmSystem { //Local constants const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var TimestampIts v_referenceTime1 := f_getCurrentTime(); var ActionID v_actionId; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId, -, -, c_transmissionInterval * 3, c_transmissionInterval, -, v_referenceTime1 ), v_situation, m_denmLocation_zeroDelta ) ); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(v_actionId, v_referenceTime1) ) ) ) ) { tc_ac.stop; log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct referenceTime ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(v_actionId) ) ) ) ) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect referenceTime ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); f_clientSyncAndVerdict(c_tbDone, e_timeout); } } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_KAFW_BV_06 /** * @desc Check that forwarder ITS-S does not change isNegation *
         * PICS Selection: PICS_KAF 
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *      and the IUT having received a DENM
         *          containing actionID
         *              indicating ACTION_ID1
         *          and containing transmissionInterval
         *              indicating TRANS_INTERVAL1
         *          and containing validityDuration
         *              indicating value DURATION_1 more than 3 times greater than TRANS_INTERVAL1
         *          and containing isNegation
         *              indicating ISNEGATION_1
         *      and the IUT having starting timer T_Forwarding for this DENM
         *      and the IUT not having received further DENM 
         *          containing actionID
         *              indicating ACTION_ID1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the timer T_Forwarding expires
         *      }
         *      then {
         *          the IUT reconstructs and sends the DENM associated to ACTION_ID1
         *              containing management container
         *                  containing isNegation
         *                      indicating ISNEGATION_1
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-07, ETSI EN 302 637-3, clause 8.2.1.3 */ testcase TC_DEN_KAFW_BV_07() runs on ItsDenm system ItsDenmSystem { //Local constants const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId, false, -, c_transmissionInterval * 3, c_transmissionInterval ), v_situation, m_denmLocation_zeroDelta ) ); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(v_actionId, -, false) ) ) ) ) { tc_ac.stop; log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct isNegation ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(v_actionId, -, true) ) ) ) ) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect isNegation ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); f_clientSyncAndVerdict(c_tbDone, e_timeout); } } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_KAFW_BV_07 /** * @desc Check that Forwarder ITS-S does not modify management, situation, location and alacarte containers * when forwarding a DENM *
         * PICS Selection: PICS_KAF 
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *      and the IUT having received a DENM
         *          containing management container
         *              indicating MANACEMENTCONTAINER_1
         *          and containing situation container
         *              indicating SITUATION_1
         *          and containing location container
         *              indicating LOCATION_1
         *          and containing alacarte container
         *              indicating ALACARTE_1
         *      and the IUT having starting timer T_Forwarding for this DENM
         *      and the IUT not having received further DENM 
         *          containing actionID
         *              indicating ACTION_ID1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the timer T_Forwarding expires
         *      }
         *      then {
         *          the IUT reconstructs and sends the DENM associated to ACTION_ID1
         *              containing management container
         *                  indicating MANACEMENTCONTAINER_1
         *              and containing situation container
         *                  indicating SITUATION_1
         *              and containing location container
         *                  indicating LOCATION_1
         *              and containing alacarte container
         *                  indicating ALACARTE_1
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-08, ETSI EN 302 637-3, clause 8.2.1.6 */ testcase TC_DEN_KAFW_BV_08() runs on ItsDenm system ItsDenmSystem { //Local constants const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId, -, -, c_transmissionInterval * 3, c_transmissionInterval ), v_situation, m_denmLocation_zeroDelta, m_alacarteConLaneCount ) ); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(v_actionId), v_situation, m_denmLocation_zeroDelta, m_alacarteConLaneCount ) ) ) ) { tc_ac.stop; log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct containers ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(v_actionId) ) ) ) ) { tc_ac.stop; log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect containers ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); f_clientSyncAndVerdict(c_tbDone, e_timeout); } } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_KAFW_BV_08 /** * @desc Check that forwarder ITS-S stops forwarding DENM after validity expiration *
         * PICS Selection: PICS_KAF 
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *      and the IUT having received an event
         *          containing management container
         *              containing actionID
         *                  indicating ACTION_ID1
         *              and containing validityDuration
         *                  indicating DURATION_1
         *      and the IUT having starting timer T_Forwarding for this DENM
         *      and the IUT not having received further DENM 
         *          containing actionID
         *              indicating ACTION_ID1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the IUT is alerted of expiration of the time associated with DURATION_1
         *      }
         *      then {
         *          the IUT stops to reconstruct and to send the DENM associated with ACTION_ID1
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-09, ETSI EN 302 637-3, clause 8.2.2 */ testcase TC_DEN_KAFW_BV_09() runs on ItsDenm system ItsDenmSystem { //Local constants const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; // Local timers timer t_validity := int2float(c_transmissionInterval * 3) / 1000.0; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId, -, -, c_transmissionInterval * 3, c_transmissionInterval ), v_situation, m_denmLocation_zeroDelta ) ); t_validity.start; tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(v_actionId) ) ) ) ) { tc_ac.stop; if(t_validity.running) { log("*** " & testcasename() & ": INFO: DENM re-forwarded during validity period ***"); tc_ac.start; repeat; } else { log("*** " & testcasename() & ": FAIL: DENM re-forwarded after validity expiration ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } } [] tc_ac.timeout { if(t_validity.running) { log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); f_clientSyncAndVerdict(c_tbDone, e_timeout); } else { log("*** " & testcasename() & ": PASS: DENM not reforwarded after validity expiration ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } } [] t_validity.timeout { log("*** " & testcasename() & ": INFO: End of validity period ***"); repeat; } } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_KAFW_BV_09 /** * @desc Check that forwarder ITS-S stops forwarding DENM if it is outside relevance area *
         * PICS Selection: PICS_KAF 
         * Initial conditions:
         *  with {
         *      the IUT being in the "initial state"
         *      and the IUT having received an event
         *          containing management container
         *              containing actionID
         *                  indicating ACTION_ID1
         *      and the IUT having starting timer T_Forwarding for this DENM
         *      and the IUT not having received further DENM 
         *          containing actionID
         *              indicating ACTION_ID1
         *  }
         * Expected behaviour:
         *  ensure that {
         *      when { 
         *          the IUT is alerted that its position is now outside of the relevance area associated with ACTION_ID1
         *      }
         *      then {
         *          the IUT stops to reconstruct and to send the DENM associated with ACTION_ID1
         *      }
         *  }
         * 
* * @version 1.2.1 * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-10, ETSI EN 302 637-3, clause 8.2.2 */ testcase TC_DEN_KAFW_BV_10() runs on ItsDenm system ItsDenmSystem { //Local constants const TransmissionInterval c_transmissionInterval := c_transmissionInterval_10sec; // Local variables var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); var ActionID v_actionId; var boolean v_positionChanged := false; // Test control // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); // Test Body v_actionId := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId, -, -, c_transmissionInterval * 5, c_transmissionInterval ), v_situation, m_denmLocation_zeroDelta ) ); tc_ac.start; alt { [] denmPort.receive( mw_denmInd( mw_denmPdu( mw_denm( mw_denmMgmtCon(v_actionId) ) ) ) ) { tc_ac.stop; if(v_positionChanged == false) { log("*** " & testcasename() & ": INFO: DENM re-forwarded. Changing position ***"); f_utChangePosition(m_utChangePosition(1000, 0)); v_positionChanged := true; tc_ac.start; repeat; } else { log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect containers ***"); f_clientSyncAndVerdict(c_tbDone, e_error); } } [] tc_ac.timeout { if(v_positionChanged == false) { log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); f_clientSyncAndVerdict(c_tbDone, e_timeout); } else { log("*** " & testcasename() & ": PASS: DENM stopped re-forwarding DENM ***"); f_clientSyncAndVerdict(c_tbDone, e_success); } } } // Postamble f_poCancelEvent(e_ets, v_actionId); f_cfDown(); } // end TC_DEN_KAFW_BV_10 } // end denKeepAliveForwarding } // end ItsDenm_TestCases