diff --git a/ttcn/AtsATSP/ItsAtsp_TestCases.ttcn b/ttcn/AtsATSP/ItsAtsp_TestCases.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..72a8283b754b17c4e018f5a925b6172e42307bb6 --- /dev/null +++ b/ttcn/AtsATSP/ItsAtsp_TestCases.ttcn @@ -0,0 +1,5095 @@ +/** + * @author ETSI / STF455 + * @version $URL$ + * $Id$ + * @desc Testcases for Access Technology Support Protocols (ISO 21218) (TP version: 1.1.2 - v06) + * + */ + module ItsAtsp_TestCases { + + // Libcommon + import from LibItsCalm_Interface all; + import from LibCommon_Sync all; + import from LibCommon_BasicTypesAndValues { + type UInt8 + }; + + // LibIts + import from LibItsAtsp_Pics all; + import from LibItsAtsp_Pixits all; + import from LibItsAtsp_Templates all; + import from LibItsAtsp_TypesAndValues all; + import from LibItsAtsp_Functions all; + import from LibItsAtsp_Pixits all; + + import from LibItsCalm_TestSystem { + type ItsCalmSystem + }; + + import from LibItsCalm_Interface { + type ItsCalm + }; + + import from LibItsMgt_Functions { + function f_getNextCommandRef + }; + + import from LibItsMgt_TypesAndValues { + type IParamNoList, IParamList + }; + + // ASN.1 modules + import from CALMllsap language "ASN.1:1997" { + type + Link_ID, MedType, CIstatus, VirtualCIs, + IN_UNITDATA_request, + I_Param, DataRate, Errors, + UserPriority, + INsapPrimitivesUp, + RemoteCIID + }; + import from CALMmsap language "ASN.1:1997" { + type + MI_Command_request, MI_Command_confirm + }; + + + // State event transitions + group stateEventTransitions { + + group validBehavior { + + /** + * @desc TP: IUT with CI supporting 48-bit MAC addresses registers correctly at the management entity + * @author STF 455 + * @config + * + *
+                 * PICS selection: PICS_DYNREG AND PICS_MAC48
+                 * Initial conditions: 
+                 *  with {
+                 *       the IUT being in the CI state "not-existent"
+                 *       }
+                 * 
+                 * Expected behaviour:
+                 *  ensure that {
+                 *     when {
+                 *          the IUT starts operation
+                 *          }
+                 *     then {
+                 *          the IUT registers properly at the ITS-S management
+                 *          }
+                 *     }
+                 *     
+                 * Final conditions:
+                 * ensure that {
+                 *     when {
+                 *          the IUT presented the state "registered" to the ITS-S management
+                 *          }
+                 *     then {
+                 *          the IUT has a LocalCIID representing the 48 bit MAC address of the IUT
+                 *          }
+                 *     }
+                 * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/01 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + + // Test control + if (not(PICS_DYNREG and PICS_MAC48)) { + log("*** TC_ATSP_SE_BV_01: ERROR: 'PICS_DYNREG' and 'PICS_MAC48' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // Request operator to switch on the SUT or to activate the IUT + action("Switch on SUT or activate IUT"); + + // Test Body + // Clause 'when' + log("*** TC_ATSP_SE_BV_01: INFO: Waiting for power-on of IUT ***"); + + // Clause 'then' + + // Wait for MI-Request.request "RegReq" + f_cnAwaitAndConfirmMI_RequestCI(mw_miRegRequest(f_get_CI_LinkID(), ?, m_regRequest(PX_CI_MED_TYPE)), true); + + // Reply MI-Command.request "RegCmd" + f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miRegistrationCommandRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + m_regCommand(PX_ITS_SCU_ID, PX_CI_MED_TYPE)), true); + + // Clause 'when' + // the IUT registers properly at the ITS-S management + // the IUT presented the state "registered" to the ITS-S management + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusRegistered)), true); + + //Clause 'then' + // the IUT has a LocalCIID representing the 48 bit MAC address of the IUT + // Try to address the VCI using the expected Link-ID. Return value is not used. + f_cnGetCiStatusParameterValueCI(f_get_CI_LinkID()); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_SE_BV_01: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_01: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_SE_BV_01 + + /** + * @desc TP: IUT with CI not supporting 48-bit MAC addresses registers correctly at the management entity + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_DYNREG AND NOT PICS_MAC48
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "not-existent"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT starts operation
+             *          }
+             *     then {
+             *          the IUT registers properly at the ITS-S management
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT presented the state "registered" to the ITS-S management
+             *          }
+             *     then {
+             *          the IUT has a LocalCIID created from ITS-SCU-ID and MedID
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/02 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + + // Test control + if (not(PICS_DYNREG and not PICS_MAC48)) { + log("*** TC_ATSP_SE_BV_02: ERROR: 'PICS_DYNREG' and NOT 'PICS_MAC48' required for executing the TC ***"); + stop; + } + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // Request operator to switch on the SUT or to activate the IUT + action("Switch on SUT or activate IUT"); + + + // Test Body + // Clause 'then' + + // Wait for MI-Request.request "RegReq" + f_cnAwaitAndConfirmMI_RequestCI(mw_miRegRequest(f_get_CI_LinkID(), ?, m_regRequest(PX_CI_MED_TYPE)), true); + + // Reply MI-Command.request "RegCmd" + f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miRegistrationCommandRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + m_regCommand(PX_ITS_SCU_ID, PX_CI_MED_TYPE)), false); + + //Clause 'when' + //the IUT registers properly at the ITS-S management + // the IUT presented the state "registered" to the ITS-S management + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusRegistered)), true); + + //Clause 'then' + // the IUT has a LocalCIID created from ITS-SCU-ID and MedID + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_SE_BV_02: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_02: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_SE_BV_02 + + /** + * @desc TP: IUT repeats registration as long as management entity does not confirm it + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_DYNREG
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "not-existent"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT starts operation
+             *          }
+             *     then {
+             *          the IUT repeats continuously the registration procedure as long as the ITS-S management does not confirm with MI-COMMAND "RegCmd"
+             *          }
+             *     }
+             *     
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/03 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_03() runs on ItsCalm system ItsCalmSystem { + // Local variables + var boolean v_discard; + var integer v_messageCounter; + + // Test control + if (not(PICS_DYNREG)) { + log("*** TC_ATSP_SE_BV_03: ERROR: 'PICS_DYNREG' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // Request operator to switch on the SUT or to activate the IUT + action("Switch on SUT or activate IUT"); + + // Test Body + // Clause 'when' + log("*** TC_ATSP_SE_BV_03: INFO: Waiting for power-on of IUT ***"); + + // Clause 'then' + for(v_messageCounter := 0; v_messageCounter < 5; v_messageCounter := v_messageCounter + 1) { + // Wait for MI-Request.request "RegReq" + f_cnAwaitAndConfirmMI_RequestCI(mw_miRegRequest(f_get_CI_LinkID(), ?, m_regRequest(PX_CI_MED_TYPE)), true); + } + + // Reply MI-Command.request "RegCmd" + f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miRegistrationCommandRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + m_regCommand(PX_ITS_SCU_ID, PX_CI_MED_TYPE)), false); + + // Check for reception of Status notification (I-Parameter 12 "CIstatus" set to "registered". + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusRegistered)), true); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_SE_BV_03: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_03: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_SE_BV_03 + + /** + * @desc TP: IUT with CI class "CIC-l2" automatically creates a UC-VCI and reaches the CI state "active" + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_CIC_l2
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "not-existent"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT has finished the registration procedure
+             *          }
+             *     then {
+             *          the IUT creates a UC-VCI
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT created a UC-VCI
+             *          }
+             *     then {
+             *          the IUT is in the state "active"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/04 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_04() runs on ItsCalm system ItsCalmSystem { + // Local variables + var integer v_messageCounter; + + // Test control + if (not(PICS_CIC_l2)) { + log("*** TC_ATSP_SE_BV_04: ERROR: 'PICS_CIC_l2' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // Request operator to switch on the SUT or to activate the IUT + action("Switch on SUT or activate IUT"); + + // Test Body + // Clause 'when' + // the IUT has finished the registration procedure + f_cnAwaitRegistrationCI(f_get_CI_LinkID(), PX_CI_MED_TYPE, true); + + // Clause 'then' + //the IUT creates a UC-VCI(applying MAC unicast communications) + + //TODO: Cecking for a UC-VCI + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_3(mw_miVCICreDelRes(PX_REMOTE_CIID_UC, f_get_CI_Local_CIID())), true); + + // Clause 'then' + // the IUT is in the state "active" + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_SE_BV_04: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_04: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_SE_BV_04 + + /** + * @desc TP: IUT with CI class "CIC-l3" automatically creates a BC-VCI and reaches the CI state "active" + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_CIC_l3
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "not-existent"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT has finished the registration procedure
+             *          }
+             *     then {
+             *          the IUT creates a BC-VCI
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT created a BC-VCI
+             *          }
+             *     then {
+             *          the IUT is in the state "active"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/05 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_05() runs on ItsCalm system ItsCalmSystem { + // Local variables + var integer v_messageCounter; + + // Test control + if (not(PICS_CIC_l3)) { + log("*** TC_ATSP_SE_BV_05: ERROR: 'PICS_CIC_l3' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // Request operator to switch on the SUT or to activate the IUT + action("Switch on SUT or activate IUT"); + + // Test Body + // Clause 'when' + f_cnAwaitRegistrationCI(f_get_CI_LinkID(), PX_CI_MED_TYPE, true); + + // Clause 'then' + //the IUT creates a BC-VCI(applying MAC broadcast communications) + //TODO: checking for BC-VCI + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_3(mw_miVCICreDelRes(PX_REMOTE_CIID_BC, f_get_CI_Local_CIID())), true); + + // Clause 'then' + // the IUT is in the state "active" + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_SE_BV_05: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_05: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_SE_BV_05 + + /** + * @desc TP: IUT with CI class "CIC-l4" automatically creates a RX-VCI and reaches the CI state "active" + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_CIC_l4
+             * Initial conditions: 
+             *  with {
+             *       he IUT being in the CI state "registered"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT has finished the registration procedure
+             *          }
+             *     then {
+             *          the IUT creates a RX-VCI
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT created a BC-VCI
+             *          }
+             *     then {
+             *          the IUT is in the state "active"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/06 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_06() runs on ItsCalm system ItsCalmSystem { + // Local variables + var integer v_messageCounter; + + // Test control + if (not(PICS_CIC_l4)) { + log("*** TC_ATSP_SE_BV_06: ERROR: 'PICS_CIC_l4' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // Request operator to switch on the SUT or to activate the IUT + action("Switch on SUT or activate IUT"); + + // Test Body + // Clause 'when' + f_cnAwaitRegistrationCI(f_get_CI_LinkID(), PX_CI_MED_TYPE, true); + + // Clause 'then' + //the IUT creates a RX-VCI + // this is given by notification of the status "active" + + // Clause 'then' + // the IUT is in the state "active" + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_SE_BV_06: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_06: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_SE_BV_06 + + /** + * @desc TP: IUT with CI class "CIC-l1"or "CIC-il1" automatically creates a UC-VCI and a BC-VCI and reaches the CI state "active" + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_CIC_l1 OR PICS_CIC_il1
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "registered", and MAC multicast groups are not known to the IUT
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT has finished the registration procedure
+             *          }
+             *     then {
+             *          the IUT creates a UC-VCI and a BC-VCI
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT created a UC-VCI and a BC-VCI
+             *          }
+             *     then {
+             *          the IUT is in the state "active"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/07 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_07() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CfAtspEventInd v_result; + var template CfAtspEventInd v_cf_UC_VCI_Event; + var boolean v_UC_VCI_created; + var template CfAtspEventInd v_cf_BC_VCI_Event; + var boolean v_BC_VCI_created; + var boolean v_discard := true; + + // Test control + if (not(PICS_CIC_l1 or PICS_CIC_il1)) { + log("*** TC_ATSP_SE_BV_07: ERROR: 'PICS_CIC_l1' OR 'PICS_CIC_il1' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // Request operator to switch on the SUT or to activate the IUT + action("Switch on SUT or activate IUT"); + + // Test Body + // Clause 'when' + f_cnAwaitRegistrationCI(f_get_CI_LinkID(), PX_CI_MED_TYPE, true); + + // Clause 'then' + //the IUT creates a BC-VCI(applying MAC broadcast communications) + v_UC_VCI_created := false; + v_BC_VCI_created := false; + + //TODO: UC-VCI and a BC-VCI correct template values, how to distinguish between UC and BC? + v_cf_UC_VCI_Event := mw_cfAtspRequestRequest( + mw_miEventsRequest(f_get_CI_LinkID(), ?, mw_miEvent21218_3(mw_miVCICreDelRes(PX_REMOTE_CIID_UC, f_get_CI_Local_CIID())))); + v_cf_BC_VCI_Event := mw_cfAtspRequestRequest( + mw_miEventsRequest(f_get_CI_LinkID(), ?, mw_miEvent21218_3(mw_miVCICreDelRes(PX_REMOTE_CIID_BC, f_get_CI_Local_CIID())))); + + log("*** TC_ATSP_SE_BV_07: INFO: Expected MI-Request-request: ", v_cf_UC_VCI_Event, " ***"); + log("*** TC_ATSP_SE_BV_07: INFO: Expected MI-Request-request: ", v_cf_BC_VCI_Event, " ***"); + tc_wait.start; + alt { + [not v_UC_VCI_created] cfPort.receive(v_cf_UC_VCI_Event) -> value v_result { + v_UC_VCI_created := true; + log("*** TC_ATSP_SE_BV_07: INFO: Expected UC-VCI creation event received ***"); + f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); + if(not v_BC_VCI_created) + { + tc_wait.start; + repeat; + } + tc_wait.stop; + } + [not v_BC_VCI_created] cfPort.receive(v_cf_BC_VCI_Event) -> value v_result { + v_BC_VCI_created := true; + log("*** TC_ATSP_SE_BV_07: INFO: Expected BC-VCI creation event received ***"); + f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); + if(not v_UC_VCI_created) + { + tc_wait.start; + repeat; + } + tc_wait.stop; + } + [] cfPort.receive(CfAtspEventInd : ?) -> value v_result { + if (v_discard == false) { + tc_wait.stop; + log("*** TC_ATSP_SE_BV_07: ERROR: An unexpected MI-REQUEST was received ***", v_result); + f_selfOrClientSyncAndVerdict("error", e_timeout); // to be checked + } else { + log("*** TC_ATSP_SE_BV_07: INFO: An unexpected MI-REQUEST was received, repeating check ***"); + f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); + repeat; + } + } + [] tc_wait.timeout { + log("*** TC_ATSP_SE_BV_07: ERROR: Timeout while waiting for event check result ***"); + f_selfOrClientSyncAndVerdict("error", e_timeout); // to be checked + } + } // End of 'alt' statement + + // Clause 'then' + // the IUT is in the state "active" + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_SE_BV_07: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_07: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_SE_BV_07 + + /** + * @desc TP: IUT with CI class "CIC-l3" automatically creates a BC-VCI and known MC-VCIs and reaches the CI state "active" + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_CIC_l3 AND PICS_MCVCI
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "registered", and at least one MAC multicast group is known to the IUT
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT has finished the registration procedure
+             *          }
+             *     then {
+             *          the IUT creates a BC-VCI and a MC-VCI for each known MAC multicast group
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT created a BC-VCI and the MC-VCI(s)
+             *          }
+             *     then {
+             *          the IUT is in the state "active"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/08 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_08() runs on ItsCalm system ItsCalmSystem { + // Local variables + var integer v_messageCounter; + var CfAtspEventInd v_result; + var template CfAtspEventInd v_cf_BC_VCI_Event; + var boolean v_BC_VCI_created; + var template CfAtspEventInd v_cf_MC_VCI_Event; + var boolean v_MC_VCI_created; + var boolean v_discard := true; + + // Test control + if (not(PICS_CIC_l3 and PICS_MCVCI)) { + log("*** TC_ATSP_SE_BV_08: ERROR: 'PICS_CIC_l3' OR 'PICS_MCVCI' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // Request operator to switch on the SUT or to activate the IUT + action("Switch on SUT or activate IUT"); + + // Test Body + // Clause 'when' + f_cnAwaitRegistrationCI(f_get_CI_LinkID(), PX_CI_MED_TYPE, true); + + // Clause 'then' + //the IUT creates a BC-VCI(applying MAC broadcast communications) + v_BC_VCI_created := false; + v_MC_VCI_created := false; + v_cf_BC_VCI_Event := mw_cfAtspRequestRequest( + mw_miEventsRequest(mw_miLinkIndAny, ?, mw_miEvent21218_3(mw_miVCICreDelRes(PX_REMOTE_CIID_BC, f_get_CI_Local_CIID())))); + v_cf_MC_VCI_Event := mw_cfAtspRequestRequest( + mw_miEventsRequest(mw_miLinkIndAny, ?, mw_miEvent21218_3(mw_miVCICreDelRes(PX_REMOTE_CIID_MC, f_get_CI_Local_CIID())))); + + log("*** TC_ATSP_SE_BV_08: INFO: Expected MI-Request-request: ", v_cf_BC_VCI_Event, " ***"); + log("*** TC_ATSP_SE_BV_08: INFO: Expected MI-Request-request: ", v_cf_MC_VCI_Event, " ***"); + tc_wait.start; + alt { + [not v_BC_VCI_created] cfPort.receive(v_cf_BC_VCI_Event) -> value v_result { + v_BC_VCI_created := true; + log("*** TC_ATSP_SE_BV_08: INFO: Expected BC-VCI creation event received ***"); + f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); + if(not v_MC_VCI_created) + { + tc_wait.start; + repeat; + } + tc_wait.stop; + } + [not v_MC_VCI_created] cfPort.receive(v_cf_MC_VCI_Event) -> value v_result{ + v_MC_VCI_created := true; + log("*** TC_ATSP_SE_BV_08: INFO: Expected MC-VCI creation event received ***"); + f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); + if(not v_BC_VCI_created) + { + tc_wait.start; + repeat; + } + tc_wait.stop; + } + [] cfPort.receive(mw_miEventMI_RequestRequest_any) -> value v_result { + if (v_discard == false) { + tc_wait.stop; + log("*** TC_ATSP_SE_BV_08: ERROR: An unexpected MI-REQUEST was received ***", v_result); + f_selfOrClientSyncAndVerdict("error", e_timeout); // to be checked + } else { + log("*** TC_ATSP_SE_BV_08: INFO: An unexpected MI-REQUEST was received, repeating check ***"); + f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); + repeat; + } + } + [] tc_wait.timeout { + log("*** TC_ATSP_SE_BV_08: ERROR: Timeout while waiting for event check result ***"); + f_selfOrClientSyncAndVerdict("error", e_timeout); // to be checked + } + } // End of 'alt' statement + + // Clause 'then' + // the IUT is in the state "active" + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_SE_BV_08: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_08: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_SE_BV_08 + + /** + * @desc TP: IUT with CI class "CIC-l1" or "CIC-il1" automatically creates a UC-VCI and a BC-VCI and known MC-VCIs and reaches the CI state "active" + * @author STF 455 + * @config + * + *
+             * PICS selection: (PICS_CIC_l1 OR PICS_CIC_il1) AND PICS_MCVCI
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "registered", and at least one MAC multicast group is known to the IUT
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT has finished the registration procedure
+             *          }
+             *     then {
+             *          the IUT creates a UC-VCI and a BC-VCI and the MC-VCI(s)
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT created a UC-VCI and a BC-VCI and the MC-VCIs
+             *          }
+             *     then {
+             *          the IUT is in the state "active"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/09 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_09() runs on ItsCalm system ItsCalmSystem { + // Local variables + var boolean v_discard; + var CfAtspEventInd v_result; + var template CfAtspEventInd v_cf_UC_VCI_Event; + var boolean v_UC_VCI_created; + var template CfAtspEventInd v_cf_BC_VCI_Event; + var boolean v_BC_VCI_created; + var template CfAtspEventInd v_cf_MC_VCI_Event; + var boolean v_MC_VCI_created; + + // Test control + if (not((PICS_CIC_l1 or PICS_CIC_il1)and PICS_MCVCI)) { + log("*** TC_ATSP_SE_BV_09: ERROR: ('PICS_CIC_l1' OR 'PICS_CIC_il1') AND 'PICS_MCVCI' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // Request operator to switch on the SUT or to activate the IUT + action("Switch on SUT or activate IUT"); + + // Test Body + // Clause 'when' + f_cnAwaitRegistrationCI(f_get_CI_LinkID(), PX_CI_MED_TYPE, true); + + // Clause 'when' + v_UC_VCI_created := false; + v_BC_VCI_created := false; + v_MC_VCI_created := false; + + //TODO: correct template values for UC-VCI, BC-VCI and MC-VCI + v_cf_UC_VCI_Event := mw_cfAtspRequestRequest( + mw_miEventsRequest(mw_miLinkIndAny, ?, mw_miEvent21218_3(mw_miVCICreDelRes(PX_REMOTE_CIID_UC, f_get_CI_Local_CIID())))); + v_cf_BC_VCI_Event := mw_cfAtspRequestRequest( + mw_miEventsRequest(mw_miLinkIndAny, ?, mw_miEvent21218_3(mw_miVCICreDelRes(PX_REMOTE_CIID_BC, f_get_CI_Local_CIID())))); + v_cf_MC_VCI_Event := mw_cfAtspRequestRequest( + mw_miEventsRequest(mw_miLinkIndAny, ?, mw_miEvent21218_3(mw_miVCICreDelRes(PX_REMOTE_CIID_MC, f_get_CI_Local_CIID())))); + + log("*** TC_ATSP_SE_BV_09: INFO: Expected MI-Request-request: ", v_cf_UC_VCI_Event, " ***"); + log("*** TC_ATSP_SE_BV_09: INFO: Expected MI-Request-request: ", v_cf_BC_VCI_Event, " ***"); + log("*** TC_ATSP_SE_BV_09: INFO: Expected MI-Request-request: ", v_cf_MC_VCI_Event, " ***"); + tc_wait.start; + alt { + [not v_UC_VCI_created] cfPort.receive(v_cf_UC_VCI_Event) -> value v_result { + v_UC_VCI_created := true; + log("*** TC_ATSP_SE_BV_09: INFO: Expected UC-VCI creation event received ***"); + f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); + if(not v_BC_VCI_created or not v_MC_VCI_created) + { + tc_wait.start; + repeat; + } + tc_wait.stop; + } + [not v_BC_VCI_created] cfPort.receive(v_cf_BC_VCI_Event) -> value v_result{ + v_BC_VCI_created := true; + log("*** TC_ATSP_SE_BV_09: INFO: Expected BC-VCI creation event received ***"); + f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); + if(not v_UC_VCI_created or not v_MC_VCI_created) + { + tc_wait.start; + repeat; + } + tc_wait.stop; + } + [not v_MC_VCI_created] cfPort.receive(v_cf_MC_VCI_Event) -> value v_result{ + v_MC_VCI_created := true; + log("*** TC_ATSP_SE_BV_09: INFO: Expected MC-VCI creation event received ***"); + f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); + if(not v_UC_VCI_created or not v_BC_VCI_created) + { + tc_wait.start; + repeat; + } + tc_wait.stop; + } + [] cfPort.receive(mw_miEventMI_RequestRequest_any) -> value v_result { + if (v_discard == false) { + tc_wait.stop; + log("*** TC_ATSP_SE_BV_09: ERROR: An unexpected MI-REQUEST was received ***", v_result); + f_selfOrClientSyncAndVerdict("error", e_timeout); // to be checked + } else { + log("*** TC_ATSP_SE_BV_09: INFO: An unexpected MI-REQUEST was received, repeating check ***"); + f_cnConfirmMI_RequestCI(m_cfAtspRequestConfirm(v_result.miRequestRequest, c_ciErrStatusSuccess)); + repeat; + } + } + [] tc_wait.timeout { + log("*** TC_ATSP_SE_BV_09: ERROR: Timeout while waiting for event check result ***"); + f_selfOrClientSyncAndVerdict("error", e_timeout); // to be checked + } + } // End of 'alt' statement + + // Clause 'then' + // the IUT is in the state "active" + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_SE_BV_09: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_09: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_SE_BV_09 + + /** + * @desc TP: IUT deregisters correctly from the management entity + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_DYNREG
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state different to "existent" or "not_existent"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the COMMAND "CIstateChng" with the value "deregister"
+             *          }
+             *     then {
+             *          the IUT performs deregistration
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT deregistered
+             *          }
+             *     then {
+             *          the IUT no more is addressable by the ITS-S management entity
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/10 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_10() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + + // Test control + if (not(PICS_DYNREG)) { + log("*** TC_ATSP_SE_BV_10: ERROR: 'PICS_DYNREG' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + + // Get CI status + v_CIstatus := f_initialCIstatesOperational(); + + // Test Body + // Clause 'when' + f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miStateChangeCommandRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + c_ciStateChngDeregister), true); + //Clause 'then' + // the IUT deregistered !!??!! ToDo: This might not be possible. Check with ISO + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5( + mw_miCIStatusParam(c_ciStatusNot_existent)), true); + // and is no more addressable + f_cnTestGetCiStatusParameterValueNoReplyExpected(f_get_CI_LinkID()); + + log("*** TC_ATSP_SE_BV_10: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_10: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_SE_BV_10 + + /** + * @desc TP: IUT performs inactivation + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_INACT
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active" or "connected" or "suspended"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the COMMAND "CIstateChng" with the value "inactivate"
+             *          }
+             *     then {
+             *          the IUT performs inactivation
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT performed inactivation
+             *          }
+             *     then {
+             *          the IUT no more has VCIs
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/11 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_11() runs on ItsCalm system ItsCalmSystem { + // Local variables + var IParamList v_IparamList; + var CIstatus v_CIstatus; + + // Test control + if (not(PICS_INACT)) { + log("*** TC_ATSP_SE_BV_11: ERROR: 'PICS_INACT' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + + // Get CI status + v_CIstatus := f_cnGetCiStatusParameterValueCI( f_get_CI_LinkID()); + if( (v_CIstatus == c_ciStatusUnknown) or (v_CIstatus == c_ciStatusNot_existent) or (v_CIstatus == c_ciStatusExistent) or (v_CIstatus == c_ciStatusInactive) or (v_CIstatus == c_ciStatusRegistered)) + // wrong status + { + // Request operator to switch on the SUT or to activate the IUT + action("Switch on SUT or activate IUT"); + f_cnAwaitRegistrationCI(f_get_CI_LinkID(), PX_CI_MED_TYPE, true); + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); + v_CIstatus := f_cnGetCiStatusParameterValueCI( f_get_CI_LinkID()); + } + // check again CI status after activation of IUT + if( (v_CIstatus == c_ciStatusUnknown) or (v_CIstatus == c_ciStatusNot_existent) or (v_CIstatus == c_ciStatusExistent) or (v_CIstatus == c_ciStatusInactive) or (v_CIstatus == c_ciStatusRegistered)) // wrong status + { + log("*** TC_ATSP_BV_11: ERROR: Invalid CI status returned ***", v_CIstatus); + f_selfOrClientSyncAndVerdict("error", e_timeout); // Might be just a time-out error + stop; + } + else + { + log("*** TC_ATSP_BV_11: Allowed CI status returned ***", v_CIstatus); + } + + // Test Body + // Clause 'when' + // the IUT receives the COMMAND "CIstateChng" with the value "inactivate" + f_cnTriggerStateChangeAndWaitCI(f_get_CI_LinkID(), c_ciStateChngInactivate, c_ciStatusInactive, false); + + //Clause 'when' + // the IUT performed inactivation + + + //Clause 'then' + v_IparamList := f_cnGetIParameterValueCI(f_get_CI_LinkID(), {c_ciIParamNoVirtualCI}, false ); + if(lengthof(v_IparamList) == 1 and v_IparamList[0].paramNo == c_ciIParamNoVirtualCI and f_getVirualCIcount(v_IparamList[0]) == 0) + { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_SE_BV_11: INFO: test body done ***"); + } + else if(lengthof(v_IparamList) == 0) + { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_SE_BV_11: INFO: test body done ***"); + } + else + { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + log("*** TC_ATSP_SE_BV_11: ERROR: Inactivated CI still has VCIs ***"); + } + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_11: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_SE_BV_11 + + /** + * @desc TP: IUT performs activation + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_ACT
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "inactive"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the COMMAND "CIstateChng" with the value "activate"
+             *          }
+             *     then {
+             *          the IUT performs activation, i.e. reaches the CI state "registered"
+             *          }
+             *     }
+              * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/12 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_12() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + var template MI_Command_request v_stateChangeRequest; + + // Test control + if (not(PICS_ACT)) { + log("*** TC_ATSP_SE_BV_12: ERROR: 'PICS_ACT' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + + // Get CI status + v_CIstatus := f_cnGetCiStatusParameterValueCI( f_get_CI_LinkID()); + if( (v_CIstatus == c_ciStatusUnknown) or (v_CIstatus == c_ciStatusNot_existent) or (v_CIstatus == c_ciStatusExistent) or (v_CIstatus == c_ciStatusInactive) or (v_CIstatus == c_ciStatusRegistered)) + // wrong status + { + // Request operator to switch on the SUT or to activate the IUT + action("Switch on SUT or activate IUT"); + f_cnAwaitRegistrationCI(f_get_CI_LinkID(), PX_CI_MED_TYPE, true); + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); + v_CIstatus := f_cnGetCiStatusParameterValueCI( f_get_CI_LinkID()); + } + // check again CI status after activation of IUT + if( (v_CIstatus == c_ciStatusUnknown) or (v_CIstatus == c_ciStatusNot_existent) or (v_CIstatus == c_ciStatusExistent) or (v_CIstatus == c_ciStatusInactive) or (v_CIstatus == c_ciStatusRegistered)) // wrong status + { + log("*** TC_ATSP_BV_12: ERROR: Invalid CI status returned ***", v_CIstatus); + f_selfOrClientSyncAndVerdict("error", e_timeout); // Might be just a time-out error + stop; + } + else + { + log("*** TC_ATSP_BV_12: Allowed CI status returned ***", v_CIstatus); + } + // Inactivate CI (required initial state) + f_cnTriggerStateChangeAndWaitCI(f_get_CI_LinkID(), c_ciStateChngInactivate, c_ciStatusInactive, false); + + + // Test Body + // Clause 'when' + //the IUT receives the COMMAND "CIstateChng" with the value "activate" + //inactive->active state chenge is not possible inactive->registered->active is possible + //f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miStateChangeCommandRequest(f_get_CI_LinkID(), f_getNextCommandRef(), c_ciStatusRegistered), true); + v_stateChangeRequest := m_miStateChangeCommandRequest(f_get_CI_LinkID(), f_getNextCommandRef(), c_ciStatusRegistered); + f_cnSendMICOMMAND_RequestCI(v_stateChangeRequest); + + //Clause 'then' + // the IUT performs activation, i.e. reaches the CI state "registered" + f_cnAwaitRegistrationCI(f_get_CI_LinkID(), PX_CI_MED_TYPE, true); + + f_cnAwaitCommandConfirmSuccess(v_stateChangeRequest, false); + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); + + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); // ToDo: Is this needed here? + log("*** TC_ATSP_SE_BV_12: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_12: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_SE_BV_12 + + /** + * @desc TP: IUT performs suspension + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_SUSP
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "connected"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the COMMAND "CIstateChng" with the value "suspend"
+             *          }
+             *     then {
+             *          the IUT performs suspension
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT performed suspension
+             *          }
+             *     then {
+             *          the IUT still accepts new transmission requests at the IN-SAP, without performing the transmission
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/13 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_13() runs on ItsCalm system ItsCalmSystem { + //TODO: Ensure IUT is in "connected" state + // + + + // Local variables + var CIstatus v_CIstatus; + var template AtspInd v_atspEventInd; + + // Test control + if (not(PICS_SUSP)) { + log("*** TC_ATSP_SE_BV_13: ERROR: 'PICS_ACT' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + + // IUT in interim CI state "active" + v_CIstatus := f_initialCIstateActive(); + // Connect CI by sending a frame + f_atspSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_TesterCI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_TesterDestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest); + + // Test Body + // Clause 'when' + //the IUT receives the COMMAND "CIstateChng" with the value "suspend" + f_cnTriggerStateChangeAndWaitCI(f_get_CI_LinkID(), c_ciStateChngSuspend, c_ciStatusSuspended, false); + + //Clause 'then' + // the IUT still accepts new transmission requests at the IN-SAP, without performing the transmission + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest); + + //Check whether the transmission request is performed unexpected + v_atspEventInd := ?; + + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_SE_BV_13: INFO: Unexpected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_wait.timeout { + log("*** TC_ATSP_SE_BV_13: INFO: Expected time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_13: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_SE_BV_13 + + /** + * @desc TP: IUT performs suspension + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_RES
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "suspended"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the COMMAND "CIstateChng" with the value "resume"
+             *          }
+             *     then {
+             *          the IUT performs resuming
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT performed resuming
+             *          }
+             *     then {
+             *          the IUT starts transmisison of pending packets
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/14 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_14() runs on ItsCalm system ItsCalmSystem { + // Local variables + var AtspInd v_result; + var template AtspInd v_atspEventInd; + var CIstatus v_CIstatus; + + // Test control + if (not(PICS_RES)) { + log("*** TC_ATSP_SE_BV_14: ERROR: 'PICS_ACT' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + + // Get IUT in CI state "active + v_CIstatus := f_initialCIstateActive(); + // Get IUT in CI state "connected" + f_atspSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_TesterCI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_TesterDestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest); + + // Force the IUT to enter the state suspended + f_cnTriggerStateChangeAndWaitCI(f_get_CI_LinkID(), c_ciStateChngSuspend, c_ciStatusSuspended, true); + // Request IUT to send several BC frames + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityAverage); + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataAA, + m_inUserPriorityHighest); + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataBB, + m_inUserPriorityLowest); + + // Check that IUT does not send the frames + v_atspEventInd := ?; + + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_SE_BV_14: INFO: Unexpected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_wait.timeout { + log("*** TC_ATSP_SE_BV_14: INFO: Expected time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } // End of 'alt' statement + + // Test Body + // Clause 'when' + // the IUT receives the COMMAND "CIstateChng" with the value "resume" + f_cnTriggerStateChangeAndWaitCI(f_get_CI_LinkID(), c_ciStateChngResume, c_ciStatusConnected, true); + // the IUT performed resuming + + //Clause 'then' + // the IUT starts transmisison of pending packets + v_atspEventInd := ?; + + // Clause 'then' receive via atspPort + for( var integer x:=1; x <4; x := x+1) { + tc_wait.start; + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_SE_BV_14: INFO: Expected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_SE_BV_14: INFO: test body done ***"); + } + [] tc_wait.timeout { + log("*** TC_ATSP_SE_BV_14: INFO: Unexpected time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + } + + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_SE_BV_14: INFO: test body done ***"); + + log("*** TC_ATSP_SE_BV_14: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_14: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_SE_BV_14 + + /** + * @desc TP: IUT of CIC-l2 and CIAC-2 performs connection manually + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_CIC_l2 AND PICS_CIAC2
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active",
+             *       valid access information in I-Parameters "SIMpin", "ProviderInfo" is present,
+             *       the IUT is exposed to the signals of a related base station,
+             *       I-Parameter Connect is set to "manual"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the COMMAND "CONcmd"
+             *          }
+             *     then {
+             *          the IUT performs connection
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/15 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_15() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + + // Test control + if (not(PICS_CIC_l2 and PICS_CIAC2)) { + log("*** TC_ATSP_SE_BV_15: ERROR: 'PICS_CIC_l2 AND PICS_CIAC2' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Get CI status + v_CIstatus := f_initialCIstateActive(); + // Set I-Parameter Connect to "manual" + // set access credentials in I-Parameters "SIMpin", "ProviderInfo" + // ToDo + // + + // Test Body + // Clause 'when' + // the IUT receives the COMMAND "CONcmd" + // Clause 'then' + // the IUT performs connection + f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miCONcmdCommandRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + c_ciConConnect), true); + + // Check whether CI status is now "connected" + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusConnected)), true); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_15: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_SE_BV_15 + + /** + * @desc TP: IUT CIC-l2 performs connection automatically + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_CIC_l2
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active",
+             *       valid access information in I-Parameters "SIMpin", "ProviderInfo" is present,
+             *       the IUT is not exposed to the signals of a related base station,
+             *       I-Parameter Connect is set to "automatic"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT is exposed to the signal of a related base station
+             *          }
+             *     then {
+             *          the IUT performs connection
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/16 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_16() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + + // Test control + if (not(PICS_CIC_l2)) { + log("*** TC_ATSP_SE_BV_15: ERROR: 'PICS_CIC_l2' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Initial conditions + // CI status has to be "active" + v_CIstatus := f_initialCIstateActive(); + // Set I-Parameter Connect to "automatic" + // set access credentials in I-Parameters "SIMpin", "ProviderInfo" + // ToDo + + // Test Body + // Clause 'when' + // the IUT is exposed to the signal of a related base station + action("Expose IUT to signal of base station"); + + // Clause 'then' + // the IUT performs connection + // Check whether CI status is now "connected" + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusConnected)), true); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_16: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_SE_BV_16 + + /** + * @desc TP: IUT CIAC-2 or CIAC-3 performs disconnection + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_DISCONN
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "connected"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the COMMAND "CIstateChng" with the value "disconnect"
+             *          }
+             *     then {
+             *          the IUT performs disconnection
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT performed disconnection
+             *          }
+             *     then {
+             *          the IUT is in the CI state "active"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BV/17 + * @remark to be created + */ + testcase TC_ATSP_SE_BV_17() runs on ItsCalm system ItsCalmSystem { + // Local variables +// var integer v_messageCounter; + var CIstatus v_CIstatus; + + // Test control + if (not(PICS_DISCONN)) { + log("*** TC_ATSP_SE_BV_17: ERROR: 'PICS_DISCONN' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // CI status has to be "active" + v_CIstatus := f_initialCIstateActive(); + // + // Connect CI by sending a frame + f_atspSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_TesterCI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_TesterDestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest); + + + // Test Body + // Clause 'when' + //the IUT receives the COMMAND "CIstateChng" with the value "disconnect" + f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miStateChangeCommandRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + c_ciStateChngDisconnect), true); + + //Clause 'then' + // the IUT is in the CI state "active" + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_SE_BV_17: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_17: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_SE_BV_17 + + } // End of group validBehavior + + + group invalidBehavior { + + /** + * @desc TP: IUT rejects an invalid CI state transition request + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_DYNREG OR PICS_INACT OR PICS_ACT OR PICS_SUSP OR PICS_RES OR PICS_CONN OR PICS_DISCONN
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in any CI state except the CI state "existent" or "not-existent"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the MI-COMMAND "CIstateChng" with an invalid value of CIstatus
+             *          }
+             *     then {
+             *          the IUT acknowledges with error code "INVALID COMMAND/REQUEST VALUE"
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT acknowledged with error code "INVALID COMMAND/REQUEST VALUE"
+             *          }
+             *     then {
+             *          the IUT is still in the initial CI state
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BI/01 + * @remark to be created + */ + testcase TC_ATSP_SE_BI_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + var integer v_messageCounter; + var template(value) MI_Command_request v_stateChangeCommand; + var CIstatus v_CIstatus; + var CIstatus v_CIstatus1; + + // Test control + if (not(PICS_DYNREG or PICS_INACT or PICS_ACT or PICS_SUSP or PICS_RES or PICS_CONN or PICS_DISCONN)) { + log("*** TC_ATSP_SE_BI_01: ERROR: 'PICS_DYNREG' or 'PICS_INACT' or 'PICS_ACT'", + " or 'PICS_SUSP' or 'PICS_RES' or 'PICS_CONN' or 'PICS_DISCONN' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // the IUT being in any CI state except the CI state "existent" or "not-existent" + // Check initial CI state + v_CIstatus := f_initialCIstatesOperational(); + + // Test Body + // Clause 'when' + //the IUT receives the MI-COMMAND "CIstateChng" with an invalid value of CIstatus + v_stateChangeCommand := m_miStateChangeCommandRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + c_ciStateChngInvalidValue); + f_cnSendMICOMMAND_RequestCI(v_stateChangeCommand); + + //Clause 'then' + // the IUT acknowledged with error code "INVALID COMMAND/REQUEST VALUE" + f_cnAwaitCommandConfirm(v_stateChangeCommand, c_ciErrStatusCmdReqVal, true); + + + //Clause 'then' + // the IUT is still in the initial CI state + v_CIstatus1 := f_cnGetCiStatusParameterValueCI(f_get_CI_LinkID()); + if(v_CIstatus1 == v_CIstatus) { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** TC_ATSP_SE_BI_01: INFO: CI status changed unexpected", v_CIstatus1); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + + log("*** TC_ATSP_SE_BI_01: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BI_01: INFO: Postamble: done ***"); + + + } // End of testcase TC_ATSP_SE_BI_01 + + /** + * @desc TP: IUT ignores a connect request with missing access information + * @author STF 455 + * @config + * + *
+             * PICS selection: (PICS_CIAC2 OR PICS_CIAC3) AND PICS_CONN
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active",
+             *       I-Parameter "Connect" is set to "manual",
+             *       no access information in I-Parameters "SIMpin", "ProviderInfo" is present
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the MI-COMMAND "CONcmd" with value "connect"
+             *          }
+             *     then {
+             *          the IUT acknowledges with error code "INVALID COMMAND/REQUEST VALUE"
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT acknowledged with error code "INVALID COMMAND/REQUEST VALUE"
+             *          }
+             *     then {
+             *          the IUT is still in the CI state "active"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 SE/BI/02 + * @remark to be created + */ + testcase TC_ATSP_SE_BI_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + var template MI_Command_request v_stateChngCmdReq; + + // Test control + if (not(PICS_CIC_l2 and PICS_CIAC2)) { + log("*** TC_ATSP_SE_BV_15: ERROR: 'PICS_CIC_l2 AND PICS_CIAC2' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // CI status has to be "active" + v_CIstatus := f_initialCIstateActive(); + // Set I-Parameter Connect to "manual" + // ToDo + // + + // Test Body + // Clause 'when' + // the IUT receives the COMMAND "CONcmd" + v_stateChngCmdReq := m_miStateChangeCommandRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + c_ciStateChngConnect); + f_cnSendMICOMMAND_RequestCI(v_stateChngCmdReq); + // Clause 'then' + // the IUT rejects connection + f_cnAwaitCommandConfirm(v_stateChngCmdReq, c_ciErrStatusCmdReqVal, false); + + // Check whether CI status is still "active" + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_5(mw_miCIStatusParam(c_ciStatusActive)), true); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_SE_BV_15: INFO: Postamble: done ***"); + + + } // End of testcase TC_ATSP_SE_BI_02 + + } // End of group invalidBehavior + + } // End of group stateEventTransitions + + + + // MIB I-Parameters + group mibIparameters { + + + group validBehavior { + + /** + * @desc TP: IUT correctly reads I-Parameters with Read/Write access or Read-only access + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_IPRW OR PICS_IPRO
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the MI-GET command for a supported I-Paramter with Read/Write access or Read-only access
+             *          }
+             *     then {
+             *          the IUT reports the proper value of this I-Parameter
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 MB/BV/01 + * @remark to be created + */ + testcase TC_ATSP_MB_BV_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + var IParamNoList v_requestedParameters; + var IParamList v_returnedValues; + var CIstatus v_CIstatus; + var I_Param v_Iparameter; + + // Test control + if (not(PICS_IPRW or PICS_IPRO)) { + log("*** TC_ATSP_MB_BV_01: ERROR: 'PICS_IPRW OR PICS_IPRO' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // IUT has to be in the CI state "active" + v_CIstatus := f_initialCIstateActive(); + + // Test Body + // Clause 'when' + // the IUT receives the MI-GET command for a supported I-Paramter with Read/Write access or Read-only access + v_requestedParameters := { c_ciIParamNoCiStatus }; + v_returnedValues := f_cnGetIParameterValueCI(f_get_CI_LinkID(), v_requestedParameters, false); + + // Clause 'then' + if(not f_cnCheckOneIparamGetSuccess(c_ciIParamNoCiStatus, v_returnedValues, v_Iparameter)){ + // error + log("*** TC_ATSP_MB_BV_01: INFO: MI-Get.request failed ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + // proper reading + if(v_Iparameter.parameter.CIstatus != c_ciStatusActive){ + // unexpected value + log("*** TC_ATSP_MB_BV_01: INFO: MI-Get.confirm unexpected CiStatus value ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + // expected value + log("*** TC_ATSP_MB_BV_01: INFO: Received expected I-Parameter value ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } + + log("*** TC_ATSP_MB_BV_01: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_MB_BV_01: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_MB_BV_01 + + /** + * @desc TP: IUT correctly writes I-Parameters with Read/Write access or Write-only access + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_IPRW OR PICS_IPWO
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the MI-SET command for a supported I-Paramter with Read/Write access
+             *          }
+             *     then {
+             *          the IUT accepts the new value of this I-Parameter
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 MB/BV/02 + * @remark to be created + */ + testcase TC_ATSP_MB_BV_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + var IParamList v_writeValues; + var Errors v_cfSetErrorList; + var I_Param v_writeParameter; + + // Test control + if (not(PICS_IPRW or PICS_IPWO)) { + log("*** TC_ATSP_MB_BV_01: ERROR: 'PICS_IPRW OR PICS_IPWO' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + + // Test Body + // Clause 'when the IUT receives the MI-SET command for a supported I-Paramter with Read/Write access' + v_writeParameter := PX_CI_SUPPORT_PARAM_WR; + //r.paramNo := c_ciIParamNoDataRate; PX_CI_SUPPORT_NO_WRITE_ACCESS_PARAM + //v_writeParameter.parameter.DataRate := 125; + v_writeValues := {v_writeParameter}; + v_cfSetErrorList := f_cnSetIParameterValueCI(f_get_CI_LinkID(),v_writeValues, false ); + + + // Clause 'then the IUT accepts the new value of this I-Parameter' + if (f_cnCheckOneIparamSetSuccess(PX_CI_SUPPORT_PARAM_WR_NO, v_cfSetErrorList)) { + log("*** TC_ATSP_MB_BV_02: INFO: MI-Set.confirm was successfully executed ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** TC_ATSP_MB_BV_02: ERROR: MI-Set was not properly acknowledged ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + stop; + } + + // Postamble + // here we could read the value to cross-check proper writing. + + } // End of testcase TC_ATSP_MB_BV_02 + + /** + * @desc TP: IUT correctly monitors change of value of I-Parameters + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_MONITOR AND (PICS_IPRW OR PICS_IPRO OR PICS_IPNO)
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the MI-COMMAND "Monitor" to activate monitoring of value changes for a supported I-Paramter
+             *          }
+             *     then {
+             *          the IUT reports automatically all value changes of this I-Parameter with MI-REQUEST "Events(E21218-5)"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 MB/BV/03 + * @remark to be created + */ + testcase TC_ATSP_MB_BV_03() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + + // Test control + if (not(PICS_MONITOR and (PICS_IPRW or PICS_IPRO or PICS_IPNO))) { + log("*** TC_ATSP_MB_BV_03: ERROR: 'PICS_MONITOR AND (PICS_IPRW OR PICS_IPRO OR PICS_IPNO)' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + + // Test Body + // Clause 'when' + + // Clause 'then' + + // Postamble + + } // End of testcase TC_ATSP_MB_BVB_03 + + } // End of group validBehavior + + + group invalidBehavior { + + /** + * @desc TP: IUT correctly acknowledges MI-GET requests to non-existent I-Paramters + * @author STF 455 + * @config + * + *
+             * PICS selection: TRUE
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the MI-GET command for an I-Parameter which is not existent
+             *          }
+             *     then {
+             *          the IUT acknowledges with error code "INVALID PARAMETER NUMBER"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 MB/BI/01 + * @remark to be created + */ + testcase TC_ATSP_MB_BI_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + var IParamNoList v_requestedParameters; + var IParamList v_returnedValues; + var I_Param v_Iparameter; + + // Test control + // always true + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + + // Test Body + // Clause 'when' + // the IUT receives the MI-GET command for a supported I-Paramter with Read/Write access or Read-only access + v_requestedParameters := { PX_CI_UNKNOWN_PARAM_NO }; + v_returnedValues := f_cnGetIParameterValueCI(f_get_CI_LinkID(), v_requestedParameters, false); + + if(f_cnCheckOneIparamGetSuccess(PX_CI_UNKNOWN_PARAM_NO, v_returnedValues, v_Iparameter)){ + // error + log("*** TC_ATSP_MB_BV_01: ERROR: MI-Get.request returned unknown I-Parameter ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + // error detected as expected + log("*** TC_ATSP_MB_BV_01: INFO: MI-Get.confirm failed as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + +/* if(lengthof(v_returnedValues) != 1){ + log("*** TC_ATSP_MB_BI_01: INFO: MI-Get.confirm contained incorrect number of parameters ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else if(v_returnedValues[0].paramNo != c_ciIParamNoErrors) { + log("*** TC_ATSP_MB_BI_01: INFO: MI-Get.confirm contained incorrect parameter ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else if(v_returnedValues[0].parameter.Errors[0] != {PX_CI_UNKNOWN_PARAM, c_ciErrStatusInvalParamNo}){ + log("*** TC_ATSP_MB_BI_01: INFO: MI-Get.confirm unexpected Error Code ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + log("*** TC_ATSP_MB_BI_01: INFO: Received expected Error Code ***", v_returnedValues[0].parameter.Errors); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + }*/ + + log("*** TC_ATSP_MB_BI_01: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_MB_BI_01: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_MB_BI_01 + + /** + * @desc TP: IUT correctly acknowledges MI-SET requests to non-supported I-Paramters + * @author STF 455 + * @config + * + *
+             * PICS selection: TRUE
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the MI-SET command for an I-Parameter which is not supported
+             *          }
+             *     then {
+             *          the IUT acknowledges with error code "INVALID PARAMETER NUMBER"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 MB/BI/02 + * @remark to be created + */ + testcase TC_ATSP_MB_BI_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + var IParamList v_writeValues; + var Errors v_cfSetErrorList; + var I_Param v_writeParameter; + + // Test control + // always true + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + + // Test Body + // Clause 'when the IUT receives the MI-SET command for a supported I-Paramter with Read/Write access' + v_writeParameter := PX_CI_NO_SUPPORT_PARAM; + v_writeValues := {v_writeParameter}; + v_cfSetErrorList := f_cnSetIParameterValueCI(f_get_CI_LinkID(),v_writeValues, false ); + + + // Clause 'then the IUT accepts the new value of this I-Parameter' + if (not f_cnCheckOneIparamSetSuccess(PX_CI_NO_SUPPORT_PARAM_NO, v_cfSetErrorList)) { + log("*** TC_ATSP_MB_BI_02: INFO: MI-Set.confirm was successfully executed reporting errors ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** TC_ATSP_MB_BI_02: ERROR: MI-Set was not properly acknowledged ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + + // Postamble + // here we could read the value to cross-check proper writing. + + } // End of testcase TC_ATSP_MB_BI_02 + + /** + * @desc TP: IUT correctly acknowledges MI-SET requests to I-Paramters with Read-only access or Notify-only access + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_IPRO OR PICS_IPNO
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the MI-SET command for an I-Parameter with Read-only or Notify-only access
+             *          }
+             *     then {
+             *          the IUT acknowledges with error code "ACCESS VIOLATION"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 MB/BI/03 + * @remark to be created + */ + testcase TC_ATSP_MB_BI_03() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + var IParamList v_writeValues; + var Errors v_cfSetErrorList; + var I_Param v_writeParameter; + + // Test control + if (not(PICS_IPRO or PICS_IPNO)) { + log("*** TC_ATSP_MB_BI_03: ERROR: 'PICS_IPRO OR PICS_IPNO' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + + // Test Body + // Clause 'when the IUT receives the MI-SET command for a write-only or notify-only I-Paramter' + v_writeParameter := PX_CI_SUPPORT_NO_WRITE_ACCESS_PARAM; + v_writeValues := {v_writeParameter}; + v_cfSetErrorList := f_cnSetIParameterValueCI(f_get_CI_LinkID(),v_writeValues, false ); + + + // Clause then the IUT rejects the write command + if (not f_cnCheckOneIparamSetSuccess(PX_CI_SUPPORT_NO_WRITE_ACCESS_PARAM_NO, v_cfSetErrorList)) { + log("*** TC_ATSP_MB_BI_03: INFO: MI-Set.confirm was successfully executed ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** TC_ATSP_MB_BI_03: ERROR: MI-Set was not properly acknowledged ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + + // Postamble + // here we could read the value to cross-check proper writing. + + } // End of testcase TC_ATSP_MB_BI_03 + + } // End of group invalidBehavior + + } // End of group mibIparameters + + + + // Handling of CIs + group handlingOfCIs { + + + group validBehavior { + + /** + * @desc TP: IUT correctly handles COMMAND "WakeUp" + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_WAKEUP
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the MI-COMMAND "WakeUp"
+             *          }
+             *     then {
+             *          the IUT periodically sends out wake-up messages
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 HC/BV/01 + * @remark to be created + */ + testcase TC_ATSP_HC_BV_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + + // Test control + if (not(PICS_WAKEUP)) { + log("*** TC_ATSP_HC_BV_01: ERROR: 'PICS_WAKEUP' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // IUT has to be in the CI state "active" + v_CIstatus := f_initialCIstateActive(); + + // Test Body + // Clause 'when' + // the IUT receives the MI-COMMAND "WakeUp" + f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miWakeUpCommandRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + c_ciWakeUpEnable), true); + + // Clause 'then' + // the IUT periodically sends out wake-up messages + + //currently no technology is known that supports wake-up. + //TODO: Wake Up + // + + + // Postamble + f_poDefault(); + f_cf01Down(); + + log("*** TC_ATSP_HC_BV_01: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_HC_BV_01 + + /** + * @desc TP: IUT correctly handles COMMAND "RIcmd" + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_RIM
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in any CI state except "not_existent" or "existent"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the MI-COMMAND "RIcmd"
+             *          }
+             *     then {
+             *          the IUT accepts the new regulatory information
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 HC/BV/02 + * @remark to be created + */ + testcase TC_ATSP_HC_BV_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + + // Test control + if (not(PICS_RIM)) { + log("*** TC_ATSP_HC_BV_02: ERROR: 'PICS_WAKEUP' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // Check allowed initial CI state + v_CIstatus := f_initialCIstatesOperational(); + + // Test Body + // Clause 'when' + // the IUT receives the MI-COMMAND "RIcmd" + + f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miRICmdCommandRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + m_miRICmd( + f_get_CI_LinkID(), + ''O)), true); + + //the IUT accepts the new regulatory information + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_HC_BV_02: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + + log("*** TC_ATSP_HC_BV_02: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_HC_BV_02 + + /** + * @desc TP: IUT correctly handles COMMAND "VCIcmd" to reset a VCI + * @author STF 455 + * @config + * + *
+             * PICS selection: TRUE
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the MI-COMMAND "VCIcmd" requesting to reset a VCI
+             *          }
+             *     then {
+             *          the IUT resets the selected VCI
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 HC/BV/03 + * @remark to be created + */ + testcase TC_ATSP_HC_BV_03() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + var IParamNoList v_requestedParameters; + var IParamList v_returnedValues; + var I_Param v_Iparameter; + var RemoteCIID v_existentVCI; + + // Test control + // always true + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + // check available VCIs in the CI addressed by f_get_CI_LinkID() + v_requestedParameters := { c_ciIParamNoVirtualCI }; + v_returnedValues := f_cnGetIParameterValueCI(f_get_CI_LinkID(), v_requestedParameters, false); + + // Clause 'then' + if(not f_cnCheckOneIparamGetSuccess(c_ciIParamNoVirtualCI, v_returnedValues, v_Iparameter)){ + // error + log("*** TC_ATSP_HC_BV_03: INFO: MI-Get.request failed ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + // proper reading + log("*** TC_ATSP_HC_BV_03: INFO: Received expected I-Parameter value ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + + // The following VCI exists and can be deleted + v_existentVCI := v_Iparameter.parameter.VirtualCIs[0]; + + // Test Body + // Clause 'when the IUT receives the MI-COMMAND "VCIcmd" requesting to reset a VCI' + // Note that f_get_CI_LinkID() in the VCIcmd resets all VCIs of this CI + f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miVCIcmdCommandRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + {'0000000'B, f_get_VCI_LinkID(v_existentVCI), true}), true); + //Clause 'then' + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_7( + mw_miVCICreDelRes(v_existentVCI, f_get_CI_Local_CIID())), false); + + // Postamble + // there is no straight forward means to control whether reset was performed. + + } // End of testcase TC_ATSP_HC_BV_03 + + /** + * @desc TP: IUT correctly handles COMMAND "VCIcmd" to delete a VCI + * @author STF 455 + * @config + * + *
+             * PICS selection: TRUE
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in any CI state except "not_existent" or "existent" or "registered"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the MI-COMMAND "VCIcmd" requesting deletion of a VCI
+             *          }
+             *     then {
+             *          the IUT deletes the selected VCI
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 HC/BV/04 + * @remark to be created + */ + testcase TC_ATSP_HC_BV_04() runs on ItsCalm system ItsCalmSystem { + // Local variables + var IParamNoList v_requestedParameters; + var IParamList v_returnedValues; + var CIstatus v_CIstatus; + var I_Param v_Iparameter; + var RemoteCIID v_existentVCI; + var template AtspInd v_atspEventInd; + var template AtspInd v_result; + + // Test control + // always true + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + // check available VCIs in the CI addressed by f_get_CI_LinkID() + v_requestedParameters := { c_ciIParamNoVirtualCI }; + v_returnedValues := f_cnGetIParameterValueCI(f_get_CI_LinkID(), v_requestedParameters, false); + + // Clause 'then' + if(not f_cnCheckOneIparamGetSuccess(c_ciIParamNoVirtualCI, v_returnedValues, v_Iparameter)){ + // error + log("*** TC_ATSP_HC_BV_04: INFO: MI-Get.request failed ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + // proper reading + log("*** TC_ATSP_HC_BV_04: INFO: Received expected I-Parameter value ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + + // The following VCI exists and can be deleted + v_existentVCI := v_Iparameter.parameter.VirtualCIs[0]; + + // Test Body + // Clause 'when the IUT receives the MI-COMMAND "VCIcmd" requesting to delete a VCI' + // Note that f_get_CI_LinkID() in the VCIcmd resets all VCIs of this CI + f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miVCIcmdCommandRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + {'0000000'B, f_get_VCI_LinkID(v_existentVCI), false}), true); + //Clause 'then' + // the IUT deregistered + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_4( + mw_miVCICreDelRes(v_existentVCI, f_get_CI_Local_CIID())), false); + + // Postamble + // Check whether VCI still is available for transmission of a frame. + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_VCI_LinkID(v_existentVCI)), + m_inDataEmpty, + m_inUserPriorityHighest); + + v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_VCI_LinkID(v_existentVCI)), + m_inDataEmpty, + ?, + m_inUnitdataDefaultAP) ) ); + + // Clause 'then' + // no transmission of the corresponding frame happens + + log("*** TC_ATSP_HC_BV_04: INFO: Expected IN-UNITDATA.indication: ", v_atspEventInd, " ***"); + tc_wait.start; + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_HC_BV_04: ERROR: Unexpected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + log("*** TC_ATSP_HC_BV_04: INFO: test body done ***"); + } + [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { + log("*** TC_ATSP_HC_BV_04: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result); + repeat; + } + [] tc_wait.timeout { + log("*** TC_ATSP_HC_BV_04: INFO: Expected time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_HC_BV_04: INFO: test body done ***"); + } + } // End of 'alt' statement + + + } // End of testcase TC_ATSP_HC_BV_04 + + /** + * @desc TP: IUT correctly handles COMMAND "VCIcmd" to create a VCI + * @author STF 455 + * @config + * + *
+             * PICS selection: TRUE
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in any CI state except "not_existent" or "existent" or "registered"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the MI-COMMAND "VCIcmd" requesting creation of a new VCI
+             *          }
+             *     then {
+             *          the IUT creates a new VCI
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 HC/BV/05 + * @remark to be created + */ + testcase TC_ATSP_HC_BV_05() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + var template AtspInd v_atspEventInd; + var template AtspInd v_result; + + // Test control + // always true + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + + // Test Body + // Clause 'when the IUT receives the MI-COMMAND "VCIcmd" requesting creation of a new VCI' + f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miVCIcmdCommandRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + {'0000000'B, f_get_DestinationVCI_UC_LinkID(), true}), true); + //Clause 'then' + // the IUT deregistered !!??!! ToDo: This might not be possible. Check with ISO + f_cnAwaitEventNotificationCI(f_get_CI_LinkID(), mw_miEvent21218_3( + mw_miVCICreDelRes(PX_REMOTE_CIID_UC, f_get_CI_Local_CIID())), false); + + // Postamble + // Check whether VCI is available for transmission of a frame. + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_UC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest); + + v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_UC_LinkID()), + m_inDataEmpty, + ?, + m_inUnitdataDefaultAP) ) ); + + // Clause 'then' + // no transmission of the corresponding frame happens + + log("*** TC_ATSP_HC_BV_05: INFO: Expected IN-UNITDATA.indication: ", v_atspEventInd, " ***"); + tc_wait.start; + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_HC_BV_05: INFO: Expected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_HC_BV_05: INFO: test body done ***"); + } + [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { + log("*** TC_ATSP_HC_BV_05: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result); + repeat; + } + [] tc_wait.timeout { + log("*** TC_ATSP_HC_BV_05: INFO: Unexpected time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + log("*** TC_ATSP_HC_BV_05: INFO: test body done ***"); + } + } // End of 'alt' statement + + + } // End of testcase TC_ATSP_HC_BV_05 + + } // End of group validBehavior + + + group invalidBehavior { + + /** + * @desc TP: IUT correctly handles invalid MI-COMMAND + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_DELET
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in any CI state except "not_existent" or "existent"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives an invalid MI-COMMAND
+             *          }
+             *     then {
+             *          the IUT acknowledges with error code "INVALID COMMAND/REQUEST NUMBER"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 HC/BI/01 + * @remark to be created + */ + testcase TC_ATSP_HC_BI_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + var template(value) MI_Command_request v_invalidCommandRequest; + var CIstatus v_CIstatus; + + // Test control + if (not(PICS_DELET)) { + log("*** TC_ATSP_HC_BI_01: ERROR: 'PICS_DELET' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // Check allowed initial CI state + v_CIstatus := f_initialCIstatesOperational(); + + // Test Body + // Clause 'when' + // the IUT receives an invalid MI-COMMAND + v_invalidCommandRequest := m_miUnknwonCommandRequest(f_get_CI_LinkID(), + f_getNextCommandRef()); + f_cnSendMICOMMAND_RequestCI(v_invalidCommandRequest); + + // Clause 'then' + // the IUT acknowledges with error code "INVALID COMMAND/REQUEST NUMBER" + f_cnAwaitCommandConfirm(v_invalidCommandRequest, c_ciErrStatusCmdReqNo, true); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_HC_BI_01: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + + log("*** TC_ATSP_HC_BI_01: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_HC_BI_01 + + } // End of group invalidBehavior + + } // End of group handlingOfCIs + + + + // Handling of data plane + group handlingOfCDataPlane { + + + group validBehavior { + + /** + * @desc TP: IUT correctly handles an IN-UNITDATA transmission request with MAC broadcast address + * @author STF 455 + * @config + * + *
+             * PICS selection: (PICS_MAC48 AND PICS_BCVCI) AND NOT PICS_CIC_l4 AND NOT PICS_CIC_l5
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active" or "connected"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives an IN-UNITDATA.request for transmission of a packet to a MAC broadcast address
+             *          }
+             *     then {
+             *          the BC-VCI of the IUT correctly performs transmission of the corresponding frame
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BV/01 + * @remark to be created + */ + testcase TC_ATSP_DP_BV_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + var AtspInd v_result; + var template AtspInd v_atspEventInd; + var CIstatus v_CIstatus; + + // Test control + if (not((PICS_MAC48 and PICS_BCVCI) and (not PICS_CIC_l4) and (not PICS_CIC_l5))) { + log("*** TC_ATSP_DP_BV_01: ERROR: (PICS_MAC48 AND PICS_BCVCI) AND NOT PICS_CIC_l4 AND NOT PICS_CIC_l5' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + + //Clause 'with' + // the IUT being in the CI state "active" + + // Test Body + // Clause 'when' + // the IUT receives an IN-UNITDATA.request for transmission of a packet to a MAC broadcast address + + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest); + + v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + ?, + m_inUnitdataDefaultAP) ) ); + + // Clause 'then' + // the BC-VCI of the IUT correctly performs transmission of the corresponding frame + + log("*** TC_ATSP_DP_BV_01: INFO: Expected IN-UNITDATA.indication: ", v_atspEventInd, " ***"); + tc_wait.start; + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BV_01: INFO: Expected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_DP_BV_01: INFO: test body done ***"); + } + [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { + log("*** TC_ATSP_DP_BV_01: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result); + repeat; + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BV_01: INFO: Time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_DP_BV_01: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_DP_BV_01 + + /** + * @desc TP: IUT correctly handles an IN-UNITDATA transmission request with MAC multicast address + * @author STF 455 + * @config + * + *
+             * PICS selection: (PICS_MAC48 AND PICS_MCVCI) AND NOT PICS_CIC_l4 AND NOT PICS_CIC_l5
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active" or "connected"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives an IN-UNITDATA.request for transmission of a packet to a known MAC multicast address
+             *          }
+             *     then {
+             *          the MC-VCI of the IUT correctly performs transmission of the corresponding frame
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BV/02 + * @remark to be created + */ + testcase TC_ATSP_DP_BV_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + var AtspInd v_result; + var template AtspInd v_atspEventInd; + var CIstatus v_CIstatus; + + // Test control + if (not((PICS_MAC48 and PICS_MCVCI) and (not PICS_CIC_l4) and (not PICS_CIC_l5))) { + log("*** TC_ATSP_DP_BV_02: ERROR: '(PICS_MAC48 AND PICS_MCVCI) AND NOT PICS_CIC_l4 AND NOT PICS_CIC_l5' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + + //Clause 'with' + // the IUT being in the CI state "active" + + // Test Body + // Clause 'when' + // the IUT receives an IN-UNITDATA.request for transmission of a packet to a MAC broadcast address + + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_MC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest); + + v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_MC_LinkID()), + m_inDataEmpty, + ?, + m_inUnitdataDefaultAP) ) ); + + // Clause 'then' + // the BC-VCI of the IUT correctly performs transmission of the corresponding frame + + log("*** TC_ATSP_DP_BV_02: INFO: Expected IN-UNITDATA.indication: ", v_atspEventInd, " ***"); + tc_wait.start; + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BV_02: INFO: Expected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_DP_BV_02: INFO: test body done ***"); + } + [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { + log("*** TC_ATSP_DP_BV_02: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result); + repeat; + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BV_02: INFO: Time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_DP_BV_02: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_DP_BV_02 + + /** + * @desc TP: IUT correctly handles an IN-UNITDATA transmission request with MAC unicast address + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_MAC48 AND PICS_UCVCI AND (NOT PICS_CIC_l4) AND (NOT PICS_CIC_l5)
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "connected"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives an IN-UNITDATA.request for transmission of a packet to a known MAC unicast address
+             *          }
+             *     then {
+             *          the UC-VCI of the IUT correctly performs transmission of the corresponding frame
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BV/03 + * @remark to be created + */ + testcase TC_ATSP_DP_BV_03() runs on ItsCalm system ItsCalmSystem { + // Local variables + var AtspInd v_result; + var template AtspInd v_atspEventInd; + var CIstatus v_CIstatus; + + // Test control + if (not(PICS_MAC48 and PICS_UCVCI and (not PICS_CIC_l4) and (not PICS_CIC_l5))) { + log("*** TC_ATSP_DP_BV_03: ERROR: '(PICS_MAC48 AND PICS_UCVCI) AND NOT PICS_CIC_l4 AND NOT PICS_CIC_l5' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + + // Test Body + // Clause 'when' + + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_UC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest); + + v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_UC_LinkID()), + m_inDataEmpty, + ?, + m_inUnitdataDefaultAP) ) ); + + // Clause 'then' + log("*** TC_ATSP_DP_BV_03: INFO: Expected IN-UNITDATA.indication: ", v_atspEventInd, " ***"); + tc_wait.start; + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BV_03: INFO: Expected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_DP_BV_03: INFO: test body done ***"); + } + [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { + log("*** TC_ATSP_DP_BV_03: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result); + repeat; + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BV_03: INFO: Time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_DP_BV_03: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_DP_BV_03 + + /** + * @desc TP: IUT correctly handles an IN-UNITDATA notification for reception of a broadcast frame + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_MAC48 AND NOT PICS_CIC_l5
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "connected"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives a frame addressed to a MAC broadcast address
+             *          }
+             *     then {
+             *          the IUT correctly notifies reception with IN-UNITDATA.indication
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the the IUT notified the received frame
+             *          }
+             *     then {
+             *          creates a UC-VCI related to the transmitter of the received frame,
+             *          the IUT is in the CI state "connected"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BV/04 + * @remark to be created + */ + testcase TC_ATSP_DP_BV_04() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + var UtAtspEventInd v_result; + var template UtAtspEventInd v_utAtspEventInd := ?; + + // Test control + if (not(PICS_MAC48 and (not PICS_CIC_l5))) { + log("*** TC_ATSP_DP_BV_04: ERROR: 'PICS_MAC48 AND NOT PICS_CIC_l5' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + + // Test Body + // Clause 'when' send via atspPort + + f_atspSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest); + + v_utAtspEventInd := { inSapPrimitivesUp := mwd_inUnitDataInd( + mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest, + m_inUnitdataDefaultAP) + ) + + }; + + // Clause 'then' receive via utPort + log("*** TC_ATSP_DP_BV_04: INFO: Expected IN-UNITDATA.indication: ", v_utAtspEventInd, " ***"); + tc_wait.start; + alt { + [] utPort.receive(v_utAtspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BV_04: INFO: Expected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_DP_BV_04: INFO: test body done ***"); + } + [] utPort.receive(UtAtspEventInd : ?) -> value v_result { + log("*** TC_ATSP_DP_BV_04: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result); + repeat; + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BV_04: INFO: Time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of alt block + + // Postamble + // notification of "connected", if "active" was initial state. However not topic of this TC + // could be done later + + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_DP_BV_04: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_DP_BV_04 + + /** + * @desc TP: IUT correctly handles an IN-UNITDATA notification for reception of a multicast frame + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_MAC48 AND NOT PICS_CIC_l5
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active" or "connected"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives a frame addressed to a MAC multicast address
+             *          }
+             *     then {
+             *          the IUT correctly notifies reception with IN-UNITDATA.indication
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the the IUT notified the received frame
+             *          }
+             *     then {
+             *          creates a UC-VCI related to the transmitter of the received frame,
+             *          the IUT is in the CI state "connected"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BV/05 + * @remark to be created + */ + testcase TC_ATSP_DP_BV_05() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + var UtAtspEventInd v_result; + var template UtAtspEventInd v_utAtspEventInd := ?; + + // Test control + if (not(PICS_MAC48 and (not PICS_CIC_l5))) { + log("*** TC_ATSP_DP_BV_05: ERROR: 'PICS_MAC48 AND NOT PICS_CIC_l5' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + + // Test Body + // Clause 'when' + f_atspSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_MC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest); + + v_utAtspEventInd := { inSapPrimitivesUp := mwd_inUnitDataInd( + mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_MC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest, + m_inUnitdataDefaultAP) + ) + + }; + + // Clause 'then' + log("*** TC_ATSP_DP_BV_05: INFO: Expected IN-UNITDATA.indication: ", v_utAtspEventInd, " ***"); + tc_wait.start; + alt { + [] utPort.receive(v_utAtspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BV_05: INFO: Expected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_DP_BV_05: INFO: test body done ***"); + } + [] utPort.receive(UtAtspEventInd : ?) -> value v_result { + log("*** TC_ATSP_DP_BV_05: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result); + repeat; + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BV_05: INFO: Time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of alt block + + // Postamble + // notification of "connected", if "active" was initial state. However not topic of this TC + // could be done later + + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_DP_BV_05: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_DP_BV_05 + + /** + * @desc TP: IUT correctly handles an IN-UNITDATA notification for reception of a unicast frame + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_MAC48 AND NOT PICS_CIC_l5
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active" or "connected"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives a frame addressed to the MAC unicast address of the CI of the IUT
+             *          }
+             *     then {
+             *          the IUT correctly notifies reception with IN-UNITDATA.indication
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the the IUT notified the received frame
+             *          }
+             *     then {
+             *          creates a UC-VCI related to the transmitter of the received frame,
+             *          the IUT is in the CI state "connected"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BV/06 + * @remark to be created + */ + testcase TC_ATSP_DP_BV_06() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + var UtAtspEventInd v_result; + var template UtAtspEventInd v_utAtspEventInd := ?; + + // Test control + if (not(PICS_MAC48 and (not PICS_CIC_l5))) { + log("*** TC_ATSP_DP_BV_06: ERROR: 'PICS_MAC48 AND NOT PICS_CIC_l5' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + + // Test Body + // Clause 'when' + f_atspSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_UC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest); + + v_utAtspEventInd := { inSapPrimitivesUp := mwd_inUnitDataInd( + mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_UC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest, + m_inUnitdataDefaultAP) + ) + + }; + + // Clause 'then' + log("*** TC_ATSP_DP_BV_06: INFO: Expected IN-UNITDATA.indication: ", v_utAtspEventInd, " ***"); + tc_wait.start; + alt { + [] utPort.receive(v_utAtspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BV_06: INFO: Expected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_DP_BV_06: INFO: test body done ***"); + } + [] utPort.receive(UtAtspEventInd : ?) -> value v_result { + log("*** TC_ATSP_DP_BV_06: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result); + repeat; + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BV_06: INFO: Time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of alt block + + // Postamble + // notification of "connected", if "active" was initial state. However not topic of this TC + // could be done later + + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_DP_BV_06: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_DP_BV_06 + + /** + * @desc TP: IUT correctly handles prioritization + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_MAC48 AND NOT PICS_CIC_l4 AND PICS_SUSP AND PICS_RES
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "suspended",
+             *       the IUT has three pending IN-UNITDATA transmission request with three different priority values, i.e. a broadcast request with priority 255, a multicast request with priority 100 and a unicast request with priority zero
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives the COMMAND "CIstateChng" with the value "resume"
+             *          }
+             *     then {
+             *          the IUT correctly performs transmission of frames related to the three pending transmission requests in the sequence with highest priority first
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BV/07 + * @remark to be created + */ + testcase TC_ATSP_DP_BV_07() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + var template AtspInd v_atspEventInd; + var AtspInd v_result; + + // Test control + if (not(PICS_MAC48 and (not PICS_CIC_l4) and PICS_SUSP and PICS_RES)) { + log("*** TC_ATSP_DP_BV_07: ERROR: 'PICS_MAC48 AND NOT PICS_CIC_l4 AND PICS_SUSP AND PICS_RES' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + + // Get IUT in CI state "active + v_CIstatus := f_initialCIstateActive(); + + // Get IUT in CI state "connected" + f_atspSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_TesterCI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_TesterDestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest); + + // Force the IUT to enter the state suspended + f_cnTriggerStateChangeAndWaitCI(f_get_CI_LinkID(), c_ciStateChngSuspend, c_ciStatusSuspended, true); + + // Request IUT to send several BC frames + f_atspSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_TesterCI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_TesterDestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityAverage); + f_atspSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_TesterCI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_TesterDestinationVCI_BC_LinkID()), + m_inDataAA, + m_inUserPriorityHighest); + f_atspSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_TesterCI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_TesterDestinationVCI_BC_LinkID()), + m_inDataBB, + m_inUserPriorityLowest); + + // Check that IUT does not send the frames + v_atspEventInd := ?; + + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BV_07: INFO: Unexpected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BV_07: INFO: Expected time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } // End of 'alt' statement + + // Test Body + // Clause 'when' + // the IUT receives the COMMAND "CIstateChng" with the value "resume" + f_cnTriggerStateChangeAndWaitCI(f_get_CI_LinkID(), c_ciStateChngResume, c_ciStatusConnected, true); + // the IUT performed resuming + + //Clause 'then' + // the IUT starts transmisison of pending packets + v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_MC_LinkID()), + m_inDataAA, + ?, + m_inUnitdataDefaultAP ) ) ); + + // Clause 'then' receive via atspPort + tc_wait.start; + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BV_07: INFO: Expected IN-UNITDATA.indication received ***"); + } + [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { + tc_wait.stop; + log("*** TC_ATSP_DP_BV_07: INFO: An unexpected IN-UNITDATA.indication received ***", v_result); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BV_07: INFO: Time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_MC_LinkID()), + m_inDataEmpty, + ?, + m_inUnitdataDefaultAP ) ) ); + + // Clause 'then' receive via atspPort + tc_wait.start; + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BV_07: INFO: Expected IN-UNITDATA.indication received ***"); + } + [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { + log("*** TC_ATSP_DP_BV_07: INFO: An unexpected IN-UNITDATA.indication received ***", v_result); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BV_07: INFO: Time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_MC_LinkID()), + m_inDataBB, + ?, + m_inUnitdataDefaultAP ) ) ); + + // Clause 'then' receive via atspPort + tc_wait.start; + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BV_07: INFO: Expected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { + log("*** TC_ATSP_DP_BV_07: INFO: An unexpected IN-UNITDATA.indication received ***", v_result); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BV_07: INFO: Time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + log("*** TC_ATSP_DP_BV_07: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_DP_BV_07: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_DP_BV_07 + + + /** + * @desc TP: IUT correctly registers for the cross-CI prioritization victim procedure + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_CRCIP_V
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active" or "connected"
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT needs to register for cross-CI prioritization as a potential victim of interference
+             *          }
+             *     then {
+             *          the IUT presents MI-REQUEST "PrioReg"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BV/08 + * @remark to be created + */ + testcase TC_ATSP_DP_BV_08() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + const UInt8 c_prioTimeout := 127; + + // Test control + if (not(PICS_CRCIP_V)) { + log("*** TC_ATSP_DP_BV_08: ERROR: 'PICS_CRCIP_V' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActiveConnected(); + + // Test Body + // Clause 'when' + action("Enforce IUT to register for cross-CI prioritization as a potential victim of interference"); + + // Clause 'then' + f_cnAwaitAndConfirmMI_RequestCI(mw_miPrioRegRequest(f_get_CI_LinkID(), f_getNextCommandRef(), {{PX_CI_INTERFERER_MED_TYPE}, c_prioTimeout}) , true); + log("*** TC_ATSP_DP_BV_08: INFO: test body done ***"); + + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TTC_ATSP_DP_BV_08: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_DP_BV_08 + + /** + * @desc TP: IUT correctly requests prioritization and gets prioritization + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_CRCIP_V
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active" or "connected",
+             *       the IUT being registered for cross-CI prioritization
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives an IN-UNITDATA.request with priority value of at least equal to the value of the I-Parameter "MinPrioCrossCI"
+             *          }
+             *     then {
+             *          the IUT presents the prioritization request MI-REQUEST "RTSreq"
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT received an MI-COMMAND "RTSackCmd" granting prioritization
+             *          }
+             *     then {
+             *          the IUT sends the pending packet,
+             *          the IUT releases the prioritization request with MI-REQUEST "RTSreq"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BV/09 + * @remark to be created + */ + testcase TC_ATSP_DP_BV_09() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + const UInt8 c_prioTimeout := 255; + var I_Param v_writeParameter; + var IParamList v_writeValues; + var Errors v_cfSetErrorList; + var template AtspInd v_atspEventInd; + var template AtspInd v_result; + timer t_dummyAckReq := PX_TIMER_DUMMYAckReq; + + + // Test control + if (not(PICS_CRCIP_V)) { + log("*** TC_ATSP_DP_BV_09: ERROR: 'PICS_CRCIP_V' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActiveConnected(); + action("Enforce IUT to register for cross-CI prioritization as a potential victim of interference"); + f_cnAwaitAndConfirmMI_RequestCI(mw_miPrioRegRequest(f_get_CI_LinkID(), f_getNextCommandRef(), {{PX_CI_INTERFERER_MED_TYPE}, c_prioTimeout}) , true); + // Set MinPrioCrossCI to a value + v_writeParameter.paramNo := c_ciIParamNoMinPrioCrossCI; + v_writeParameter.parameter.UserPriority := c_IParamValueMinPrioCrossCI; + v_writeValues := {v_writeParameter}; + v_cfSetErrorList := f_cnSetIParameterValueCI(f_get_CI_LinkID(),v_writeValues, false ); + + + // Clause 'then the IUT accepts the new value of this I-Parameter' + if (f_cnCheckOneIparamSetSuccess(c_ciIParamNoMinPrioCrossCI, v_cfSetErrorList)) { + log("*** TC_ATSP_DP_BV_09: INFO: MI-Set.confirm was successfully executed ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** TC_ATSP_DP_BV_09: ERROR: MI-Set was not properly acknowledged ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + stop; + } + + // Test Body + // Clause 'when' + // IUT receives an IN-UNITDATA.request with priority value of at least equal to the value of the I-Parameter "MinPrioCrossCI" + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest); + + v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + ?, + m_inUnitdataDefaultAP) ) ); + + // now we should be sure that nothing is received within timeout period of 255 ms + t_dummyAckReq.start; + alt { + [] atspPort.receive(v_atspEventInd) { + t_dummyAckReq.stop; + log("*** TC_ATSP_DP_BV_09: INFO: Unexpected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + stop; + } + [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { + log("*** TC_ATSP_DP_BV_09: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result); + repeat; + } + [] t_dummyAckReq.timeout { + log("*** TC_ATSP_DP_BV_09: INFO: Expected time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } // End of 'alt' statement + + // Clause 'then' + // the IUT presents the prioritization request MI-REQUEST "RTSreq" + f_cnAwaitAndConfirmMI_RequestCI(mw_miRTSreqRequest (f_get_CI_LinkID(), f_getNextCommandRef(), + {m_inUserPriorityHighest, 1, c_PrioStatus_request} ), true); + + // Final condition + // when + // the IUT received an MI-COMMAND "RTSackCmd" granting prioritization + f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miRTSackCmdCommandRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + {m_inUserPriorityHighest, 1, c_PrioStatus_granted} ), true); + + // then + // the IUT sends the pending packet + tc_wait.start; + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BV_09: INFO: Expected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { + log("*** TC_ATSP_DP_BV_09: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result); + repeat; + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BV_09: INFO: Expected time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } // End of 'alt' statement + + // the IUT releases the prioritization request with MI-REQUEST "RTSreq" + f_cnAwaitAndConfirmMI_RequestCI(mw_miRTSreqRequest (f_get_CI_LinkID(), f_getNextCommandRef(), + {m_inUserPriorityHighest, 1, c_PrioStatus_release} ), true); + + log("*** TC_ATSP_DP_BV_09: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TTC_ATSP_DP_BV_09: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_DP_BV_09 + + /** + * @desc TP: IUT correctly requests prioritization but does not get prioritization + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_CRCIP_V
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active" or "connected",
+             *       the IUT being registered for cross-CI prioritization
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives an IN-UNITDATA.request with priority value of at least equal to the value of the I-Parameter "MinPrioCrossCI"
+             *          }
+             *     then {
+             *          the IUT presents the prioritization request MI-REQUEST "RTSreq"
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the IUT received an MI-COMMAND "RTSackCmd" ignoring prioritization
+             *          }
+             *     then {
+             *          the IUT releases the prioritization request with MI-REQUEST "RTSreq"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BV/10 + * @remark to be created + */ + testcase TC_ATSP_DP_BV_10() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + const UInt8 c_prioTimeout := 255; + var I_Param v_writeParameter; + var IParamList v_writeValues; + var Errors v_cfSetErrorList; + var template AtspInd v_atspEventInd; + var template AtspInd v_result; + timer t_dummyAckReq := PX_TIMER_DUMMYAckReq; + + + // Test control + if (not(PICS_CRCIP_V)) { + log("*** TC_ATSP_DP_BV_10: ERROR: 'PICS_CRCIP_V' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActiveConnected(); + action("Enforce IUT to register for cross-CI prioritization as a potential victim of interference"); + f_cnAwaitAndConfirmMI_RequestCI(mw_miPrioRegRequest(f_get_CI_LinkID(), f_getNextCommandRef(), {{PX_CI_INTERFERER_MED_TYPE}, c_prioTimeout}) , true); + // Set MinPrioCrossCI to a value + v_writeParameter.paramNo := c_ciIParamNoMinPrioCrossCI; + v_writeParameter.parameter.UserPriority := c_IParamValueMinPrioCrossCI; + v_writeValues := {v_writeParameter}; + v_cfSetErrorList := f_cnSetIParameterValueCI(f_get_CI_LinkID(),v_writeValues, false ); + + + // Clause 'then the IUT accepts the new value of this I-Parameter' + if (f_cnCheckOneIparamSetSuccess(c_ciIParamNoMinPrioCrossCI, v_cfSetErrorList)) { + log("*** TC_ATSP_DP_BV_10: INFO: MI-Set.confirm was successfully executed ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** TC_ATSP_DP_BV_10: ERROR: MI-Set was not properly acknowledged ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + stop; + } + + // Test Body + // Clause 'when' + // IUT receives an IN-UNITDATA.request with priority value of at least equal to the value of the I-Parameter "MinPrioCrossCI" + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest); + + v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + ?, + m_inUnitdataDefaultAP) ) ); + + // now we should be sure that nothing is received within timeout period of 255 ms + t_dummyAckReq.start; + alt { + [] atspPort.receive(v_atspEventInd) { + t_dummyAckReq.stop; + log("*** TC_ATSP_DP_BV_10: INFO: Unexpected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + stop; + } + [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { + log("*** TC_ATSP_DP_BV_10: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result); + repeat; + } + [] t_dummyAckReq.timeout { + log("*** TC_ATSP_DP_BV_10: INFO: Expected time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } // End of 'alt' statement + + // Clause 'then' + // the IUT presents the prioritization request MI-REQUEST "RTSreq" + f_cnAwaitAndConfirmMI_RequestCI(mw_miRTSreqRequest (f_get_CI_LinkID(), f_getNextCommandRef(), + {m_inUserPriorityHighest, 1, c_PrioStatus_request} ), true); + + // Final condition + // when + // the IUT received an MI-COMMAND "RTSackCmd" rejecting (ignore) prioritization + f_cnSendMICOMMAND_RequestCheckSuccessCI(m_miRTSackCmdCommandRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + {m_inUserPriorityHighest, 1, c_PrioStatus_ignored} ), true); + + // then + // the IUT sends the pending packet or not. Nothing to be checked. + + // the IUT releases the prioritization request with MI-REQUEST "RTSreq" + f_cnAwaitAndConfirmMI_RequestCI(mw_miRTSreqRequest (f_get_CI_LinkID(), f_getNextCommandRef(), + {m_inUserPriorityHighest, 1, c_PrioStatus_release} ), true); + + log("*** TC_ATSP_DP_BV_10: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TTC_ATSP_DP_BV_10: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_DP_BV_10 + + /** + * @desc TP: IUT correctly requests prioritization but does not get prioritization within timeout + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_CRCIP_V
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active" or "connected",
+             *       the IUT being registered for cross-CI prioritization
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives an IN-UNITDATA.request with priority value of at least equal to the value of the I-Parameter "MinPrioCrossCI"
+             *          }
+             *     then {
+             *          the IUT presents the prioritization request MI-REQUEST "RTSreq"
+             *          }
+             *     }
+             *     
+             * Final conditions:
+             * ensure that {
+             *     when {
+             *          the T_DummyAckReq timer expired
+             *          }
+             *     then {
+             *          the IUT releases the prioritization request with MI-REQUEST "RTSreq"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BV/11 + * @remark to be created + */ + testcase TC_ATSP_DP_BV_11() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + const UInt8 c_prioTimeout := 255; + var I_Param v_writeParameter; + var IParamList v_writeValues; + var Errors v_cfSetErrorList; + var template AtspInd v_atspEventInd; + var template AtspInd v_result; + timer t_dummyAckReq := PX_TIMER_DUMMYAckReq; + + + // Test control + if (not(PICS_CRCIP_V)) { + log("*** TC_ATSP_DP_BV_11: ERROR: 'PICS_CRCIP_V' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActiveConnected(); + action("Enforce IUT to register for cross-CI prioritization as a potential victim of interference"); + f_cnAwaitAndConfirmMI_RequestCI(mw_miPrioRegRequest(f_get_CI_LinkID(), f_getNextCommandRef(), {{PX_CI_INTERFERER_MED_TYPE}, c_prioTimeout}) , true); + // Set MinPrioCrossCI to a value + v_writeParameter.paramNo := c_ciIParamNoMinPrioCrossCI; + v_writeParameter.parameter.UserPriority := c_IParamValueMinPrioCrossCI; + v_writeValues := {v_writeParameter}; + v_cfSetErrorList := f_cnSetIParameterValueCI(f_get_CI_LinkID(),v_writeValues, false ); + + + // Clause 'then the IUT accepts the new value of this I-Parameter' + if (f_cnCheckOneIparamSetSuccess(c_ciIParamNoMinPrioCrossCI, v_cfSetErrorList)) { + log("*** TC_ATSP_DP_BV_11: INFO: MI-Set.confirm was successfully executed ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** TC_ATSP_DP_BV_11: ERROR: MI-Set was not properly acknowledged ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + stop; + } + + // Test Body + // Clause 'when' + // IUT receives an IN-UNITDATA.request with priority value of at least equal to the value of the I-Parameter "MinPrioCrossCI" + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityHighest); + + v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + ?, + m_inUnitdataDefaultAP) ) ); + + + // Clause 'then' + // the IUT presents the prioritization request MI-REQUEST "RTSreq" + f_cnAwaitAndConfirmMI_RequestCI(mw_miRTSreqRequest (f_get_CI_LinkID(), f_getNextCommandRef(), + {m_inUserPriorityHighest, 1, c_PrioStatus_request} ), true); + + + // await expiration of t_dummyAckReq + t_dummyAckReq.start; + while (t_dummyAckReq.running){} + + // Final condition + // when + // the T_DummyAckReq timer expired + + // the IUT releases the prioritization request with MI-REQUEST "RTSreq" + f_cnAwaitAndConfirmMI_RequestCI(mw_miRTSreqRequest (f_get_CI_LinkID(), f_getNextCommandRef(), + {m_inUserPriorityHighest, 1, c_PrioStatus_release} ), true); + + log("*** TC_ATSP_DP_BV_11: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TTC_ATSP_DP_BV_11: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_DP_BV_11 + + /** + * @desc TP: IUT correctly transmits a packet without requesting prioritization + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_CRCIP_V
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active" or "connected",
+             *       the IUT being registered for cross-CI prioritization
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives an IN-UNITDATA.request with priority value less than the value of the I-Parameter "MinPrioCrossCI"
+             *          }
+             *     then {
+             *          the IUT sends the packet without presenting MI-REQUEST "RTSreq"
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BV/12 + * @remark to be created + */ + testcase TC_ATSP_DP_BV_12() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + const UInt8 c_prioTimeout := 255; + var I_Param v_writeParameter; + var IParamList v_writeValues; + var Errors v_cfSetErrorList; + var template AtspInd v_atspEventInd; + var template AtspInd v_result; + timer t_dummyAckReq := PX_TIMER_DUMMYAckReq; + + + // Test control + if (not(PICS_CRCIP_V)) { + log("*** TC_ATSP_DP_BV_12: ERROR: 'PICS_CRCIP_V' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActiveConnected(); + action("Enforce IUT to register for cross-CI prioritization as a potential victim of interference"); + f_cnAwaitAndConfirmMI_RequestCI(mw_miPrioRegRequest(f_get_CI_LinkID(), f_getNextCommandRef(), {{PX_CI_INTERFERER_MED_TYPE}, c_prioTimeout}) , true); + // Set MinPrioCrossCI to a value + v_writeParameter.paramNo := c_ciIParamNoMinPrioCrossCI; + v_writeParameter.parameter.UserPriority := c_IParamValueMinPrioCrossCI; + v_writeValues := {v_writeParameter}; + v_cfSetErrorList := f_cnSetIParameterValueCI(f_get_CI_LinkID(),v_writeValues, false ); + + + // Clause 'then the IUT accepts the new value of this I-Parameter' + if (f_cnCheckOneIparamSetSuccess(c_ciIParamNoMinPrioCrossCI, v_cfSetErrorList)) { + log("*** TC_ATSP_DP_BV_12: INFO: MI-Set.confirm was successfully executed ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** TC_ATSP_DP_BV_12: ERROR: MI-Set was not properly acknowledged ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + stop; + } + + // Test Body + // Clause 'when' + // IUT receives an IN-UNITDATA.request with priority value of at least equal to the value of the I-Parameter "MinPrioCrossCI" + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityLowest); + + v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + ?, + m_inUnitdataDefaultAP) ) ); + + // Clause 'then' + // the IUT sends the pending packet + tc_wait.start; + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BV_12: INFO: Expected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { + log("*** TC_ATSP_DP_BV_12: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result); + repeat; + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BV_12: INFO: Expected time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } // End of 'alt' statement + + // Final condition + log("*** TC_ATSP_DP_BV_12: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TTC_ATSP_DP_BV_12: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_DP_BV_12 + + /** + * @desc TP: IUT correctly grants prioritization + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_CRCIP_I
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active" or "connected",
+             *       there are no pending packets in the CI
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives an MI-COMMAND "RTScmd" requesting to grant prioritization to another CI 
+             *          }
+             *     then {
+             *          the IUT presents MI-REQUEST "RTSackReq" granting prioritization
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BV/13 + * @remark to be created + */ + testcase TC_ATSP_DP_BV_13() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + + // Test control + if (not(PICS_CRCIP_I)) { + log("*** TC_ATSP_DP_BV_13: ERROR: 'PICS_CRCIP_I' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActiveConnected(); + + // Test Body + // Clause 'when IUT receives an MI-COMMAND "RTScmd" requesting to grant prioritization to another CI (The ITS test system)' + f_cnAwaitAndConfirmMI_RequestCI(mw_miRTScmdRequest (f_get_CI_LinkID(), f_getNextCommandRef(), + {{f_get_TesterCI_LinkID()}, m_inUserPriorityHighest, 1, c_PrioStatus_request} ), true); + + // Clause 'then the IUT presents MI-REQUEST "RTSackReq" granting prioritization' + f_cnAwaitAndConfirmMI_RequestCI(mw_miRTSackReqRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + {{f_get_TesterCI_LinkID()}, 1, c_PrioStatus_granted}) , true); + + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TTC_ATSP_DP_BV_13: INFO: Postamble: done ***"); + + } // End of testcase TC_ATSP_DP_BV_13 + + /** + * @desc TP: IUT correctly postpones transmission of pending packets after granting prioritization + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_CRCIP_I
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active" or "connected",
+             *       the IUT having granted prioritization to another CI
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives an IN-UNITDATA.request 
+             *          }
+             *     then {
+             *          the IUT sends the packet only upon reception of MI-COMMAND "RTScmd" releasing prioritization, or upon timeout of T_dummyAckGrant
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BV/14 + * @remark to be created + */ + testcase TC_ATSP_DP_BV_14() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + var template AtspInd v_atspEventInd; + var template AtspInd v_result; + timer t_dummyAckReq := PX_TIMER_DUMMYAckReq; + + // Test control + if (not(PICS_CRCIP_I)) { + log("*** TC_ATSP_DP_BV_14: ERROR: 'PICS_CRCIP_I' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActiveConnected(); + // Request to grant prioritization + f_cnAwaitAndConfirmMI_RequestCI(mw_miRTScmdRequest (f_get_CI_LinkID(), f_getNextCommandRef(), + {{f_get_TesterCI_LinkID()}, m_inUserPriorityHighest, 1, c_PrioStatus_request} ), true); + // grant prioritization + f_cnAwaitAndConfirmMI_RequestCI(mw_miRTSackReqRequest( + f_get_CI_LinkID(), + f_getNextCommandRef(), + {{f_get_TesterCI_LinkID()}, 1, c_PrioStatus_granted}) , true); + + // Test Body + // Clause 'when IUT receives an IN-UNITDATA.request' + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityLowest); + + v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + ?, + m_inUnitdataDefaultAP) ) ); + + // Clause 'IUT sends the packet only upon reception of MI-COMMAND "RTScmd" releasing prioritization, + // or upon timeout of T_dummyAckGrant' -- to do: this requires another TC + t_dummyAckReq.start; + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BV_14: INFO: Unexpected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { + log("*** TC_ATSP_DP_BV_14: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result); + repeat; + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BV_14: INFO: Expected time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } // End of 'alt' statement + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TTC_ATSP_DP_BV_14: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_DP_BV_14 + + } // End of group validBehavior + + + group invalidBehavior { + + /** + * @desc TP: IUT correctly handles the minimum priority "MinimumUserPriority" and notifies this in an IN-UNITDATA-STATUS.indication service primitive + * @author STF 455 + * @config + * + *
+             * PICS selection: PICS_INUDS AND NOT PICS_CIC_l4
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active" or "connected",
+             *       I-Parameter "MinimumUserPriority" is set to a value larger than zero and smaller than 255
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives an IN-UNITDATA.request with priority value less than the value of the I-Parameter "MinimumUserPriority" 
+             *          }
+             *     then {
+             *          the IUT presents MI-REQUEST "Events" with value "E21218-0",
+             *          the IUT presents IN-UNITDATA-STAUS.indication with transmission_status "PRIORITY"
+             *          the IUT deletes the packet without sending it
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BI/01 + * @remark to be created + */ + testcase TC_ATSP_DP_BI_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + var IParamList v_writeValues; + var Errors v_cfSetErrorList; + var I_Param v_writeParameter; + var template AtspInd v_atspEventInd; + var AtspInd v_result; + var UtAtspEventInd v_resultUT; + var template INsapPrimitivesUp v_INsapPrimUp; + var template UtAtspEventInd v_utAtspEventInd; + + // Test control + if (not(PICS_INUDS and (not PICS_CIC_l4))) { + log("*** TC_ATSP_DP_BI_01: ERROR: 'PICS_INUDS AND NOT PICS_CIC_l4' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + // the IUT being in the CI state "active" + + // Test Body + // Set MinimumUserPriority + v_writeParameter.paramNo := c_ciIParamNoMinUserPriority; + v_writeParameter.parameter.UserPriority := 128; // m_inUserPriorityAverage plus 1 + v_writeValues := {v_writeParameter}; + v_cfSetErrorList := f_cnSetIParameterValueCI(f_get_CI_LinkID(),v_writeValues, false ); + + // Clause 'then the IUT accepts the new value of this I-Parameter' + if (f_cnCheckOneIparamSetSuccess(c_ciIParamNoMinUserPriority, v_cfSetErrorList)) { + log("*** TC_ATSP_DP_BI_01: INFO: MI-Set.confirm was successfully executed ***"); + } else { + log("*** TC_ATSP_DP_BI_01: ERROR: MI-Set was not properly acknowledged ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + stop; + } + + // Clause 'when' + // the IUT receives an IN-UNITDATA.request for transmission of a packet to a MAC broadcast address + + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityAverage); + + v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + ?, + m_inUnitdataDefaultAP) ) ); + + // Clause 'then' + // the BC-VCI of the IUT correctly blocks transmission of the corresponding frame + + tc_wait.start; + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BI_01: INFO: Unexpected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { + log("*** TC_ATSP_DP_BI_01: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result); + repeat; + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BI_01: INFO: Expected time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } // End of 'alt' statement + + // Check IN-UNITDATA-STATUS.indication + v_utAtspEventInd := { inSapPrimitivesUp := mwd_inUnitDataStatusInd(mw_inUnitDataStatusInd( + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityAverage, + m_inUnitdataDefaultAP, + c_ciINtxStatus_Priority)) + }; + + tc_wait.start; + alt { + [] utPort.receive(v_utAtspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BI_01: INFO: Expected IN-UNITDATA-STATUS.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_ATSP_DP_BI_01: INFO: test body done ***"); + } + [] utPort.receive(UtAtspEventInd : ?) -> value v_resultUT { + log("*** TC_ATSP_DP_BI_01: INFO: An unexpected IN-UNITDATA-STATUS.indication received, repeating check ***", v_resultUT); + repeat; + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BI_01: INFO: Unexpected time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of alt block + + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_DP_BI_01: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_DP_BI_01 + + /** + * @desc TP: IUT correctly handles the minimum priority "MinimumUserPriority" + * @author STF 455 + * @config + * + *
+             * PICS selection: NOT PICS_CIC_l4
+             * Initial conditions: 
+             *  with {
+             *       the IUT being in the CI state "active" or "connected",
+             *       I-Parameter "MinimumUserPriority" is set to a value larger than zero and smaller than 255
+             *       }
+             * 
+             * Expected behaviour:
+             *  ensure that {
+             *     when {
+             *          the IUT receives an IN-UNITDATA.request with priority value less than the value of the I-Parameter "MinimumUserPriority" 
+             *          }
+             *     then {
+             *          the IUT presents MI-REQUEST "Events" with value "E21218-0",
+             *          the IUT deletes the packet without sending it
+             *          }
+             *     }
+             * 
+ * + * @version 2013-05-07.0 + * @since 2013-05-07.0 + * @status empty test case + * @reference ETSI TS 102 760-2 v1.1.2_STF455_v06 DP/BI/02 + * @remark to be created + */ + testcase TC_ATSP_DP_BI_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + var CIstatus v_CIstatus; + var IParamList v_writeValues; + var Errors v_cfSetErrorList; + var I_Param v_writeParameter; + var template AtspInd v_atspEventInd; + var AtspInd v_result; + var UtAtspEventInd v_resultUT; + var template INsapPrimitivesUp v_INsapPrimUp; + var template UtAtspEventInd v_utAtspEventInd; + + // Test control + if (not((not PICS_INUDS) and (not PICS_CIC_l4))) { + log("*** TC_ATSP_DP_BI_02: ERROR: 'NOT PICS_INUDS AND NOT PICS_CIC_l4' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + v_CIstatus := f_initialCIstateActive(); + // the IUT being in the CI state "active" + + // Test Body + // Set MinimumUserPriority + v_writeParameter.paramNo := c_ciIParamNoMinUserPriority; + v_writeParameter.parameter.UserPriority := 128; // m_inUserPriorityAverage plus 1 + v_writeValues := {v_writeParameter}; + v_cfSetErrorList := f_cnSetIParameterValueCI(f_get_CI_LinkID(),v_writeValues, false ); + + // Clause 'then the IUT accepts the new value of this I-Parameter' + if (f_cnCheckOneIparamSetSuccess(c_ciIParamNoMinUserPriority, v_cfSetErrorList)) { + log("*** TC_ATSP_DP_BI_02: INFO: MI-Set.confirm was successfully executed ***"); + } else { + log("*** TC_ATSP_DP_BI_02: ERROR: MI-Set was not properly acknowledged ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + stop; + } + + // Clause 'when' + // the IUT receives an IN-UNITDATA.request for transmission of a packet to a MAC broadcast address + + f_utSendIN_UNITDATA_Request( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + m_inUserPriorityAverage); + + v_atspEventInd := mw_atspInd( mwd_inUnitDataInd(mw_inUnitDataInd( + //source + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_CI_LinkID()), + //destination + m_inLLServiceAddr( + PX_IN_SAP_ADDRESS, + f_get_DestinationVCI_BC_LinkID()), + m_inDataEmpty, + ?, + m_inUnitdataDefaultAP) ) ); + + // Clause 'then' + // the BC-VCI of the IUT correctly blocks transmission of the corresponding frame + + tc_wait.start; + alt { + [] atspPort.receive(v_atspEventInd) { + tc_wait.stop; + log("*** TC_ATSP_DP_BI_01: INFO: Unexpected IN-UNITDATA.indication received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] atspPort.receive(AtspInd : { msgIn := ?, receptionTime := ? } ) -> value v_result { + log("*** TC_ATSP_DP_BI_01: INFO: An unexpected IN-UNITDATA.indication received, repeating check ***", v_result); + repeat; + } + [] tc_wait.timeout { + log("*** TC_ATSP_DP_BI_01: INFO: Expected time out ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } // End of 'alt' statement + + // Postamble + f_poDefault(); + f_cf01Down(); + log("*** TC_ATSP_DP_BI_02: INFO: Postamble: done ***"); + } // End of testcase TC_ATSP_DP_BI_02 + + } // End of group invalidBehavior + + } // End of group handlingOfCDataPlane + + +} // End of module ItsAtsp_TestCases diff --git a/ttcn/AtsATSP/ItsAtsp_TestControl.ttcn b/ttcn/AtsATSP/ItsAtsp_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..be98371d9fd602301a19c6f9c671fdfe547b1da0 --- /dev/null +++ b/ttcn/AtsATSP/ItsAtsp_TestControl.ttcn @@ -0,0 +1,187 @@ +/** + * @author ETSI / STF455 + * @version $URL$ + * $Id$ + * @desc Test Control file for Access Technology Support ISO 21218 (TP version: 0.0.1) + * + */ +module ItsAtsp_TestControl { + + + // ItsAtsp + import from ItsAtsp_TestCases {testcase all}; + + // LibIts + import from LibItsAtsp_Pics all; + + + // Test Execution + control { + +// State Event Transistions (SE) +// SE - Valid Behaviour + if (PICS_DYNREG and PICS_MAC48) { + execute(TC_ATSP_SE_BV_01()); + } + + if (PICS_DYNREG and not(PICS_MAC48)) { + execute(TC_ATSP_SE_BV_02()); + } + + if (PICS_DYNREG) { + execute(TC_ATSP_SE_BV_03()); + execute(TC_ATSP_SE_BV_10()); + } + + if (PICS_CIC_l2) { + execute(TC_ATSP_SE_BV_04()); + execute(TC_ATSP_SE_BV_16()); + } + + if (PICS_CIC_l3) { + execute(TC_ATSP_SE_BV_05()); + } + + if (PICS_CIC_l4) { + execute(TC_ATSP_SE_BV_06()); + } + + if (PICS_CIC_l1) { + execute(TC_ATSP_SE_BV_07()); + } + + if (PICS_CIC_l3 and PICS_MCVCI) { + execute(TC_ATSP_SE_BV_08()); + } + + if ((PICS_CIC_l1 or PICS_CIC_il1) and PICS_MCVCI) { + execute(TC_ATSP_SE_BV_09()); + } + + if (PICS_INACT) { + execute(TC_ATSP_SE_BV_11()); + } + + if (PICS_ACT) { + execute(TC_ATSP_SE_BV_12()); + } + + if (PICS_SUSP) { + execute(TC_ATSP_SE_BV_13()); + } + + if (PICS_RES) { + execute(TC_ATSP_SE_BV_14()); + } + + if (PICS_CIC_l2 and PICS_CIAC2) { + execute(TC_ATSP_SE_BV_15()); + } + + if ((PICS_CIAC2 or PICS_CIAC3) and PICS_DISCONN) { + execute(TC_ATSP_SE_BV_17()); + } + + // SE - Invalid Valid Behaviour + if (PICS_DYNREG or PICS_INACT or PICS_ACT or PICS_SUSP or PICS_RES or PICS_CONN or PICS_DISCONN) { + execute(TC_ATSP_SE_BI_01()); + } + + if ((PICS_CIAC2 or PICS_CIAC3) and PICS_CONN) { + execute(TC_ATSP_SE_BI_02()); + } + +// MIB I-Parameters (MB) +// MB - Valid Behaviour + if (PICS_IPRW or PICS_IPRO) { + execute(TC_ATSP_MB_BV_01()); + } + + if (PICS_IPRW or PICS_IPWO) { + execute(TC_ATSP_MB_BV_02()); + } + + if (PICS_IPRW or PICS_IPRO or PICS_IPNO) { + execute(TC_ATSP_MB_BV_03()); + } + +// MB - Invalid Valid Behaviour + + execute (TC_ATSP_MB_BI_01()); + execute (TC_ATSP_MB_BI_02()); + + if (PICS_IPRO or PICS_IPNO) { + execute(TC_ATSP_MB_BI_03()); + } + +// Handling of CIs (HC) +// HC - Valid Behaviour + + execute (TC_ATSP_HC_BV_03()); + execute (TC_ATSP_HC_BV_05()); + + if (PICS_WAKEUP) { + execute(TC_ATSP_HC_BV_01()); + } + + if (PICS_RIM) { + execute(TC_ATSP_HC_BV_02()); + } + + if (PICS_DELET) { + execute(TC_ATSP_HC_BV_04()); + } + +// HC - Invalid Valid Behaviour + + execute(TC_ATSP_HC_BI_01()); + +// Handling of data plane (DP) +// DP - Valid Behaviour + if ((PICS_MAC48 and PICS_BCVCI) and not(PICS_CIC_l4) and not(PICS_CIC_l5)) { + execute(TC_ATSP_DP_BV_01()); + } + + if ((PICS_MAC48 and PICS_MCVCI) and not(PICS_CIC_l4) and not(PICS_CIC_l5)) { + execute(TC_ATSP_DP_BV_02()); + } + + if ((PICS_MAC48 and PICS_UCVCI) and not(PICS_CIC_l4) and not(PICS_CIC_l5)) { + execute(TC_ATSP_DP_BV_03()); + } + + if (PICS_MAC48 and not(PICS_CIC_l5)) { + execute(TC_ATSP_DP_BV_04()); + execute(TC_ATSP_DP_BV_05()); + execute(TC_ATSP_DP_BV_06()); + } + + if (PICS_MAC48 and not(PICS_CIC_l4) and PICS_SUSP and PICS_RES) { + execute(TC_ATSP_DP_BV_07()); + } + + if (PICS_CRCIP_V) { + execute(TC_ATSP_DP_BV_08()); + execute(TC_ATSP_DP_BV_09()); + execute(TC_ATSP_DP_BV_10()); + execute(TC_ATSP_DP_BV_11()); + execute(TC_ATSP_DP_BV_12()); + } + + if (PICS_CRCIP_I) { + execute(TC_ATSP_DP_BV_13()); + execute(TC_ATSP_DP_BV_14()); + } + +// DP - Invalid Valid Behaviour + if (PICS_INUDS and not(PICS_CIC_l4)) { + execute(TC_ATSP_DP_BI_01()); + } + + if (not(PICS_INUDS) and not(PICS_CIC_l4)) { + execute(TC_ATSP_DP_BI_02()); + } + + } // End of control + +} // End of module ItsAtsp_TestControl diff --git a/ttcn/AtsFNTP/ItsFntp_TestCases.ttcn3 b/ttcn/AtsFNTP/ItsFntp_TestCases.ttcn3 index b419be83bff604c0f6732a2bf173bb360bedf860..62322c75da8741ed9a93492576fcd2d7db0e4643 100644 --- a/ttcn/AtsFNTP/ItsFntp_TestCases.ttcn3 +++ b/ttcn/AtsFNTP/ItsFntp_TestCases.ttcn3 @@ -10,14 +10,15 @@ module ItsFntp_TestCases { import from LibCommon_BasicTypesAndValues { const c_uInt8Max }; - import from LibCommon_VerdictControl all; import from LibCommon_Sync all; // LibIts - import from CALMllsap language "ASN.1:1997" { - type - INsapPrimitivesDown, INsapPrimitivesUp - }; + import from LibItsCommon_Functions { + function + f_checkTimeValidity, f_getCurrentTime + } + + // LibItsCalm import from CALMfntp language "ASN.1:1997" { type FNTPNPDU, @@ -26,29 +27,32 @@ module ItsFntp_TestCases { import from CALMmsap language "ASN.1:1997" { type CommandRef }; - import from LibItsMgt_Functions { - function - f_getNextCommandRef + import from CALMllsap language "ASN.1:1997" { + type IN_UNITDATA_request }; import from LibItsFntp_TypesAndValues all; import from LibItsFntp_Templates all; import from LibItsFntp_Functions all; import from LibItsFntp_Pics all; - import from LibItsMgt_Templates { - template m_mgtMnSapRequestReq + import from LibItsMgt_TypesAndValues { + const c_dniCiid + }; + import from LibItsMgt_Functions { + function + f_getNextCommandRef + }; + import from LibItsCalm_Interface { + type + ItsCalm, FntpInd; }; import from LibItsCalm_TestSystem { type ItsCalmSystem }; - import from LibItsCalm_Interface { - type ItsCalm; - function f_utCommandRequestConfirm - }; - - // 7.6 Transmitting Packets + + // 6.1 Transmitting Packets group transmittingPackets { - // 7.6.2 Basic procedure + // 6.1.1 Basic procedure group basicProcedure { group validBehavior { @@ -63,7 +67,7 @@ module ItsFntp_TestCases { * the IUT having an FNTP forwarding table with proper entry in support of the local port number of the ITS-S application * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted single hop BC transmission request * } @@ -73,12 +77,12 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/TXP/BP/BV/01 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/TXP/BP/BV/01 */ testcase TC_FNTP_TXP_BP_BV_01() runs on ItsCalm system ItsCalmSystem { // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; + var FntpInd v_fntpInd; var FNTPNPDU v_basicNpdu; // Test control @@ -100,46 +104,63 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_utCommandRequestConfirm( + f_fntpGenerateNfSApRequestWithoutConfirm( m_generateNfFntpCommRequest( f_getNextCommandRef(), // Unique cyclic reference number of command vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation - f_getIutWlLinkIdBc(), // Identifies the VCI to be used to transmit the packet - f_getIutItsFpdu(), // Contains the endpoint payload EPDU - md_nHopNfFntpOptions(f_getIutShopValue())), //Content of the FNTP control field in the FNTP extended header - mw_fntpCommConfirm_success, - false, - vc_utCommandConf); + f_getIutWlLinkIdBc(), // Identifies the VCI to be used to transmit the packet + f_getIutItsFpdu(), // Contains the ITS-SP payload EPDU + md_nHopNfFntpOptions(f_getIutShopValue()) // Content of the FNTP control field in the FNTP extended header + ) + ); log("*** TC_FNTP_TXP_BP_BV_01: INFO: Formatted single hop BC transmission request done ***"); // Clause 'then' + log("*** TC_FNTP_TXP_BP_BV_01: INFO: expected template: ", mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId((c_dniCiid, f_getIutWlRemoteCiid()), f_getIutWlLocalCiid()), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutWlLocalCiid()) + )))); tc_ac.start; alt { [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReq( - mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()) - ))) -> value v_inSapPrimitivesDown { + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId((c_dniCiid, f_getIutWlRemoteCiid()), f_getIutWlLocalCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutWlLocalCiid()) + )))) -> value v_fntpInd { tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_basicNpdu); + f_oct2npdu(v_fntpInd.msgIn.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_basicNpdu); + log("*** TC_FNTP_TXP_BP_BV_01: INFO: FNTPPDU: ", v_basicNpdu, " ***"); if (match(v_basicNpdu, mdw_fntpBasicNpdu(vc_portNumber, f_getIutRemotePortNumberValue()))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + //TODO Enhance to check generation timestamp + /*if (f_checkTimeValidity(int2float(v_fntpInd.receptionTime), int2float(f_getCurrentTime())) == false) { + log("*** TC_FNTP_TXP_BP_BV_01: WARN: Invalid timestamp ***"); + }*/ log("*** TC_FNTP_TXP_BP_BV_01: PASS: Received basic FNTP NPDU as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_TXP_BP_BV_01: FAIL: Unexpected basic FNTP NPDU ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } } + [] a_fntpUnsollictedMessages() { + // Do not restart tc_ac + repeat; + } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_TXP_BP_BV_01: INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement log("*** TC_FNTP_TXP_BP_BV_01: INFO: test body done ***"); // Postamble + f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); + log("*** TC_FNTP_TXP_BP_BV_01: INFO: Postamble: done ***"); } // End of testcase TC_FNTP_TXP_BP_BV_01 @@ -150,10 +171,10 @@ module ItsFntp_TestCases { * Config Id: CF01 * Initial conditions: * with { - * the IUT having an FNTP forwarding table with proper entry in support of the local port number of the ITS-S application + * the IUT having an FNTP forwarding table with proper entry in support of the requested local port number of the ITS-S application * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted single hop UC transmission request * } @@ -163,12 +184,12 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/TXP/BP/BV/02 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/TXP/BP/BV/02 */ testcase TC_FNTP_TXP_BP_BV_02() runs on ItsCalm system ItsCalmSystem { // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; + var FntpInd v_fntpInd; var FNTPNPDU v_basicNpdu; // Test control @@ -191,44 +212,64 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_utCommandRequestConfirm( + f_fntpGenerateNfSApRequestWithoutConfirm( m_generateNfFntpCommRequest( f_getNextCommandRef(), // Unique cyclic reference number of command vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation - f_getIutWlLinkIdUc(), // Identifies the VCI to be used to transmit the packet - f_getIutItsFpdu(), // Contains the endpoint payload EPDU - md_nHopNfFntpOptions(f_getIutShopValue())), //Content of the FNTP control field in the FNTP extended header - mw_fntpCommConfirm_success, - false, - vc_utCommandConf); + mw_linkId( // Identifies the VCI to be used to transmit the packet + f_getIutRemoteDestCiidUc(), + f_getIutWlLocalCiid()), + f_getIutItsFpdu(), // Contains the ITS-SP payload EPDU + md_nHopNfFntpOptions(f_getIutShopValue()) // Content of the FNTP control field in the FNTP extended header + ) + ); log("*** TC_FNTP_TXP_BP_BV_02: INFO: Formatted single hop UC transmission request done ***"); // Clause 'then' + log("*** TC_FNTP_TXP_BP_BV_02: DEBUG: Expected template: ", + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId((c_dniCiid, f_getIutWlRemoteCiid()), f_getIutWlLocalCiid()), + mw_linkId(f_getIutRemoteDestCiidUc(), f_getIutWlLocalCiid()) + ))), + " ***"); tc_ac.start; alt { [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReq( - mw_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid()), - mw_linkId(f_getIutRemoteDestCiidUc(), f_getIutDestLocalCiid()) - ))) -> value v_inSapPrimitivesDown { + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId((c_dniCiid, f_getIutWlRemoteCiid()), f_getIutWlLocalCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + mw_linkId(f_getIutRemoteDestCiidUc(), f_getIutWlLocalCiid()) + )))) -> value v_fntpInd { tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_basicNpdu); + f_oct2npdu(v_fntpInd.msgIn.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_basicNpdu); + log("*** TC_FNTP_TXP_BP_BV_02: INFO: FNTPPDU: ", v_basicNpdu, " ***"); if (match(v_basicNpdu, mdw_fntpBasicNpdu(vc_portNumber, ?))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + //TODO Enhance to check generation timestamp + /*if (f_checkTimeValidity(int2float(v_fntpInd.receptionTime), int2float(f_getCurrentTime())) == false) { + log("*** TC_FNTP_TXP_BP_BV_02: WARN: Invalid timestamp ***"); + }*/ log("*** TC_FNTP_TXP_BP_BV_02: PASS: Received basic FNTP NPDU ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_TXP_BP_BV_02: FAIL: Unexpected basic FNTP NPDU ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } } + [] a_fntpUnsollictedMessages() { + // Do not restart tc_ac + repeat; + } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_TXP_BP_BV_02: INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement log("*** TC_FNTP_TXP_BP_BV_02: INFO: test body done ***"); - + // Postamble + f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -236,168 +277,18 @@ module ItsFntp_TestCases { } // End of group validBehavior - // TODO BI shall be revised by ISO when concept of flows in architecture standard ISO 21217 will be done -// group invalidBehavior { -// -// /** -// * @desc Single hop broadcast transmission request with unknown VCI -// *
-//                 * Pics Selection: PICS_ROLE_RH
-//                 * Config Id: CF01
-//                 * Initial conditions: 
-//                 *  with {
-//                 *      the IUT having an FNTP forwarding table with no entry of the required BC-VCI, 
-//                 *      but with an entry for another BC-VCI properly serving the ITS-S application
-//                 *  }
-//                 * Expected behaviour:
-//                 *  evaluate whether {
-//                 *      when { 
-//                 *          the IUT having received a correctly formatted single hop BC transmission request
-//                 *      }
-//                 *      then {
-//                 *          the IUT reports failure of delivery
-//                 *      }
-//                 *  }
-//                 * 
-// * -// * @version 0.0.9 -// * @see ETSI TS 102 985-2 v0.0.9 FNTP/TXP/BP/BI/01 -// */ -// testcase TC_FNTP_TXP_BP_BI_01() runs on ItsCalm system ItsCalmSystem { -// // Local variables -// -// // Test control -// if (not PICS_ROLE_RH) { -// log("*** TC_FNTP_TXP_BP_BI_01: ERROR: 'PICS_ROLE_RH' required for executing the TC ***"); -// stop; -// } -// -// // Test component configuration -// f_cf01Up(); // Combined Host-Router -// -// // Test adapter configuration -// -// // Preamble -// // Clause 'Initial conditions' -// f_initializeFntpForwardingTable(f_getIutAppPortValue()); -// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); -// log("*** TC_FNTP_TXP_BP_BI_01: INFO: Preamble: FNTP forwarding Table was not setup properly ***"); -// -// // Test Body -// // Clause 'when' -// f_utCommandRequestConfirm( -// m_generateNfFntpCommRequest( -// f_getNextCommandRef(), // Unique cyclic reference number of command -// vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation -// f_getIutWlLinkIdUnknownBc(), // Identifies an unknown VCI to be used to transmit the packet -// f_getIutItsFpdu(), // Contains the endpoint payload EPDU -// md_nHopNfFntpOptions(f_getIutShopValue())), //Content of the FNTP control field in the FNTP extended header -// mdw_fntpCommConfirm_unspecFailure, // Failure expected -// true, -// vc_utCommandConf); -// log("*** TC_FNTP_TXP_BP_BI_01: INFO: FNTP-COMMAND.request done ***"); -// // Clause 'then' -// tc_noac.start; // No message expected -// alt { -// [] fntpPort.receive { -// tc_noac.stop; -// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); -// log("*** TC_FNTP_TXP_BP_BI_01: FAIL: No message was expected ***"); -// } -// [] tc_noac.timeout { -// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); -// log("*** TC_FNTP_TXP_BP_BI_01: PASS: No message received as expected ***"); -// } -// } // End of 'alt' statement -// log("*** TC_FNTP_TXP_BP_BI_01: INFO: test body done ***"); -// -// // Postamble -// f_poDefault(); -// f_cf01Down(); -// -// } // End of testcase TC_FNTP_TXP_BP_BI_01 -// -// /** -// * @desc Single hop unicast transmission request with unknown VCI -// *
-//                 * Pics Selection: PICS_ROLE_RH
-//                 * Config Id: CF01
-//                 * Initial conditions: 
-//                 *  with {
-//                 *      the IUT having an FNTP forwarding table with no entry of the required BC-VCI, 
-//                 *      but with an entry for another BC-VCI properly serving the ITS-S application
-//                 *  }
-//                 * Expected behaviour:
-//                 *  evaluate whether {
-//                 *      when { 
-//                 *          the IUT having received a correctly formatted single hop UC transmission request for delivery via a non-existent UC-VCI
-//                 *      }
-//                 *      then {
-//                 *          the IUT reports failure of delivery
-//                 *      }
-//                 *  }
-//                 * 
-// * -// * @version 0.0.9 -// * @see ETSI TS 102 985-2 v0.0.9 FNTP/TXP/BP/BI/02 -// */ -// testcase TC_FNTP_TXP_BP_BI_02() runs on ItsCalm system ItsCalmSystem { -// // Local variables -// -// // Test control -// if (not PICS_ROLE_RH) { -// log("*** TC_FNTP_TXP_BP_BI_02: ERROR: 'PICS_ROLE_RH' required for executing the TC ***"); -// stop; -// } -// -// // Test component configuration -// f_cf01Up(); // Combined Host-Router -// -// // Test adapter configuration -// -// // Preamble -// // Clause 'Initial conditions' -// f_initializeFntpForwardingTable(f_getIutAppPortValue()); -// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); -// log("*** TC_FNTP_TXP_BP_BI_02: INFO: Preamble: FNTP forwarding Table was not setup properly ***"); -// -// // Test Body -// f_utCommandRequestConfirm( -// m_generateNfFntpCommRequest( -// f_getNextCommandRef(), // Unique cyclic reference number of command -// vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation -// f_getIutWlLinkIdUnknownUc(), // Identifies an unknown VCI to be used to transmit the packet -// f_getIutItsFpdu(), // Contains the endpoint payload EPDU -// md_nHopNfFntpOptions(f_getIutShopValue())), //Content of the FNTP control field in the FNTP extended header -// mdw_fntpCommConfirm_unspecFailure, // Failure expected -// true, -// vc_utCommandConf); -// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); -// tc_noac.start; // No message expected -// alt { -// [] fntpPort.receive { -// tc_noac.stop; -// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); -// log("*** TC_FNTP_TXP_BP_BI_02: FAIL: No message was expected ***"); -// } -// [] tc_noac.timeout { -// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); -// log("*** TC_FNTP_TXP_BP_BI_02: PASS: No message received as expected ***"); -// } -// } // End of 'alt' statement -// log("*** TC_FNTP_TXP_BP_BI_02: INFO: test body done ***"); -// -// // Postamble -// f_poDefault(); -// f_cf01Down(); -// -// } // End of testcase TC_FNTP_TXP_BP_BI_02 -// -// } // End of group invalidBehavior + /** + * Invalid test purposes will be defined in the next version of the present document once ISO has + * implemented the concept of flows in the architecture standard ISO 21217 [i.7], and subsequently in + * ISO 29281-1 [1] + */ + group invalidBehavior { + + } // End of group invalidBehavior } // End of group basicProcedure - // 7.6.3 Extended procedure + // 6.1.2 Extended procedure group extendedProcedure { group validBehavior { @@ -409,10 +300,10 @@ module ItsFntp_TestCases { * Config Id: CF01 * Initial conditions: * with { - * the IUT having an FNTP forwarding table with proper entry in support of the local port number of the ITS-S application + * the IUT having an FNTP forwarding table with proper entry in support of the requested local port number of the ITS-S application * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted N-hop BC transmission request * } @@ -422,12 +313,12 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/TXP/EP/BV/01 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/TXP/EP/BV/01 */ testcase TC_FNTP_TXP_EP_BV_01() runs on ItsCalm system ItsCalmSystem { // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; + var FntpInd v_fntpInd; var FNTPNPDU v_extendedNpdu; // Test control @@ -449,44 +340,62 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_utCommandRequestConfirm( + f_fntpGenerateNfSApRequestWithoutConfirm( m_generateNfFntpCommRequest( f_getNextCommandRef(), // Unique cyclic reference number of command vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation - f_getIutWlLinkIdBc(), // Identifies the VCI to be used to transmit the packet - f_getIutItsFpdu(), // Contains the endpoint payload EPDU - md_nHopNfFntpOptions(f_getIutNhopsValue())),//Content of the FNTP control field in the FNTP extended header - mw_fntpCommConfirm_success, - false, - vc_utCommandConf); + f_getIutWlLinkIdBc(), // Identifies the VCI to be used to broadcast the payload + f_getIutItsFpdu(), // Contains the ITS-SP payload EPDU + md_nHopNfFntpOptions(f_getIutNhopsValue())) // Content of the FNTP control field in the FNTP extended header + ); log("*** TC_FNTP_TXP_EP_BV_01: INFO: Formatted N-hop BC transmission request done ***"); // Clause 'then' + log("*** TC_FNTP_TXP_EP_BV_01: DEBUG: Expected template: ", + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId((c_dniCiid, f_getIutWlRemoteCiid()), f_getIutWlLocalCiid()), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutWlLocalCiid()) + ))), + " ***"); tc_ac.start; alt { [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReq( - mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()) - ))) -> value v_inSapPrimitivesDown { + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId((c_dniCiid, f_getIutWlRemoteCiid()), f_getIutWlLocalCiid()), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutWlLocalCiid()) + )))) -> value v_fntpInd { tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu); + f_oct2npdu(v_fntpInd.msgIn.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_extendedNpdu); + log("*** TC_FNTP_TXP_EP_BV_01: INFO: Expected FNTPPDU: ", mdw_fntpExtendedNpdu(vc_portNumber, ?), " ***"); + log("*** TC_FNTP_TXP_EP_BV_01: INFO: FNTPPDU: ", v_extendedNpdu, " ***"); if (match(v_extendedNpdu, mdw_fntpExtendedNpdu(vc_portNumber, ?))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + //TODO Enhance to check generation timestamp + /*if (f_checkTimeValidity(int2float(v_fntpInd.receptionTime), int2float(f_getCurrentTime())) == false) { + log("*** TC_FNTP_TXP_EP_BV_01: WARN: Invalid timestamp ***"); + }*/ log("*** TC_FNTP_TXP_EP_BV_01: PASS: Received extended N-hops FNTP NPDU as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_TXP_EP_BV_01: FAIL: Unexpected extended N-hops FNTP NPDU ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } } + [] a_fntpUnsollictedMessages() { + // Do not restart tc_ac + repeat; + } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_TXP_EP_BV_01: INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement log("*** TC_FNTP_TXP_EP_BV_01: INFO: test body done ***"); // Postamble + f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -497,97 +406,20 @@ module ItsFntp_TestCases { group invalidBehavior { // TODO BI shall be revised by ISO when concept of flows in architecture standard ISO 21217 will be done -// /** -// * @desc N-hop broadcast transmission request with unknown VCI -// *
-//                 * Pics Selection: PICS_EXT and PICS_ROLE_RH and PICS_NHOPBC
-//                 * Config Id: CF01
-//                 * Initial conditions: 
-//                 *  with {
-//                 *      the IUT having an FNTP forwarding table with no entry of the required BC-VCI, 
-//                 *      but with an entry for another BC-VCI properly serving the ITS-S application
-//                 *  }
-//                 * Expected behaviour:
-//                 *  evaluate whether {
-//                 *      when { 
-//                 *          the IUT having received a correctly formatted N-hop BC transmission request
-//                 *      }
-//                 *      then {
-//                 *          the IUT reports failure of delivery
-//                 *      }
-//                 *  }
-//                 * 
-// * -// * @version 0.0.9 -// * @see ETSI TS 102 985-2 v0.0.9 FNTP/TXP/EP/BI/01 -// */ -// testcase TC_FNTP_TXP_EP_BI_01() runs on ItsCalm system ItsCalmSystem { -// // Local variables -// -// // Test control -// if (not(PICS_EXT and PICS_ROLE_RH and PICS_NHOPBC)) { -// log("*** TC_FNTP_TXP_EP_BI_01: ERROR: 'PICS_EXT and PICS_ROLE_RH and PICS_NHOPBC' required for executing the TC ***"); -// stop; -// } -// -// // Test component configuration -// f_cf01Up(); // Combined Host-Router -// -// // Test adapter configuration -// -// // Preamble -// // Clause 'Initial conditions' -// f_initializeFntpForwardingTable(f_getIutAppPortValue()); -// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); -// log("*** TC_FNTP_TXP_EP_BI_01: INFO: Preamble: FNTP forwarding Table was not setup properly ***"); -// -// // Test Body -// // Clause 'when' -// f_utCommandRequestConfirm( -// m_generateNfFntpCommRequest( -// f_getNextCommandRef(), // Unique cyclic reference number of command -// vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation -// f_getIutWlLinkIdUnknownBc(), // Identifies an unknown VCI to be used to transmit the packet -// f_getIutItsFpdu(), // Contains the endpoint payload EPDU -// md_nHopNfFntpOptions(f_getIutNhopsValue())),//Content of the FNTP control field in the FNTP extended header -// mdw_fntpCommConfirm_unspecFailure, // Failure expected -// true, -// vc_utCommandConf); -// log("*** TC_FNTP_TXP_EP_BI_01: INFO: FNTP-COMMAND.request done ***"); -// // Clause 'then' -// tc_noac.start; // No message expected -// alt { -// [] fntpPort.receive { -// tc_noac.stop; -// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); -// log("*** TC_FNTP_TXP_EP_BI_01: FAIL: No message was expected ***"); -// } -// [] tc_noac.timeout { -// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); -// log("*** TC_FNTP_TXP_EP_BI_01: PASS: No message received as expected ***"); -// } -// } // End of 'alt' statement -// log("*** TC_FNTP_TXP_EP_BI_01: INFO: test body done ***"); -// -// // Postamble -// f_poDefault(); -// f_cf01Down(); -// -// } // End of testcase TC_FNTP_TXP_EP_BI_01 - /** - * @desc N-hop broadcast transmission request with invalid FNTP control field, and with known VCI + * @desc N-hop broadcast transmission request with unknown VCI *
                  * Pics Selection: PICS_EXT and PICS_ROLE_RH and PICS_NHOPBC
                  * Config Id: CF01
                  * Initial conditions: 
                  *  with {
-                 *      the IUT having an FNTP forwarding table with proper entry in support the local port number of the ITS-S application
+                 *      the IUT having an FNTP forwarding table with no entry of the required BC-VCI, 
+                 *      but with an entry for another BC-VCI properly serving the ITS-S application
                  *  }
                  * Expected behaviour:
-                 *  evaluate whether {
+                 *  ensure that {
                  *      when { 
-                 *          the IUT having received an N-hop BC transmission request with non-supported bits in "controlField" also set to 1
+                 *          the IUT having received a correctly formatted N-hop BC transmission request
                  *      }
                  *      then {
                  *          the IUT reports failure of delivery
@@ -595,15 +427,16 @@ module ItsFntp_TestCases {
                  *  }
                  * 
* - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/TXP/EP/BI/02 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/TXP/EP/BI/01 */ - testcase TC_FNTP_TXP_EP_BI_02() runs on ItsCalm system ItsCalmSystem { + /* Removed from ETSI TS 102 985-2 V1.1.3 (2014-03) + * testcase TC_FNTP_TXP_EP_BI_01() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control if (not(PICS_EXT and PICS_ROLE_RH and PICS_NHOPBC)) { - log("*** TC_FNTP_TXP_EP_BI_02: ERROR: 'PICS_EXT and PICS_ROLE_RH and PICS_NHOPBC' required for executing the TC ***"); + log("*** TC_FNTP_TXP_EP_BI_01: ERROR: 'PICS_EXT and PICS_ROLE_RH and PICS_NHOPBC' required for executing the TC ***"); stop; } @@ -616,87 +449,77 @@ module ItsFntp_TestCases { // Clause 'Initial conditions' f_initializeFntpForwardingTable(f_getIutAppPortValue()); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FNTP_TXP_EP_BI_02: INFO: Preamble: FNTP forwarding Table was not setup properly ***"); + log("*** TC_FNTP_TXP_EP_BI_01: INFO: Preamble: FNTP forwarding Table was setup properly ***"); // Test Body // Clause 'when' - f_utCommandRequestConfirm( + f_fntpGenerateNfSApRequestWithConfirm( m_generateNfFntpCommRequest( - f_getNextCommandRef(), // Unique cyclic reference number of command - vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation - f_getIutWlLinkIdBc(), // Identifies the VCI to be used to transmit the packet - f_getIutItsFpdu(), // Contains the endpoint payload EPDU - md_nonSupportedFntpControlField), // NFfntpCommRequest message with unsupported control field - mdw_fntpCommConfirm_unspecFailure, // Failure expected + f_getNextCommandRef(), // Unique cyclic reference number of command + vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation + f_getIutWlLinkIdUnknownBc(), // Identifies an unknown VCI to be used to transmit the packet + f_getIutItsFpdu(), // Contains the ITS-SP payload EPDU + md_nHopNfFntpOptions(f_getIutNhopsValue())), // Content of the FNTP control field in the FNTP extended header + mdw_fntpCommConfirm_unspecFailure(vc_portNumber), // Failure expected true, - vc_utCommandConf); - log("*** TC_FNTP_TXP_EP_BI_02: INFO: FNTP-COMMAND.request done ***"); + vc_utEventInd.utFntpEventInd); + log("*** TC_FNTP_TXP_EP_BI_01: DEBUG: FNTP-COMMAND.request: vc_utEventInd=", vc_utEventInd, " ***"); + log("*** TC_FNTP_TXP_EP_BI_01: INFO: FNTP-COMMAND.request done ***"); // Clause 'then' tc_noac.start; // No message expected alt { [] fntpPort.receive { tc_noac.stop; + log("*** TC_FNTP_TXP_EP_BI_01: FAIL: No message was expected ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_TXP_EP_BI_02: FAIL: No message was expected ***"); } [] tc_noac.timeout { + log("*** TC_FNTP_TXP_EP_BI_01: PASS: No message received as expected ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FNTP_TXP_EP_BI_02: PASS: No message received as expected ***"); } } // End of 'alt' statement - log("*** TC_FNTP_TXP_EP_BI_02: INFO: test body done ***"); + log("*** TC_FNTP_TXP_EP_BI_01: INFO: test body done ***"); // Postamble f_poDefault(); f_cf01Down(); - } // End of testcase TC_FNTP_TXP_EP_BI_02 - - } // End of group invalidBehavior - - } // End of group extendedProcedure - - // 7.6.4 Forwarding procedure - group forwardingProcedure { - - group validBehavior { + }*/ // End of testcase TC_FNTP_TXP_EP_BI_01 /** - * @desc TX from ITS-S host + * @desc N-hop broadcast transmission request with invalid FNTP control field, and with known VCI *
-                 * Pics Selection: PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)
-                 * Config Id: CF02
+                 * Pics Selection: PICS_EXT and PICS_ROLE_RH and PICS_NHOPBC
+                 * Config Id: CF01
                  * Initial conditions: 
                  *  with {
-                 *      the IUT having an FNTP forwarding table with proper entry in support of the requested local port numbers of the ITS-S application
+                 *      the IUT having an FNTP forwarding table with proper entry in support the local port number of the ITS-S application
                  *  }
                  * Expected behaviour:
-                 *  evaluate whether {
+                 *  ensure that {
                  *      when { 
-                 *          the IUT having received a correctly formatted single hop BC transmission request for delivery via a VCI contained in a different ITS-SCU
+                 *          the IUT having received an N-hop BC transmission request with non-supported bits in "controlField" also set to 1
                  *      }
                  *      then {
-                 *          the IUT generates an FNTP forwarding NPDU, and forwards it to the BC-VCI for transmission to the selected ITS-S router
+                 *          the IUT reports failure of delivery
                  *      }
                  *  }
                  * 
* - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/TXP/FP/BV/01 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/TXP/EP/BI/02 */ - testcase TC_FNTP_TXP_FP_BV_01() runs on ItsCalm system ItsCalmSystem { + testcase TC_FNTP_TXP_EP_BI_02() runs on ItsCalm system ItsCalmSystem { // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; - var FNTPNPDU v_forwardingNpdu; // Test control - if (not(PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH))) { - log("*** TC_FNTP_TXP_FP_BV_01: ERROR: 'PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)' required for executing the TC ***"); + if (not(PICS_EXT and PICS_ROLE_RH and PICS_NHOPBC)) { + log("*** TC_FNTP_TXP_EP_BI_02: ERROR: 'PICS_EXT and PICS_ROLE_RH and PICS_NHOPBC' required for executing the TC ***"); stop; } // Test component configuration - f_cf02Up(); // Router only or Host only + f_cf01Up(); // Combined Host-Router // Test adapter configuration @@ -704,53 +527,153 @@ module ItsFntp_TestCases { // Clause 'Initial conditions' f_initializeFntpForwardingTable(f_getIutAppPortValue()); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FNTP_TXP_FP_BV_01: INFO: Preamble: FNTP forwarding Table was setup properly ***"); + log("*** TC_FNTP_TXP_EP_BI_02: INFO: Preamble: FNTP forwarding Table was setup properly ***"); // Test Body // Clause 'when' - f_utCommandRequestConfirm( + f_fntpGenerateNfSApRequestWithConfirm( m_generateNfFntpCommRequest( - f_getNextCommandRef(), // Unique cyclic reference number of command - vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation - f_getIutLanLinkIdBc(), // Broadcast message with a different ITS-SCU - f_getIutItsFpdu(), // Contains the endpoint payload EPDU - md_nHopNfFntpOptions(f_getIutShopValue())), //Content of the FNTP control field in the FNTP extended header - mw_fntpCommConfirm_success, - false, - vc_utCommandConf); - log("*** TC_FNTP_TXP_FP_BV_01: INFO: Formatted single hop BC transmission request for delivery via a VCI contained in a different ITS-SCU done ***"); + f_getNextCommandRef(), // Unique cyclic reference number of command + vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation + f_getIutWlLinkIdBc(), // Identifies the VCI to be used to transmit the packet + f_getIutItsFpdu(), // Contains the ITS-SP payload EPDU + md_nonSupportedFntpControlField // NFfntpCommRequest message with unsupported control field + ), + mdw_fntpCommConfirm_unspecFailure(vc_portNumber), // Failure expected + true, + vc_utEventInd.utFntpEventInd); + log("*** TC_FNTP_TXP_EP_BI_02: DEBUG: FNTP-COMMAND.request: vc_utEventInd=", vc_utEventInd, " ***"); + log("*** TC_FNTP_TXP_EP_BI_02: INFO: FNTP-COMMAND.request done ***"); // Clause 'then' - tc_ac.start; + tc_noac.start; // No message expected alt { - [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReq( - mw_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()), - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()) - ))) -> value v_inSapPrimitivesDown { - tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_forwardingNpdu); - if(match(v_forwardingNpdu, mdw_fntpForwardingNpdu(c_portRtr, c_portHst, f_getIutForwardingSrcPort(), f_getIutForwardingDestPort(), ?, f_getIutShopValue()))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FNTP_TXP_FP_BV_01: PASS: Received extended N-hops FNTP NPDU as expected ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + [] fntpPort.receive { + tc_noac.stop; + log("*** TC_FNTP_TXP_EP_BI_02: FAIL: No message was expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** TC_FNTP_TXP_EP_BI_02: PASS: No message received as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } // End of 'alt' statement + log("*** TC_FNTP_TXP_EP_BI_02: INFO: test body done ***"); + + // Postamble + f_unInitializeFntpForwardingTable(); + f_poDefault(); + f_cf01Down(); + + } // End of testcase TC_FNTP_TXP_EP_BI_02 + + } // End of group invalidBehavior + + } // End of group extendedProcedure + + // 6.1.3 Forwarding procedure + group forwardingProcedure { + + group validBehavior { + + /** + * @desc TX from ITS-S host + *
+                 * Pics Selection: PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)
+                 * Config Id: CF02
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having an FNTP forwarding table with proper entry in support of the requested local port numbers of the ITS-S application
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a correctly formatted single hop BC transmission request for delivery via a VCI contained in a different ITS-SCU
+                 *      }
+                 *      then {
+                 *          the IUT generates an FNTP forwarding NPDU, and forwards it to the BC-VCI for transmission to the selected ITS-S router
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/TXP/FP/BV/01 + */ + testcase TC_FNTP_TXP_FP_BV_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FntpInd v_fntpInd; + var FNTPNPDU v_forwardingNpdu; + + // Test control + if (not(PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH))) { + log("*** TC_FNTP_TXP_FP_BV_01: ERROR: 'PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); // Router only or Host only + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_initializeFntpForwardingTable(f_getIutAppPortValue()); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FNTP_TXP_FP_BV_01: INFO: Preamble: FNTP forwarding Table was setup properly ***"); + + // Test Body + // Clause 'when' + f_fntpGenerateNfSApRequestWithoutConfirm( + m_generateNfFntpCommRequest( + f_getNextCommandRef(), // Unique cyclic reference number of command + vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation + f_getIutLanLinkIdBc(), // Broadcast message with a different ITS-SCU + f_getIutItsFpdu(), // Contains the ITS-SP payload EPDU + md_nHopNfFntpOptions(f_getIutShopValue())) // Content of the FNTP control field in the FNTP extended header + ); + log("*** TC_FNTP_TXP_FP_BV_01: INFO: Formatted single hop BC transmission request for delivery via a VCI contained in a different ITS-SCU done ***"); + // Clause 'then' + tc_ac.start; + alt { + [] fntpPort.receive( + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()) + )))) -> value v_fntpInd { + tc_ac.stop; + f_oct2npdu(v_fntpInd.msgIn.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_forwardingNpdu); + log("*** TC_FNTP_TXP_FP_BV_01: INFO: FNTPPDU: ", v_forwardingNpdu, " ***"); + if(match(v_forwardingNpdu, mdw_fntpForwardingNpdu(c_portRtr, c_portHst, f_getIutForwardingSrcPort(), f_getIutForwardingDestPort(), ?, f_getIutShopValue()))) { + //TODO Enhance to check generation timestamp + /*if (f_checkTimeValidity(int2float(v_fntpInd.receptionTime), int2float(f_getCurrentTime())) == false) { + log("*** TC_FNTP_TXP_FP_BV_01: WARN: Invalid timestamp ***"); + }*/ + log("*** TC_FNTP_TXP_FP_BV_01: PASS: Received extended N-hops FNTP NPDU as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { log("*** TC_FNTP_TXP_FP_BV_01: FAIL: Unexpected extended N-hops FNTP NPDU ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } } + [] a_fntpUnsollictedMessages() { + // Do not restart tc_ac + repeat; + } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_TXP_FP_BV_01: INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement log("*** TC_FNTP_TXP_FP_BV_01: INFO: test body done ***"); // Postamble +// f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf02Down(); } // End of testcase TC_FNTP_TXP_FP_BV_01 - + /** * @desc RX at ITS-S router *
@@ -759,9 +682,9 @@ module ItsFntp_TestCases {
                  * Initial conditions: 
                  *  with {
                  *      the IUT having an FNTP forwarding table with proper entry in support of an ITS-S application in an ITS-S host
-                 *  }
+                *  }
                  * Expected behaviour:
-                 *  evaluate whether {
+                 *  ensure that {
                  *      when { 
                  *          the IUT having received an FNTP station-internal forwarding NPDU containing a correctly formatted FNTP basic NPDU for single hop BC transmission
                  *      }
@@ -771,12 +694,12 @@ module ItsFntp_TestCases {
                  *  }
                  * 
* - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/TXP/FP/BV/02 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/TXP/FP/BV/02 */ testcase TC_FNTP_TXP_FP_BV_02() runs on ItsCalm system ItsCalmSystem { // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; + var FntpInd v_fntpInd; var FNTPNPDU v_forwardingNpdu; // Test control @@ -798,7 +721,7 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpForwardingNpdu( + f_sendForwardingNpdu( { portLong := c_portHst }, // From host { portLong := c_portRtr }, // To router f_getIutForwardingSrcPort(), // Forwarding source port @@ -813,29 +736,36 @@ module ItsFntp_TestCases { tc_ac.start; alt { [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReq( - mw_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()), - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()) - ))) -> value v_inSapPrimitivesDown { + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()) + )))) -> value v_fntpInd { tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_forwardingNpdu); + f_oct2npdu(v_fntpInd.msgIn.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_forwardingNpdu); + log("*** TC_FNTP_TXP_FP_BV_02: INFO: FNTPPDU: ", v_forwardingNpdu, " ***"); if (match(v_forwardingNpdu, mdw_fntpForwardingNpdu(c_portRtr, c_portHst, f_getIutForwardingSrcPort(), f_getIutForwardingDestPort(), ?, ?))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + //TODO Enhance to check generation timestamp + /*if (f_checkTimeValidity(int2float(v_fntpInd.receptionTime), int2float(f_getCurrentTime())) == false) { + log("*** TC_FNTP_TXP_FP_BV_02: WARN: Invalid timestamp ***"); + }*/ log("*** TC_FNTP_TXP_FP_BV_02: PASS: Received forwarding S-Hop FNTP NPDU as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_TXP_FP_BV_02: FAIL: Unexpected forwarding S-hops FNTP NPDU ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_TXP_FP_BV_02: INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement log("*** TC_FNTP_TXP_FP_BV_02: INFO: test body done ***"); // Postamble +// f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf02Down(); @@ -851,7 +781,7 @@ module ItsFntp_TestCases { * the IUT having an FNTP forwarding table with proper entry in support of the requested local port numbers of the ITS-S application * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a sequence of correctly formatted single hop BC transmission requests for delivery via a VCI contained in a different ITS-SCU, with the number of requests such that at least once the "Counter" value before increment is different to 255, * and at least once it is equal to 255 @@ -862,12 +792,12 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/TXP/FP/BV/03 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/TXP/FP/BV/03 */ testcase TC_FNTP_TXP_FP_BV_03() runs on ItsCalm system ItsCalmSystem { // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; + var FntpInd v_fntpInd; var FNTPNPDU v_forwardingNpdu; var integer v_counter; // Index used for loop var template FNTPpacketCounter v_fntpPacketCounter; // Expected FNTPpacketCounter value @@ -894,47 +824,49 @@ module ItsFntp_TestCases { v_fntpPacketCounter := ?; // First loop, the fntpPacketCounter is unknown v_counter := 0; // Send first formatted single hop BC transmission request - f_utCommandRequestConfirm( + f_fntpGenerateNfSApRequestWithoutConfirm( m_generateNfFntpCommRequest( f_getNextCommandRef(), // Unique cyclic reference number of command vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation f_getIutLanLinkIdBc(), // Broadcast message with a different ITS-SCU - f_getIutItsFpdu(), // Contains the endpoint payload EPDU - md_nHopNfFntpOptions(f_getIutShopValue())), //Content of the FNTP control field in the FNTP extended header - mw_fntpCommConfirm_success, - false, - vc_utCommandConf); + f_getIutItsFpdu(), // Contains the ITS-SP payload EPDU + md_nHopNfFntpOptions(f_getIutShopValue())) // Content of the FNTP control field in the FNTP extended header + ); log("*** TC_FNTP_TXP_FP_BV_03: INFO: First formatted single hop BC transmission request for delivery via a VCI contained in a different ITS-SCU done ***"); // Clause 'then' // Process first expected FNTP forwarding NPDU tc_ac.start; alt { [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReq( - mw_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()), - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()) - ))) -> value v_inSapPrimitivesDown { + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()) + )))) -> value v_fntpInd { tc_ac.stop; log("*** TC_FNTP_TXP_FP_BV_03: INFO: Received next FNTP forwarding NPDU ***"); - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_forwardingNpdu); + f_oct2npdu(v_fntpInd.msgIn.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_forwardingNpdu); + log("*** TC_FNTP_TXP_FP_BV_03: INFO: FNTPPDU: ", v_forwardingNpdu, " ***"); if (match(v_forwardingNpdu, mdw_fntpForwardingNpdu(c_portRtr, c_portHst, f_getIutForwardingSrcPort(), f_getIutForwardingDestPort(), v_fntpPacketCounter, f_getIutShopValue())) == false) { + //TODO Enhance to check generation timestamp + /*if (f_checkTimeValidity(int2float(v_fntpInd.receptionTime), int2float(f_getCurrentTime())) == false) { + log("*** TC_FNTP_TXP_FP_BV_03: WARN: Invalid timestamp ***"); + }*/ + log("*** TC_FNTP_TXP_FP_BV_03: ERROR: Received unexpected FNTP packet counter value ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_TXP_FP_BV_03: ERROR: Received unexpected FNTP packet couneter value ***"); } else if (v_counter < 258) { // Send next formatted single hop BC transmission request v_counter := v_counter + 1; v_fntpPacketCounter := (v_forwardingNpdu.header.options.intForw.counter + 1) mod (c_uInt8Max + 1); // Apply modulus 256 here - f_utCommandRequestConfirm( + f_fntpGenerateNfSApRequestWithoutConfirm( m_generateNfFntpCommRequest( - f_getNextCommandRef(), - vc_portNumber, - f_getIutLanLinkIdBc(), - f_getIutItsFpdu(), - md_nHopNfFntpOptions(f_getIutShopValue())), - mw_fntpCommConfirm_success, - false, - vc_utCommandConf); + f_getNextCommandRef(), // Unique cyclic reference number of command + vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation + f_getIutLanLinkIdBc(), // Broadcast message with a different ITS-SCU + f_getIutItsFpdu(), // Contains the ITS-SP payload EPDU + md_nHopNfFntpOptions(f_getIutShopValue())) // Content of the FNTP control field in the FNTP extended header + ); log("*** TC_FNTP_TXP_FP_BV_03: INFO: Second formatted single hop BC transmission request done ***"); repeat; // Continue the processing } else { @@ -942,14 +874,19 @@ module ItsFntp_TestCases { log("*** TC_FNTP_TXP_FP_BV_03: PASS: The counter has passed the wrap around fromt the value 255 to 0 ***"); } } + [] a_fntpUnsollictedMessages() { + // Do not restart tc_ac + repeat; + } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_TXP_FP_BV_03: INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement log("*** TC_FNTP_TXP_FP_BV_03: INFO: test body done ***"); // Postamble +// f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf02Down(); @@ -969,7 +906,7 @@ module ItsFntp_TestCases { * the IUT having an FNTP forwarding table with no entry related to an ITS station-internal network * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted single hop BC transmission request for delivery via a VCI contained in a different ITS-SCU * } @@ -979,8 +916,8 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/TXP/FP/BI/01 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/TXP/FP/BI/01 */ // FIXME Implementation shall be reviewed during ATS validation testcase TC_FNTP_TXP_FP_BI_01() runs on ItsCalm system ItsCalmSystem { @@ -1000,23 +937,22 @@ module ItsFntp_TestCases { // Preamble // Clause 'Initial conditions' f_initializeFntpForwardingTable(f_getIutAppPortValue()); - // FIXME Use MGT to delete entries in forwarding table - // Table D.6 — MN-COMMAND.request for MN-COMMAND FWTdelete f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FNTP_TXP_FP_BI_01: INFO: Preamble: FNTP forwarding Table was not setup properly ***"); + log("*** TC_FNTP_TXP_FP_BI_01: INFO: Preamble: FNTP forwarding Table was setup properly ***"); // Test Body // Clause 'when' - f_utCommandRequestConfirm( + f_fntpGenerateNfSApRequestWithConfirm( m_generateNfFntpCommRequest( - f_getNextCommandRef(), // Unique cyclic reference number of command - vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation - f_getIutLanLinkIdBc(), // Broadcast message with a different ITS-SCU - f_getIutItsFpdu(), // Contains the endpoint payload EPDU - md_nHopNfFntpOptions(f_getIutShopValue())), //Content of the FNTP control field in the FNTP extended header - mdw_fntpCommConfirm_unspecFailure, // Failure expected + f_getNextCommandRef(), // Unique cyclic reference number of command + vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation + f_getIutLanLinkIdBc(), // Broadcast message with a different ITS-SCU + f_getIutItsFpdu(), // Contains the ITS-SP payload EPDU + md_nHopNfFntpOptions(f_getIutShopValue())), // Content of the FNTP control field in the FNTP extended header + mdw_fntpCommConfirm_unspecFailure(vc_portNumber), // Failure expected true, - vc_utCommandConf); + vc_utEventInd.utFntpEventInd + ); log("*** TC_FNTP_TXP_FP_BI_01: INFO: FNTP-COMMAND.request done ***"); // Clause 'then' tc_noac.start; // No more message expected @@ -1046,10 +982,10 @@ module ItsFntp_TestCases { } // End of group transmittingPackets - // 7.7 Transmitting Packets + // 6.2 Transmitting Packets group receivingPackets { - // 7.7.3 Basic delivery procedure + // 6.2.1 Basic delivery procedure group basicProcedure { group validBehavior { @@ -1064,21 +1000,22 @@ module ItsFntp_TestCases { * the IUT having an entry in the FNTP forwarding table with Service Port such that no ITS station-internal forwarding is needed * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted unicast packet from the peer station via the IN-SAP * } * then { - * the IUT forwards the message to the endpoint selected by the Service Port + * the IUT forwards the message to the ITS-SP selected by the Service Port * } * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/BP/BV/01 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/BP/BV/01 */ testcase TC_FNTP_RXP_BP_BV_01() runs on ItsCalm system ItsCalmSystem { // Local variables + var UtFntpEventInd v_result; // Test control if (not(PICS_ROLE_RH)) { @@ -1093,45 +1030,55 @@ module ItsFntp_TestCases { // Preamble // Clause 'Initial conditions' - f_initializeFntpForwardingTable(f_getIutRemotePortNumberValue()); + f_initializeFntpForwardingTable(f_getIutLocalPortNumberValue()); f_setupKnownPeerStation(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_FNTP_RXP_BP_BV_01: INFO: Preamble: FNTP forwarding Table was setup properly ***"); // Test Body // Clause 'when' - f_acGenerateFntpNpdu( // FIXME Do we use the cfPort? - f_getIutLocalPortNumberValue(), + f_sendBasicFntpNpdu( f_getIutRemotePortNumberValue(), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidUc(), f_getIutDestLocalCiid())), // Peer station service address - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid())), // Local station service address - f_getIutShopValue() + vc_portNumber, + m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidUc(), f_getIutWlLocalCiid())), + m_llServiceAddr(m_linkId(f_getIutWlLocalCiid(), f_getIutWlLocalCiid())) ); - log("*** TC_FNTP_RXP_BP_BV_01: INFO: FNTP extended NPDU for single hop UC reception done ***"); + log("*** TC_FNTP_RXP_BP_BV_01: INFO: FNTP basic NPDU for single hop UC reception done ***"); // Clause 'then' + log("*** TC_FNTP_RXP_BP_BV_01: DEBUG: Expected UT template: ", + mw_utFntpEventInd( + mdw_checkNfFntpCommIndication( + f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive + f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive + m_linkId(f_getIutRemoteDestCiidUc(), f_getIutWlLocalCiid()) // Source address of DL-UNITDATA.request primitive + ))); tc_ac.start; - alt { - [] utPort.receive(mdw_checkNfFntpCommIndication( - f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive - f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive - m_linkId(f_getIutRemoteDestCiidUc(), f_getIutDestLocalCiid()) // Source address of DL-UNITDATA.request primitive - )) { + alt { + [] utPort.receive( + mw_utFntpEventInd( + mdw_checkNfFntpCommIndication( + f_getIutLocalPortNumberValue(), // Destination port of DL-UNITDATA.request primitive + f_getIutRemotePortNumberValue(), // Source port of DL-UNITDATA.request primitive + m_linkId(f_getIutRemoteDestCiidUc(), f_getIutWlLocalCiid()) // Source address of DL-UNITDATA.request primitive + ))) { tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_FNTP_RXP_BP_BV_01: PASS: Received NF-COMM.indication primitive as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } - [] utPort.receive { + [] utPort.receive(UtFntpEventInd:?) -> value v_result { + tc_ac.stop; + log("*** TC_FNTP_RXP_BP_BV_01: FAIL: Unexpected NF-COMM.indication primitive ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_RXP_BP_BV_01: FAIL: Unexpected basic FNTP NPDU ***"); } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_RXP_BP_BV_01: INCONC: Unexpected basic FNTP NPDU ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement log("*** TC_FNTP_RXP_BP_BV_01: INFO: test body done ***"); // Postamble + f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -1148,23 +1095,24 @@ module ItsFntp_TestCases { * but no entry for the peer station * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted unicast packet from the peer station via the IN-SAP * } * then { - * the IUT forwards the message to the endpoint selected by the Service Port, + * the IUT forwards the message to the ITS-SP selected by the Service Port, * the ITU informs the management about the new peer ITS-S * } * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/BP/BV/02 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/BP/BV/02 */ testcase TC_FNTP_RXP_BP_BV_02() runs on ItsCalm system ItsCalmSystem { // Local variables + var UtFntpEventInd v_result; // Test control if (not(PICS_ROLE_RH)) { @@ -1185,37 +1133,57 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpNpdu( - f_getIutLocalPortNumberValue(), + f_sendBasicFntpNpdu( f_getIutRemotePortNumberValue(), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidUc(), f_getIutDestLocalCiid())), // Peer station service address - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid())), // Local station service address - f_getIutShopValue() + f_getIutAppPortValue(), + m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlRemoteCiidUc())), // Peer station service address + m_llServiceAddr(m_linkId(f_getIutWlLocalCiid(), f_getIutWlRemoteCiidUc())) // Local station service address ); - log("*** TC_FNTP_RXP_BP_BV_02: INFO: FNTP extended NPDU for single hop UC reception done ***"); + log("*** TC_FNTP_RXP_BP_BV_02: INFO: FNTP basic NPDU for single hop UC reception done ***"); // Clause 'then' + log("*** TC_FNTP_RXP_BP_BV_02: INFO: expected template: ", + mw_utFntpEventInd( + mdw_checkNfFntpCommIndication( + f_getIutAppPortValue(), // Source port of DL-UNITDATA.request primitive + f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive + m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid()) // Source address of DL-UNITDATA.request primitive + ))); tc_ac.start; alt { - [] utPort.receive(mdw_checkNfFntpCommIndication( - f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive - f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive - m_linkId(f_getIutRemoteDestCiidUc(), f_getIutDestLocalCiid()) // Source address of DL-UNITDATA.request primitive - )) { + [] utPort.receive( + mw_utFntpEventInd( + mdw_checkNfFntpCommIndication( + f_getIutAppPortValue(), // Source port of DL-UNITDATA.request primitive + f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive + m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid()) // Source address of DL-UNITDATA.request primitive + ))) { tc_ac.stop; + // And check for a MN-SAP.MN-REQUEST/FWTupdate message sent to ITS management entity to update the forwarding table + if (PICS_ITS_MGT_NOT) { + f_fntpAwaitFwtUpdate( + vc_portNumber, + mw_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid()), + f_getIutRemotePortNumberValue(), + vc_portNumber + ); + } log("*** TC_FNTP_RXP_BP_BV_02: PASS: Received NF-COMM.indication primitive as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } - [] utPort.receive { + [] utPort.receive(UtFntpEventInd:?) -> value v_result { + tc_ac.stop; + log("*** TC_FNTP_RXP_BP_BV_02: FAIL: Unexpected NF-COMM.indication primitive ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_RXP_BP_BV_02: FAIL: Unexpected basic FNTP NPDU ***"); } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_RXP_BP_BV_02: INCONC: Unexpected basic FNTP NPDU ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement log("*** TC_FNTP_RXP_BP_BV_02: INFO: test body done ***"); // Postamble + f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -1231,21 +1199,22 @@ module ItsFntp_TestCases { * the IUT having an entry in the FNTP forwarding table for a Service Port such that no ITS station-internal forwarding is needed * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted broadcast packet from the peer station via the IN-SAP * } * then { - * the IUT forwards the message to the endpoint selected by the Service Port + * the IUT forwards the message to the ITS-SP selected by the Service Port * } * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/BP/BV/03 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/BP/BV/03 */ testcase TC_FNTP_RXP_BP_BV_03() runs on ItsCalm system ItsCalmSystem { // Local variables + var UtFntpEventInd v_result; // Test control if (not(PICS_ROLE_RH)) { @@ -1266,37 +1235,57 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpNpdu( - f_getIutLocalPortNumberValue(), + f_sendBasicFntpNpdu( f_getIutRemotePortNumberValue(), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidUc(), f_getIutDestLocalCiid())), // Peer station service address - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid())), // Local station service address - f_getIutShopValue() + f_getIutAppPortValue(), + m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlRemoteCiidBc())), // Peer station service address + m_llServiceAddr(m_linkId(f_getIutWlLocalCiid(), f_getIutWlRemoteCiidUc())) // Local station service address ); - log("*** TC_FNTP_RXP_BP_BV_03: INFO: FNTP extended NPDU for single hop BC reception done ***"); + log("*** TC_FNTP_RXP_BP_BV_03: INFO: FNTP basic NPDU for single hop BC reception done ***"); // Clause 'then' + log("*** TC_FNTP_RXP_BP_BV_03: INFO: expected template: ", + mw_utFntpEventInd( + mdw_checkNfFntpCommIndication( + f_getIutAppPortValue(), // Source port of DL-UNITDATA.request primitive + f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive + m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid()) // Source address of DL-UNITDATA.request primitive + ))); tc_ac.start; alt { - [] utPort.receive(mdw_checkNfFntpCommIndication( - f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive - f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive - m_linkId(f_getIutRemoteDestCiidUc(), f_getIutDestLocalCiid()) // Source address of DL-UNITDATA.request primitive - )) { + [] utPort.receive( + mw_utFntpEventInd( + mdw_checkNfFntpCommIndication( + f_getIutAppPortValue(), // Source port of DL-UNITDATA.request primitive + f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive + m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid()) // Source address of DL-UNITDATA.request primitive + ))) { tc_ac.stop; + // And check for a MN-SAP.MN-REQUEST/FWTupdate message sent to ITS management entity to update the forwarding table + if (PICS_ITS_MGT_NOT) { + f_fntpAwaitFwtUpdate( + vc_portNumber, + mw_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid()), + f_getIutRemotePortNumberValue(), + vc_portNumber + ); + } log("*** TC_FNTP_RXP_BP_BV_03: PASS: Received NF-COMM.indication primitive as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } - [] utPort.receive { + [] utPort.receive(UtFntpEventInd:?) -> value v_result { + tc_ac.stop; + log("*** TC_FNTP_RXP_BP_BV_02: FAIL: Unexpected NF-COMM.indication primitive ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_RXP_BP_BV_03: FAIL: Unexpected basic FNTP NPDU ***"); } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_RXP_BP_BV_03: INCONC: Unexpected basic FNTP NPDU ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement log("*** TC_FNTP_RXP_BP_BV_03: INFO: test body done ***"); // Postamble + f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -1317,7 +1306,7 @@ module ItsFntp_TestCases { * but not for Service Port = port2 * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted broadcast message with a destination Port port2, * with port2 different to port1 @@ -1328,8 +1317,8 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/BP/BI/01 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/BP/BI/01 */ testcase TC_FNTP_RXP_BP_BI_01() runs on ItsCalm system ItsCalmSystem { // Local variables @@ -1353,12 +1342,12 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpNpdu( + f_sendExtendedFntpNpdu( f_getIutLocalPortNumberValue(), f_getIutSecondRemotePortNumberValue(), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), // Peer station service address - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), // Local station service address - f_getIutNhopsValue() + m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlRemoteCiidBc())), // Peer station service address + m_llServiceAddr(m_linkId(f_getIutWlLocalCiid(), f_getIutWlRemoteCiidUc())), // Local station service address + f_getIutShopValue() ); log("*** TC_FNTP_RXP_BP_BI_01: INFO: Broadcast message sent ***"); // Clause 'then' @@ -1366,17 +1355,18 @@ module ItsFntp_TestCases { alt { [] fntpPort.receive { tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_BP_BI_01: FAIL: No message was expected on FNTP port ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_FNTP_RXP_BP_BI_01: PASS: No FNTP NPDU received as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } } // End of 'alt' statement log("*** TC_FNTP_RXP_BP_BI_01: INFO: test body done ***"); // Postamble + f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -1391,7 +1381,7 @@ module ItsFntp_TestCases { * with { * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted broadcast message with a destination Port PORT_NON * } @@ -1401,8 +1391,8 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/BP/BI/02 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/BP/BI/02 */ testcase TC_FNTP_RXP_BP_BI_02() runs on ItsCalm system ItsCalmSystem { // Local variables @@ -1425,12 +1415,12 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpNpdu( + f_sendExtendedFntpNpdu( f_getIutLocalPortNumberValue(), { portLong := c_portNon }, - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), // Peer station service address - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), // Local station service address - f_getIutNhopsValue() + m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlRemoteCiidBc())), // Peer station service address + m_llServiceAddr(m_linkId(f_getIutWlLocalCiid(), f_getIutWlRemoteCiidUc())), // Local station service address + f_getIutShopValue() ); log("*** TC_FNTP_RXP_BP_BI_02: INFO: Broadcast message sent ***"); // Clause 'then' @@ -1438,12 +1428,12 @@ module ItsFntp_TestCases { alt { [] fntpPort.receive { tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_BP_BI_02: FAIL: No message was expected on FNTP port ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } [] tc_noac.timeout { // the IUT discards the message, no messages expected - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_FNTP_RXP_BP_BI_02: PASS: No FNTP NPDUs received as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } } // End of 'alt' statement log("*** TC_FNTP_RXP_BP_BI_02: INFO: test body done ***"); @@ -1464,7 +1454,7 @@ module ItsFntp_TestCases { * the IUT having an entry in the FNTP forwarding table for Service Port = port1 * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted broadcast message with a destinationPort port1 and a sourcePort PORT_NON * } @@ -1474,8 +1464,8 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/BP/BI/03 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/BP/BI/03 */ testcase TC_FNTP_RXP_BP_BI_03() runs on ItsCalm system ItsCalmSystem { // Local variables @@ -1499,12 +1489,12 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpNpdu( + f_sendExtendedFntpNpdu( { portLong := c_portNon }, f_getIutRemotePortNumberValue(), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), // Peer station service address - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), // Local station service address - f_getIutNhopsValue() + m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlRemoteCiidBc())), // Peer station service address + m_llServiceAddr(m_linkId(f_getIutWlLocalCiid(), f_getIutWlRemoteCiidUc())), // Local station service address + f_getIutShopValue() ); log("*** TC_FNTP_RXP_BP_BI_03: INFO: Broadcast message sent ***"); // Clause 'then' @@ -1512,17 +1502,18 @@ module ItsFntp_TestCases { alt { [] fntpPort.receive { tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_BP_BI_03: FAIL: No message was expected on FNTP port***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } [] tc_noac.timeout { // the IUT discards the message, no messages expected - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_FNTP_RXP_BP_BI_03: PASS: No FNTP NPDUs received as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } } // End of 'alt' statement log("*** TC_FNTP_RXP_BP_BI_03: INFO: test body done ***"); // Postamble + f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -1537,7 +1528,7 @@ module ItsFntp_TestCases { * with { * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted broadcast message with a destinationPort port1 and a sourcePort PORT_NON * } @@ -1547,8 +1538,8 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/BP/BI/04 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/BP/BI/04 */ testcase TC_FNTP_RXP_BP_BI_04() runs on ItsCalm system ItsCalmSystem { // Local variables @@ -1571,12 +1562,12 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpNpdu( + f_sendExtendedFntpNpdu( { portLong := c_portNon }, { portLong := c_portNon }, - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), // Peer station service address - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), // Local station service address - f_getIutNhopsValue() + m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlRemoteCiidBc())), // Peer station service address + m_llServiceAddr(m_linkId(f_getIutWlLocalCiid(), f_getIutWlRemoteCiidUc())), // Local station service address + f_getIutShopValue() ); log("*** TC_FNTP_RXP_BP_BI_04: INFO: Broadcast message sent ***"); // Clause 'then' @@ -1584,17 +1575,17 @@ module ItsFntp_TestCases { alt { [] fntpPort.receive { tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_BP_BI_04: FAIL: No message was expected on FNTP port ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } [] cfPort.receive { tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_BP_BI_04: FAIL: No message was expected on MN-SAP port ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } [] tc_noac.timeout { // the IUT discards the message, no messages expected - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_FNTP_RXP_BP_BI_04: PASS: No FNTP NPDUs received as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } } // End of 'alt' statement log("*** TC_FNTP_RXP_BP_BI_04: INFO: test body done ***"); @@ -1614,7 +1605,7 @@ module ItsFntp_TestCases { * with { * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted broadcast message with a destinationPort PORT_RTR and a sourcePort different to PORT_HST * } @@ -1624,8 +1615,8 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/BP/BI/05 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/BP/BI/05 */ testcase TC_FNTP_RXP_BP_BI_05() runs on ItsCalm system ItsCalmSystem { // Local variables @@ -1648,12 +1639,12 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpNpdu( + f_sendExtendedFntpNpdu( f_getIutRemotePortNumberValue(), { portLong := c_portRtr }, - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), // Peer station service address - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), // Local station service address - f_getIutNhopsValue() + m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlRemoteCiidBc())), // Peer station service address + m_llServiceAddr(m_linkId(f_getIutWlLocalCiid(), f_getIutWlRemoteCiidUc())), // Local station service address + f_getIutShopValue() ); log("*** TC_FNTP_RXP_BP_BI_05: INFO: Broadcast message sent ***"); // Clause 'then' @@ -1661,17 +1652,17 @@ module ItsFntp_TestCases { alt { [] fntpPort.receive { tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_BP_BI_05: FAIL: No message was expected on FNTP port ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } [] cfPort.receive { tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_BP_BI_05: FAIL: No message was expected on MN-SAP port ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } [] tc_noac.timeout { // the IUT discards the message, no messages expected - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_FNTP_RXP_BP_BI_05: PASS: No FNTP NPDUs received as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } } // End of 'alt' statement log("*** TC_FNTP_RXP_BP_BI_05: INFO: test body done ***"); @@ -1691,7 +1682,7 @@ module ItsFntp_TestCases { * with { * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted broadcast message with a destinationPort PORT_RTR and a sourcePort different to PORT_HST * } @@ -1701,8 +1692,8 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/BP/BI/06 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/BP/BI/06 */ testcase TC_FNTP_RXP_BP_BI_06() runs on ItsCalm system ItsCalmSystem { // Local variables @@ -1725,12 +1716,12 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpNpdu( - f_getIutRemotePortNumberValue(), + f_sendExtendedFntpNpdu( { portLong := c_portHst }, - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), // Peer station service address - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), // Local station service address - f_getIutNhopsValue() + { portLong := c_portRtr }, + m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlRemoteCiidBc())), // Peer station service address + m_llServiceAddr(m_linkId(f_getIutWlLocalCiid(), f_getIutWlRemoteCiidUc())), // Local station service address + f_getIutShopValue() ); log("*** TC_FNTP_RXP_BP_BI_06: INFO: Broadcast message sent ***"); @@ -1739,17 +1730,17 @@ module ItsFntp_TestCases { alt { [] fntpPort.receive { tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_BP_BI_06: FAIL: No message was expected on FNTP port ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } [] cfPort.receive { tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_BP_BI_06: FAIL: No message was expected on MN-SAP port ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } [] tc_noac.timeout { // the IUT discards the message, no messages expected - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_FNTP_RXP_BP_BI_06: PASS: No FNTP NPDUs received as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } } // End of 'alt' statement log("*** TC_FNTP_RXP_BP_BI_06: INFO: test body done ***"); @@ -1764,7 +1755,7 @@ module ItsFntp_TestCases { } // End of group basicProcedure - // 7.7.4 Extended delivery procedure + // 6.2.2 Extended delivery procedure group extendedProcedure { group validBehavior { @@ -1776,27 +1767,27 @@ module ItsFntp_TestCases { * Config Id: CF01 * Initial conditions: * with { - * stationthe IUT having an FNTP forwarding table with proper entry in support of the local port number of the ITS-S application + * the IUT having an FNTP forwarding table with proper entry in support of the local port number of the ITS-S application * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted broadcast packet from the peer station via the IN-SAP with FNTP hop count set to 1 * } * then { - * the IUT forwards the message to the endpoint selected by the Service Port, + * the IUT forwards the message to the ITS-SP selected by the Service Port, * and, the IUT transmits the received packet in broadcast mode with FNTP hop count set to zero * } * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/EP/BV/01 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/EP/BV/01 */ testcase TC_FNTP_RXP_EP_BV_01() runs on ItsCalm system ItsCalmSystem { // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; - var FNTPNPDU v_forwardingNpdu; // Expected forwarding NPDU + var FntpInd v_fntpInd; + var FNTPNPDU v_extendedNpdu; // Expected forwarding NPDU // Test control if (not(PICS_ROLE_RH and PICS_NHOPBC)) { @@ -1812,68 +1803,98 @@ module ItsFntp_TestCases { // Preamble // Clause 'Initial conditions' f_initializeFntpForwardingTable(f_getIutAppPortValue()); + f_setupKnownPeerStation(); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_FNTP_RXP_EP_BV_01: INFO: Preamble: FNTP forwarding Table was setup properly ***"); // Test Body // Clause 'when' - f_acGenerateFntpNpdu( - f_getIutLocalPortNumberValue(), + f_sendExtendedFntpNpdu( f_getIutRemotePortNumberValue(), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), // Peer station service address - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), // Local station service address + f_getIutAppPortValue(), + m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlRemoteCiidBc())), // Peer station service address + m_llServiceAddr(m_linkId(f_getIutWlLocalCiid(), f_getIutWlRemoteCiidUc())), // Local station service address f_getIutNhopsValue() // N-hops count set to a value larger than 0 ); log("*** TC_FNTP_RXP_EP_BV_01: INFO: Broadcast message sent ***"); // Clause 'then' - // 1) The IUT forwards the message to the endpoint selected by the Service Port, + // 1) The IUT forwards the message to the ITS-SP selected by the Service Port, + log("*** TC_FNTP_RXP_EP_BV_01: DEBUG: Expected UT template: ", + mw_utFntpEventInd( + mdw_checkNfFntpCommIndication( + f_getIutAppPortValue(), // Source port of DL-UNITDATA.request primitive + f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive + m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid()) // Source address of DL-UNITDATA.request primitive + ))); tc_ac.start; alt { - [] utPort.receive(mdw_checkNfFntpCommIndication( - f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive - f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive - m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()) // Source address of DL-UNITDATA.request primitive - )) { + [] utPort.receive( + mw_utFntpEventInd( + mdw_checkNfFntpCommIndication( + f_getIutAppPortValue(), // Source port of DL-UNITDATA.request primitive + f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive + m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid()) // Source address of DL-UNITDATA.request primitive + ))) { tc_ac.stop; log("*** TC_FNTP_RXP_EP_BV_01: INFO: Received NF-COMM.indication primitive as expected ***"); } [] utPort.receive { + tc_ac.stop; + log("*** TC_FNTP_RXP_EP_BV_01: FAIL: Unexpected NF-COMM.indication primitive ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_RXP_EP_BV_01: FAIL: Unexpected basic FNTP NPDU ***"); } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_RXP_EP_BV_01: INCONC: Unexpected basic FNTP NPDU ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement // 2) And, the IUT transmits the received packet in broadcast mode with FNTP hop count decremented by one - tc_ac.start; - alt { - [] fntpPort.receive( + log("*** TC_FNTP_RXP_EP_BV_01: DEBUG: Expected LT template: ", + mw_fntpInd( mw_fntpInSapPrimitiveReq( mdw_inUnitDataReq( - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), + mw_linkId(f_getIutWlLocalCiid(), f_getIutWlLocalCiid()), mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()) - ))) -> value v_inSapPrimitivesDown { + )))); + tc_ac.start; + alt { + [] fntpPort.receive( + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId(f_getIutWlLocalCiid(), f_getIutWlLocalCiid()), + mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()) + )))) -> value v_fntpInd { tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_forwardingNpdu); - if (match(v_forwardingNpdu, mdw_fntpForwardingNpdu(c_portRtr, c_portHst, f_getIutForwardingSrcPort(), f_getIutForwardingDestPort(), ?, f_getIutNhopsValue() - 1))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + f_oct2npdu(v_fntpInd.msgIn.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_extendedNpdu); + log("*** TC_FNTP_RXP_EP_BV_01: DEBUG: Expected FNTPPDU: ", m_fntpExtendedNpdu(f_getIutRemotePortNumberValue(), f_getIutAppPortValue(), f_getIutNhopsValue() - 1), " ***"); + log("*** TC_FNTP_RXP_EP_BV_01: INFO: FNTPPDU: ", v_extendedNpdu, " ***"); + if (match(v_extendedNpdu, m_fntpExtendedNpdu(f_getIutRemotePortNumberValue(), f_getIutAppPortValue(), f_getIutNhopsValue() - 1))) { + //TODO Enhance to check generation timestamp +/* if (f_checkTimeValidity(int2float(v_fntpInd.receptionTime), int2float(f_getCurrentTime())) == false) { + log("*** TC_FNTP_RXP_EP_BV_01: WARN: Invalid timestamp ***"); + }*/ log("*** TC_FNTP_RXP_EP_BV_01: PASS: IUT transmits the received packet in BC mode ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_EP_BV_01: FAIL: Unexpected extended N-hops FNTP NPDU ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } } + [] a_fntpUnsollictedMessages() { + // Do not restart tc_ac + repeat; + } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_RXP_EP_BV_01: INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement log("*** TC_FNTP_RXP_EP_BV_01: INFO: test body done ***"); // Postamble +// f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -1889,19 +1910,19 @@ module ItsFntp_TestCases { * the IUT having an FNTP forwarding table with proper entry in support of the local port number of the ITS-S application * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted broadcast packet from the peer station via the IN-SAP with FNTP hop count set to 0 * } * then { - * the IUT forwards the message to the endpoint selected by the Service Port, + * the IUT forwards the message to the ITS-SP selected by the Service Port, * and, the IUT does not transmit the received packet * } * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/EP/BV/02 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/EP/BV/02 */ testcase TC_FNTP_RXP_EP_BV_02() runs on ItsCalm system ItsCalmSystem { // Local variables @@ -1925,34 +1946,44 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpNpdu( - f_getIutLocalPortNumberValue(), + f_sendExtendedFntpNpdu( f_getIutRemotePortNumberValue(), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), // Peer station service address - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), // Local station service address + f_getIutAppPortValue(), + m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlRemoteCiidBc())), // Peer station service address + m_llServiceAddr(m_linkId(f_getIutWlLocalCiid(), f_getIutWlRemoteCiidUc())), // Local station service address f_getIutShopValue() // S-hop count set to 0 ); log("*** TC_FNTP_RXP_EP_BV_02: INFO: Broadcast message sent ***"); // Clause 'then' - // 1) The IUT forwards the message to the endpoint selected by the Service Port, + // 1) The IUT forwards the message to the ITS-SP selected by the Service Port, + log("*** TC_FNTP_RXP_EP_BV_02: DEBUG: Expected UT template: ", + mw_utFntpEventInd( + mdw_checkNfFntpCommIndication( + f_getIutAppPortValue(), // Source port of DL-UNITDATA.request primitive + f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive + m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid()) // Source address of DL-UNITDATA.request primitive + ))); tc_ac.start; alt { - [] utPort.receive(mdw_checkNfFntpCommIndication( - f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive - f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive - m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()) // Source address of DL-UNITDATA.request primitive - )) { + [] utPort.receive( + mw_utFntpEventInd( + mdw_checkNfFntpCommIndication( + f_getIutAppPortValue(), // Source port of DL-UNITDATA.request primitive + f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive + m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid()) // Source address of DL-UNITDATA.request primitive + ))) { tc_ac.stop; log("*** TC_FNTP_RXP_EP_BV_02: INFO: Received NF-COMM.indication primitive as expected ***"); } [] utPort.receive { + tc_ac.stop; + log("*** TC_FNTP_RXP_EP_BV_02: FAIL: Unexpected NF-COMM.indication primitive ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_RXP_EP_BV_02: FAIL: Unexpected basic FNTP NPDU ***"); } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_RXP_EP_BV_02: INCONC: Unexpected basic FNTP NPDU ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement // 2) And, the IUT does not transmit the received packet @@ -1960,17 +1991,19 @@ module ItsFntp_TestCases { alt { [] fntpPort.receive { tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_EP_BV_02: FAIL: No message was expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } [] tc_noac.timeout { // And, the IUT does not transmit the received packet - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + tc_noac.stop; log("*** TC_FNTP_RXP_EP_BV_02: PASS: No message received as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } } // End of 'alt' statement log("*** TC_FNTP_RXP_EP_BV_02: INFO: test body done ***"); // Postamble +// f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -1986,7 +2019,7 @@ module ItsFntp_TestCases { * the IUT having no entry in the FNTP forwarding table for Service Port * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted broadcast packet with unknown destination Port from a peer station via the IN-SAP with FNTP hop count set to a value larger than 0 * } @@ -1997,13 +2030,13 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/EP/BV/03 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/EP/BV/03 */ testcase TC_FNTP_RXP_EP_BV_03() runs on ItsCalm system ItsCalmSystem { // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; - var FNTPNPDU v_forwardingNpdu; // Expected forwarding NPDU + var FntpInd v_fntpInd; + var FNTPNPDU v_extendedNpdu; // Expected extended NPDU var boolean v_inSapMessageReceived := false; // Test control @@ -2025,16 +2058,23 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpNpdu( - f_getIutLocalPortNumberValue(), + f_sendExtendedFntpNpdu( f_getIutRemotePortNumberValue(), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), // Peer station service address - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), // Local station service address + f_getIutAppPortValue(), + m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlRemoteCiidBc())), // Peer station service address + m_llServiceAddr(m_linkId(f_getIutWlLocalCiid(), f_getIutWlRemoteCiidUc())), // Local station service address f_getIutNhopsValue() //hop count set to a value larger than 0 ); log("*** TC_FNTP_RXP_EP_BV_03: INFO: Broadcast message sent ***"); // Clause 'then' + log("*** TC_FNTP_RXP_EP_BV_03: DEBUG: Expected LT template: ", + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId(f_getIutWlLocalCiid(), f_getIutWlLocalCiid()), + mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()) + )))); tc_ac.start; tc_noac.start; alt { @@ -2044,32 +2084,43 @@ module ItsFntp_TestCases { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_EP_BV_03: FAIL: No message was expected on NF-SAP ***"); } - [] tc_noac.timeout { - log("*** TC_FNTP_RXP_EP_BV_03: INFO: No message received as expected ***"); - if (v_inSapMessageReceived == false) { - repeat; - } - } - [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReq( - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), - mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()) - ))) -> value v_inSapPrimitivesDown { + [] fntpPort.receive( + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId(f_getIutWlLocalCiid(), f_getIutWlLocalCiid()), + mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()) + )))) -> value v_fntpInd { tc_ac.stop; v_inSapMessageReceived := true; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_forwardingNpdu); - if (match(v_forwardingNpdu, mdw_fntpForwardingNpdu(c_portRtr, c_portHst, f_getIutForwardingSrcPort(), f_getIutForwardingDestPort(), ?, f_getIutNhopsValue() - 1))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + f_oct2npdu(v_fntpInd.msgIn.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_extendedNpdu); + log("*** TC_FNTP_RXP_EP_BV_03: DEBUG: Expected FNTPPDU: ", mdw_fntpExtendedNpdu_portNumber(f_getIutRemotePortNumberValue(), f_getIutAppPortValue(), f_getIutNhopsValue() - 1), " ***"); + log("*** TC_FNTP_RXP_EP_BV_03: INFO: FNTPPDU: ", v_extendedNpdu, " ***"); + if (match(v_extendedNpdu, mdw_fntpExtendedNpdu_portNumber(f_getIutRemotePortNumberValue(), f_getIutAppPortValue(), f_getIutNhopsValue() - 1))) { + //TODO Enhance to check generation timestamp + /*if (f_checkTimeValidity(int2float(v_fntpInd.receptionTime), int2float(f_getCurrentTime())) == false) { + log("*** TC_FNTP_TXP_FP_BV_03: WARN: Invalid timestamp ***"); + }*/ log("*** TC_FNTP_RXP_EP_BV_03: PASS: IUT transmits the received packet in BC mode ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_EP_BV_03: FAIL: Unexpected extended N-hops FNTP NPDU ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FNTP_RXP_EP_BV_03: INCONC: the IUT discards the packet ***"); + [] a_fntpUnsollictedMessages() { + // Do not restart tc_ac + repeat; + } + [] tc_noac.timeout { + log("*** TC_FNTP_RXP_EP_BV_03: INFO: No message received as expected ***"); + if (v_inSapMessageReceived == false) { + repeat; + } + } + [] tc_ac.timeout { + log("*** TC_FNTP_RXP_EP_BV_03: INCONC: the IUT discards the packet ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement log("*** TC_FNTP_RXP_EP_BV_03: INFO: test body done ***"); @@ -2090,7 +2141,7 @@ module ItsFntp_TestCases { * the IUT having no entry in the FNTP forwarding table for Service Port * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted broadcast packet with unknown destination Port from a peer station via the IN-SAP with FNTP hop count set to 0 * } @@ -2101,8 +2152,8 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/EP/BV/04 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/EP/BV/04 */ testcase TC_FNTP_RXP_EP_BV_04() runs on ItsCalm system ItsCalmSystem { // Local variables @@ -2126,11 +2177,11 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpNpdu( - f_getIutLocalPortNumberValue(), + f_sendExtendedFntpNpdu( f_getIutRemotePortNumberValue(), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), // Peer station service address - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), // Local station service address + f_getIutAppPortValue(), + m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlRemoteCiidBc())), // Peer station service address + m_llServiceAddr(m_linkId(f_getIutWlLocalCiid(), f_getIutWlRemoteCiidUc())), // Local station service address 0 ); log("*** TC_FNTP_RXP_EP_BV_04: INFO: Broadcast message sent ***"); @@ -2140,17 +2191,18 @@ module ItsFntp_TestCases { alt { [] fntpPort.receive { tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_EP_BV_04: FAIL: No message was expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_FNTP_RXP_EP_BV_04: PASS: No FNTP NPDUs received as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } } // End of 'alt' statement log("*** TC_FNTP_RXP_EP_BV_04: INFO: test body done ***"); // Postamble +// f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -2170,7 +2222,7 @@ module ItsFntp_TestCases { * the IUT having setup properly the FNTP forwarding table * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a broadcast packet with invalid value in the FNTP control field from a peer station via the IN-SAP with FNTP hop count set to a value larger than 0 * } @@ -2181,8 +2233,8 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/EP/BI/01 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/EP/BI/01 */ testcase TC_FNTP_RXP_EP_BI_01() runs on ItsCalm system ItsCalmSystem { // Local variables @@ -2206,11 +2258,11 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpNpduInvalidCtrlField( - f_getIutLocalPortNumberValue(), + f_sendFntpNpduInvalidCtrlField( f_getIutRemotePortNumberValue(), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), // Peer station service address - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), // Local station service address + f_getIutAppPortValue(), + m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlRemoteCiidBc())), // Peer station service address + m_llServiceAddr(m_linkId(f_getIutWlLocalCiid(), f_getIutWlRemoteCiidUc())), // Local station service address 10 ); log("*** TC_FNTP_RXP_EP_BI_01: INFO: Broadcast message with invalid control fields sent ***"); @@ -2220,17 +2272,18 @@ module ItsFntp_TestCases { alt { [] fntpPort.receive { tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_EP_BI_01: FAIL: No message was expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_FNTP_RXP_EP_BI_01: PASS: No message received as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } } // End of 'alt' statement log("*** TC_FNTP_RXP_EP_BI_01: INFO: test body done ***"); // Postamble + f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -2247,7 +2300,7 @@ module ItsFntp_TestCases { * but without entry for the peer station * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a broadcast packet with not supported / illegal value (e.g. bit 5 set to 1) from a peer station via the IN-SAP * } @@ -2257,8 +2310,8 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/EP/BI/02 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/EP/BI/02 */ testcase TC_FNTP_RXP_EP_BI_02() runs on ItsCalm system ItsCalmSystem { // Local variables @@ -2282,7 +2335,7 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpNpduInvalidBitSet( + f_sendFntpNpduInvalidBitSet( f_getIutLocalPortNumberValue(), f_getIutRemotePortNumberValue(), m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), // Peer station service address @@ -2294,17 +2347,18 @@ module ItsFntp_TestCases { alt { [] fntpPort.receive { tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_EP_BI_02: FAIL: No message was expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_FNTP_RXP_EP_BI_02: PASS: No message received as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } } // End of 'alt' statement log("*** TC_FNTP_RXP_EP_BI_02: INFO: test body done ***"); // Postamble + f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -2329,7 +2383,7 @@ module ItsFntp_TestCases { * the IUT having set up properly the FNTP forwarding table * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a packet from a peer station requiring local forwarding via the ITS station-internal network * } @@ -2339,12 +2393,12 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/FP/BV/01 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/FP/BV/01 */ testcase TC_FNTP_RXP_FP_BV_01() runs on ItsCalm system ItsCalmSystem { // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; + var FntpInd v_fntpInd; var FNTPNPDU v_forwardingNpdu; // Expected forwarding NPDU // Test control @@ -2366,7 +2420,7 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpForwardingNpdu( + f_sendForwardingNpdu( { portLong := c_portRtr }, // From ITS-S router { portLong := c_portHst }, // To ITS-S host f_getIutForwardingSrcPort(), // Forwarding source port @@ -2382,29 +2436,36 @@ module ItsFntp_TestCases { tc_ac.start; alt { [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReq( - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), - mw_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()) - ))) -> value v_inSapPrimitivesDown { + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), + mw_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()) + )))) -> value v_fntpInd { tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_forwardingNpdu); + f_oct2npdu(v_fntpInd.msgIn.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_forwardingNpdu); + log("*** TC_FNTP_RXP_FP_BV_01: INFO: FNTPPDU: ", v_forwardingNpdu, " ***"); if (match(v_forwardingNpdu, mdw_fntpForwardingNpdu(c_portRtr, c_portHst, f_getIutForwardingSrcPort(), f_getIutForwardingDestPort(), ?, ?))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + //TODO Enhance to check generation timestamp + /*if (f_checkTimeValidity(int2float(v_fntpInd.receptionTime), int2float(f_getCurrentTime())) == false) { + log("*** TC_FNTP_TXP_BP_BV_01: WARN: Invalid timestamp ***"); + }*/ log("*** TC_FNTP_RXP_FP_BV_01: PASS: Received FNTP forwarding NPDU as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_FP_BV_01: FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_RXP_FP_BV_01: INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement log("*** TC_FNTP_RXP_FP_BV_01: INFO: test body done ***"); // Postamble +// f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf02Down(); @@ -2420,7 +2481,7 @@ module ItsFntp_TestCases { * the IUT having set up ptoperly the FNTP forwarding table * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having receivd a sequence of packets from a peer station requiring local forwarding via the ITS station-internal network, * with the number of packets such that at least once the "Counter" value before increment is different to 255, @@ -2433,12 +2494,12 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/FP/BV/02 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/FP/BV/02 */ testcase TC_FNTP_RXP_FP_BV_02() runs on ItsCalm system ItsCalmSystem { // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; + var FntpInd v_fntpInd; var FNTPNPDU v_forwardingNpdu; var integer v_counter; // Index used for loop var template (value) FNTPpacketCounter v_fntpPacketCounter; // Expected FNTPpacketCounter value @@ -2464,7 +2525,7 @@ module ItsFntp_TestCases { // Clause 'when' v_counter := 250; v_fntpPacketCounter := v_counter; - f_acGenerateFntpForwardingNpdu( + f_sendForwardingNpdu( { portLong := c_portRtr }, // From ITS-S router { portLong := c_portHst }, // To ITS-S host f_getIutForwardingSrcPort(), // Forwarding source port @@ -2472,7 +2533,7 @@ module ItsFntp_TestCases { m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), // Peer station is the source m_llServiceAddr(m_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid())), // Router is the destination v_fntpPacketCounter, - f_getIutShopValue() // S-Hop + f_getIutNhopsValue() ); // Prepare expected value v_counter := v_counter + 1; @@ -2482,22 +2543,29 @@ module ItsFntp_TestCases { tc_ac.start; alt { [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReq( - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), - mw_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()) - ))) -> value v_inSapPrimitivesDown { + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), + mw_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()) + )))) -> value v_fntpInd { tc_ac.stop; log("*** TC_FNTP_RXP_FP_BV_02: INFO: Received next FNTP forwarding NPDU ***"); - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_forwardingNpdu); + f_oct2npdu(v_fntpInd.msgIn.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_forwardingNpdu); + log("*** TC_FNTP_RXP_FP_BV_02: INFO: FNTPPDU: ", v_forwardingNpdu, " ***"); if (match(v_forwardingNpdu, mdw_fntpForwardingNpdu(c_portRtr, c_portHst, f_getIutForwardingSrcPort(), f_getIutForwardingDestPort(), v_fntpPacketCounter, ?)) == false) { + log("*** TC_FNTP_RXP_FP_BV_02: ERROR: Received unexpected FNTP packet counter value ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_RXP_FP_BV_02: ERROR: Received unexpected FNTP packet couneter value ***"); } else if (v_counter < 258) { + //TODO Enhance to check generation timestamp + /*if (f_checkTimeValidity(int2float(v_fntpInd.receptionTime), int2float(f_getCurrentTime())) == false) { + log("*** TC_FNTP_TXP_BP_BV_01: WARN: Invalid timestamp ***"); + }*/ // Prepare expected value v_counter := v_counter + 1; v_fntpPacketCounter := v_counter mod (c_uInt8Max + 1); // Apply modulus 256 here log("*** TC_FNTP_RXP_FP_BV_02: INFO: Second formatted single hop BC transmission request done ***"); + // FIXME Do we need to call f_sendForwardingNpdu again? repeat; // Continue the processing } else { // Here, the counter has passed the wrap around fromt the value 255 to 0 @@ -2505,13 +2573,14 @@ module ItsFntp_TestCases { } } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_RXP_FP_BV_02: INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement log("*** TC_FNTP_RXP_FP_BV_02: INFO: test body done ***"); // Postamble +// f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf02Down(); @@ -2527,7 +2596,7 @@ module ItsFntp_TestCases { * the IUT having set up properly the FNTP forwarding table * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an FNTP station-internal forwarding NPDU containing a correctly fornmated FNTP basic NPDU * } @@ -2538,8 +2607,8 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/FP/BV/04 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/FP/BV/04 */ testcase TC_FNTP_RXP_FP_BV_03() runs on ItsCalm system ItsCalmSystem { // Local variables @@ -2563,7 +2632,7 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpForwardingNpdu( + f_sendForwardingNpdu( { portLong := c_portRtr }, // From ITS-S router { portLong := c_portHst }, // To ITS-S host f_getIutForwardingSrcPort(), // Forwarding source port @@ -2577,27 +2646,30 @@ module ItsFntp_TestCases { // Clause 'then' tc_ac.start; alt { - [] utPort.receive(mdw_checkNfFntpCommIndication( - vc_portNumber, // Destination port of DL-UNITDATA.request primitive - f_getIutForwardingSrcPort(), // Source port of DL-UNITDATA.request primitive - m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()) // Source address of DL-UNITDATA.request primitive - )) { + [] utPort.receive( + mw_utFntpEventInd( + mdw_checkNfFntpCommIndication( + vc_portNumber, // Destination port of DL-UNITDATA.request primitive + f_getIutForwardingSrcPort(), // Source port of DL-UNITDATA.request primitive + m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()) // Source address of DL-UNITDATA.request primitive + ))) { tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_FNTP_RXP_FP_BV_03: PASS: Received NF-COMM.indication primitive as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] utPort.receive { + log("*** TC_FNTP_RXP_FP_BV_03: FAIL: Unexpected NF-COMM.indication primitive ***"); f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_RXP_FP_BV_03: FAIL: Unexpected basic FNTP NPDU ***"); } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_RXP_FP_BV_03: INCONC: Unexpected basic FNTP NPDU ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } } // End of 'alt' statement log("*** TC_FNTP_RXP_FP_BV_03: INFO: test body done ***"); // Postamble +// f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf02Down(); @@ -2613,7 +2685,7 @@ module ItsFntp_TestCases { * the IUT having an ITS-SCU-ID different to the requested one * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an FNTP station-internal forwarding NPDU containing a correctly formatted FNTP basic NPDU, * but the ITS-SCU-ID indicates a different ITS-SCU @@ -2624,8 +2696,8 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/FP/BV/04 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/FP/BV/04 */ testcase TC_FNTP_RXP_FP_BV_04() runs on ItsCalm system ItsCalmSystem { // Local variables @@ -2649,7 +2721,7 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpForwardingNpduWithUnknownItsSciId( + f_sendFntpForwardingNpduWithUnknownItsSciId( { portLong := c_portRtr }, // From ITS-S router { portLong := c_portHst }, // To ITS-S host f_getIutForwardingSrcPort(), // Forwarding source port @@ -2665,8 +2737,8 @@ module ItsFntp_TestCases { alt { [] fntpPort.receive { tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_FNTP_RXP_FP_BV_04: FAIL: No message was expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); } [] tc_noac.timeout { log("*** TC_FNTP_RXP_FP_BV_04: PASS: No message received as expected ***"); @@ -2676,6 +2748,7 @@ module ItsFntp_TestCases { log("*** TC_FNTP_RXP_FP_BV_04: INFO: test body done ***"); // Postamble +// f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf02Down(); @@ -2695,7 +2768,7 @@ module ItsFntp_TestCases { * the IUT having no more entry for the required Service Port * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an FNTP station-internal forwarding NPDU containing a correctly formatted FNTP basic NPDU, but the Service Port is no more known * } @@ -2705,8 +2778,8 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/RXP/FP/BI/01 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/RXP/FP/BI/01 */ testcase TC_FNTP_RXP_FP_BI_01() runs on ItsCalm system ItsCalmSystem { // Local variables @@ -2729,7 +2802,7 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpForwardingNpdu( + f_sendForwardingNpdu( { portLong := c_portRtr }, // From ITS-S router { portLong := c_portHst }, // To ITS-S host f_getIutForwardingSrcPort(), // Forwarding source port @@ -2756,6 +2829,7 @@ module ItsFntp_TestCases { log("*** TC_FNTP_RXP_FP_BI_01: INFO: test body done ***"); // Postamble +// f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf02Down(); @@ -2767,10 +2841,10 @@ module ItsFntp_TestCases { } // End of group receivingPackets - // 7.10 CI parameter management + // 6.3 CI parameter management group cipManagement { - // 7.10. Basic procedure N/A + // 6.3.1 Basic procedure N/A group basicProcedure { group validBehavior { @@ -2783,7 +2857,7 @@ module ItsFntp_TestCases { } // End of group basicProcedure - // 7.10.x Extended procedure + // 6.3.2 Extended procedure group extendedProcedure { group validBehavior { @@ -2798,7 +2872,7 @@ module ItsFntp_TestCases { * the IUT having setup properly the FNTP forwarding table * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted single hop BC transmission request with CIPs indicated in the NF-FNTP-COMM.request service primitive * } @@ -2808,12 +2882,12 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/CIP/EP/BV/01 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/CIP/EP/BV/01 */ testcase TC_FNTP_CIP_EP_BV_01() runs on ItsCalm system ItsCalmSystem { // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; + var FntpInd v_fntpInd; var FNTPNPDU v_extendedNpdu; // Test control @@ -2835,33 +2909,34 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_utCommandRequestConfirm( + f_fntpGenerateNfSApRequestWithoutConfirm( m_generateNfFntpCommRequest( f_getNextCommandRef(), // Unique cyclic reference number of command vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation f_getIutWlLinkIdBc(), // Identifies the VCI to be used to transmit the packet - f_getIutItsFpdu(), // Contains the endpoint payload EPDU + f_getIutItsFpdu(), // Contains the ITS-SP payload EPDU md_cipNfFntpOptions( // Contains CIP indication f_getIutShopValue(), ''O, - f_getIutTxCipValue())), - mw_fntpCommConfirm_success, - false, - vc_utCommandConf); + f_getIutTxCipValue() + ) + ) + ); log("*** TC_FNTP_CIP_EP_BV_01: INFO: Formatted BC transmission request done ***"); // Clause 'then' tc_ac.start; alt { [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReqCip( - mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), - f_getIutTxCipValue() - ))) -> value v_inSapPrimitivesDown { + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReqCip( + mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), + f_getIutAccessParametersValue() // FIXME ASN.1 AccessParameters description shall be enhanced + )))) -> value v_fntpInd { tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu); + f_oct2npdu(v_fntpInd.msgIn.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_extendedNpdu); if (match( v_extendedNpdu, mw_fntpExtendedNpduCip( @@ -2882,6 +2957,7 @@ module ItsFntp_TestCases { log("*** TC_FNTP_CIP_EP_BV_01: INFO: test body done ***"); // Postamble + f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -2897,7 +2973,7 @@ module ItsFntp_TestCases { * the IUT having setup properly the FNTP forwarding table * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted N-hop BC transmission request with CIPs indicated in the NF-FNTP-COMM.request service primitive * } @@ -2907,12 +2983,12 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/CIP/EP/BV/02 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/CIP/EP/BV/02 */ testcase TC_FNTP_CIP_EP_BV_02() runs on ItsCalm system ItsCalmSystem { // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; + var FntpInd v_fntpInd; var FNTPNPDU v_extendedNpdu; // Test control @@ -2934,33 +3010,34 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_utCommandRequestConfirm( + f_fntpGenerateNfSApRequestWithoutConfirm( m_generateNfFntpCommRequest( f_getNextCommandRef(), // Unique cyclic reference number of command vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation f_getIutWlLinkIdBc(), // Identifies the VCI to be used to transmit the packet - f_getIutItsFpdu(), // Contains the endpoint payload EPDU + f_getIutItsFpdu(), // Contains the ITS-SP payload EPDU md_cipNfFntpOptions( // Contains CIP indication f_getIutNhopsValue(), ''O, - f_getIutTxCipValue())), - mw_fntpCommConfirm_success, - false, - vc_utCommandConf); + f_getIutTxCipValue() + ) + ) + ); log("*** TC_FNTP_CIP_EP_BV_02: INFO: Formatted N-hops BC transmission request done ***"); // Clause 'then' tc_ac.start; alt { [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReqCip( - mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), - f_getIutTxCipValue() - ))) -> value v_inSapPrimitivesDown { + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReqCip( + mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), + f_getIutAccessParametersValue() // FIXME ASN.1 AccessParameters description shall be enhanced + )))) -> value v_fntpInd { tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu); + f_oct2npdu(v_fntpInd.msgIn.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_extendedNpdu); if (match( v_extendedNpdu, mw_fntpExtendedNpduCip( @@ -2981,6 +3058,7 @@ module ItsFntp_TestCases { log("*** TC_FNTP_CIP_EP_BV_02: INFO: test body done ***"); // Postamble + f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -2996,7 +3074,7 @@ module ItsFntp_TestCases { * the IUT having setup properly the FNTP forwarding table * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted UC transmission request with CIPs indicated in the NF-FNTP-COMM.request service primitive * } @@ -3006,13 +3084,13 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/CIP/EP/BV/03 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/CIP/EP/BV/03 */ testcase TC_FNTP_CIP_EP_BV_03() runs on ItsCalm system ItsCalmSystem { // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; - var FNTPNPDU v_extendedNpdu; + var FntpInd v_fntpInd; + var FNTPNPDU v_extendedNpdu; // Test control if (not((PICS_CIP and PICS_ROLE_RH))) { @@ -3033,33 +3111,34 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_utCommandRequestConfirm( + f_fntpGenerateNfSApRequestWithoutConfirm( m_generateNfFntpCommRequest( f_getNextCommandRef(), // Unique cyclic reference number of command vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation f_getIutWlLinkIdUc(), // Identifies the VCI to be used to transmit the packet - f_getIutItsFpdu(), // Contains the endpoint payload EPDU + f_getIutItsFpdu(), // Contains the ITS-SP payload EPDU md_cipNfFntpOptions( // Contains CIP indication f_getIutNhopsValue(), ''O, - f_getIutTxCipValue())), - mw_fntpCommConfirm_success, - false, - vc_utCommandConf); + f_getIutTxCipValue() + ) + ) + ); log("*** TC_FNTP_CIP_EP_BV_03: INFO: Formatted UC transmission request done ***"); // Clause 'then' tc_ac.start; alt { [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReqCip( - mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), - ? - ))) -> value v_inSapPrimitivesDown { + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReqCip( + mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), + f_getIutAccessParametersValue() // FIXME ASN.1 AccessParameters description shall be enhanced + )))) -> value v_fntpInd { tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu); + f_oct2npdu(v_fntpInd.msgIn.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_extendedNpdu); if (match( v_extendedNpdu, mw_fntpExtendedNpduCip( @@ -3073,14 +3152,14 @@ module ItsFntp_TestCases { } } [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); log("*** TC_FNTP_CIP_EP_BV_03: INCONC: Expected message not received ***"); } } // End of 'alt' statement log("*** TC_FNTP_CIP_EP_BV_03: INFO: test body done ***"); // Postamble -// f_unInitializeFntpForwardingTable(); + f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -3096,7 +3175,7 @@ module ItsFntp_TestCases { * the IUT having setup properly the FNTP forwarding table * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a correctly formatted FNTP extended NPDU with CIPs included and with the FNTP hop count set to 1 * } @@ -3107,12 +3186,12 @@ module ItsFntp_TestCases { * } * * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/CIP/EP/BV/04 + * @version 1.1.2 + * @see ETSI TS 102 985-2 v1.1.2 FNTP/CIP/EP/BV/04 */ testcase TC_FNTP_CIP_EP_BV_04() runs on ItsCalm system ItsCalmSystem { // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; + var FntpInd v_fntpInd; var FNTPNPDU v_extendedNpdu; // Test control @@ -3134,7 +3213,7 @@ module ItsFntp_TestCases { // Test Body // Clause 'when' - f_acGenerateFntpNpduCip( + f_sendFntpNpduCip( f_getIutLocalPortNumberValue(), f_getIutRemotePortNumberValue(), m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid())), @@ -3142,7 +3221,7 @@ module ItsFntp_TestCases { f_getIutNhopsValue(), f_getIutTxCipValue(), f_getIutRxCipValue(), - f_getIutRxCipValue() // Access parameter + f_getIutAccessParametersValue() // Access parameter - FIXME ASN.1 AccessParameters description shall be enhanced ); log("*** TC_FNTP_CIP_EP_BV_04: INFO: Formatted single hop BC transmission request done ***"); @@ -3150,17 +3229,19 @@ module ItsFntp_TestCases { // 1) Notifies reception to the required port tc_ac.start; alt { - [] utPort.receive(mdw_checkNfFntpCommIndication( - f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive - f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive - m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid()) // Source address of DL-UNITDATA.request primitive - )) { + [] utPort.receive( + mw_utFntpEventInd( + mdw_checkNfFntpCommIndication( + f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive + f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive + m_linkId(f_getIutWlRemoteCiidUc(), f_getIutWlLocalCiid()) // Source address of DL-UNITDATA.request primitive + ))) { tc_ac.stop; log("*** TC_FNTP_CIP_EP_BV_04: INFO: Received NF-COMM.indication primitive as expected ***"); } [] utPort.receive { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_CIP_EP_BV_04: FAIL: Unexpected basic FNTP NPDU ***"); + log("*** TC_FNTP_CIP_EP_BV_04: FAIL: Unexpected NF-COMM.indication primitive ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -3170,16 +3251,21 @@ module ItsFntp_TestCases { // 2) Forwards the remaining NPDU to the BC-VCI for next hop transmission tc_ac.start; alt { - [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReqCip( - mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), - ? - ))) -> value v_inSapPrimitivesDown { + [] fntpPort.receive( + mw_fntpInd( + mw_fntpInSapPrimitiveReq( + mdw_inUnitDataReqCip( + mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), + ? // FIXME ASN.1 AccessParameters description shall be enhanced + )))) -> value v_fntpInd { tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu); - if (match(v_extendedNpdu, mdw_fntpExtendedNpdu(?, ?))) { + f_oct2npdu(v_fntpInd.msgIn.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_extendedNpdu); + if (match( + v_extendedNpdu, + mw_fntpExtendedNpduCip( + ''O, // For transmission, RX parameter shall be empty - See ISO/CD 21218 - Clause 8.5 + ?))) { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_FNTP_CIP_EP_BV_04: PASS: Received extended FNTP NPDU with CIPs as expected ***"); } else { @@ -3195,7 +3281,7 @@ module ItsFntp_TestCases { log("*** TC_FNTP_CIP_EP_BV_04: INFO: test body done ***"); // Postamble -// f_unInitializeFntpForwardingTable(); + f_unInitializeFntpForwardingTable(); f_poDefault(); f_cf01Down(); @@ -3209,884 +3295,884 @@ module ItsFntp_TestCases { } // End of group extendedProcedure - // 7.10.x Forwarded procedure + // 6.3.3 Forwarded procedure group forwardedProcedure { group validBehavior { - /** - * @desc TX from ITS-S host with CIPs - *
-                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)
-                 * Config Id: CF02
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having setup properly the FNTP forwarding table
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a correctly formatted single hop BC transmission request with CIPs for delivery via a VCI contained in a different ITS-SCU
-                 *      }
-                 *      then {
-                 *          the IUT generates an FNTP forwarding NPDU containing an FNTP extended NPDU with CIPs, 
-                 *          and forwards it to the BC-VCI for transmission to the selected ITS-S router
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/CIP/FP/BV/01 - */ - testcase TC_FNTP_CIP_FP_BV_01() runs on ItsCalm system ItsCalmSystem { - // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; - var FNTPNPDU v_extendedNpdu; - - // Test control - if (not(PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH))) { - log("*** TC_FNTP_CIP_FP_BV_01: ERROR: 'PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_initializeFntpForwardingTable(f_getIutAppPortValue()); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_01: INFO: Preamble: FNTP forwarding Table was setup properly ***"); - - // Test Body - // Clause 'when' - f_acGenerateFntpNpduCip( - f_getIutLocalPortNumberValue(), - f_getIutRemotePortNumberValue(), - m_llServiceAddr(m_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanDifferentLocalCiid())), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutSecondRemoteDestCiidBc())), - f_getIutShopValue(), - f_getIutTxCipValue(), - f_getIutRxCipValue(), - f_getIutRxCipValue() // Access parameter - ); - log("*** TC_FNTP_CIP_FP_BV_01: INFO: Formatted single hop BC transmission request done ***"); - - // Clause 'then' - tc_ac.start; - alt { - [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReqCip( - mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutSecondRemoteDestCiidBc()), - ? - ))) -> value v_inSapPrimitivesDown { - tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu); - if (match( - v_extendedNpdu, - mw_fntpExtendedNpduCip( - ''O, // For transmission, RX parameter shall be empty - See ISO/CD 21218 - Clause 8.5 - f_getIutTxCipValue()))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_01: PASS: Received extended FNTP NPDU with CIPs as expected ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_CIP_FP_BV_01: FAIL: Expected message not received ***"); - } - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FNTP_CIP_FP_BV_01: INCONC: Expected message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FNTP_CIP_FP_BV_01: INFO: test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FNTP_CIP_FP_BV_01 - - /** - * @desc RX at ITS-S router from ITS-S host with CIPs - *
-                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)
-                 * Config Id: CF02
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having set up properly the FNTP forwarding table
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received an FNTP station-internal forwarding NPDU containing a correctly formatted FNTP extended NPDU 
-                 *          with CIPs for single hop BC transmission
-                 *      }
-                 *      then {
-                 *          the IUT extracts the FNTP extended NPDU, 
-                 *          and forwards it to the BC-VCI for transmission via the IN-SAP with access_parameters set equal to the CIPs
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/CIP/FP/BV/02 - */ - testcase TC_FNTP_CIP_FP_BV_02() runs on ItsCalm system ItsCalmSystem { - // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; - var FNTPNPDU v_extendedNpdu; - - // Test control - if (not(PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH))) { - log("*** TC_FNTP_CIP_FP_BV_02: ERROR: 'PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_initializeFntpForwardingTable(f_getIutAppPortValue()); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_02: INFO: Preamble: FNTP forwarding Table was setup properly ***"); - - // Test Body - // Clause 'when' - f_acGenerateFntpForwardingNpduCip( - { portLong := c_portRtr }, // From ITS-S router - { portLong := c_portHst }, // To ITS-S host - f_getIutForwardingSrcPort(), // Forwarding source port - f_getIutForwardingDestPort(), // Forwarding destination port - m_llServiceAddr(m_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid())), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidUc(), f_getIutRemoteDestCiidUc())), - 0, // Packet counter - f_getIutShopValue(), // S-Hop - f_getIutRxCipValue(), // rx CIP parameter - f_getIutTxCipValue(), // tx CIP parameter - f_getIutRxCipValue() // Access parameter - ); - log("*** TC_FNTP_CIP_FP_BV_02: INFO: Formatted single hop BC transmission request contained in a different ITS-SCU done ***"); - - // Clause 'then' - tc_ac.start; - alt { - [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReqCip( - mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), - mw_linkId(f_getIutRemoteDestCiidUc(), f_getIutRemoteDestCiidUc()), - ? - ))) -> value v_inSapPrimitivesDown { - tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu); - if (match( - v_extendedNpdu, - mw_fntpExtendedNpduCip( - ''O, // For transmission, RX parameter shall be empty - See ISO/CD 21218 - Clause 8.5 - f_getIutTxCipValue()))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_02: PASS: Received extended FNTP NPDU with CIPs as expected ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_CIP_FP_BV_02: FAIL: Expected message not received ***"); - } - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FNTP_CIP_FP_BV_02: INCONC: Expected message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FNTP_CIP_FP_BV_02: INFO: test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FNTP_CIP_FP_BV_02 - - /** - * @desc RX at ITS-S router from access layer with TX CIPs - *
-                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)
-                 * Config Id: CF02
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having set up properly the FNTP forwarding table
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a packet from the IN-SAP containing a properly formatted FNTP NPDU with TX CIPs, 
-                 *          and no RX CIPs are available
-                 *      }
-                 *      then {
-                 *          the IUT forwards the TX-CIP information to the implementation-specific destination in the ITS-S router, 
-                 *          and constructs an FNTP forwarding NPDU containing the received FNTP NPDU including the CIP header, 
-                 *          and transmits the FNTP forwarding NPDU via the BC-VCI connected to the ITS station-internal network
-
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/CIP/FP/BV/03 - */ - testcase TC_FNTP_CIP_FP_BV_03() runs on ItsCalm system ItsCalmSystem { - // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; - var FNTPNPDU v_forwardingNpdu; // Expected forwarding NPDU - - // Test control - if (not(PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH))) { - log("*** TC_FNTP_CIP_FP_BV_03: ERROR: 'PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_initializeFntpForwardingTable(f_getIutAppPortValue()); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_03: INFO: Preamble: FNTP forwarding Table was setup properly ***"); - - // Test Body - // Clause 'when' - f_acGenerateFntpNpduCip( - f_getIutLocalPortNumberValue(), - f_getIutRemotePortNumberValue(), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), - f_getIutNhopsValue(), - f_getIutTxCipValue(), // With TX CIPs - ''O, // and no RX CIPs are available - f_getIutRxCipValue() // Access parameter - ); - log("*** TC_FNTP_CIP_FP_BV_03: INFO: Formatted BC transmission request done ***"); - - // Clause 'then' - tc_ac.start; - alt { - [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReq( - m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), - m_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()) - ))) -> value v_inSapPrimitivesDown { - tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_forwardingNpdu); - if (match(v_forwardingNpdu, mdw_fntpForwardingNpduCip( - c_portRtr, - c_portHst, - f_getIutForwardingSrcPort(), - f_getIutForwardingDestPort(), - ?, - ?, - ''O, - f_getIutTxCipValue()))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_03: PASS: Received FNTP forwarding NPDU as expected ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_CIP_FP_BV_03: FAIL: Expected message not received ***"); - } - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FNTP_CIP_FP_BV_03: INCONC: Expected message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FNTP_CIP_FP_BV_03: INFO: test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FNTP_CIP_FP_BV_03 - - /** - * @desc RX at ITS-S router from access layer with TX CIPs and RX CIPs - *
-                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)
-                 * Config Id: CF02
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having set up properly the FNTP forwarding table
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a packet from the IN-SAP containing a properly formatted FNTP NPDU with TX CIPs, and RX CIPs are available
-                 *      }
-                 *      then {
-                 *          the IUT forwards the TX-CIP and RX-CIP information to the implementation-specific destination in the ITS-S router, 
-                 *          and constructs an FNTP forwarding NPDU containing the received FNTP NPDU including the CIP header extended by the RX CIPs, 
-                 *          and transmits the FNTP forwarding NPDU via the BC-VCI connected to the ITS station-internal network
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/CIP/FP/BV/04 - */ - testcase TC_FNTP_CIP_FP_BV_04() runs on ItsCalm system ItsCalmSystem { - // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; - var FNTPNPDU v_forwardingNpdu; // Expected forwarding NPDU - - // Test control - if (not(PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH))) { - log("*** TC_FNTP_CIP_FP_BV_04: ERROR: 'PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_initializeFntpForwardingTable(f_getIutAppPortValue()); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_04: INFO: Preamble: FNTP forwarding Table was setup properly ***"); - - // Test Body - // Clause 'when' - f_acGenerateFntpNpduCip( - f_getIutLocalPortNumberValue(), - f_getIutRemotePortNumberValue(), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), - f_getIutShopValue(), - f_getIutTxCipValue(), - f_getIutRxCipValue(), - f_getIutRxCipValue() - ); - log("*** TC_FNTP_CIP_FP_BV_04: INFO: Formatted BC transmission request done ***"); - - // Clause 'then' - // TODO How to do this: Forwards the TX-CIP and RX-CIP information to the implementation-specific destination in the ITS-S host' - // 1) Forwards NPDU containing the received FNTP NPDU including the CIP header extended by the RX CIPs - tc_ac.start; - alt { - [] utPort.receive( - mdw_checkNfFntpCommIndicationCip( - f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive - f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive - m_linkId(f_getIutRemoteDestCiidBc(), f_getIutSecondRemoteDestCiidBc()), // Source address of DL-UNITDATA.request primitive - mdw_nHopNfFntpOptions_cip( - f_getIutNhopsValue(), - f_getIutTxCipValue(), - f_getIutRxCipValue() - ) - )) { - tc_ac.stop; - log("*** TC_FNTP_CIP_FP_BV_04: INFO: Received NF-COMM.indication primitive as expected ***"); - } - [] utPort.receive { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_CIP_FP_BV_04: FAIL: Unexpected basic FNTP NPDU ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FNTP_CIP_FP_BV_04: INCONC: Unexpected basic FNTP NPDU ***"); - } - } // End of 'alt' statement - // 2) Transmits the FNTP forwarding NPDU via the BC-VCI connected to the ITS station-internal network - tc_ac.start; - alt { - [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReq( - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), - mw_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()) - ))) -> value v_inSapPrimitivesDown { - tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_forwardingNpdu); - if (match(v_forwardingNpdu, mdw_fntpForwardingNpduCip( - c_portRtr, - c_portHst, - f_getIutForwardingSrcPort(), - f_getIutForwardingDestPort(), - ?, - ?, - f_getIutRxCipValue(), - f_getIutTxCipValue()))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_04: PASS: Received FNTP forwarding NPDU as expected ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_CIP_FP_BV_04: FAIL: Expected message not received ***"); - } - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FNTP_CIP_FP_BV_04: INCONC: Expected message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FNTP_CIP_FP_BV_04: INFO: test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FNTP_CIP_FP_BV_04 - - /** - * @desc RX at ITS-S host from ITS-S router with CIPs - *
-                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)
-                 * Config Id: CF02
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having set up properly the FNTP forwarding table
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received an FNTP forwarding NPDU containing a correctly formatted FNTP extended NPDU and CIP
-                 *      }
-                 *      then {
-                 *          the IUT forwards the TX-CIP and RX-CIP information to the implementation-specific destination in the ITS-S host, 
-                 *          the IUT delivers the ITS-FPDU to the ITS-SP selected by the Service Port
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/CIP/FP/BV/05 - */ - testcase TC_FNTP_CIP_FP_BV_05() runs on ItsCalm system ItsCalmSystem { - // Local variables - - // Test control - if (not(PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH))) { - log("*** TC_FNTP_CIP_FP_BV_05: ERROR: 'PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_initializeFntpForwardingTable(f_getIutAppPortValue()); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_05: INFO: Preamble: FNTP forwarding Table was setup properly ***"); - - // Test Body - // Clause 'when' - f_acGenerateFntpForwardingNpduCip( - { portLong := c_portRtr }, // From ITS-S router - { portLong := c_portHst }, // To ITS-S host - f_getIutForwardingSrcPort(), // Forwarding source port - f_getIutForwardingDestPort(), // Forwarding destination port - m_llServiceAddr(m_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid())), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), - 0, // Packet counter - f_getIutShopValue(), // S-Hop - f_getIutRxCipValue(), // rx CIP parameter - f_getIutTxCipValue(), // tx CIP parameter - f_getIutRxCipValue() // Access parameter - ); - log("*** TC_FNTP_CIP_FP_BV_05: INFO: Request to send an FNTP extended NPDU containing CIP done ***"); - // Clause 'then' - // TODO How to do this: Forwards the TX-CIP and RX-CIP information to the implementation-specific destination in the ITS-S host' - tc_ac.start; - alt { - [] utPort.receive( - mdw_checkNfFntpCommIndicationCip( - f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive - f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive - m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), // Source address of DL-UNITDATA.request primitive - mdw_nHopNfFntpOptions_cip( - f_getIutNhopsValue(), - f_getIutTxCipValue(), - f_getIutRxCipValue() - ) - )) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_05: INFO: Received NF-COMM.indication primitive as expected ***"); - } - [] utPort.receive { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_CIP_FP_BV_05: FAIL: Unexpected basic FNTP NPDU ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FNTP_CIP_FP_BV_05: INCONC: Unexpected basic FNTP NPDU ***"); - } - } // End of 'alt' statement - log("*** TC_FNTP_CIP_FP_BV_05: INFO: test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FNTP_CIP_FP_BV_05 - - /** - * @desc TX at ITS-S router to remote ITS-S with no transmission of CIP in the frame - *
-                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)
-                 * Config Id: CF02
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having set up properly the FNTP forwarding table, 
-                 *      and the IUT is set to not transmit CIPs in a frame to a remote ITS-S
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received the request to send an FNTP extended NPDU containing TX-CIPs
-                 *      }
-                 *      then {
-                 *          the IUT removes the TX-CIP information from the extended NPDU 
-                 *          and constructs the proper FNTP NPDU without TX-CIP, 
-                 *          and forwards it to the BC-VCI for transmission via the IN-SAP with access_parameters set equal to the TX-CIPs
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/CIP/FP/BV/06 - */ - testcase TC_FNTP_CIP_FP_BV_06() runs on ItsCalm system ItsCalmSystem { - // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; - var FNTPNPDU v_extendedNpdu; - - // Test control - if (not(PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH))) { - log("*** TC_FNTP_CIP_FP_BV_06: ERROR: 'PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_initializeFntpForwardingTable(f_getIutAppPortValue()); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_06: INFO: Preamble: FNTP forwarding Table was setup properly ***"); - - // Test Body - // Clause 'when' - f_utCommandRequestConfirm( - m_generateNfFntpCommRequest( - f_getNextCommandRef(), // Unique cyclic reference number of command - vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation - f_getIutWlLinkIdBc(), // Identifies the VCI to be used to transmit the packet - f_getIutItsFpdu(), // Contains the endpoint payload EPDU - md_cipNfFntpOptions( // Contains CIP indication - f_getIutShopValue(), - ''O, - f_getIutTxCipValue())), - mw_fntpCommConfirm_success, - false, - vc_utCommandConf); - log("*** TC_FNTP_CIP_FP_BV_06: INFO: Request to send an FNTP extended NPDU containing CIP done ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReqCip( - mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), - f_getIutTxCipValue() - ))) -> value v_inSapPrimitivesDown { - tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu); - if (match(v_extendedNpdu, mdw_fntpExtendedNpdu(?, ?))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_06: INFO: IUT transmits the received packet in BC mode ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_CIP_FP_BV_06: FAIL: Unexpected extended N-hops FNTP NPDU ***"); - } - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FNTP_CIP_FP_BV_06: INCONC: Expected message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FNTP_CIP_FP_BV_06: INFO: test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FNTP_CIP_FP_BV_06 - - /** - * @desc RX of an FNTP extended NPDU with CIP at ITS-S router which is due to a retransmission (N-hop) - *
-                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH
-                 * Config Id: CF02
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having set up properly the FNTP forwarding table, 
-                 *      the IUT is enabled to transmit CIPs in a frame to remote ITS-S
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a correctly formatted broadcast packet from the peer station via the IN-SAP with FNTP hop count set to a value larger than 0
-                 *      }
-                 *      then {
-                 *          the IUT forwards the CIP information to the implementation-specific destination in the ITS-S router, 
-                 *          the IUT retransmits the received packet in broadcast mode with FNTP hop count decremented by one, 
-                 *              and with no CIP contained in the NPDU, 
-                 *              and with access_parameters not set equal to the received CIP,
-                 *          the IUT processes the "FNTP extended NPDU" and notifies reception to the proper ITS-SP
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/CIP/FP/BV/07 - */ - testcase TC_FNTP_CIP_FP_BV_07() runs on ItsCalm system ItsCalmSystem { - // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; - var FNTPNPDU v_extendedNpdu; - - // Test control - if (not(PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH)) { - log("*** TC_FNTP_CIP_FP_BV_07: ERROR: 'PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_initializeFntpForwardingTable(f_getIutAppPortValue()); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_07: INFO: Preamble: FNTP forwarding Table was setup properly ***"); - - // Test Body - // Clause 'when' - f_acGenerateFntpNpdu( - f_getIutLocalPortNumberValue(), - f_getIutRemotePortNumberValue(), - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), - f_getIutNhopsValue() - ); - log("*** TC_FNTP_CIP_FP_BV_07: INFO: Request to send an FNTP extended NPDU containing CIP done ***"); - // Clause 'then' - // TODO How to do this: Forwards the TX-CIP and RX-CIP information to the implementation-specific destination in the ITS-S host' - // 1) The IUT processes the "FNTP extended NPDU" and notifies reception to the proper ITS-SP - tc_ac.start; - alt { - [] utPort.receive( - mdw_checkNfFntpCommIndicationCip( - f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive - f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive - m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), // Source address of DL-UNITDATA.request primitive - mdw_nHopNfFntpOptions_cip( - f_getIutNhopsValue(), - f_getIutTxCipValue(), - f_getIutRxCipValue() - ) - )) { - tc_ac.stop; - log("*** TC_FNTP_CIP_FP_BV_07: INFO: Received NF-COMM.indication primitive as expected ***"); - } - [] utPort.receive { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_CIP_FP_BV_07: FAIL: Unexpected basic FNTP NPDU ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FNTP_CIP_FP_BV_07: INCONC: Unexpected basic FNTP NPDU ***"); - } - } // End of 'alt' statement - // 2) the IUT retransmits the received packet in broadcast mode with... - tc_ac.start; - alt { - [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReqCip( - mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), - f_getIutRxCipValue() // And with access_parameters not set equal to the received CIP - ))) -> value v_inSapPrimitivesDown { - tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu); - if (match( - v_extendedNpdu, - mdw_fntpExtendedNpdu( - ?, - ? - ))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_07: INFO: IUT transmits the received packet in BC mode ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_CIP_FP_BV_07: FAIL: Unexpected extended N-hops FNTP NPDU ***"); - } - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FNTP_CIP_FP_BV_07: INCONC: Expected message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FNTP_CIP_FP_BV_07: INFO: test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FNTP_CIP_FP_BV_07 - - /** - * @desc RX of an FNTP extended NPDU with CIP at ITS-S router which is due to a retransmission (N-hop) - *
-                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH
-                 * Config Id: CF02
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having set up properly the FNTP forwarding table, 
-                 *      the IUT is enabled to transmit CIPs in a frame to remote ITS-S
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a correctly formatted broadcast packet from the peer station via the IN-SAP with FNTP hop count set to a value larger than 0
-                 *      }
-                 *      then {
-                 *          the IUT forwards the CIP information to the implementation-specific destination in the ITS-S router, 
-                 *          the IUT retransmits the received packet in broadcast mode with FNTP hop count decremented by one, 
-                 *              and with no CIP contained in the NPDU, 
-                 *              and with access_parameters not set equal to the received CIP, 
-                 *          the IUT forwards the "FNTP extended NPDU" to the proper ITS host
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.9 - * @see ETSI TS 102 985-2 v0.0.9 FNTP/CIP/FP/BV/08 - */ - testcase TC_FNTP_CIP_FP_BV_08() runs on ItsCalm system ItsCalmSystem { - // Local variables - var INsapPrimitivesDown v_inSapPrimitivesDown; - var FNTPNPDU v_extendedNpdu; - - // Test control - if (not(PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH)) { - log("*** TC_FNTP_CIP_FP_BV_08: ERROR: 'PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_initializeFntpForwardingTable(f_getIutAppPortValue()); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_08: INFO: Preamble: FNTP forwarding Table was setup properly ***"); - - // Test Body - // Clause 'when' - f_acGenerateFntpNpdu( - f_getIutLocalPortNumberValue(), - f_getIutRemotePortNumberValue(), - m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), - m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), - f_getIutNhopsValue() - ); - log("*** TC_FNTP_CIP_FP_BV_08: INFO: Request to send an FNTP extended NPDU containing CIP done ***"); - // Clause 'then' - // 1) The IUT forwards the "FNTP extended NPDU" to the proper ITS host - tc_ac.start; - alt { - [] utPort.receive( - mdw_checkNfFntpCommIndicationCip( - f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive - f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive - m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), // Source address of DL-UNITDATA.request primitive - mdw_nHopNfFntpOptions_cip( - f_getIutNhopsValue(), - f_getIutTxCipValue(), - f_getIutRxCipValue() - ) - )) { - tc_ac.stop; - log("*** TC_FNTP_CIP_FP_BV_08: INFO: Received NF-COMM.indication primitive as expected ***"); - } - [] utPort.receive { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_CIP_FP_BV_08: FAIL: Unexpected basic FNTP NPDU ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FNTP_CIP_FP_BV_08: INCONC: Unexpected basic FNTP NPDU ***"); - } - } // End of 'alt' statement - // 2) the IUT retransmits the received packet in broadcast mode with... - tc_ac.start; - alt { - [] fntpPort.receive( - mw_fntpInSapPrimitiveReq( - mdw_inUnitDataReqCip( - mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), - mw_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()), - f_getIutRxCipValue() // and with access_parameters not set equal to the received CIP - ))) -> value v_inSapPrimitivesDown { - tc_ac.stop; - f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu); - if (match( - v_extendedNpdu, - mdw_fntpExtendedNpdu( - ?, - ? - ))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FNTP_CIP_FP_BV_08: INFO: IUT transmits the received packet in BC mode ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FNTP_CIP_FP_BV_08: FAIL: Unexpected extended N-hops FNTP NPDU ***"); - } - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FNTP_CIP_FP_BV_08: INCONC: Expected message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FNTP_CIP_FP_BV_08: INFO: test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FNTP_CIP_FP_BV_08 +// /** +// * @desc TX from ITS-S host with CIPs +// *
+//                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)
+//                 * Config Id: CF02
+//                 * Initial conditions: 
+//                 *  with {
+//                 *      the IUT having setup properly the FNTP forwarding table
+//                 *  }
+//                 * Expected behaviour:
+//                 *  ensure that {
+//                 *      when { 
+//                 *          the IUT having received a correctly formatted single hop BC transmission request with CIPs for delivery via a VCI contained in a different ITS-SCU
+//                 *      }
+//                 *      then {
+//                 *          the IUT generates an FNTP forwarding NPDU containing an FNTP extended NPDU with CIPs, 
+//                 *          and forwards it to the BC-VCI for transmission to the selected ITS-S router
+//                 *      }
+//                 *  }
+//                 * 
+// * +// * @version 1.1.2 +// * @see ETSI TS 102 985-2 v1.1.2 FNTP/CIP/FP/BV/01 +// */ +// testcase TC_FNTP_CIP_FP_BV_01() runs on ItsCalm system ItsCalmSystem { +// // Local variables +// var INsapPrimitivesDown v_inSapPrimitivesDown; +// var FNTPNPDU v_extendedNpdu; +// +// // Test control +// if (not(PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH))) { +// log("*** TC_FNTP_CIP_FP_BV_01: ERROR: 'PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)' required for executing the TC ***"); +// stop; +// } +// +// // Test component configuration +// f_cf02Up(); +// +// // Test adapter configuration +// +// // Preamble +// // Clause 'Initial conditions' +// f_initializeFntpForwardingTable(f_getIutAppPortValue()); +// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_01: INFO: Preamble: FNTP forwarding Table was setup properly ***"); +// +// // Test Body +// // Clause 'when' +// f_sendFntpNpduCip( +// f_getIutLocalPortNumberValue(), +// f_getIutRemotePortNumberValue(), +// m_llServiceAddr(m_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanDifferentLocalCiid())), +// m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutSecondRemoteDestCiidBc())), +// f_getIutShopValue(), +// f_getIutTxCipValue(), +// f_getIutRxCipValue(), +// f_getIutRxCipValue() // Access parameter +// ); +// log("*** TC_FNTP_CIP_FP_BV_01: INFO: Formatted single hop BC transmission request done ***"); +// +// // Clause 'then' +// tc_ac.start; +// alt { +// [] fntpPort.receive( +// mw_fntpInSapPrimitiveReq( +// mdw_inUnitDataReqCip( +// mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), +// mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutSecondRemoteDestCiidBc()), +// ? +// ))) -> value v_inSapPrimitivesDown { +// tc_ac.stop; +// f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu); +// if (match( +// v_extendedNpdu, +// mw_fntpExtendedNpduCip( +// ''O, // For transmission, RX parameter shall be empty - See ISO/CD 21218 - Clause 8.5 +// f_getIutTxCipValue()))) { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_01: PASS: Received extended FNTP NPDU with CIPs as expected ***"); +// } else { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); +// log("*** TC_FNTP_CIP_FP_BV_01: FAIL: Expected message not received ***"); +// } +// } +// [] tc_ac.timeout { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); +// log("*** TC_FNTP_CIP_FP_BV_01: INCONC: Expected message not received ***"); +// } +// } // End of 'alt' statement +// log("*** TC_FNTP_CIP_FP_BV_01: INFO: test body done ***"); +// +// // Postamble +// f_poDefault(); +// f_cf02Down(); +// +// } // End of testcase TC_FNTP_CIP_FP_BV_01 +// +// /** +// * @desc RX at ITS-S router from ITS-S host with CIPs +// *
+//                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)
+//                 * Config Id: CF02
+//                 * Initial conditions: 
+//                 *  with {
+//                 *      the IUT having set up properly the FNTP forwarding table
+//                 *  }
+//                 * Expected behaviour:
+//                 *  ensure that {
+//                 *      when { 
+//                 *          the IUT having received an FNTP station-internal forwarding NPDU containing a correctly formatted FNTP extended NPDU 
+//                 *          with CIPs for single hop BC transmission
+//                 *      }
+//                 *      then {
+//                 *          the IUT extracts the FNTP extended NPDU, 
+//                 *          and forwards it to the BC-VCI for transmission via the IN-SAP with access_parameters set equal to the CIPs
+//                 *      }
+//                 *  }
+//                 * 
+// * +// * @version 1.1.2 +// * @see ETSI TS 102 985-2 v1.1.2 FNTP/CIP/FP/BV/02 +// */ +// testcase TC_FNTP_CIP_FP_BV_02() runs on ItsCalm system ItsCalmSystem { +// // Local variables +// var INsapPrimitivesDown v_inSapPrimitivesDown; +// var FNTPNPDU v_extendedNpdu; +// +// // Test control +// if (not(PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH))) { +// log("*** TC_FNTP_CIP_FP_BV_02: ERROR: 'PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)' required for executing the TC ***"); +// stop; +// } +// +// // Test component configuration +// f_cf02Up(); +// +// // Test adapter configuration +// +// // Preamble +// // Clause 'Initial conditions' +// f_initializeFntpForwardingTable(f_getIutAppPortValue()); +// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_02: INFO: Preamble: FNTP forwarding Table was setup properly ***"); +// +// // Test Body +// // Clause 'when' +// f_sendFntpForwardingNpduCip( +// { portLong := c_portRtr }, // From ITS-S router +// { portLong := c_portHst }, // To ITS-S host +// f_getIutForwardingSrcPort(), // Forwarding source port +// f_getIutForwardingDestPort(), // Forwarding destination port +// m_llServiceAddr(m_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid())), +// m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidUc(), f_getIutRemoteDestCiidUc())), +// 0, // Packet counter +// f_getIutShopValue(), // S-Hop +// f_getIutRxCipValue(), // rx CIP parameter +// f_getIutTxCipValue(), // tx CIP parameter +// f_getIutRxCipValue() // Access parameter +// ); +// log("*** TC_FNTP_CIP_FP_BV_02: INFO: Formatted single hop BC transmission request contained in a different ITS-SCU done ***"); +// +// // Clause 'then' +// tc_ac.start; +// alt { +// [] fntpPort.receive( +// mw_fntpInSapPrimitiveReq( +// mdw_inUnitDataReqCip( +// mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), +// mw_linkId(f_getIutRemoteDestCiidUc(), f_getIutRemoteDestCiidUc()), +// ? +// ))) -> value v_inSapPrimitivesDown { +// tc_ac.stop; +// f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu); +// if (match( +// v_extendedNpdu, +// mw_fntpExtendedNpduCip( +// ''O, // For transmission, RX parameter shall be empty - See ISO/CD 21218 - Clause 8.5 +// f_getIutTxCipValue()))) { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_02: PASS: Received extended FNTP NPDU with CIPs as expected ***"); +// } else { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); +// log("*** TC_FNTP_CIP_FP_BV_02: FAIL: Expected message not received ***"); +// } +// } +// [] tc_ac.timeout { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); +// log("*** TC_FNTP_CIP_FP_BV_02: INCONC: Expected message not received ***"); +// } +// } // End of 'alt' statement +// log("*** TC_FNTP_CIP_FP_BV_02: INFO: test body done ***"); +// +// // Postamble +// f_poDefault(); +// f_cf02Down(); +// +// } // End of testcase TC_FNTP_CIP_FP_BV_02 +// +// /** +// * @desc RX at ITS-S router from access layer with TX CIPs +// *
+//                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)
+//                 * Config Id: CF02
+//                 * Initial conditions: 
+//                 *  with {
+//                 *      the IUT having set up properly the FNTP forwarding table
+//                 *  }
+//                 * Expected behaviour:
+//                 *  ensure that {
+//                 *      when { 
+//                 *          the IUT having received a packet from the IN-SAP containing a properly formatted FNTP NPDU with TX CIPs, 
+//                 *          and no RX CIPs are available
+//                 *      }
+//                 *      then {
+//                 *          the IUT forwards the TX-CIP information to the implementation-specific destination in the ITS-S router, 
+//                 *          and constructs an FNTP forwarding NPDU containing the received FNTP NPDU including the CIP header, 
+//                 *          and transmits the FNTP forwarding NPDU via the BC-VCI connected to the ITS station-internal network
+//
+//                 *      }
+//                 *  }
+//                 * 
+// * +// * @version 1.1.2 +// * @see ETSI TS 102 985-2 v1.1.2 FNTP/CIP/FP/BV/03 +// */ +// testcase TC_FNTP_CIP_FP_BV_03() runs on ItsCalm system ItsCalmSystem { +// // Local variables +// var INsapPrimitivesDown v_inSapPrimitivesDown; +// var FNTPNPDU v_forwardingNpdu; // Expected forwarding NPDU +// +// // Test control +// if (not(PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH))) { +// log("*** TC_FNTP_CIP_FP_BV_03: ERROR: 'PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)' required for executing the TC ***"); +// stop; +// } +// +// // Test component configuration +// f_cf02Up(); +// +// // Test adapter configuration +// +// // Preamble +// // Clause 'Initial conditions' +// f_initializeFntpForwardingTable(f_getIutAppPortValue()); +// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_03: INFO: Preamble: FNTP forwarding Table was setup properly ***"); +// +// // Test Body +// // Clause 'when' +// f_sendFntpNpduCip( +// f_getIutLocalPortNumberValue(), +// f_getIutRemotePortNumberValue(), +// m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), +// m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), +// f_getIutNhopsValue(), +// f_getIutTxCipValue(), // With TX CIPs +// ''O, // and no RX CIPs are available +// f_getIutRxCipValue() // Access parameter +// ); +// log("*** TC_FNTP_CIP_FP_BV_03: INFO: Formatted BC transmission request done ***"); +// +// // Clause 'then' +// tc_ac.start; +// alt { +// [] fntpPort.receive( +// mw_fntpInSapPrimitiveReq( +// mdw_inUnitDataReq( +// m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), +// m_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()) +// ))) -> value v_inSapPrimitivesDown { +// tc_ac.stop; +// f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_forwardingNpdu); +// if (match(v_forwardingNpdu, mdw_fntpForwardingNpduCip( +// c_portRtr, +// c_portHst, +// f_getIutForwardingSrcPort(), +// f_getIutForwardingDestPort(), +// ?, +// ?, +// ''O, +// f_getIutTxCipValue()))) { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_03: PASS: Received FNTP forwarding NPDU as expected ***"); +// } else { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); +// log("*** TC_FNTP_CIP_FP_BV_03: FAIL: Expected message not received ***"); +// } +// } +// [] tc_ac.timeout { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); +// log("*** TC_FNTP_CIP_FP_BV_03: INCONC: Expected message not received ***"); +// } +// } // End of 'alt' statement +// log("*** TC_FNTP_CIP_FP_BV_03: INFO: test body done ***"); +// +// // Postamble +// f_poDefault(); +// f_cf02Down(); +// +// } // End of testcase TC_FNTP_CIP_FP_BV_03 +// +// /** +// * @desc RX at ITS-S router from access layer with TX CIPs and RX CIPs +// *
+//                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)
+//                 * Config Id: CF02
+//                 * Initial conditions: 
+//                 *  with {
+//                 *      the IUT having set up properly the FNTP forwarding table
+//                 *  }
+//                 * Expected behaviour:
+//                 *  ensure that {
+//                 *      when { 
+//                 *          the IUT having received a packet from the IN-SAP containing a properly formatted FNTP NPDU with TX CIPs, and RX CIPs are available
+//                 *      }
+//                 *      then {
+//                 *          the IUT forwards the TX-CIP and RX-CIP information to the implementation-specific destination in the ITS-S router, 
+//                 *          and constructs an FNTP forwarding NPDU containing the received FNTP NPDU including the CIP header extended by the RX CIPs, 
+//                 *          and transmits the FNTP forwarding NPDU via the BC-VCI connected to the ITS station-internal network
+//                 *      }
+//                 *  }
+//                 * 
+// * +// * @version 1.1.2 +// * @see ETSI TS 102 985-2 v1.1.2 FNTP/CIP/FP/BV/04 +// */ +// testcase TC_FNTP_CIP_FP_BV_04() runs on ItsCalm system ItsCalmSystem { +// // Local variables +// var INsapPrimitivesDown v_inSapPrimitivesDown; +// var FNTPNPDU v_forwardingNpdu; // Expected forwarding NPDU +// +// // Test control +// if (not(PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH))) { +// log("*** TC_FNTP_CIP_FP_BV_04: ERROR: 'PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)' required for executing the TC ***"); +// stop; +// } +// +// // Test component configuration +// f_cf02Up(); +// +// // Test adapter configuration +// +// // Preamble +// // Clause 'Initial conditions' +// f_initializeFntpForwardingTable(f_getIutAppPortValue()); +// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_04: INFO: Preamble: FNTP forwarding Table was setup properly ***"); +// +// // Test Body +// // Clause 'when' +// f_sendFntpNpduCip( +// f_getIutLocalPortNumberValue(), +// f_getIutRemotePortNumberValue(), +// m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), +// m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), +// f_getIutShopValue(), +// f_getIutTxCipValue(), +// f_getIutRxCipValue(), +// f_getIutRxCipValue() +// ); +// log("*** TC_FNTP_CIP_FP_BV_04: INFO: Formatted BC transmission request done ***"); +// +// // Clause 'then' +// // TODO How to do this: Forwards the TX-CIP and RX-CIP information to the implementation-specific destination in the ITS-S host' +// // 1) Forwards NPDU containing the received FNTP NPDU including the CIP header extended by the RX CIPs +// tc_ac.start; +// alt { +// [] utPort.receive( +// mdw_checkNfFntpCommIndicationCip( +// f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive +// f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive +// m_linkId(f_getIutRemoteDestCiidBc(), f_getIutSecondRemoteDestCiidBc()), // Source address of DL-UNITDATA.request primitive +// mdw_nHopNfFntpOptions_cip( +// f_getIutNhopsValue(), +// f_getIutTxCipValue(), +// f_getIutRxCipValue() +// ) +// )) { +// tc_ac.stop; +// log("*** TC_FNTP_CIP_FP_BV_04: INFO: Received NF-COMM.indication primitive as expected ***"); +// } +// [] utPort.receive { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); +// log("*** TC_FNTP_CIP_FP_BV_04: FAIL: Unexpected basic FNTP NPDU ***"); +// } +// [] tc_ac.timeout { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); +// log("*** TC_FNTP_CIP_FP_BV_04: INCONC: Unexpected basic FNTP NPDU ***"); +// } +// } // End of 'alt' statement +// // 2) Transmits the FNTP forwarding NPDU via the BC-VCI connected to the ITS station-internal network +// tc_ac.start; +// alt { +// [] fntpPort.receive( +// mw_fntpInSapPrimitiveReq( +// mdw_inUnitDataReq( +// mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), +// mw_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()) +// ))) -> value v_inSapPrimitivesDown { +// tc_ac.stop; +// f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_forwardingNpdu); +// if (match(v_forwardingNpdu, mdw_fntpForwardingNpduCip( +// c_portRtr, +// c_portHst, +// f_getIutForwardingSrcPort(), +// f_getIutForwardingDestPort(), +// ?, +// ?, +// f_getIutRxCipValue(), +// f_getIutTxCipValue()))) { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_04: PASS: Received FNTP forwarding NPDU as expected ***"); +// } else { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); +// log("*** TC_FNTP_CIP_FP_BV_04: FAIL: Expected message not received ***"); +// } +// } +// [] tc_ac.timeout { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); +// log("*** TC_FNTP_CIP_FP_BV_04: INCONC: Expected message not received ***"); +// } +// } // End of 'alt' statement +// log("*** TC_FNTP_CIP_FP_BV_04: INFO: test body done ***"); +// +// // Postamble +// f_poDefault(); +// f_cf02Down(); +// +// } // End of testcase TC_FNTP_CIP_FP_BV_04 +// +// /** +// * @desc RX at ITS-S host from ITS-S router with CIPs +// *
+//                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)
+//                 * Config Id: CF02
+//                 * Initial conditions: 
+//                 *  with {
+//                 *      the IUT having set up properly the FNTP forwarding table
+//                 *  }
+//                 * Expected behaviour:
+//                 *  ensure that {
+//                 *      when { 
+//                 *          the IUT having received an FNTP forwarding NPDU containing a correctly formatted FNTP extended NPDU and CIP
+//                 *      }
+//                 *      then {
+//                 *          the IUT forwards the TX-CIP and RX-CIP information to the implementation-specific destination in the ITS-S host, 
+//                 *          the IUT delivers the ITS-FPDU to the ITS-SP selected by the Service Port
+//                 *      }
+//                 *  }
+//                 * 
+// * +// * @version 1.1.2 +// * @see ETSI TS 102 985-2 v1.1.2 FNTP/CIP/FP/BV/05 +// */ +// testcase TC_FNTP_CIP_FP_BV_05() runs on ItsCalm system ItsCalmSystem { +// // Local variables +// +// // Test control +// if (not(PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH))) { +// log("*** TC_FNTP_CIP_FP_BV_05: ERROR: 'PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)' required for executing the TC ***"); +// stop; +// } +// +// // Test component configuration +// f_cf02Up(); +// +// // Test adapter configuration +// +// // Preamble +// // Clause 'Initial conditions' +// f_initializeFntpForwardingTable(f_getIutAppPortValue()); +// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_05: INFO: Preamble: FNTP forwarding Table was setup properly ***"); +// +// // Test Body +// // Clause 'when' +// f_sendFntpForwardingNpduCip( +// { portLong := c_portRtr }, // From ITS-S router +// { portLong := c_portHst }, // To ITS-S host +// f_getIutForwardingSrcPort(), // Forwarding source port +// f_getIutForwardingDestPort(), // Forwarding destination port +// m_llServiceAddr(m_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid())), +// m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), +// 0, // Packet counter +// f_getIutShopValue(), // S-Hop +// f_getIutRxCipValue(), // rx CIP parameter +// f_getIutTxCipValue(), // tx CIP parameter +// f_getIutRxCipValue() // Access parameter +// ); +// log("*** TC_FNTP_CIP_FP_BV_05: INFO: Request to send an FNTP extended NPDU containing CIP done ***"); +// // Clause 'then' +// // TODO How to do this: Forwards the TX-CIP and RX-CIP information to the implementation-specific destination in the ITS-S host' +// tc_ac.start; +// alt { +// [] utPort.receive( +// mdw_checkNfFntpCommIndicationCip( +// f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive +// f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive +// m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), // Source address of DL-UNITDATA.request primitive +// mdw_nHopNfFntpOptions_cip( +// f_getIutNhopsValue(), +// f_getIutTxCipValue(), +// f_getIutRxCipValue() +// ) +// )) { +// tc_ac.stop; +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_05: INFO: Received NF-COMM.indication primitive as expected ***"); +// } +// [] utPort.receive { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); +// log("*** TC_FNTP_CIP_FP_BV_05: FAIL: Unexpected basic FNTP NPDU ***"); +// } +// [] tc_ac.timeout { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); +// log("*** TC_FNTP_CIP_FP_BV_05: INCONC: Unexpected basic FNTP NPDU ***"); +// } +// } // End of 'alt' statement +// log("*** TC_FNTP_CIP_FP_BV_05: INFO: test body done ***"); +// +// // Postamble +// f_poDefault(); +// f_cf02Down(); +// +// } // End of testcase TC_FNTP_CIP_FP_BV_05 +// +// /** +// * @desc TX at ITS-S router to remote ITS-S with no transmission of CIP in the frame +// *
+//                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)
+//                 * Config Id: CF02
+//                 * Initial conditions: 
+//                 *  with {
+//                 *      the IUT having set up properly the FNTP forwarding table, 
+//                 *      and the IUT is set to not transmit CIPs in a frame to a remote ITS-S
+//                 *  }
+//                 * Expected behaviour:
+//                 *  ensure that {
+//                 *      when { 
+//                 *          the IUT having received the request to send an FNTP extended NPDU containing TX-CIPs
+//                 *      }
+//                 *      then {
+//                 *          the IUT removes the TX-CIP information from the extended NPDU 
+//                 *          and constructs the proper FNTP NPDU without TX-CIP, 
+//                 *          and forwards it to the BC-VCI for transmission via the IN-SAP with access_parameters set equal to the TX-CIPs
+//                 *      }
+//                 *  }
+//                 * 
+// * +// * @version 1.1.2 +// * @see ETSI TS 102 985-2 v1.1.2 FNTP/CIP/FP/BV/06 +// */ +// testcase TC_FNTP_CIP_FP_BV_06() runs on ItsCalm system ItsCalmSystem { +// // Local variables +// var INsapPrimitivesDown v_inSapPrimitivesDown; +// var FNTPNPDU v_extendedNpdu; +// +// // Test control +// if (not(PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH))) { +// log("*** TC_FNTP_CIP_FP_BV_06: ERROR: 'PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)' required for executing the TC ***"); +// stop; +// } +// +// // Test component configuration +// f_cf02Up(); +// +// // Test adapter configuration +// +// // Preamble +// // Clause 'Initial conditions' +// f_initializeFntpForwardingTable(f_getIutAppPortValue()); +// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_06: INFO: Preamble: FNTP forwarding Table was setup properly ***"); +// +// // Test Body +// // Clause 'when' +// f_utEventResponse( +// m_generateNfFntpCommRequest( +// f_getNextCommandRef(), // Unique cyclic reference number of command +// vc_portNumber, // Port number allocated by FN-FNTP-PORT.create operation +// f_getIutWlLinkIdBc(), // Identifies the VCI to be used to transmit the packet +// f_getIutItsFpdu(), // Contains the ITS-SP payload EPDU +// md_cipNfFntpOptions( // Contains CIP indication +// f_getIutShopValue(), +// ''O, +// f_getIutTxCipValue())), +// mw_fntpCommConfirm_success, +// false, +// vc_utCommandConf); +// log("*** TC_FNTP_CIP_FP_BV_06: INFO: Request to send an FNTP extended NPDU containing CIP done ***"); +// // Clause 'then' +// tc_ac.start; +// alt { +// [] fntpPort.receive( +// mw_fntpInSapPrimitiveReq( +// mdw_inUnitDataReqCip( +// mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), +// mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), +// f_getIutTxCipValue() +// ))) -> value v_inSapPrimitivesDown { +// tc_ac.stop; +// f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu); +// if (match(v_extendedNpdu, mdw_fntpExtendedNpdu(?, ?))) { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_06: INFO: IUT transmits the received packet in BC mode ***"); +// } else { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); +// log("*** TC_FNTP_CIP_FP_BV_06: FAIL: Unexpected extended N-hops FNTP NPDU ***"); +// } +// } +// [] tc_ac.timeout { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); +// log("*** TC_FNTP_CIP_FP_BV_06: INCONC: Expected message not received ***"); +// } +// } // End of 'alt' statement +// log("*** TC_FNTP_CIP_FP_BV_06: INFO: test body done ***"); +// +// // Postamble +// f_poDefault(); +// f_cf02Down(); +// +// } // End of testcase TC_FNTP_CIP_FP_BV_06 +// +// /** +// * @desc RX of an FNTP extended NPDU with CIP at ITS-S router which is due to a retransmission (N-hop) +// *
+//                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH
+//                 * Config Id: CF02
+//                 * Initial conditions: 
+//                 *  with {
+//                 *      the IUT having set up properly the FNTP forwarding table, 
+//                 *      the IUT is enabled to transmit CIPs in a frame to remote ITS-S
+//                 *  }
+//                 * Expected behaviour:
+//                 *  ensure that {
+//                 *      when { 
+//                 *          the IUT having received a correctly formatted broadcast packet from the peer station via the IN-SAP with FNTP hop count set to a value larger than 0
+//                 *      }
+//                 *      then {
+//                 *          the IUT forwards the CIP information to the implementation-specific destination in the ITS-S router, 
+//                 *          the IUT retransmits the received packet in broadcast mode with FNTP hop count decremented by one, 
+//                 *              and with no CIP contained in the NPDU, 
+//                 *              and with access_parameters not set equal to the received CIP,
+//                 *          the IUT processes the "FNTP extended NPDU" and notifies reception to the proper ITS-SP
+//                 *      }
+//                 *  }
+//                 * 
+// * +// * @version 1.1.2 +// * @see ETSI TS 102 985-2 v1.1.2 FNTP/CIP/FP/BV/07 +// */ +// testcase TC_FNTP_CIP_FP_BV_07() runs on ItsCalm system ItsCalmSystem { +// // Local variables +// var INsapPrimitivesDown v_inSapPrimitivesDown; +// var FNTPNPDU v_extendedNpdu; +// +// // Test control +// if (not(PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH)) { +// log("*** TC_FNTP_CIP_FP_BV_07: ERROR: 'PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH' required for executing the TC ***"); +// stop; +// } +// +// // Test component configuration +// f_cf02Up(); +// +// // Test adapter configuration +// +// // Preamble +// // Clause 'Initial conditions' +// f_initializeFntpForwardingTable(f_getIutAppPortValue()); +// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_07: INFO: Preamble: FNTP forwarding Table was setup properly ***"); +// +// // Test Body +// // Clause 'when' +// f_sendExtendedFntpNpdu( +// f_getIutLocalPortNumberValue(), +// f_getIutRemotePortNumberValue(), +// m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), +// m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), +// f_getIutNhopsValue() +// ); +// log("*** TC_FNTP_CIP_FP_BV_07: INFO: Request to send an FNTP extended NPDU containing CIP done ***"); +// // Clause 'then' +// // TODO How to do this: Forwards the TX-CIP and RX-CIP information to the implementation-specific destination in the ITS-S host' +// // 1) The IUT processes the "FNTP extended NPDU" and notifies reception to the proper ITS-SP +// tc_ac.start; +// alt { +// [] utPort.receive( +// mdw_checkNfFntpCommIndicationCip( +// f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive +// f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive +// m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), // Source address of DL-UNITDATA.request primitive +// mdw_nHopNfFntpOptions_cip( +// f_getIutNhopsValue(), +// f_getIutTxCipValue(), +// f_getIutRxCipValue() +// ) +// )) { +// tc_ac.stop; +// log("*** TC_FNTP_CIP_FP_BV_07: INFO: Received NF-COMM.indication primitive as expected ***"); +// } +// [] utPort.receive { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); +// log("*** TC_FNTP_CIP_FP_BV_07: FAIL: Unexpected basic FNTP NPDU ***"); +// } +// [] tc_ac.timeout { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); +// log("*** TC_FNTP_CIP_FP_BV_07: INCONC: Unexpected basic FNTP NPDU ***"); +// } +// } // End of 'alt' statement +// // 2) the IUT retransmits the received packet in broadcast mode with... +// tc_ac.start; +// alt { +// [] fntpPort.receive( +// mw_fntpInSapPrimitiveReq( +// mdw_inUnitDataReqCip( +// mw_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid()), +// mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), +// f_getIutRxCipValue() // And with access_parameters not set equal to the received CIP +// ))) -> value v_inSapPrimitivesDown { +// tc_ac.stop; +// f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu); +// if (match( +// v_extendedNpdu, +// mdw_fntpExtendedNpdu( +// ?, +// ? +// ))) { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_07: INFO: IUT transmits the received packet in BC mode ***"); +// } else { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); +// log("*** TC_FNTP_CIP_FP_BV_07: FAIL: Unexpected extended N-hops FNTP NPDU ***"); +// } +// } +// [] tc_ac.timeout { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); +// log("*** TC_FNTP_CIP_FP_BV_07: INCONC: Expected message not received ***"); +// } +// } // End of 'alt' statement +// log("*** TC_FNTP_CIP_FP_BV_07: INFO: test body done ***"); +// +// // Postamble +// f_poDefault(); +// f_cf02Down(); +// +// } // End of testcase TC_FNTP_CIP_FP_BV_07 +// +// /** +// * @desc RX of an FNTP extended NPDU with CIP at ITS-S router which is due to a retransmission (N-hop) +// *
+//                 * Pics Selection: PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH
+//                 * Config Id: CF02
+//                 * Initial conditions: 
+//                 *  with {
+//                 *      the IUT having set up properly the FNTP forwarding table, 
+//                 *      the IUT is enabled to transmit CIPs in a frame to remote ITS-S
+//                 *  }
+//                 * Expected behaviour:
+//                 *  ensure that {
+//                 *      when { 
+//                 *          the IUT having received a correctly formatted broadcast packet from the peer station via the IN-SAP with FNTP hop count set to a value larger than 0
+//                 *      }
+//                 *      then {
+//                 *          the IUT forwards the CIP information to the implementation-specific destination in the ITS-S router, 
+//                 *          the IUT retransmits the received packet in broadcast mode with FNTP hop count decremented by one, 
+//                 *              and with no CIP contained in the NPDU, 
+//                 *              and with access_parameters not set equal to the received CIP, 
+//                 *          the IUT forwards the "FNTP extended NPDU" to the proper ITS host
+//                 *      }
+//                 *  }
+//                 * 
+// * +// * @version 1.1.2 +// * @see ETSI TS 102 985-2 v1.1.2 FNTP/CIP/FP/BV/08 +// */ +// testcase TC_FNTP_CIP_FP_BV_08() runs on ItsCalm system ItsCalmSystem { +// // Local variables +// var INsapPrimitivesDown v_inSapPrimitivesDown; +// var FNTPNPDU v_extendedNpdu; +// +// // Test control +// if (not(PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH)) { +// log("*** TC_FNTP_CIP_FP_BV_08: ERROR: 'PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH' required for executing the TC ***"); +// stop; +// } +// +// // Test component configuration +// f_cf02Up(); +// +// // Test adapter configuration +// +// // Preamble +// // Clause 'Initial conditions' +// f_initializeFntpForwardingTable(f_getIutAppPortValue()); +// f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_08: INFO: Preamble: FNTP forwarding Table was setup properly ***"); +// +// // Test Body +// // Clause 'when' +// f_sendExtendedFntpNpdu( +// f_getIutLocalPortNumberValue(), +// f_getIutRemotePortNumberValue(), +// m_llServiceAddr(m_linkId(f_getIutWlRemoteCiidBc(), f_getIutWlLocalCiid())), +// m_llServiceAddr(m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid())), +// f_getIutNhopsValue() +// ); +// log("*** TC_FNTP_CIP_FP_BV_08: INFO: Request to send an FNTP extended NPDU containing CIP done ***"); +// // Clause 'then' +// // 1) The IUT forwards the "FNTP extended NPDU" to the proper ITS host +// tc_ac.start; +// alt { +// [] utPort.receive( +// mdw_checkNfFntpCommIndicationCip( +// f_getIutRemotePortNumberValue(), // Destination port of DL-UNITDATA.request primitive +// f_getIutLocalPortNumberValue(), // Source port of DL-UNITDATA.request primitive +// m_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), // Source address of DL-UNITDATA.request primitive +// mdw_nHopNfFntpOptions_cip( +// f_getIutNhopsValue(), +// f_getIutTxCipValue(), +// f_getIutRxCipValue() +// ) +// )) { +// tc_ac.stop; +// log("*** TC_FNTP_CIP_FP_BV_08: INFO: Received NF-COMM.indication primitive as expected ***"); +// } +// [] utPort.receive { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); +// log("*** TC_FNTP_CIP_FP_BV_08: FAIL: Unexpected basic FNTP NPDU ***"); +// } +// [] tc_ac.timeout { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); +// log("*** TC_FNTP_CIP_FP_BV_08: INCONC: Unexpected basic FNTP NPDU ***"); +// } +// } // End of 'alt' statement +// // 2) the IUT retransmits the received packet in broadcast mode with... +// tc_ac.start; +// alt { +// [] fntpPort.receive( +// mw_fntpInSapPrimitiveReq( +// mdw_inUnitDataReqCip( +// mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutDestLocalCiid()), +// mw_linkId(f_getIutLanRemoteCiidBc(), f_getIutLanLocalCiid()), +// f_getIutRxCipValue() // and with access_parameters not set equal to the received CIP +// ))) -> value v_inSapPrimitivesDown { +// tc_ac.stop; +// f_oct2npdu(v_inSapPrimitivesDown.primitives.inUnitdataRq.data, c_tbDone, v_extendedNpdu); +// if (match( +// v_extendedNpdu, +// mdw_fntpExtendedNpdu( +// ?, +// ? +// ))) { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); +// log("*** TC_FNTP_CIP_FP_BV_08: INFO: IUT transmits the received packet in BC mode ***"); +// } else { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); +// log("*** TC_FNTP_CIP_FP_BV_08: FAIL: Unexpected extended N-hops FNTP NPDU ***"); +// } +// } +// [] tc_ac.timeout { +// f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); +// log("*** TC_FNTP_CIP_FP_BV_08: INCONC: Expected message not received ***"); +// } +// } // End of 'alt' statement +// log("*** TC_FNTP_CIP_FP_BV_08: INFO: test body done ***"); +// +// // Postamble +// f_poDefault(); +// f_cf02Down(); +// +// } // End of testcase TC_FNTP_CIP_FP_BV_08 } // End of group validBehavior @@ -4098,18 +4184,17 @@ module ItsFntp_TestCases { } // End of group cipManagement - // x.x.x Extended procedure - group secureCommunications { - - group validBehavior { - - } // End of group validBehavior + // x.x.x Extended procedure + group secureCommunications { + + group validBehavior { - group invalidBehavior { - - } // End of group invalidBehavior + } // End of group validBehavior + + group invalidBehavior { - } // End of group secureCommunications + } // End of group invalidBehavior + } // End of group secureCommunications } // End of module ItsFntp_TestCases \ No newline at end of file diff --git a/ttcn/AtsFNTP/ItsFntp_TestControl.ttcn3 b/ttcn/AtsFNTP/ItsFntp_TestControl.ttcn3 index b3fbb31405c14a03501a1b12391c5ede60014938..e094e24c678b10bf3fab1a819e251ca325558b7d 100644 --- a/ttcn/AtsFNTP/ItsFntp_TestControl.ttcn3 +++ b/ttcn/AtsFNTP/ItsFntp_TestControl.ttcn3 @@ -1,126 +1,132 @@ -/** - * @author ETSI / STF422_EETS - * @version $URL:$ - * $Id:$ - * @desc test control file for Fast Networking & Transport layer Protocol (ISO 29281-2) - */ -module ItsFntp_TestControl { - - // ATS FNTP - import from ItsFntp_TestCases {testcase all}; - - // LibIts - import from LibItsFntp_Pics all; - - // Test Execution - control { - -// 7.6 Transmitting Packets -// 7.6.2 Basic procedure - valid behavior - if (PICS_ROLE_RH) { - execute(TC_FNTP_TXP_BP_BV_01()); - execute(TC_FNTP_TXP_BP_BV_02()); - } - -// 7.6.2 Basic procedure - invalid behavior - if (PICS_ROLE_RH) { -// execute(TC_FNTP_TXP_BP_BI_01()); -// execute(TC_FNTP_TXP_BP_BI_02()); - } - -// 7.6.3 Extended procedure - valid behavior - if (PICS_EXT and PICS_ROLE_RH and PICS_NHOPBC) { - execute(TC_FNTP_TXP_EP_BV_01()); - } - -// 7.6.3 Extended procedure - invalid behavior - if (PICS_EXT and PICS_ROLE_RH and PICS_NHOPBC) { -// execute(TC_FNTP_TXP_EP_BI_01()); - execute(TC_FNTP_TXP_EP_BI_02()); - } - -// 7.6.4 Forwarding procedure - valid behavior - if (PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)) { - execute(TC_FNTP_TXP_FP_BV_01()); - execute(TC_FNTP_TXP_FP_BV_02()); - execute(TC_FNTP_TXP_FP_BV_03()); - } - -// 7.6.4 Forwarding procedure - invalid behavior - if (PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)) { -// FIXME Implementation shall be reviewed during ATS validation execute(TC_FNTP_TXP_FP_BI_01()); - } - -// 7.7 Receiving Packets -// 7.7.3 Basic procedure - valid behavior - if (PICS_ROLE_RH) { - execute(TC_FNTP_RXP_BP_BV_01()); - execute(TC_FNTP_RXP_BP_BV_02()); - execute(TC_FNTP_RXP_BP_BV_03()); - } - -// 7.7.3 Basic procedure - invalid behavior - if (PICS_ROLE_RH or PICS_ROLE_HONLY or PICS_ROLE_RONLY) { - execute(TC_FNTP_RXP_BP_BI_01()); - execute(TC_FNTP_RXP_BP_BI_02()); - execute(TC_FNTP_RXP_BP_BI_03()); - execute(TC_FNTP_RXP_BP_BI_04()); - execute(TC_FNTP_RXP_BP_BI_05()); - execute(TC_FNTP_RXP_BP_BI_06()); - } - -// 7.7.3 Extended procedure - valid behavior - if (PICS_ROLE_RH and PICS_NHOPBC) { - execute(TC_FNTP_RXP_EP_BV_01()); - execute(TC_FNTP_RXP_EP_BV_02()); - execute(TC_FNTP_RXP_EP_BV_03()); - execute(TC_FNTP_RXP_EP_BV_04()); - } - -// 7.7.3 Extended procedure - invalid behavior - if (PICS_ROLE_RH and PICS_NHOPBC) { - execute(TC_FNTP_RXP_EP_BI_01()); - } - if (PICS_EXT and PICS_ROLE_RH) { - execute(TC_FNTP_RXP_EP_BI_02()); - } - -// 7.7.6 Forwarded delivery procedure - valid behavior - if (PICS_ITS_S_INW and (PICS_ROLE_RONLY or PICS_ROLE_RH)) { - execute(TC_FNTP_RXP_FP_BV_01()); - execute(TC_FNTP_RXP_FP_BV_02()); - execute(TC_FNTP_RXP_FP_BV_03()); - execute(TC_FNTP_RXP_FP_BV_04()); - } - -// 7.7.6 Forwarded delivery procedure - invalid behavior - if (PICS_ITS_S_INW and (PICS_ROLE_RONLY or PICS_ROLE_RH)) { - execute(TC_FNTP_RXP_FP_BI_01()); - } - -// 7.10 CI parameter management: Not applicable - -// 7.10.x Extended procedure - valid behavior - if ((PICS_CIP and PICS_ROLE_RH)) { - execute(TC_FNTP_CIP_EP_BV_01()); - execute(TC_FNTP_CIP_EP_BV_02()); - execute(TC_FNTP_CIP_EP_BV_03()); - execute(TC_FNTP_CIP_EP_BV_04()); - } - -// 7.10.x Forwarded procedure - invalid behavior - if (PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)) { - execute(TC_FNTP_CIP_FP_BV_01()); - execute(TC_FNTP_CIP_FP_BV_02()); - execute(TC_FNTP_CIP_FP_BV_03()); - execute(TC_FNTP_CIP_FP_BV_04()); - execute(TC_FNTP_CIP_FP_BV_05()); - execute(TC_FNTP_CIP_FP_BV_06()); - } - if (PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH) { - execute(TC_FNTP_CIP_FP_BV_07()); - execute(TC_FNTP_CIP_FP_BV_08()); - } - - } // End of control +/** + * @author ETSI / STF422_EETS + * @version $URL:$ + * $Id:$ + * @desc test control file for Fast Networking & Transport layer Protocol (ISO 29281-2) + */ +module ItsFntp_TestControl { + + // LibCommon + + // ATS FNTP + import from ItsFntp_TestCases {testcase all}; + + // LibIts + import from LibItsFntp_Pics all; + + // Test Execution + control { + + if (not PICS_ROLE_RONLY and not PICS_ROLE_HONLY and not PICS_ROLE_RH) { + log("ETSI TS 102 985-1 v1.1.2 A.2: It is mandatory to support at least one of these items"); + stop; + } + +// 6.1.1 Transmitting Packets +// 6.1.1.1 Basic procedure - valid behavior + if (PICS_ROLE_RH) { + execute(TC_FNTP_TXP_BP_BV_01()); + execute(TC_FNTP_TXP_BP_BV_02()); + } + +// 6.1.1.2 Basic procedure - invalid behavior +// Invalid test purposes will be defined in the next version of the present document once ISO has implemented the concept of flows in the architecture standard ISO 21217 [i.7], and subsequently in ISO 29281-1 [1] + +// 6.1.2.1 Extended procedure - valid behavior + if (PICS_EXT and PICS_ROLE_RH and PICS_NHOPBC) { + execute(TC_FNTP_TXP_EP_BV_01()); + } + +// 6.1.2.2 Extended procedure - invalid behavior + if (PICS_EXT and PICS_ROLE_RH and PICS_NHOPBC) { +// execute(TC_FNTP_TXP_EP_BI_01()); + execute(TC_FNTP_TXP_EP_BI_02()); + } + +// 6.1.3.1 Forwarding procedure - valid behavior + if (PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)) { + execute(TC_FNTP_TXP_FP_BV_01()); + execute(TC_FNTP_TXP_FP_BV_02()); + execute(TC_FNTP_TXP_FP_BV_03()); + } + +// 6.1.3.2 Forwarding procedure - invalid behavior + if (PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)) { +// FIXME Implementation shall be reviewed during ATS validation execute(TC_FNTP_TXP_FP_BI_01()); + } + +// 6.2 Receiving Packets +// 6.2.1.1 Basic procedure - valid behavior + if (PICS_ROLE_RH) { + execute(TC_FNTP_RXP_BP_BV_01()); + execute(TC_FNTP_RXP_BP_BV_02()); + execute(TC_FNTP_RXP_BP_BV_03()); + } + +// 6.2.1.2 Basic procedure - invalid behavior + if (PICS_ROLE_RH or PICS_ROLE_HONLY or PICS_ROLE_RONLY) { + execute(TC_FNTP_RXP_BP_BI_01()); + execute(TC_FNTP_RXP_BP_BI_02()); + execute(TC_FNTP_RXP_BP_BI_03()); + execute(TC_FNTP_RXP_BP_BI_04()); + execute(TC_FNTP_RXP_BP_BI_05()); + execute(TC_FNTP_RXP_BP_BI_06()); + } + +// 6.2.2.1 Extended procedure - valid behavior + if (PICS_ROLE_RH and PICS_NHOPBC) { + execute(TC_FNTP_RXP_EP_BV_01()); + execute(TC_FNTP_RXP_EP_BV_02()); + execute(TC_FNTP_RXP_EP_BV_03()); + execute(TC_FNTP_RXP_EP_BV_04()); + } + +// 6.2.2.2 Extended procedure - invalid behavior + if (PICS_ROLE_RH and PICS_NHOPBC) { + execute(TC_FNTP_RXP_EP_BI_01()); + } + if (PICS_EXT and PICS_ROLE_RH) { + execute(TC_FNTP_RXP_EP_BI_02()); + } +/******************************************************************************************************* + +// 6.3.1.1 Forwarded delivery procedure - valid behavior + if (PICS_ITS_S_INW and (PICS_ROLE_RONLY or PICS_ROLE_RH)) { + execute(TC_FNTP_RXP_FP_BV_01()); + execute(TC_FNTP_RXP_FP_BV_02()); + execute(TC_FNTP_RXP_FP_BV_03()); + execute(TC_FNTP_RXP_FP_BV_04()); + } + +// 6.3.1.2 Forwarded delivery procedure - invalid behavior + if (PICS_ITS_S_INW and (PICS_ROLE_RONLY or PICS_ROLE_RH)) { + execute(TC_FNTP_RXP_FP_BI_01()); + } + +// 6.4 CI parameter management: Not applicable + +// 6.4.1.1 Extended procedure - valid behavior + if ((PICS_CIP and PICS_ROLE_RH)) { + execute(TC_FNTP_CIP_EP_BV_01()); + execute(TC_FNTP_CIP_EP_BV_02()); + execute(TC_FNTP_CIP_EP_BV_03()); + execute(TC_FNTP_CIP_EP_BV_04()); + } + +// 6.4.1.2 Forwarded procedure - invalid behavior + if (PICS_CIP and PICS_ITS_S_INW and (PICS_ROLE_HONLY or PICS_ROLE_RH)) { + execute(TC_FNTP_CIP_FP_BV_01()); + execute(TC_FNTP_CIP_FP_BV_02()); + execute(TC_FNTP_CIP_FP_BV_03()); + execute(TC_FNTP_CIP_FP_BV_04()); + execute(TC_FNTP_CIP_FP_BV_05()); + execute(TC_FNTP_CIP_FP_BV_06()); + } + if (PICS_CIP and PICS_ITS_S_INW and PICS_ROLE_RH) { + execute(TC_FNTP_CIP_FP_BV_07()); + execute(TC_FNTP_CIP_FP_BV_08()); + } + +*******************************************************************************************************/ + } // End of control } // End of module ItsNt_TestControl \ No newline at end of file diff --git a/ttcn/AtsFSAP/ItsFsap_TestCases.ttcn3 b/ttcn/AtsFSAP/ItsFsap_TestCases.ttcn3 index cd5bbbc3b41f10a5cbdea237b2501eb8c0d2a2e1..c20f17a1f3addf80d0dd4f5b9226511812e8d81d 100644 --- a/ttcn/AtsFSAP/ItsFsap_TestCases.ttcn3 +++ b/ttcn/AtsFSAP/ItsFsap_TestCases.ttcn3 @@ -1,3785 +1,4356 @@ -/** - * @author ETSI / STF422_EETS - * @version $URL:$ - * $Id:$ - * @desc Fast service advertisement protocol (ISO 24102-5) test cases - */ -module ItsFsap_TestCases { - - // Libcommon - import from LibCommon_Time all; - import from LibCommon_VerdictControl all; - import from LibCommon_Sync all; - - // LibIts - import from CALMiitsscu language "ASN.1:1997" all; - import from CALMmsap language "ASN.1:1997" { - type - CommandRef, - MF_Request - }; - import from LibItsFntp_TypesAndValues { - const c_portSam; - }; - import from LibItsFntp_Templates { - template - m_llServiceAddr, m_linkId; - }; - import from LibItsFsap_TypesAndValues all; - import from LibItsFsap_Templates all; - import from LibItsFsap_Functions all; - import from LibItsFsap_Pixits all; - import from LibItsFsap_Pics all; - import from LibItsMgt_Templates all; - import from LibItsMgt_Functions { - function - f_getNextCommandRef, f_getNextPduCounter, - f_getIutSourceItsScuId, f_getIutDestItsScuId, f_getIutMedType, f_getIutCiAccessClass, f_getIutCiClass - }; - //import from LibItsIicp_Templates all; - import from LibItsIicp_Functions { - function f_iicpTriggerRequest - }; - import from LibItsIicp_Templates { - template - m_iicRequest, // TODO To be removed - mw_iicpRequest, mw_iicpResponse, // TODO To be removed - mdw_iicRequest_notify, // TODO To be removed - mdw_iicpResponse_success, // TODO To be removed - mdw_mfCommandRequest_iicRequestTx, mdw_mfCommandRequest_iicResponseTx, - mdw_iicRequestTx_mfCommandRequest, mdw_iicRequestTx_mfRequestRequest, - mdw_iicResponseTx_mfRequestRequest, - m_pduRequest_mfRequestRequest, mw_pduRequest_mfRequestRequest, - mw_pduRequest_mfCommandReq - }; - import from LibItsCalm_TestSystem all; - import from LibItsCalm_Interface all; - - // 9.1 Service provider - group serviceProvider { - - // 9.1.1 Combined ITS-S host and ITS-S router - group combinedITS_S_Host_ITS_S_Router { - - group validBehavior { - - /** - * @desc Registration of ITS-S application for message distribution only (no session phase) with request of specific access technology - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND PICS_ROLE_RH
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT knows the requested access technology
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request for an ITS-S application including a required access technology and non-IP communications
-                 *      }
-                 *      then {
-                 *          the IUT periodically sends out SAM via the requested access technology with the requested repetition rate, not inviting for a reply
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/HR/BV/01 - */ - testcase TC_FSAP_SP_HR_BV_01() runs on ItsMgt system ItsCalmSystem { - // Local variables - timer t_minRetransTimer := f_getIutSamRetransmitTimer(); - timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); - var CommandRef v_commandRef; - var boolean v_samNotificationReceived := false; - - // Test control - if (not(PICS_FSAP_ROLE_SP and PICS_ROLE_RH)) { - log("*** TC_FSAP_SP_HR_BV_01: ERROR: 'PICS_FSAP_ROLE_SP AND PICS_ROLE_RH' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_HR_BV_01: INFO: Preamble: IUT was setup properly ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGcScheduleWithAccessTechAndNonIp(), - f_getIutServiceDataRegWithNoSession() - ) - ) - ) - ); - log("*** TC_FSAP_SP_HR_BV_01: INFO: GCregServer registration request done ***"); - // Clause 'then' - tc_ac.start; - t_maxRetransTimer.start; - alt { - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - v_commandRef, - mdw_mfCommand_gcSam( - f_getIutApplicationId(), - ?, - mw_samDataServerciceWithAccessTechAndNonIp( - ?, - ?, - { portLong := c_portSam } - ) - )))) { - tc_ac.stop; - if (v_samNotificationReceived == false) { - v_samNotificationReceived := true; - t_minRetransTimer.start; - t_maxRetransTimer.start; - // After the SAM received, check the retransmission - tc_ac.start; - repeat; - } - if(t_minRetransTimer.running) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_HR_BV_01: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_HR_BV_01: PASS: SAM transmitted at prescribed periodicity ***"); - } - } - [] t_minRetransTimer.timeout { - log("*** TC_FSAP_SP_HR_BV_01: INFO: Ready for retransmission ***"); - repeat; - } - [] t_maxRetransTimer.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HR_BV_01: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HR_BV_01: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_HR_BV_01: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of testcase TC_FSAP_SP_HR_BV_01 - - /** - * @desc Registration of ITS-S application for message distribution only (no session phase) with no request of specific access technology - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND PICS_ROLE_RH
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT knows a suitable access technology
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request for an ITS-S application requiring non-IP communications
-                 *      }
-                 *      then {
-                 *          the IUT periodically sends out SAM via a suited access technology selected by the CI selection manager with the requested repetition rate, not inviting for a reply
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/HR/BV/02 - */ - testcase TC_FSAP_SP_HR_BV_02() runs on ItsMgt system ItsCalmSystem { - // Local variables - timer t_minRetransTimer := f_getIutSamRetransmitTimer(); - timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); - var CommandRef v_commandRef; - var boolean v_samNotificationReceived := false; - - // Test control - if (not(PICS_FSAP_ROLE_SP and PICS_ROLE_RH)) { - log("*** TC_FSAP_SP_HR_BV_02: ERROR: 'PICS_FSAP_ROLE_SP AND PICS_ROLE_RH' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_HR_BV_02: INFO: Preamble: IUT was setup properly ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGCscheduleWithNonIp(), - f_getIutServiceDataRegWithNoSession() - ) - ) - ) - ); - log("*** TC_FSAP_SP_HR_BV_02: INFO: GCregServer registration request done ***"); - // Clause 'then' - tc_ac.start; - t_maxRetransTimer.start; - alt { - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - v_commandRef, - mdw_mfCommand_gcSam( - f_getIutApplicationId(), - ?, - mw_samDataServerciceWithAccessTechAndNonIp( - ?, - ?, - { portLong := c_portSam } - ) - )))) { - tc_ac.stop; - if (v_samNotificationReceived == false) { - v_samNotificationReceived := true; - t_minRetransTimer.start; - t_maxRetransTimer.start; - // After the SAM received, check the retransmission - tc_ac.start; - repeat; - } - if(t_minRetransTimer.running) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_HR_BV_02: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_HR_BV_02: PASS: SAM transmitted at prescribed periodicity ***"); - } - } - [] t_minRetransTimer.timeout { - log("*** TC_FSAP_SP_HR_BV_02: INFO: Ready for retransmission ***"); - repeat; - } - [] t_maxRetransTimer.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HR_BV_02: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HR_BV_02: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_HR_BV_02: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of testcase TC_FSAP_SP_HR_BV_02 - - /** - * @desc Registration of ITS-S application with need for a session, with no request of specific access technology, and without request to change communication channel for session phase - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND PICS_ROLE_RH
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT knows a suitable access technology
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request for an ITS-S application requiring non-IP communications in the session phase, but no change of communication channel
-                 *      }
-                 *      then {
-                 *          the IUT periodically sends out SAM via a suited access technology selected by the CI selection manager with the requested repetition rate, inviting for a reply
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/HR/BV/03 - */ - testcase TC_FSAP_SP_HR_BV_03() runs on ItsMgt system ItsCalmSystem { - // Local variables - timer t_minRetransTimer := f_getIutSamRetransmitTimer(); - timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); - var CommandRef v_commandRef; - var boolean v_samNotificationReceived := false; - - // Test control - if (not(PICS_FSAP_ROLE_SP and PICS_ROLE_RH)) { - log("*** TC_FSAP_SP_HR_BV_03: ERROR: 'PICS_FSAP_ROLE_SP AND PICS_ROLE_RH' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_HR_BV_03: INFO: Preamble: IUT was setup properly ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGCscheduleWithNonIp(), - f_getIutServiceDataRegWithSession() - ) - ) - ) - ); - log("*** TC_FSAP_SP_HR_BV_03: INFO: GCregServer registration request done ***"); - // Clause 'then' - tc_ac.start; - t_maxRetransTimer.start; - alt { - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - v_commandRef, - mdw_mfCommand_gcSam( - f_getIutApplicationId(), - ?, - mw_samDataServerciceWithAccessTechAndNonIp( - ?, - ?, - { portLong := c_portSam } - ) - )))) { - tc_ac.stop; - if (v_samNotificationReceived == false) { - v_samNotificationReceived := true; - t_minRetransTimer.start; - t_maxRetransTimer.start; - // After the SAM received, check the retransmission - tc_ac.start; - repeat; - } - if(t_minRetransTimer.running) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_HR_BV_03: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_HR_BV_03: PASS: SAM transmitted at prescribed periodicity ***"); - } - } - [] t_minRetransTimer.timeout { - log("*** TC_FSAP_SP_HR_BV_03: INFO: Ready for retransmission ***"); - repeat; - } - [] t_maxRetransTimer.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HR_BV_03: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HR_BV_03: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_HR_BV_03: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of testcase TC_FSAP_SP_HR_BV_03 - - /** - * @desc Registration of ITS-S application with need for a session, with no request of specific access technology, and with request to change communication channel for session phase - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND PICS_ROLE_RH
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT knows a suitable access technology
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request for an ITS-S application requiring non-IP communications, and requiring change of communication channel in the session phase
-                 *      }
-                 *      then {
-                 *          the IUT periodically sends out SAM via a suited access technology selected by the CI selection manager with the requested repetition rate, inviting for a reply, requesting a change of channel
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/HR/BV/04 - */ - testcase TC_FSAP_SP_HR_BV_04() runs on ItsMgt system ItsCalmSystem { - // Local variables - timer t_minRetransTimer := f_getIutSamRetransmitTimer(); - timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); - var CommandRef v_commandRef; - var boolean v_samNotificationReceived := false; - - // Test control - if (not(PICS_FSAP_ROLE_SP and PICS_ROLE_RH)) { - log("*** TC_FSAP_SP_HR_BV_04: ERROR: 'PICS_FSAP_ROLE_SP AND PICS_ROLE_RH' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_HR_BV_04: INFO: Preamble: IUT was setup properly ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGcScheduleWithAccessTechAndNonIp(), - f_getIutServiceDataRegWithNoSessionAndChannelChange() - ) - ) - ) - ); - log("*** TC_FSAP_SP_HR_BV_04: INFO: GCregServer registration request done ***"); - // Clause 'then' - tc_ac.start; - t_maxRetransTimer.start; - alt { - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - v_commandRef, - mdw_mfCommand_gcSam( - f_getIutApplicationId(), - ?, - mw_samDataServerciceWithAccessTechAndNonIp( - ?, - ?, - { portLong := c_portSam } - ) - )))) { - tc_ac.stop; - if (v_samNotificationReceived == false) { - v_samNotificationReceived := true; - t_minRetransTimer.start; - t_maxRetransTimer.start; - // After the SAM received, check the retransmission - tc_ac.start; - repeat; - } - if(t_minRetransTimer.running) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_HR_BV_04: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_HR_BV_04: PASS: SAM transmitted at prescribed periodicity ***"); - } - } - [] t_minRetransTimer.timeout { - log("*** TC_FSAP_SP_HR_BV_04: INFO: Ready for retransmission ***"); - repeat; - } - [] t_maxRetransTimer.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HR_BV_04: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HR_BV_04: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_HR_BV_04: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of testcase TC_FSAP_SP_HR_BV_04 - - /** - * @desc Finalization of SIP upon reception of CTX for non-IP session - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND PICS_ROLE_RH AND PICS_SIP_W_CTX
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT sending out periodically SAMs for one ITS-S application with non-IP based sessions
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a CTX as proper reply to a SAM
-                 *      }
-                 *      then {
-                 *          the IUT generates a GCctx message to notify of reception of CTX
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/HR/BV/05 - */ - testcase TC_FSAP_SP_HR_BV_05() runs on ItsMgt system ItsCalmSystem { - // Local variables - timer t_minRetransTimer := f_getIutSamRetransmitTimer(); - timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); - var CommandRef v_commandRef; - var boolean v_samNotificationReceived := false; - - // Test control - if (not(PICS_FSAP_ROLE_SP and PICS_ROLE_RH and PICS_SIP_W_CTX)) { - log("*** TC_FSAP_SP_HR_BV_05: ERROR: 'PICS_FSAP_ROLE_SP AND PICS_ROLE_RH AND PICS_SIP_W_CTX' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGcScheduleWithAccessTechAndNonIp(), - f_getIutServiceDataRegWithNoSession() - ) - ) - ) - ); - tc_ac.start; - t_maxRetransTimer.start; - alt { - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - v_commandRef, - mdw_mfCommand_gcSam( - f_getIutApplicationId(), - ?, - mw_samDataServerciceWithAccessTechAndNonIp( - ?, - ?, - { portLong := c_portSam } - ) - )))) { - tc_ac.stop; - if (v_samNotificationReceived == false) { - v_samNotificationReceived := true; - t_minRetransTimer.start; - t_maxRetransTimer.start; - // After the SAM received, check the retransmission - tc_ac.start; - repeat; - } - if(t_minRetransTimer.running) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_HR_BV_05: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); - } else { - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_HR_BV_05: INFO: Preamble: IUT was setup properly ***"); - } - } - [] t_minRetransTimer.timeout { - log("*** TC_FSAP_SP_HR_BV_05: INFO: Ready for retransmission ***"); - repeat; - } - [] t_maxRetransTimer.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HR_BV_05: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HR_BV_05: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequest_ctx( - m_llServiceAddr( - m_linkId( - f_getIutSrcRemoteCiId(), - f_getIutSrcLocalCiId())), - m_ctx(f_getIutClientId()) - ) - ) - ) - ); - log("*** TC_FSAP_SP_HR_BV_05: INFO: CTX registration request done ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - ?, - mdw_mfCommand_gCctx( - f_getIutApplicationId(), - f_getIutClientId(), - mdw_ctxServiceDataNonIp( - ?, // TODO Parameters shall be reviewed during ATS validation - ?, - ? - ))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_HR_BV_05: PASS: GCtx notification sent as expected ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HR_BV_05: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_HR_BV_05: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of testcase TC_FSAP_SP_HR_BV_05 - - } // End of group validBehavior - - group invalidBehavior { - - /** - * @desc Registration of ITS-S application for message distribution only (no session phase) with request of specific but not available access technology - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND PICS_ROLE_RH
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT does not know the requested access technology,
-                 *      the IUT knows another access technology  suited for FSAP
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request for an ITS-S application for the purpose of message distribution
-                 *      }
-                 *      then {
-                 *          the IUT does not send out periodically SAMs via the existent access technology
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/HR/BI/01 - */ - testcase TC_FSAP_SP_HR_BI_01() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - - // Test control - if (not(PICS_FSAP_ROLE_SP and PICS_ROLE_RH)) { - log("*** TC_FSAP_SP_HR_BI_01: ERROR: 'PICS_FSAP_ROLE_SP AND PICS_ROLE_RH' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_HR_BI_01: INFO: Preamble done ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGCscheduleWithUnknownAccessTechAndNonIp(), - f_getIutServiceDataRegWithNoSession() - ) - ) - ) - ); - log("*** TC_FSAP_SP_HR_BI_01: INFO: GCregServer registration request sent ***"); - // Clause 'then' - tc_noac.start; // No message expected - alt { - [] fsapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_HR_BI_01: FAIL: No message was expected ***"); - } - [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_HR_BI_01: PASS: No message received as expected ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_HR_BI_01: INFO: test body done ***"); - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of testcase TC_FSAP_SP_HR_BI_01 - - /** - * @desc Registration of ITS-S application with need for a session, with no request of specific access technology which is not available, and without request to change communication channel for session phase - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND PICS_ROLE_RH
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT does not know a suitable access technology
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request for an ITS-S application offering a session phase
-                 *      }
-                 *      then {
-                 *          the IUT does not send out periodically SAMs
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/HR/BI/02 - */ - testcase TC_FSAP_SP_HR_BI_02() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - - // Test control - if (not(PICS_FSAP_ROLE_SP and PICS_ROLE_RH)) { - log("*** TC_FSAP_SP_HR_BI_02: ERROR: 'PICS_FSAP_ROLE_SP AND PICS_ROLE_RH' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_HR_BI_02: INFO: Preamble done ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGCscheduleWithUnknownAccessTechAndNonIp(), - f_getIutServiceDataRegWithSession() - ) - ) - ) - ); - log("*** TC_FSAP_SP_HR_BI_02: INFO: GCregServer registration request sent ***"); - // Clause 'then' - tc_noac.start; // No message expected - alt { - [] fsapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_HR_BI_02: FAIL: No message was expected ***"); - } - [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_HR_BI_02: PASS: No message received as expected ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_HR_BI_02: INFO: test body done ***"); - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of testcase TC_FSAP_SP_HR_BI_02 - - } // End of group invalidBehavior - - } // End of group combinedITS_S_Host_ITS_S_Router - - // 9.1.2 ITS-S host only - group its_S_HostOnly { - - group validBehavior { - - /** - * @desc Registration of ITS-S application for message distribution only (no session phase) with request of specific access technology available in an ITS-S router unit - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT knows about availability of the requested access technology in an ITS-S router
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request for an ITS-S application including a required access technology
-                 *      }
-                 *      then {
-                 *          the IUT forwards this request to the proper ITS-S router ITS-SCU applying Inter-ITS-SCU communications
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/HO/BV/01 - */ - testcase TC_FSAP_SP_HO_BV_01() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - - // Test control - if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { - log("*** TC_FSAP_SP_HO_BV_01: ERROR: 'PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_HO_BV_01: INFO: Preamble: IUT was setup properly ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGcScheduleWithAccessTechAndNonIp(), - f_getIutServiceDataRegWithNoSession() - ); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ); - log("*** TC_FSAP_SP_HO_BV_01: INFO: GCregServer registration request done ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfRequestRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfRequestRequest( - v_commandRef, - v_mfReq // Reuse the value template previously sent - ))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_HO_BV_01: PASS: GCtx notification sent as expected ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HO_BV_01: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_HO_BV_01: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SP_HO_BV_01 - - /** - * @desc Registration of ITS-S application for message distribution only (no session phase) with no request of specific access technology - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT knows about availability of a suitable access technology in an ITS-S router
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request for an ITS-S application
-                 *      }
-                 *      then {
-                 *          the IUT forwards this request to the proper ITS-S router ITS-SCU applying Inter-ITS-SCU communications
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/HO/BV/02 - */ - testcase TC_FSAP_SP_HO_BV_02() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - - // Test control - if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { - log("*** TC_FSAP_SP_HO_BV_02: ERROR: 'PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_HO_BV_02: INFO: Preamble: IUT was setup properly ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGCscheduleWithNonIp(), - f_getIutServiceDataRegWithNoSession() - ); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ); - log("*** TC_FSAP_SP_HO_BV_02: INFO: GCregServer registration request done ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfRequestRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfRequestRequest( - v_commandRef, - v_mfReq // Reuse the value template previously sent - ))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_HO_BV_02: PASS: GCtx notification sent as expected ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HO_BV_02: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_HO_BV_02: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SP_HO_BV_02 - - /** - * @desc Registration of ITS-S application with need for a session, with no request of specific access technology, and without request to change communication channel for session phase - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT knows about availability of a suitable access technology in an ITS-S router
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request for an ITS-S application requiring non-IP communications in the session phase, but no change of communication channel
-                 *      }
-                 *      then {
-                 *          the IUT forwards this request to the proper ITS-S router ITS-SCU applying Inter-ITS-SCU communications
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/HO/BV/03 - */ - testcase TC_FSAP_SP_HO_BV_03() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - - // Test control - if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { - log("*** TC_FSAP_SP_HO_BV_03: ERROR: 'PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_HO_BV_03: INFO: Preamble: IUT was setup properly ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGCscheduleWithNonIp(), - f_getIutServiceDataRegWithSession() - ); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ); - log("*** TC_FSAP_SP_HO_BV_03: INFO: GCregServer registration request done ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfRequestRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) // Reuse the value template previously sent - ))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_HO_BV_03: PASS: GCtx notification sent as expected ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HO_BV_03: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_HO_BV_03: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SP_HO_BV_03 - - /** - * @desc Registration of ITS-S application with need for a session, with no request of specific access technology, and with request to change communication channel for session phase - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT knows about availability of a suitable access technology in an ITS-S router
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request for an ITS-S application requiring non-IP communications, and requiring change of communication channel in the session phase
-                 *      }
-                 *      then {
-                 *          the IUT forwards this request to the proper ITS-S router ITS-SCU applying Inter-ITS-SCU communications
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/HO/BV/04 - */ - testcase TC_FSAP_SP_HO_BV_04() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - - // Test control - if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { - log("*** TC_FSAP_SP_HO_BV_04: ERROR: 'PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_HO_BV_04: INFO: Preamble: IUT was setup properly ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGcScheduleWithAccessTechAndNonIp(), - f_getIutServiceDataRegWithNoSessionAndChannelChange() - ); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ); - log("*** TC_FSAP_SP_HO_BV_04: INFO: GCregServer registration request done ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfRequestRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfRequestRequest( - v_commandRef, - v_mfReq // Reuse the value template previously sent - ))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_HO_BV_04: PASS: GCtx notification sent as expected ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HO_BV_04: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_HO_BV_04: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SP_HO_BV_04 - - /** - * @desc Finalization of SIP upon reception of CTX for non-IP session - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT awaiting reception of CTX messages
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a CTX as proper reply to a SAM
-                 *      }
-                 *      then {
-                 *          the IUT replies with the first session message (REQN or REQW) from the ITS-S application
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/HO/BV/05 - */ - testcase TC_FSAP_SP_HO_BV_05() runs on ItsMgt system ItsCalmSystem { - // Local variables - timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - - // Test control - if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX)) { - log("*** TC_FSAP_SP_HO_BV_05: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGcScheduleWithAccessTechAndNonIp(), - f_getIutServiceDataRegWithNoSession() - ); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ); - tc_ac.start; - alt { - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfRequestRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfRequestRequest( - v_commandRef, - v_mfReq // Reuse the value template previously sent - ))))) { - tc_ac.stop; - log("*** TC_FSAP_SP_HO_BV_05: INFO: GCregServer notification sent as expected ***"); - tc_ac.start; - repeat; - } - [] fsapPort.receive(mw_fsapReq_mfCommandConfirm(?)) { - log("*** TC_FSAP_SP_HO_BV_05: INFO: GCregServer response received as expected ***"); - tc_ac.stop; - t_maxRetransTimer.start; - } - [] t_maxRetransTimer.timeout { - log("*** TC_FSAP_SP_HO_BV_05: INFO: t_maxRetransTimer timeout ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HO_BV_05: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_HO_BV_05: INFO: Preamble: IUT was setup properly ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequest_ctx( - m_llServiceAddr( - m_linkId( - f_getIutSrcRemoteCiId(), - f_getIutSrcLocalCiId())), - m_ctx(f_getIutClientId()) - ); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ); - log("*** TC_FSAP_SP_HO_BV_05: INFO: CTX registration request done ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfRequestRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfRequestRequest( - v_commandRef, - v_mfReq // Reuse the value template previously sent - ))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_HO_BV_05: PASS: GCtx notification sent as expected ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_HO_BV_05: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_HO_BV_05: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SP_HO_BV_05 - - } // End of group validBehavior - - group invalidBehavior { - - /** - * @desc Registration of ITS-S application for message distribution only (no session phase) with request of specific but not available access technology - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT does not know about existence of the requested access technology,
-                 *      the IUT knows about availability of a suitable access technology in an ITS-S router
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request for an ITS-S application for the purpose of message distribution
-                 *      }
-                 *      then {
-                 *          the IUT dows not forward this request to the proper ITS-S router ITS-SCU applying Inter-ITS-SCU communications
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/HO/BI/01 - */ - testcase TC_FSAP_SP_HO_BI_01() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - - // Test control - if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { - log("*** TC_FSAP_SP_HO_BI_01: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_HO_BI_01: INFO: Preamble done ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGCscheduleWithUnknownAccessTechAndNonIp(), - f_getIutServiceDataRegWithNoSession() - ) - ) - ) - ); - log("*** TC_FSAP_SP_HO_BI_01: INFO: GCregServer registration request sent ***"); - // Clause 'then' - tc_noac.start; // No message expected - alt { - [] fsapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_HO_BI_01: FAIL: No message was expected ***"); - } - [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_HO_BI_01: PASS: No message received as expected ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_HO_BI_01: INFO: test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SP_HO_BI_01 - - /** - * @desc Registration of ITS-S application with need for a session, with no request of specific access technology which is not available, and without request to change communication channel for session phase - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT does not know about availability of a suitable access technology
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request for an ITS-S application offering a session phase
-                 *      }
-                 *      then {
-                 *          the IUT dows not forward this request to the proper ITS-S router ITS-SCU applying Inter-ITS-SCU communications
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/HO/BI/02 - */ - testcase TC_FSAP_SP_HO_BI_02() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - - // Test control - if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { - log("*** TC_FSAP_SP_HO_BI_02: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_HO_BI_02: INFO: Preamble done ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGCscheduleWithUnknownAccessTechAndNonIp(), - f_getIutServiceDataRegWithSession() - ) - ) - ) - ); - log("*** TC_FSAP_SP_HO_BI_02: INFO: GCregServer registration request sent ***"); - // Clause 'then' - tc_noac.start; // No message expected - alt { - [] fsapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_HO_BI_02: FAIL: No message was expected ***"); - } - [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_HO_BI_02: PASS: No message received as expected ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_HO_BI_02: INFO: test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SP_HO_BI_02 - - } // End of group invalidBehavior - - } // End of group its_S_HostOnly - - // 9.1.3 ITS-S router only - group its_S_RouterOnly { - - group validBehavior { - - /** - * @desc Registration of ITS-S application for message distribution only (no session phase) with request of specific access technology - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for SAM transmission,
-                 *      the IUT knows the requested access technology
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request via Inter-ITS-SCU communications for an ITS-S application including a required access technology and non-IP communications
-                 *      }
-                 *      then {
-                 *          the IUT periodically sends out SAM via the requested access technology with the requested repetition rate, not inviting for a reply
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/RO/BV/01 - */ - testcase TC_FSAP_SP_RO_BV_01() runs on ItsMgt system ItsCalmSystem { - // Local variables - timer t_minRetransTimer := f_getIutSamRetransmitTimer(); - timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - var boolean v_samNotificationReceived := false; - - // Test control - if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { - log("*** TC_FSAP_SP_RO_BV_01: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_RO_BV_01: INFO: Preamble: IUT was setup properly ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGcScheduleWithAccessTechAndNonIp(), - f_getIutServiceDataRegWithNoSession() - ); - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ) - ); - log("*** TC_FSAP_SP_RO_BV_01: INFO: GCregServer registration request done ***"); - // Clause 'then' - tc_ac.start; - t_maxRetransTimer.start; - alt { - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - v_commandRef, - mdw_mfCommand_gcSam( - f_getIutApplicationId(), - ?, - mw_samDataServerciceWithAccessTechAndNonIp( - ?, - ?, - { portLong := c_portSam } - ) - )))) { - tc_ac.stop; - if (v_samNotificationReceived == false) { - v_samNotificationReceived := true; - t_minRetransTimer.start; - t_maxRetransTimer.start; - // After the SAM received, check the retransmission - tc_ac.start; - repeat; - } - if(t_minRetransTimer.running) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_RO_BV_01: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_RO_BV_01: PASS: SAM transmitted at prescribed periodicity ***"); - } - } - [] t_minRetransTimer.timeout { - log("*** TC_FSAP_SP_RO_BV_01: INFO: Ready for retransmission ***"); - repeat; - } - [] t_maxRetransTimer.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_RO_BV_01: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_RO_BV_01: INCONC: Expected message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_RO_BV_01: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SP_RO_BV_01 - - /** - * @desc Registration of ITS-S application for message distribution only (no session phase) with no request of specific access technology - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT knows a suitable access technology
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request via Inter-ITS-SCU communications for an ITS-S application requiring non-IP communications
-                 *      }
-                 *      then {
-                 *          the IUT periodically sends out SAM via a suited access technology selected by the CI selection manager with the requested repetition rate, not inviting for a reply
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/RO/BV/02 - */ - testcase TC_FSAP_SP_RO_BV_02() runs on ItsMgt system ItsCalmSystem { - // Local variables - timer t_minRetransTimer := f_getIutSamRetransmitTimer(); - timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - var boolean v_samNotificationReceived := false; - - // Test control - if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { - log("*** TC_FSAP_SP_RO_BV_02: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_RO_BV_02: INFO: Preamble: IUT was setup properly ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGCscheduleWithNonIp(), - f_getIutServiceDataRegWithNoSession() - ); - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ) - ); - log("*** TC_FSAP_SP_RO_BV_02: INFO: GCregServer registration request done ***"); - // Clause 'then' - tc_ac.start; - t_maxRetransTimer.start; - alt { - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - v_commandRef, - mdw_mfCommand_gcSam( - f_getIutApplicationId(), - ?, - mw_samDataServerciceWithAccessTechAndNonIp( - ?, - ?, - { portLong := c_portSam } - ) - )))) { - tc_ac.stop; - if (v_samNotificationReceived == false) { - v_samNotificationReceived := true; - t_minRetransTimer.start; - t_maxRetransTimer.start; - // After the SAM received, check the retransmission - tc_ac.start; - repeat; - } - if(t_minRetransTimer.running) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_RO_BV_02: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_RO_BV_02: PASS: SAM transmitted at prescribed periodicity ***"); - } - } - [] t_minRetransTimer.timeout { - log("*** TC_FSAP_SP_RO_BV_02: INFO: Ready for retransmission ***"); - repeat; - } - [] t_maxRetransTimer.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_RO_BV_02: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_RO_BV_02: INCONC: Expected message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_RO_BV_02: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SP_RO_BV_02 - - /** - * @desc Registration of ITS-S application with need for a session, with no request of specific access technology, and without request to change communication channel for session phase - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT knows a suitable access technology
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request via Inter-ITS-SCU communications for an ITS-S application requiring non-IP communications
-                 *      }
-                 *      then {
-                 *          the IUT periodically sends out SAM via a suited access technology selected by the CI selection manager with the requested repetition rate, inviting for a reply
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/RO/BV/03 - */ - testcase TC_FSAP_SP_RO_BV_03() runs on ItsMgt system ItsCalmSystem { - // Local variables - timer t_minRetransTimer := f_getIutSamRetransmitTimer(); - timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - var boolean v_samNotificationReceived := false; - - // Test control - if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { - log("*** TC_FSAP_SP_RO_BV_03: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_RO_BV_03: INFO: Preamble: IUT was setup properly ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGCscheduleWithNonIp(), - f_getIutServiceDataRegWithSession() - ); - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ) - ); - log("*** TC_FSAP_SP_RO_BV_03: INFO: GCregServer registration request done ***"); - // Clause 'then' - tc_ac.start; - t_maxRetransTimer.start; - alt { - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - v_commandRef, - mdw_mfCommand_gcSam( - f_getIutApplicationId(), - ?, - mw_samDataServerciceWithAccessTechAndNonIp( - ?, - ?, - { portLong := c_portSam } - ) - )))) { - tc_ac.stop; - if (v_samNotificationReceived == false) { - v_samNotificationReceived := true; - t_minRetransTimer.start; - t_maxRetransTimer.start; - // After the SAM received, check the retransmission - tc_ac.start; - repeat; - } - if(t_minRetransTimer.running) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_RO_BV_03: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_RO_BV_03: PASS: SAM transmitted at prescribed periodicity ***"); - } - } - [] t_minRetransTimer.timeout { - log("*** TC_FSAP_SP_RO_BV_03: INFO: Ready for retransmission ***"); - repeat; - } - [] t_maxRetransTimer.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_RO_BV_03: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_RO_BV_03: INCONC: Expected message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_RO_BV_03: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SP_RO_BV_03 - - /** - * @desc Registration of ITS-S application with need for a session, with no request of specific access technology, and with request to change communication channel for session phase - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT knows a suitable access technology
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request via Inter-ITS-SCU communications for an ITS-S application requiring non-IP communications, and requiring change of communication channel in the session phase
-                 *      }
-                 *      then {
-                 *          the IUT periodically sends out SAM via a suited access technology selected by the CI selection manager with the requested repetition rate, inviting for a reply, requesting a change of channel
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/RO/BV/04 - */ - testcase TC_FSAP_SP_RO_BV_04() runs on ItsMgt system ItsCalmSystem { - // Local variables - timer t_minRetransTimer := f_getIutSamRetransmitTimer(); - timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - var boolean v_samNotificationReceived := false; - - // Test control - if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { - log("*** TC_FSAP_SP_RO_BV_04: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_RO_BV_04: INFO: Preamble: IUT was setup properly ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGcScheduleWithAccessTechAndNonIp(), - f_getIutServiceDataRegWithNoSessionAndChannelChange() - ); - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ) - ); - log("*** TC_FSAP_SP_RO_BV_04: INFO: GCregServer registration request done ***"); - // Clause 'then' - tc_ac.start; - t_maxRetransTimer.start; - alt { - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - v_commandRef, - mdw_mfCommand_gcSam( - f_getIutApplicationId(), - ?, - mw_samDataServerciceWithAccessTechAndNonIp( - ?, - ?, - { portLong := c_portSam } - ) - )))) { - tc_ac.stop; - if (v_samNotificationReceived == false) { - v_samNotificationReceived := true; - t_minRetransTimer.start; - t_maxRetransTimer.start; - // After the SAM received, check the retransmission - tc_ac.start; - repeat; - } - if(t_minRetransTimer.running) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_RO_BV_04: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); - } else { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_RO_BV_04: PASS: SAM transmitted at prescribed periodicity ***"); - } - } - [] t_minRetransTimer.timeout { - log("*** TC_FSAP_SP_RO_BV_04: INFO: Ready for retransmission ***"); - repeat; - } - [] t_maxRetransTimer.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_RO_BV_04: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_RO_BV_04: INCONC: Expected message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_RO_BV_04: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SP_RO_BV_04 - - /** - * @desc Finalization of SIP upon reception of CTX for non-IP session - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT sending out periodically SAMs for one ITS-S application with non-IP based sessions
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a CTX as proper reply to a SAM
-                 *      }
-                 *      then {
-                 *          the IUT forwards the notification of CTX reception to the proper ITS-S host applying Inter-ITS-SCU communications
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/RO/BV/05 - */ - testcase TC_FSAP_SP_RO_BV_05() runs on ItsMgt system ItsCalmSystem { - // Local variables - timer t_minRetransTimer := f_getIutSamRetransmitTimer(); - timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - var boolean v_samNotificationReceived := false; - - // Test control - if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX)) { - log("*** TC_FSAP_SP_RO_BV_05: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGcScheduleWithAccessTechAndNonIp(), - f_getIutServiceDataRegWithNoSession() - ); - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ) - ); - log("*** TC_FSAP_SP_RO_BV_05: INFO: GCregServer registration request done ***"); - tc_ac.start; - t_maxRetransTimer.start; - alt { - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - v_commandRef, - mdw_mfCommand_gcSam( - f_getIutApplicationId(), - ?, - mw_samDataServerciceWithAccessTechAndNonIp( - ?, - ?, - { portLong := c_portSam } - ) - )))) { - tc_ac.stop; - if (v_samNotificationReceived == false) { - v_samNotificationReceived := true; - t_minRetransTimer.start; - t_maxRetransTimer.start; - // After the SAM received, check the retransmission - tc_ac.start; - repeat; - } - if(t_minRetransTimer.running) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_RO_BV_05: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); - } else { - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_RO_BV_05: INFO: Preamble: IUT was setup properly ***"); - } - } - [] t_minRetransTimer.timeout { - log("*** TC_FSAP_SP_RO_BV_05: INFO: Ready for retransmission ***"); - repeat; - } - [] t_maxRetransTimer.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_RO_BV_05: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_RO_BV_05: INCONC: Expected message not received ***"); - } - } // End of 'alt' statement - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequest_ctx( - m_llServiceAddr( - m_linkId( - f_getIutSrcRemoteCiId(), - f_getIutSrcLocalCiId())), - m_ctx(f_getIutClientId()) - ) - ) - ) - ); - log("*** TC_FSAP_SP_RO_BV_05: INFO: CTX registration request done ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - ?, - mdw_mfCommand_gCctx( - f_getIutApplicationId(), - f_getIutClientId(), - mdw_ctxServiceDataNonIp( - ?, // TODO Parameters shall be reviewed during ATS validation - ?, - ? - ))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_RO_BV_05: PASS: GCtx notification sent as expected ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SP_RO_BV_05: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_RO_BV_05: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SP_RO_BV_05 - - } // End of group validBehavior - - group invalidBehavior { - - /** - * @desc Registration of ITS-S application for message distribution only (no session phase) with request of specific but not available access technology - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT does not know the requested access technology,
-                 *      the IUT knows another access technology suited for FSAP
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request via Inter-ITS-SCU communications for an ITS-S application for the purpose of message distribution
-                 *      }
-                 *      then {
-                 *          the IUT does not send out periodically SAMs via the known access technology
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/RO/BI/01 - */ - testcase TC_FSAP_SP_RO_BI_01() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - - // Test control - if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { - log("*** TC_FSAP_SP_RO_BI_01: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_RO_BI_01: INFO: Preamble done ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGCscheduleWithUnknownAccessTechAndNonIp(), - f_getIutServiceDataRegWithSession() - ); - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ) - ); - log("*** TC_FSAP_SP_RO_BI_01: INFO: GCregServer registration request done ***"); - // Clause 'then' - tc_noac.start; // No message expected - alt { - [] fsapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_RO_BI_01: FAIL: No message was expected ***"); - } - [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_RO_BI_01: PASS: No message received as expected ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_RO_BI_01: INFO: test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SP_RO_BI_01 - - /** - * @desc Registration of ITS-S application with need for a session, with no request of specific access technology which is not available, and without request to change communication channel for session phase - *
-                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having not registered any ITS-S application for service announcement,
-                 *      the IUT does not know a suitable access technology
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a GCregServer registration request via Inter-ITS-SCU communications for an ITS-S application offering a session phase
-                 *      }
-                 *      then {
-                 *          the IUT does not send out periodically SAMs
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SP/RO/BI/02 - */ - testcase TC_FSAP_SP_RO_BI_02() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - - // Test control - if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { - log("*** TC_FSAP_SP_RO_BI_02: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SP_RO_BI_02: INFO: Preamble done ***"); - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGCscheduleWithUnknownAccessTechAndNonIp(), - f_getIutServiceDataRegWithNoSession() - ); - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ) - ); - log("*** TC_FSAP_SP_RO_BI_02: INFO: GCregServer registration request done ***"); - // Clause 'then' - tc_noac.start; // No message expected - alt { - [] fsapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SP_RO_BI_02: FAIL: No message was expected ***"); - } - [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SP_RO_BI_02: PASS: No message received as expected ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SP_RO_BI_02: INFO: test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SP_RO_BI_02 - - } // End of group invalidBehavior - - } - } // End of group serviceProvider - - // 9.2 Service user - group serviceUser { - - // 9.2.1 Combined ITS-S host and ITS-S router - group combinedITS_S_Host_ITS_S_Router { - - group validBehavior { - - /** - * @desc Registration of ITS-S application for message distribution only (no session phase) with request of specific access technology - *
-                 * Pics Selection: PICS_FSAP_ROLE_SU AND PICS_ROLE_RH
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having received GCregClient, 
-                 *      and having properly registered any ITS-S application without a session 
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a SAM containing the expected ITS-AID
-                 *      }
-                 *      then {
-                 *          the IUT forwards the related message to the ITS-S application using GCsam
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SU/HR/BV/01 - */ - testcase TC_FSAP_SU_HR_BV_01() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - - // Test control - if (not(PICS_FSAP_ROLE_SU and PICS_ROLE_RH)) { - log("*** TC_FSAP_SU_HR_BV_01: ERROR: 'PICS_FSAP_ROLE_SU AND PICS_ROLE_RH' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequest_gCregClientWithNoSessionAndNoCtx( - f_getIutClientApplicationId(), - f_getIutServiceId() - ) - ) - ) - ); - tc_noac.start; // No message expected on success - alt { - [] fsapPort.receive { - tc_noac.stop; - log("*** TC_FSAP_SU_HR_BV_01: FAIL: No message was expected ***"); - } - [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); - log("*** TC_FSAP_SU_HR_BV_01: INFO: GCregClient registration request done ***"); - } - } // End of 'alt' statement - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequest_samRxNot( - m_llServiceAddr( - m_linkId( - f_getIutSrcRemoteCiId(), - f_getIutSrcLocalCiId())), - f_getIutServerId(), - f_getIutServicelistWithNoSessionAndNoChannelChange() - ) - ) - ) - ); - log("*** TC_FSAP_SU_HR_BV_01: INFO: SAM message sent ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - ?, - mdw_mfCommand_gcSam( - f_getIutApplicationId(), - ?, - mw_samDataServerciceWithAccessTechAndNonIp( - ?, - ?, - { portLong := c_portSam } - ) - )))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SU_HR_BV_01: PASS: GCsam notification sent as expected ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SU_HR_BV_01: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SU_HR_BV_01: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of testcase TC_FSAP_SU_HR_BV_01 - - /** - * @desc Reception of SAM with need for a session, without request to change communication channel for session phase, with need to send CTX - *
-                 * Pics Selection: PICS_FSAP_ROLE_SU AND PICS_ROLE_RH AND PIC_SIP_W_CTX
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having received GCregClient, and having properly registered any ITS-S application with session initialisation using CTX 
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a SAM containing the expected ITS-AID
-                 *      }
-                 *      then {
-                 *          the IUT forwards the related message to the ITS-S application using GCsamctx, with is acknowledged providing a port number for the session
-                 *          the IUT sends the requested CTX containing the port number received in the acknowledgement
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SU/HR/BV/02 - */ - testcase TC_FSAP_SU_HR_BV_02() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - var FsapReq v_cmdConfirm; // Used to retrieve portNumber - - // Test control - if (not(PICS_FSAP_ROLE_SU and PICS_ROLE_RH and PICS_SIP_W_CTX)) { - log("*** TC_FSAP_SU_HR_BV_02: ERROR: 'PICS_FSAP_ROLE_SU AND PICS_ROLE_RH' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequest_gCregClientWithSessionAndCtx( - f_getIutClientApplicationId(), - f_getIutServiceId() - ) - ) - ) - ); - tc_noac.start; // No message expected on success - alt { - [] fsapPort.receive { - tc_noac.stop; - log("*** TC_FSAP_SU_HR_BV_02: FAIL: No message was expected ***"); - } - [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); - log("*** TC_FSAP_SU_HR_BV_02: INFO: GCregClient registration request done ***"); - } - } // End of 'alt' statement - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequest_samRxNot( - m_llServiceAddr( - m_linkId( - f_getIutSrcRemoteCiId(), - f_getIutSrcLocalCiId())), - f_getIutServerId(), - f_getIutServicelistWithSessionAndNoChangeChannel() - ) - ) - ) - ); - log("*** TC_FSAP_SU_HR_BV_02: INFO: SAM message sent ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - ?, - mdw_mfCommand_gcSamCtx( - f_getIutApplicationId(), - ?, - ? - )))) { - tc_ac.stop; - log("*** TC_FSAP_SU_HR_BV_02: INFO: GCsam notification sent as expected ***"); - tc_ac.start; - repeat; // Wait for response - } - [] fsapPort.receive( - mw_fsapReq_mfCommandConfirm( - mdw_mfCommandConfirm_gCsamctxConf(0) - )) -> value v_cmdConfirm { - tc_ac.stop; - log("*** TC_FSAP_SU_HR_BV_02: INFO: Receive service port number ***"); - tc_ac.start; - repeat; // Wait for GCctxTxCmd sent - } - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - ?, - mdw_mfCommand_gcCtxTxCmd( - ?, - mdw_ctx_nonIpContext( - mw_nonIpContext( - ?, //v_cmdConfirm.mfCommandConfirmIn.cmdConfirm.mfCmdConf.gCsamctx.serviceInfo.info.nonipService.serviceID, - v_cmdConfirm.mfCommandConfirmIn.cmdConfirm.mfCmdConf.gCsamctx.port_ - ) - ))))) { - - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SU_HR_BV_02: PASS: IUT has sent GCctxTxCmd ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SU_HR_BV_02: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SU_HR_BV_02: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of testcase TC_FSAP_SU_HR_BV_02 - - /** - * @desc Reception of SAM with need for a session, with request to change communication channel for session phase, with need to send CTX - *
-                 * Pics Selection: PICS_FSAP_ROLE_SU AND PICS_ROLE_RH AND PICS_SIP_W_CTX
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having received GCregClient, and having properly registered any ITS-S application with session initialisation using CTX 
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a SAM containing the expected ITS-AID
-                 *      }
-                 *      then {
-                 *          the IUT forwards the related message to the ITS-S application using GCsamctx, with is acknowledged providing a port number for the session
-                 *          the IUT sends the requested CTX in the new channel containing the port number received in the acknowledgement
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SU/HR/BV/03 - */ - testcase TC_FSAP_SU_HR_BV_03() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - var FsapReq v_cmdConfirm; // Used to retrieve new channel, including port number - - // Test control - if (not(PICS_FSAP_ROLE_SU and PICS_ROLE_RH and PICS_SIP_W_CTX)) { - log("*** TC_FSAP_SU_HR_BV_03: ERROR: 'PICS_FSAP_ROLE_SU AND PICS_ROLE_RH AND PICS_SIP_W_CTX' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequest_gCregClientWithSessionAndCtx( - f_getIutClientApplicationId(), - f_getIutServiceId() - ) - ) - ) - ); - tc_noac.start; // No message expected on success - alt { - [] fsapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_error); - log("*** TC_FSAP_SU_HR_BV_03: FAIL: No message was expected ***"); - } - [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); - log("*** TC_FSAP_SU_HR_BV_03: INFO: GCregClient registration request done ***"); - } - } // End of 'alt' statement - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequest_samRxNot( - m_llServiceAddr( - m_linkId( - f_getIutSrcRemoteCiId(), - f_getIutSrcLocalCiId())), - f_getIutServerId(), - f_getIutServicelistWithSessionAndChangeChannel() - ) - ) - ) - ); - log("*** TC_FSAP_SU_HR_BV_03: INFO: SAM message sent ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - ?, - mdw_mfCommand_gcSamCtx( - f_getIutApplicationId(), - ?, - ? - )))) { - tc_ac.stop; - log("*** TC_FSAP_SU_HR_BV_03: INFO: GCsam notification sent as expected ***"); - tc_ac.start; - repeat; // Wait for response - } - [] fsapPort.receive( - mw_fsapReq_mfCommandConfirm( - mdw_mfCommandConfirm_gCsamctxConf(0) - )) -> value v_cmdConfirm { - tc_ac.stop; - log("*** TC_FSAP_SU_HR_BV_03: INFO: Receive service port number ***"); - tc_ac.start; - repeat; // Wait for GCctxTxCmd sent - } - [] fsapPort.receive( - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - ?, - mdw_mfCommand_gcCtxTxCmd( - ?, - mdw_ctx_nonIpContext( - mw_nonIpContext( - ?, //v_cmdConfirm.mfCommandConfirmIn.cmdConfirm.mfCmdConf.gCsamctx.serviceInfo.info.nonipService.serviceID, - v_cmdConfirm.mfCommandConfirmIn.cmdConfirm.mfCmdConf.gCsamctx.port_ - ) - ))))) { - - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SU_HR_BV_03: PASS: IUT has sent GCctxTxCmd ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SU_HR_BV_03: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SU_HR_BV_03: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of testcase TC_FSAP_SU_HR_BV_03 - - /** - * @desc Reception of SAM with need for a session, with request to change communication channel for session phase, with need to send CTX - *
-                 * Pics Selection: PICS_FSAP_ROLE_SU AND PICS_ROLE_RH
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having registered ITS applications, but not the one offered in the SAM 
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a SAM containing an unwanted ITS-AID
-                 *      }
-                 *      then {
-                 *          the IUT discards the SAM without further actions
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SU/HR/BV/04 - */ - testcase TC_FSAP_SU_HR_BV_04() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - - // Test control - if (not(PICS_FSAP_ROLE_SU and PICS_ROLE_RH)) { - log("*** TC_FSAP_SU_HR_BV_04: ERROR: 'PICS_FSAP_ROLE_SU AND PICS_ROLE_RH' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGCscheduleWithNonIp(), - f_getIutServiceDataRegWithNoSession() - ) - ) - ) - ); - tc_noac.start; // No message expected on success - alt { - [] fsapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_error); - log("*** TC_FSAP_SU_HR_BV_04: FAIL: No message was expected ***"); - } - [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); - log("*** TC_FSAP_SU_HR_BV_04: INFO: GCregClient registration request done ***"); - } - } // End of 'alt' statement - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequest_samRxNot( - m_llServiceAddr( - m_linkId( - f_getIutSrcRemoteCiId(), - f_getIutSrcLocalCiId())), - f_getIutServerId(), - f_getIutServicelistWithUnknownServiceId() - ) - ) - ) - ); - log("*** TC_FSAP_SU_HR_BV_04: INFO: SAM message sent ***"); - // Clause 'then' - tc_noac.start; // No message expected on success - alt { - [] fsapPort.receive { - tc_noac.stop; - log("*** TC_FSAP_SU_HR_BV_04: FAIL: No message was expected ***"); - } - [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); - log("*** TC_FSAP_SU_HR_BV_04: PASS: GCregClient registration request done ***"); - } - } // End of 'alt' statement - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of testcase TC_FSAP_SU_HR_BV_04 - - /** - * @desc Reception of SAM with need for a session, with request to change communication channel for session phase, with the requested channel being unknown - *
-                 * Pics Selection: PICS_FSAP_ROLE_SU AND PICS_ROLE_RH
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having received GCregClient, and having properly registered any ITS-S application
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a SAM containing the expected ITS-AID with a request to change to an unknown channel
-                 *      }
-                 *      then {
-                 *          the IUT discards the SAM without further actions
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SU/HR/BV/05 - */ - testcase TC_FSAP_SU_HR_BV_05() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - - // Test control - if (not(PICS_FSAP_ROLE_SU and PICS_ROLE_RH)) { - log("*** TC_FSAP_SU_HR_BV_05: ERROR: 'PICS_FSAP_ROLE_SU AND PICS_ROLE_RH' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequestGcregServer( - f_getIutApplicationId(), - f_getIutGCscheduleWithNonIp(), - f_getIutServiceDataRegWithNoSession() - ) - ) - ) - ); - tc_noac.start; // No message expected on success - alt { - [] fsapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_error); - log("*** TC_FSAP_SU_HR_BV_05: FAIL: No message was expected ***"); - } - [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); - log("*** TC_FSAP_SU_HR_BV_05: INFO: GCregClient registration request done ***"); - } - } // End of 'alt' statement - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - m_mfRequest_samRxNot( - m_llServiceAddr( - m_linkId( - f_getIutSrcRemoteCiId(), - f_getIutSrcLocalCiId())), - f_getIutServerId(), - f_getIutServicelistWithUnknownChannel() - ) - ) - ) - ); - log("*** TC_FSAP_SU_HR_BV_05: INFO: SAM message sent ***"); - // Clause 'then' - tc_noac.start; // No message expected on success - alt { - [] fsapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_FSAP_SU_HR_BV_05: FAIL: No message was expected ***"); - } - [] tc_noac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SU_HR_BV_05: PASS: SAM message was discarded as expected ***"); - } - } // End of 'alt' statement - - // Postamble - //f_unInitializeFntpForwardingTable(); - f_poDefault(); - f_cf01Down(); - - } // End of testcase TC_FSAP_SU_HR_BV_05 - - } // End of group validBehavior - - group invalidBehavior { - - } // End of group invalidBehavior - - } // End of group combinedITS_S_Host_ITS_S_Router - - // 9.2.2 ITS-S host only - group its_S_HostOnly { - - group validBehavior { - - /** - * @desc Reception of SAM with need for a session with need to send CTX - *
-                 * Pics Selection: PICS_FSAP_ROLE_SU AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having received GCregClient, 
-                 *      and having properly registered any ITS-S application with session initialisation using CTX 
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a SAM from the ITS-S router via Inter-ITS-SCU communications containing the expected ITS-AID
-                 *      }
-                 *      then {
-                 *          the IUT notifies reception of the SAM to the ITS-S application, which is acknowledged with a port number. 
-                 *          the IUT sends the requested CTX to the ITS-S router applying Inter-ITS-SCU communications containing the port number received in the acknowledgement
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SU/HO/BV/01 - */ - testcase TC_FSAP_SU_HO_BV_01() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - var FsapReq v_cmdConfirm; // Used to retrieve portNumber - - // Test control - if (not(PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX)) { - log("*** TC_FSAP_SU_HO_BV_01: ERROR: 'PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequest_gCregClientWithSessionAndCtx( - f_getIutClientApplicationId(), - f_getIutServiceId() - ); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ); - log("*** TC_FSAP_SU_HO_BV_01: INFO: GCregServer registration request done ***"); - tc_ac.start; - alt { - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfRequestRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfRequestRequest( - v_commandRef, - v_mfReq // Reuse the value template previously sent - ))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); - log("*** TC_FSAP_SU_HO_BV_01: INFO: GCregClient registration request done ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_timeout); - log("*** TC_FSAP_SU_HO_BV_01: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequest_samRxNot( - m_llServiceAddr( - m_linkId( - f_getIutSrcRemoteCiId(), - f_getIutSrcLocalCiId())), - f_getIutServerId(), - f_getIutServicelistWithSessionAndNoChangeChannel() - ); - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ) - ); - log("*** TC_FSAP_SU_HO_BV_01: INFO: SAM message sent ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fsapPort.receive( // The IUT notifies reception of the SAM to the ITS-S application... - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - ?, - mdw_mfCommand_gcSamCtx( - f_getIutApplicationId(), - ?, - ? - )))) { - tc_ac.stop; - log("*** TC_FSAP_SU_HO_BV_01: INFO: GCsam notification sent as expected ***"); - tc_ac.start; - repeat; // Wait for response - } - [] fsapPort.receive( // ...which is acknowledged with a port number - mw_fsapReq_mfCommandConfirm( - mdw_mfCommandConfirm_gCsamctxConf(0) - )) -> value v_cmdConfirm { - tc_ac.stop; - log("*** TC_FSAP_SU_HO_BV_01: INFO: Receive service port number ***"); - tc_ac.start; - repeat; // Wait for GCctxTxCmd sent - } - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfCommandRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfCommandRequest( - ?, - mdw_mfCommand_gcCtxTxCmd( - ?, - mdw_ctx_nonIpContext( - mw_nonIpContext( - ?, //v_cmdConfirm.mfCommandConfirmIn.cmdConfirm.mfCmdConf.gCsamctx.serviceInfo.info.nonipService.serviceID, - v_cmdConfirm.mfCommandConfirmIn.cmdConfirm.mfCmdConf.gCsamctx.port_ - )))))))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SU_HO_BV_01: PASS: IUT has sent GCctxTxCmd ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SU_HO_BV_01: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SU_HO_BV_01: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SU_HO_BV_01 - - /** - * @desc Reception of SAM with need for a session with need to send CTX with need to change communication channel - *
-                 * Pics Selection: PICS_FSAP_ROLE_SU AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having received GCregClient, 
-                 *      and having properly registered any ITS-S application with session initialisation using CTX 
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a SAM from the ITS-S router via Inter-ITS-SCU communications containing the expected ITS-AID
-                 *      }
-                 *      then {
-                 *          the IUT notifies reception of the SAM to the ITS-S application, which is acknowledged with a port number. 
-                 *          the IUT sends the requested CTX to the ITS-S router applying Inter-ITS-SCU communications containing the port number received in the acknowledgement
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SU/HO/BV/02 - */ - testcase TC_FSAP_SU_HO_BV_02() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - var FsapReq v_cmdConfirm; // Used to retrieve portNumber - - // Test control - if (not(PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX)) { - log("*** TC_FSAP_SU_HO_BV_02: ERROR: 'PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequest_gCregClientWithSessionAndCtx( - f_getIutClientApplicationId(), - f_getIutServiceId() - ); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ); - log("*** TC_FSAP_SU_HO_BV_02: INFO: GCregServer registration request done ***"); - tc_ac.start; - alt { - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfRequestRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfRequestRequest( - v_commandRef, - v_mfReq // Reuse the value template previously sent - ))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); - log("*** TC_FSAP_SU_HO_BV_02: INFO: GCregClient registration request done ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_timeout); - log("*** TC_FSAP_SU_HO_BV_02: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequest_samRxNot( - m_llServiceAddr( - m_linkId( - f_getIutSrcRemoteCiId(), - f_getIutSrcLocalCiId())), - f_getIutServerId(), - f_getIutServicelistWithSessionAndChangeChannel() - ); - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ) - ); - log("*** TC_FSAP_SU_HO_BV_02: INFO: SAM message sent ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fsapPort.receive( // The IUT notifies reception of the SAM to the ITS-S application... - mw_fsapReq_mfCommandRequest( - mw_mfCommandRequest( - ?, - mdw_mfCommand_gcSamCtx( - f_getIutApplicationId(), - ?, - ? - )))) { - tc_ac.stop; - log("*** TC_FSAP_SU_HO_BV_02: INFO: GCsam notification sent as expected ***"); - tc_ac.start; - repeat; // Wait for response - } - [] fsapPort.receive( // ...which is acknowledged with a port number - mw_fsapReq_mfCommandConfirm( - mdw_mfCommandConfirm_gCsamctxConf(0) - )) -> value v_cmdConfirm { - tc_ac.stop; - log("*** TC_FSAP_SU_HO_BV_02: INFO: Receive service port number ***"); - tc_ac.start; - repeat; // Wait for GCctxTxCmd sent - } - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfCommandRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfCommandRequest( - ?, - mdw_mfCommand_gcCtxTxCmd( - ?, - mdw_ctx_nonIpContext( - mw_nonIpContext( - ?, //v_cmdConfirm.mfCommandConfirmIn.cmdConfirm.mfCmdConf.gCsamctx.serviceInfo.info.nonipService.serviceID, - v_cmdConfirm.mfCommandConfirmIn.cmdConfirm.mfCmdConf.gCsamctx.port_ - )))))))) { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SU_HO_BV_02: PASS: IUT has sent GCctxTxCmd ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SU_HO_BV_02: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SU_HO_BV_02: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SU_HO_BV_02 - - } // End of group validBehavior - - group invalidBehavior { - - } // End of group invalidBehavior - - } // End of group its_S_HostOnly - - // 9.2.3 ITS-S router only - group its_S_RouterOnly { - - group validBehavior { - - /** - * @desc Reception of SAM for message distribution only (no session phase) - *
-                 * Pics Selection: PICS_FSAP_ROLE_SU AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having received GCregClient, 
-                 *      and having properly registered any ITS-S application without a session 
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a SAM containing the expected ITS-AID
-                 *      }
-                 *      then {
-                 *          the IUT forwards the related message to the ITS-S application using GCsam via Inter-ITS-SCU communications
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SU/RO/BV/01 - */ - testcase TC_FSAP_SU_RO_BV_01() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - - // Test control - if (not(PICS_FSAP_ROLE_SU and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { - log("*** TC_FSAP_SU_RO_BV_01: ERROR: 'PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequest_gCregClientWithNoSessionAndNoCtx( - f_getIutClientApplicationId(), - f_getIutServiceId() - ); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ); - log("*** TC_FSAP_SU_RO_BV_01: INFO: GCregServer registration request done ***"); - tc_ac.start; - alt { - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfRequestRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfRequestRequest( - v_commandRef, - v_mfReq // Reuse the value template previously sent - ))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SU_RO_BV_01: INFO: GCregClient registration request done ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - log("*** TC_FSAP_SU_RO_BV_01: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequest_samRxNot( - m_llServiceAddr( - m_linkId( - f_getIutSrcRemoteCiId(), - f_getIutSrcLocalCiId())), - f_getIutServerId(), - f_getIutServicelistWithNoSessionAndNoChannelChange() - ); - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ) - ); - log("*** TC_FSAP_SU_RO_BV_01: INFO: SAM message sent ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfCommandRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfCommandRequest( - ?, - mdw_mfCommand_gcSamCtx( - f_getIutClientApplicationId(), - f_getIutServerId(), - ? - )))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SU_RO_BV_01: PASS: GCsam sent as expected ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SU_RO_BV_01: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SU_RO_BV_01: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SU_RO_BV_01 - - /** - * @desc Reception of SAM with need for a session with need to send CTX - *
-                 * Pics Selection: PICS_FSAP_ROLE_SU AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having received GCregClient, 
-                 *      and having properly registered any ITS-S application without a session 
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a SAM containing the expected ITS-AID
-                 *      }
-                 *      then {
-                 *          the IUT forwards the related message to the ITS-S application using GCsam via Inter-ITS-SCU communications
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SU/RO/BV/02 - */ - testcase TC_FSAP_SU_RO_BV_02() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - - // Test control - if (not(PICS_FSAP_ROLE_SU and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX)) { - log("*** TC_FSAP_SU_RO_BV_02: ERROR: 'PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequest_gCregClientWithSessionAndCtx( - f_getIutClientApplicationId(), - f_getIutServiceId() - ); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ); - log("*** TC_FSAP_SU_RO_BV_02: INFO: GCregServer registration request done ***"); - tc_ac.start; - alt { - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfRequestRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfRequestRequest( - v_commandRef, - v_mfReq // Reuse the value template previously sent - ))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SU_RO_BV_02: INFO: GCregClient registration request done ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - log("*** TC_FSAP_SU_RO_BV_02: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequest_samRxNot( - m_llServiceAddr( - m_linkId( - f_getIutSrcRemoteCiId(), - f_getIutSrcLocalCiId())), - f_getIutServerId(), - f_getIutServicelistWithSessionAndNoChangeChannel() - ); - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ) - ); - log("*** TC_FSAP_SU_RO_BV_02: INFO: SAM message sent ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfCommandRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfCommandRequest( - ?, - mdw_mfCommand_gcSamCtx( - f_getIutClientApplicationId(), - f_getIutServerId(), - ? - )))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SU_RO_BV_02: PASS: GCsam sent as expected ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SU_RO_BV_02: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SU_RO_BV_02: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SU_RO_BV_02 - - /** - * @desc Reception of SAM with need for a session with need to send CTX with need to change communication channel - *
-                 * Pics Selection: PICS_FSAP_ROLE_SU AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX
-                 * Config Id: CF01
-                 * Initial conditions: 
-                 *  with {
-                 *      the IUT having received GCregClient, 
-                 *      and having properly registered any ITS-S application with session initialisation using CTX
-                 *  }
-                 * Expected behaviour:
-                 *  evaluate whether {
-                 *      when { 
-                 *          the IUT having received a SAM containing the expected ITS-AID
-                 *      }
-                 *      then {
-                 *          the IUT forwards the related message to the ITS-S application using GCsamctx via Inter-ITS-SCU communications
-                 *      }
-                 *  }
-                 * 
- * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 TP/FSAP/SU/RO/BV/03 - */ - testcase TC_FSAP_SU_RO_BV_03() runs on ItsMgt system ItsCalmSystem { - // Local variables - var CommandRef v_commandRef; - var template MF_Request v_mfReq; - - // Test control - if (not(PICS_FSAP_ROLE_SU and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX)) { - log("*** TC_FSAP_SU_RO_BV_03: ERROR: 'PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX' required for executing the TC ***"); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Test adapter configuration - - // Preamble - // Clause 'Initial conditions' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequest_gCregClientWithSessionAndCtx( - f_getIutClientApplicationId(), - f_getIutServiceId() - ); - f_utCommandRequestWithoutConfirm( - m_generateMfRequestReq( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ); - log("*** TC_FSAP_SU_RO_BV_03: INFO: GCregServer registration request done ***"); - tc_ac.start; - alt { - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfRequestRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) // Reuse the value template previously sent - ))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - log("*** TC_FSAP_SU_RO_BV_03: INFO: GCregClient registration request done ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - log("*** TC_FSAP_SU_RO_BV_03: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - - // Test Body - // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfReq := m_mfRequest_samRxNot( - m_llServiceAddr( - m_linkId( - f_getIutSrcRemoteCiId(), - f_getIutSrcLocalCiId())), - f_getIutServerId(), - f_getIutServicelistWithSessionAndChangeChannel() - ); - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - v_commandRef, - valueof(v_mfReq) - ) - ) - ) - ); - log("*** TC_FSAP_SU_RO_BV_03: INFO: SAM message sent ***"); - // Clause 'then' - tc_ac.start; - alt { - [] fsapPort.receive( // See ISO/CD 24102-5 Clause 8.5 ITS station-internal management communications - mw_fsapReq_mfCommandRequest( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfCommandRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), - mw_mfCommandRequest( - ?, - mdw_mfCommand_gcSamCtx( - f_getIutClientApplicationId(), - f_getIutServerId(), - ? - )))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_FSAP_SU_RO_BV_03: PASS: GCsam sent as expected ***"); - } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_FSAP_SU_RO_BV_03: INCONC: Expected management message not received ***"); - } - } // End of 'alt' statement - log("*** TC_FSAP_SU_RO_BV_03: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf02Down(); - - } // End of testcase TC_FSAP_SU_RO_BV_03 - - } // End of group validBehavior - - group invalidBehavior { - - } // End of group invalidBehavior - - } // End of group its_S_RouterOnly - - } // End of group serviceUser - +/** + * @author ETSI / STF422_EETS + * @version $URL:$ + * $Id:$ + * @desc Fast service advertisement protocol (ISO 24102-5) test cases + */ +module ItsFsap_TestCases { + + // Libcommon + import from LibCommon_Time { + modulepar PX_TNOAC; + function f_sleep + }; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibIts + + // LibItsCalm + import from CALMiitsscu language "ASN.1:1997" all; + import from CALMllsap language "ASN.1:1997" { + type + IN_UNITDATA_request + }; + import from CALMmsap language "ASN.1:1997" { + type + CommandRef, + MF_Request + }; + import from CALMfsap language "ASN.1:1997" { + type + SAM, CTX, + GCsamctx + }; + import from CALMfntp language "ASN.1:1997" { + type + FNTPNPDU, + NFfntpCommRequest + }; + import from LibItsFntp_TypesAndValues { + const c_portSam, c_portNon; + }; + import from LibItsFntp_Templates { + template + mdw_inUnitDataReq, mw_llServiceAddr, mw_linkId, + m_llServiceAddr, m_linkId + }; + import from LibItsFntp_Functions { + function + f_oct2npdu, + f_getIutWlLocalCiid, f_getIutRemoteDestCiidBc + }; + import from LibItsMgt_TypesAndValues { + const c_dniCiid + }; + import from LibItsMgt_Templates all; + import from LibItsMgt_Functions { + function + f_getNextCommandRef, f_getNextPduCounter, + f_getIutSourceItsScuId, f_getIutDestItsScuId, f_getIutMedType, f_getIutCiAccessClass, f_getIutCiClass + }; + import from LibItsFsap_TypesAndValues all; + import from LibItsFsap_Templates all; + import from LibItsFsap_Functions all; + import from LibItsFsap_Pixits all; + import from LibItsFsap_Pics all; + import from LibItsCalm_Interface { + type ItsCalm, FsapInd + }; + import from LibItsCalm_TestSystem { + type ItsCalmSystem + }; + + // 9.1 Service provider + group serviceProvider { + + // 9.1.1 Combined ITS-S host and ITS-S router + group combinedITS_S_Host_ITS_S_Router { + + group validBehavior { + + /** + * @desc Registration of ITS-S application for message distribution only (no session phase) with request of specific access technology + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND PICS_ROLE_RH
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT knows the requested access technology
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request for an ITS-S application including a required access technology and non-IP communications
+                 *      }
+                 *      then {
+                 *          the IUT periodically sends out SAM via the requested access technology with the requested repetition rate, not inviting for a reply
+                 *              after expiry of samRetransmitTimer
+                 *              and before expiry of samRetransmitTimer + samMaxJitter
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/HR/BV/01 + */ + testcase TC_FSAP_SP_HR_BV_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var SAM v_sam; + timer t_minRetransTimer := f_getIutSamRetransmitTimer(); + timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); + var boolean v_firstMessageReceived := false; + var boolean v_samNotificationReceived := false; + + // Test control + if (not(PICS_FSAP_ROLE_SP and PICS_ROLE_RH)) { + log("*** TC_FSAP_SP_HR_BV_01: ERROR: 'PICS_FSAP_ROLE_SP AND PICS_ROLE_RH' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // Assume that 'Initial conditions' are achieved + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_HR_BV_01: INFO: Preamble: IUT was setup properly ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGcScheduleWithAccessTechAndNonIp(), + f_getIutServiceDataRegWithNoSession() + ); + log("*** TC_FSAP_SP_HR_BV_01: INFO: GCregServer registration request done ***"); + // Clause 'then' + log("*** TC_FSAP_SP_HR_BV_01: INFO: Expected IN-SAP message: ", + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + f_getIutMedTypeIso21215LocalCiid() + ), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutMedTypeIso21215LocalCiid()) + ))), + " ***"); + tc_ac.start; + alt { + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + f_getIutMedTypeIso21215LocalCiid() + ), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutMedTypeIso21215LocalCiid()) + )))) -> value v_fsapInd { + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); + log("*** TC_FSAP_SP_HR_BV_01: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2sam(v_fntpNpdu.body, c_tbDone, v_sam); + log( + "*** TC_FSAP_SP_HR_BV_01: INFO: Expected SAM: ", + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithNoSessionAndNoChannelChange()), + " ***"); + log("*** TC_FSAP_SP_HR_BV_01: INFO: SAM: ", v_sam, " ***"); + if (match( + v_sam, + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithNoSessionAndNoChannelChange() + ))) { + if (v_firstMessageReceived == false) { // First message is reached, start timer now + v_firstMessageReceived := true; + t_maxRetransTimer.start; + tc_ac.start; + repeat; + } else { + if (v_samNotificationReceived == false) { + v_samNotificationReceived := true; + t_minRetransTimer.start; + t_maxRetransTimer.start; + // After the SAM received, check the retransmission + tc_ac.start; + repeat; + } + if (t_minRetransTimer.running) { + log("*** TC_FSAP_SP_HR_BV_01: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); + t_minRetransTimer.stop; + t_maxRetransTimer.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + t_maxRetransTimer.stop; + log("*** TC_FSAP_SP_HR_BV_01: PASS: SAM transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } + } else { + log("*** TC_FSAP_SP_HR_BV_01: FAIL: Unexpected SAM message ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + log("*** TC_FSAP_SP_HR_BV_01: FAIL: Unknown FSAP message received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] t_minRetransTimer.timeout { + log("*** TC_FSAP_SP_HR_BV_01: INFO: Ready for retransmission ***"); + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** TC_FSAP_SP_HR_BV_01: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + [] tc_ac.timeout { + f_deregServer(); + log("*** TC_FSAP_SP_HR_BV_01: INCONC: Expected SAM message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_HR_BV_01: INFO: Test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf01Down(); + + } // End of testcase TC_FSAP_SP_HR_BV_01 + + /** + * @desc Registration of ITS-S application for message distribution only (no session phase) with no request of specific access technology + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND PICS_ROLE_RH
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT knows a suitable access technology
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request for an ITS-S application requiring non-IP communications
+                 *      }
+                 *      then {
+                 *          the IUT periodically sends out SAM via a suited access technology selected by the CI selection manager with the requested repetition rate, not inviting for a reply
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/HR/BV/02 + */ + testcase TC_FSAP_SP_HR_BV_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var SAM v_sam; + timer t_minRetransTimer := f_getIutSamRetransmitTimer(); + timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); + var boolean v_firstMessageReceived := false; + var boolean v_samNotificationReceived := false; + + // Test control + if (not(PICS_FSAP_ROLE_SP and PICS_ROLE_RH)) { + log("*** TC_FSAP_SP_HR_BV_02: ERROR: 'PICS_FSAP_ROLE_SP AND PICS_ROLE_RH' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // Assume that 'Initial conditions' are achieved + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_HR_BV_02: INFO: Preamble: IUT was setup properly ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGCscheduleWithNonIp(), + f_getIutServiceDataRegWithNoSession() + ); + log("*** TC_FSAP_SP_HR_BV_02: INFO: GCregServer registration request done ***"); + // Clause 'then' + log("*** TC_FSAP_SP_HR_BV_02: DEBUG: expected template: ", + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherLocalCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + (f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherLocalCiid()) + ), + ? + )))); + tc_ac.start; + alt { + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherLocalCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + (f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherLocalCiid()) + ), + mw_linkId( + f_getIutRemoteDestCiidBc(), + ?) +// (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherLocalCiid())) + )))) -> value v_fsapInd { + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); +// log("*** TC_FSAP_SP_HR_BV_02: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2sam(v_fntpNpdu.body, c_tbDone, v_sam); + log( + "*** TC_FSAP_SP_HR_BV_02: INFO: Expected SAM: ", + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithNoSessionAndNoChannelChange()), + " ***"); + log("*** TC_FSAP_SP_HR_BV_02: INFO: SAM: ", v_sam, " ***"); + if (match( + v_sam, + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithNoSessionAndNoChannelChange() + ))) { + if (v_firstMessageReceived == false) { // First message is reached, start timer now + v_firstMessageReceived := true; + t_maxRetransTimer.start; + tc_ac.start; + repeat; + } else { + if (v_samNotificationReceived == false) { + v_samNotificationReceived := true; + t_minRetransTimer.start; + t_maxRetransTimer.start; + // After the SAM received, check the retransmission + tc_ac.start; + repeat; + } + if (t_minRetransTimer.running) { + log("*** TC_FSAP_SP_HR_BV_02: WARNING: SAM not transmitted at prescribed periodicity (too early) ***"); + t_minRetransTimer.stop; + t_maxRetransTimer.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + t_maxRetransTimer.stop; + log("*** TC_FSAP_SP_HR_BV_02: PASS: SAM transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } + } else { + log("*** TC_FSAP_SP_HR_BV_02: FAIL: Unexpected SAM PDU ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + log("*** TC_FSAP_SP_HR_BV_02: FAIL: Unknown IN-SAP message received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] t_minRetransTimer.timeout { + log("*** TC_FSAP_SP_HR_BV_02: INFO: Ready for retransmission ***"); + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** TC_FSAP_SP_HR_BV_02: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + [] tc_ac.timeout { + f_deregServer(); + log("*** TC_FSAP_SP_HR_BV_02: INCONC: Expected management message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_HR_BV_02: INFO: Test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf01Down(); + + } // End of testcase TC_FSAP_SP_HR_BV_02 + + /** + * @desc Registration of ITS-S application with need for a session, with no request of specific access technology, and without request to change communication channel for session phase + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND PICS_ROLE_RH
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT knows a suitable access technology
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request for an ITS-S application requiring non-IP communications in the session phase, but no change of communication channel
+                 *      }
+                 *      then {
+                 *          the IUT periodically sends out SAM via a suited access technology selected by the CI selection manager with the requested repetition rate, inviting for a reply
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/HR/BV/03 + */ + testcase TC_FSAP_SP_HR_BV_03() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var SAM v_sam; + timer t_minRetransTimer := f_getIutSamRetransmitTimer(); + timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); + var boolean v_firstMessageReceived := false; + var boolean v_samNotificationReceived := false; + + // Test control + if (not(PICS_FSAP_ROLE_SP and PICS_ROLE_RH)) { + log("*** TC_FSAP_SP_HR_BV_03: ERROR: 'PICS_FSAP_ROLE_SP AND PICS_ROLE_RH' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // Assume that 'Initial conditions' are achieved + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_HR_BV_03: INFO: Preamble: IUT was setup properly ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGCscheduleWithNonIp(), + f_getIutServiceDataRegWithSession() + ); + log("*** TC_FSAP_SP_HR_BV_03: INFO: GCregServer registration request done ***"); + // Clause 'then' + log("*** TC_FSAP_SP_HR_BV_02: DEBUG: expected template: ", + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherRemoteCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherRemoteCiid()) + ), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutMedTypeOtherLocalCiid()) + )))); + tc_ac.start; + alt { + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherRemoteCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherRemoteCiid()) + ), + mw_linkId(f_getIutRemoteDestCiidBc(), (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherLocalCiid())) + )))) -> value v_fsapInd { + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); +// log("*** TC_FSAP_SP_HR_BV_03: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2sam(v_fntpNpdu.body, c_tbDone, v_sam); + log( + "*** TC_FSAP_SP_HR_BV_03: INFO: Expected SAM: ", + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithSessionAndNoChangeChannel()), + " ***"); + log("*** TC_FSAP_SP_HR_BV_03: INFO: SAM: ", v_sam, " ***"); + if (match( + v_sam, + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithSessionAndNoChangeChannel() + ))) { + if (v_firstMessageReceived == false) { // First message is reached, start timer now + v_firstMessageReceived := true; + t_maxRetransTimer.start; + tc_ac.start; + repeat; + } else { + if (v_samNotificationReceived == false) { + v_samNotificationReceived := true; + t_minRetransTimer.start; + t_maxRetransTimer.start; + // After the SAM received, check the retransmission + tc_ac.start; + repeat; + } + if (t_minRetransTimer.running) { + log("*** TC_FSAP_SP_HR_BV_03: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); + t_minRetransTimer.stop; + t_maxRetransTimer.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + t_maxRetransTimer.stop; + log("*** TC_FSAP_SP_HR_BV_03: PASS: SAM transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } + } else { + log("*** TC_FSAP_SP_HR_BV_03: FAIL: Unexpected SAM PDU ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + log("*** TC_FSAP_SP_HR_BV_03: FAIL: Unknown IN-SAP message received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] t_minRetransTimer.timeout { + log("*** TC_FSAP_SP_HR_BV_03: INFO: Ready for retransmission ***"); + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** TC_FSAP_SP_HR_BV_03: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + [] tc_ac.timeout { + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SP_HR_BV_03: INCONC: Expected management message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_HR_BV_03: INFO: Test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf01Down(); + + } // End of testcase TC_FSAP_SP_HR_BV_03 + + /** + * @desc Registration of ITS-S application with need for a session, with no request of specific access technology, and with request to change communication channel for session phase + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND PICS_ROLE_RH AND PICS_FSAP_MULTIPLE_AL_TECHNOLOGIES
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT knows a suitable access technology
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request for an ITS-S application requiring non-IP communications, and 
+                 * requiring change of communication channel in the session phase
+                 *      }
+                 *      then {
+                 *          the IUT periodically sends out SAM via a suited access technology selected by the CI selection manager with the requested repetition rate, inviting for a reply, requesting a change of channel
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/HR/BV/04 + */ + testcase TC_FSAP_SP_HR_BV_04() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var SAM v_sam; + timer t_minRetransTimer := f_getIutSamRetransmitTimer(); + timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); + var boolean v_firstMessageReceived := false; + var boolean v_samNotificationReceived := false; + + // Test control + if (not(PICS_FSAP_ROLE_SP and PICS_ROLE_RH)) { + log("*** TC_FSAP_SP_HR_BV_04: ERROR: 'PICS_FSAP_ROLE_SP AND PICS_ROLE_RH' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + /*** + * ITS-S shall be configured in a such way that a message in sent on the cfPort (management) to change the providerPort' + * Problem: The managment message is not defined yet (2012/09/16) + */ + + // Preamble + // Clause 'Initial conditions' + // Assume that 'Initial conditions' are achieved + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_HR_BV_04: INFO: Preamble: IUT was setup properly ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGCscheduleWithNonIp(), + f_getIutServiceDataRegWithNoSessionAndChannelChange() + ); + log("*** TC_FSAP_SP_HR_BV_04: INFO: GCregServer registration request done ***"); + // Clause 'then' + tc_ac.start; + alt { + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherRemoteCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherRemoteCiid()) + ), + mw_linkId(f_getIutRemoteDestCiidBc(), (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherRemoteCiid())) + )))) -> value v_fsapInd { + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); +// log("*** TC_FSAP_SP_HR_BV_04: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2sam(v_fntpNpdu.body, c_tbDone, v_sam); + log( + "*** TC_FSAP_SP_HR_BV_04: INFO: Expected SAM: ", + mw_sam_channelList( + f_getIutClientId(), + f_getIutServicelistWithSessionAndChangeChannel(), + { + mw_sessionChannel( + f_getIutServicelistWithSessionAndChangeChannel()[0].sessionChannel + ) + } + ), + " ***"); + log("*** TC_FSAP_SP_HR_BV_04: INFO: SAM: ", v_sam, " ***"); + if (match( + v_sam, + mw_sam_channelList( + f_getIutClientId(), + f_getIutServicelistWithSessionAndChangeChannel(), + { + mw_sessionChannel( + f_getIutServicelistWithSessionAndChangeChannel()[0].sessionChannel + ) + } + ))) { + if (v_firstMessageReceived == false) { // First message is reached, start timer now + v_firstMessageReceived := true; + t_maxRetransTimer.start; + tc_ac.start; + repeat; + } else { + if (v_samNotificationReceived == false) { + v_samNotificationReceived := true; + t_minRetransTimer.start; + t_maxRetransTimer.start; + // After the SAM received, check the retransmission + tc_ac.start; + repeat; + } + if (t_minRetransTimer.running) { + log("*** TC_FSAP_SP_HR_BV_04: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); + t_minRetransTimer.stop; + t_maxRetransTimer.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + t_maxRetransTimer.stop; + log("*** TC_FSAP_SP_HR_BV_04: PASS: SAM transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } + } else { + log("*** TC_FSAP_SP_HR_BV_04: FAIL: Unexpected SAM PDU ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + log("*** TC_FSAP_SP_HR_BV_04: FAIL: Unknown IN-SAP message received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] t_minRetransTimer.timeout { + log("*** TC_FSAP_SP_HR_BV_04: INFO: Ready for retransmission ***"); + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** TC_FSAP_SP_HR_BV_04: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + [] tc_ac.timeout { + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SP_HR_BV_04: INCONC: Expected management message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_HR_BV_04: INFO: Test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf01Down(); + + } // End of testcase TC_FSAP_SP_HR_BV_04 + + /** + * @desc Finalization of SIP upon reception of CTX for non-IP session + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND PICS_ROLE_RH AND PICS_SIP_W_CTX
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT sending out periodically SAMs for one ITS-S application with non-IP based sessions
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a CTX as proper reply to a SAM
+                 *      }
+                 *      then {
+                 *          the IUT generates a GCctx message to notify of reception of CTX
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/HR/BV/05 + */ + testcase TC_FSAP_SP_HR_BV_05() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var SAM v_sam; + + // Test control + if (not(PICS_FSAP_ROLE_SP and PICS_ROLE_RH and PICS_SIP_W_CTX)) { + log("*** TC_FSAP_SP_HR_BV_05: ERROR: 'PICS_FSAP_ROLE_SP AND PICS_ROLE_RH AND PICS_SIP_W_CTX' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_regServer( + f_getIutGcScheduleWithAccessTechAndNonIp(), +// f_getIutGcScheduleWithAccessTechAndNonIp(), // For debug purpose: f_getIutGcScheduleLongTPeriodTimeWithAccessTechAndNonIp(), + f_getIutServiceDataRegWithSession() + ); + // Check that the first SAM message was sent + tc_wait.start; + alt { + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + f_getIutMedTypeIso21215LocalCiid() + ), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutMedTypeIso21215LocalCiid()) + )))) -> value v_fsapInd { + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); + log("*** TC_FSAP_SP_HR_BV_05: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2sam(v_fntpNpdu.body, c_tbDone, v_sam); + log( + "*** TC_FSAP_SP_HR_BV_05: INFO: Expected SAM: ", + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithSessionAndNoChangeChannel()), + " ***"); + log("*** TC_FSAP_SP_HR_BV_05: INFO: SAM: ", v_sam, " ***"); + if (not match( + v_sam, + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithNoSessionAndNoChannelChange() + ))) { // preambule is done + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_HR_BV_05: INFO: Preamble: IUT was setup properly ***"); + } else { + log("*** TC_FSAP_SP_HR_BV_05: FAIL: SAM message not received yet ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + log("*** TC_FSAP_SP_HR_BV_05: FAIL: Unknown IN-SAP message received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + f_deregServer(); + log("*** TC_FSAP_SP_HR_BV_05: INCONC: Expected management message not received ***"); + } + } // End of 'alt' statement + + // Test Body + // Clause 'when' + f_sendCtx( + { portLong := c_portSam } , + { portLong := c_portSam }, + m_ctx_noip( + f_getLocalClientId(), // Same is expected in GcCTX + m_nonIpContext( + v_sam.serviceList[0].serviceID, + v_sam.serviceList[0].serviceData, + v_sam.serviceList[0].serverPort + ) + ) + ); + log("*** TC_FSAP_SP_HR_BV_05: INFO: CTX registration request done ***"); + // Clause 'then' + log("*** TC_FSAP_SP_HR_BV_05: DEBUG: Expected GcCTX template: ", + mw_fsapGcCtx( + mdw_gCctx( + f_getIutApplicationId(), + f_getLocalClientId(), // Same as in CTX + mdw_ctxServiceDataNonIp( + v_sam.serviceList[0].serviceID, + ?, + v_sam.serviceList[0].serverPort + )))); + tc_ac.start; + alt { + [] utPort.receive( + mw_fsapGcCtx( + mdw_gCctx( + f_getIutApplicationId(), + f_getLocalClientId(), // Same as in CTX + mdw_ctxServiceDataNonIp( + v_sam.serviceList[0].serviceID, + ?, + v_sam.serviceList[0].serverPort + )))) { + tc_ac.stop; + // And check for a MF-SAP.MF-REQUESTD/CTXrxNot message sent to the Groupcast Manager entity to update the forwarding table + if (PICS_ITS_MGT_NOT) { + f_fsapAwaitCtxRxNot( + m_ctxRxNot( + m_llServiceAddr( + m_linkId( + f_getIutWlLocalCiid(), + f_getIutWlLocalCiid())), + mdw_ctx(f_getIutClientId()) + ) + ); + } + log("*** TC_FSAP_SP_HR_BV_05: PASS: GCctx notification sent as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + [] utPort.receive(UtFsapEventInd:?) { + tc_ac.stop; + log("*** TC_FSAP_SP_HR_BV_05: FAIL: Unexpected GCctx message ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** TC_FSAP_SP_HR_BV_05: INCONC: Expected management message not received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_HR_BV_05: INFO: Test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf01Down(); + + } // End of testcase TC_FSAP_SP_HR_BV_05 + + } // End of group validBehavior + + group invalidBehavior { + + /** + * @desc Registration of ITS-S application for message distribution only (no session phase) with request of specific but not available access technology + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND PICS_ROLE_RH AND PICS_FSAP_MULTIPLE_AL_TECHNOLOGIES
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT does not know the requested access technology,
+                 *      the IUT knows another access technology suited for FSAP
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request for an ITS-S application for the purpose of message distribution
+                 *      }
+                 *      then {
+                 *          the IUT does not send out periodically SAMs via the existent access technology
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/HR/BI/01 + */ + testcase TC_FSAP_SP_HR_BI_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + + // Test control + if (not(PICS_FSAP_ROLE_SP and PICS_ROLE_RH)) { + log("*** TC_FSAP_SP_HR_BI_01: ERROR: 'PICS_FSAP_ROLE_SP AND PICS_ROLE_RH' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + fsapPort.clear; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_HR_BI_01: INFO: Preamble done ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGCscheduleWithUnknownAccessTechAndNonIp(), + f_getIutServiceDataRegWithNoSession() + ); + log("*** TC_FSAP_SP_HR_BI_01: INFO: GCregServer registration request sent ***"); + // Clause 'then' + tc_noac.start; // No message expected + alt { + [] fsapPort.receive { + tc_noac.stop; + log("*** TC_FSAP_SP_HR_BI_01: FAIL: No message was expected ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** TC_FSAP_SP_HR_BI_01: PASS: No message received as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_HR_BI_01: INFO: test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf01Down(); + + } // End of testcase TC_FSAP_SP_HR_BI_01 + + /** + * @desc Registration of ITS-S application with need for a session, with no request of specific access technology which is not available, and without request to change communication channel for session phase + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND PICS_ROLE_RH
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT does not know a suitable access technology
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request for an ITS-S application offering a session phase
+                 *      }
+                 *      then {
+                 *          the IUT does not send out periodically SAMs
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/HR/BI/02 + */ + testcase TC_FSAP_SP_HR_BI_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + + // Test control + if (not(PICS_FSAP_ROLE_SP and PICS_ROLE_RH)) { + log("*** TC_FSAP_SP_HR_BI_02: ERROR: 'PICS_FSAP_ROLE_SP AND PICS_ROLE_RH' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_HR_BI_02: INFO: Preamble done ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGCscheduleWithUnknownAccessTechAndNonIp(), + f_getIutServiceDataRegWithSession() + ); + log("*** TC_FSAP_SP_HR_BI_02: INFO: GCregServer registration request sent ***"); + // Clause 'then' + tc_noac.start; // No message expected + alt { + [] fsapPort.receive { + tc_noac.stop; + log("*** TC_FSAP_SP_HR_BI_02: FAIL: No message was expected ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** TC_FSAP_SP_HR_BI_02: PASS: No message received as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_HR_BI_02: INFO: test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf01Down(); + + } // End of testcase TC_FSAP_SP_HR_BI_02 + + } // End of group invalidBehavior + + } // End of group combinedITS_S_Host_ITS_S_Router + + // 9.1.2 ITS-S host only + group its_S_HostOnly { + + group validBehavior { + + /** + * @desc Registration of ITS-S application for message distribution only (no session phase) with request of specific access technology available in an ITS-S router unit + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
+                 * Config Id: CF02
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT knows about availability of the requested access technology in an ITS-S router
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request for an ITS-S application including a required access technology
+                 *      }
+                 *      then {
+                 *          the IUT forwards this request to the proper ITS-S router ITS-SCU applying Inter-ITS-SCU communications
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/HO/BV/01 + */ + testcase TC_FSAP_SP_HO_BV_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var SAM v_sam; + timer t_minRetransTimer := f_getIutSamRetransmitTimer(); + timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); + var boolean v_firstMessageReceived := false; + var boolean v_samNotificationReceived := false; + + // Test control + if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { + log("*** TC_FSAP_SP_HO_BV_01: ERROR: 'PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_HO_BV_01: INFO: Preamble: IUT was setup properly ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGcScheduleWithAccessTechAndNonIp(), + f_getIutServiceDataRegWithNoSession() + ); + log("*** TC_FSAP_SP_HO_BV_01: INFO: GCregServer registration request done ***"); + // Clause 'then' + tc_ac.start; + alt { + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( // TODO Check the step 'apply IICP' + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + f_getIutMedTypeIso21215LocalCiid() + ), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutMedTypeIso21215LocalCiid()) + )))) -> value v_fsapInd { + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); + log("*** TC_FSAP_SP_HO_BV_01: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2sam(v_fntpNpdu.body, c_tbDone, v_sam); + log( + "*** TC_FSAP_SP_HO_BV_01: INFO: Expected SAM: ", + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithNoSessionAndNoChannelChange()), + " ***"); + log("*** TC_FSAP_SP_HO_BV_01: INFO: SAM: ", v_sam, " ***"); + if (match( + v_sam, + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithNoSessionAndNoChannelChange() + ))) { + if (v_firstMessageReceived == false) { // First message is reached, start timer now + v_firstMessageReceived := true; + t_maxRetransTimer.start; + tc_ac.start; + repeat; + } else { + if (v_samNotificationReceived == false) { + v_samNotificationReceived := true; + t_minRetransTimer.start; + t_maxRetransTimer.start; + // After the SAM received, check the retransmission + tc_ac.start; + repeat; + } + if (t_minRetransTimer.running) { + log("*** TC_FSAP_SP_HO_BV_01: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); + t_minRetransTimer.stop; + t_maxRetransTimer.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + t_maxRetransTimer.stop; + log("*** TC_FSAP_SP_HO_BV_01: PASS: SAM transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } + } else { + log("*** TC_FSAP_SP_HO_BV_01: FAIL: Unexpected SAM message ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + log("*** TC_FSAP_SP_HO_BV_01: FAIL: Unknown FSAP message received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] t_minRetransTimer.timeout { + log("*** TC_FSAP_SP_HO_BV_01: INFO: Ready for retransmission ***"); + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** TC_FSAP_SP_HO_BV_01: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SP_HO_BV_01: INCONC: Expected management message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_HO_BV_01: INFO: Test body done ***"); + + // Postamble + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SP_HO_BV_01 + + /** + * @desc Registration of ITS-S application for message distribution only (no session phase) with no request of specific access technology + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
+                 * Config Id: CF02
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT knows about availability of a suitable access technology in an ITS-S router
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request for an ITS-S application
+                 *      }
+                 *      then {
+                 *          the IUT forwards this request to the proper ITS-S router ITS-SCU applying Inter-ITS-SCU communications
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/HO/BV/02 + */ + testcase TC_FSAP_SP_HO_BV_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var SAM v_sam; + timer t_minRetransTimer := f_getIutSamRetransmitTimer(); + timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); + var boolean v_firstMessageReceived := false; + var boolean v_samNotificationReceived := false; + + // Test control + if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { + log("*** TC_FSAP_SP_HO_BV_02: ERROR: 'PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + // Assume that 'Initial conditions' are achieved + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_HO_BV_02: INFO: Preamble: IUT was setup properly ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGCscheduleWithNonIp(), + f_getIutServiceDataRegWithNoSession() + ); + log("*** TC_FSAP_SP_HO_BV_02: INFO: GCregServer registration request done ***"); + // Clause 'then' + log("*** TC_FSAP_SP_HO_BV_02: DEBUG: expected template: ", + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherLocalCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + (f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherLocalCiid()) + ), + ? + )))); + tc_ac.start; + alt { + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherLocalCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + (f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherLocalCiid()) + ), + mw_linkId( + f_getIutRemoteDestCiidBc(), + ?) +// (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherLocalCiid())) + )))) -> value v_fsapInd { + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); +// log("*** TC_FSAP_SP_HO_BV_02: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2sam(v_fntpNpdu.body, c_tbDone, v_sam); + log( + "*** TC_FSAP_SP_HO_BV_02: INFO: Expected SAM: ", + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithNoSessionAndNoChannelChange()), + " ***"); + log("*** TC_FSAP_SP_HO_BV_02: INFO: SAM: ", v_sam, " ***"); + if (match( + v_sam, + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithNoSessionAndNoChannelChange() + ))) { + if (v_firstMessageReceived == false) { // First message is reached, start timer now + v_firstMessageReceived := true; + t_maxRetransTimer.start; + tc_ac.start; + repeat; + } else { + if (v_samNotificationReceived == false) { + v_samNotificationReceived := true; + t_minRetransTimer.start; + t_maxRetransTimer.start; + // After the SAM received, check the retransmission + tc_ac.start; + repeat; + } + if (t_minRetransTimer.running) { + log("*** TC_FSAP_SP_HO_BV_02: WARNING: SAM not transmitted at prescribed periodicity (too early) ***"); + t_minRetransTimer.stop; + t_maxRetransTimer.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + t_maxRetransTimer.stop; + log("*** TC_FSAP_SP_HO_BV_02: PASS: SAM transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } + } else { + log("*** TC_FSAP_SP_HO_BV_02: FAIL: Unexpected SAM PDU ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + log("*** TC_FSAP_SP_HO_BV_02: FAIL: Unknown IN-SAP message received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] t_minRetransTimer.timeout { + log("*** TC_FSAP_SP_HO_BV_02: INFO: Ready for retransmission ***"); + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** TC_FSAP_SP_HO_BV_02: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + [] tc_ac.timeout { + f_deregServer(); + log("*** TC_FSAP_SP_HO_BV_02: INCONC: Expected management message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_HO_BV_02: INFO: Test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SP_HO_BV_02 + + /** + * @desc Registration of ITS-S application with need for a session, with no request of specific access technology, and without request to change communication channel for session phase + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
+                 * Config Id: CF02
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT knows about availability of a suitable access technology in an ITS-S router
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request for an ITS-S application requiring non-IP communications in the session phase, but no change of communication channel
+                 *      }
+                 *      then {
+                 *          the IUT forwards this request to the proper ITS-S router ITS-SCU applying Inter-ITS-SCU communications
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/HO/BV/03 + */ + testcase TC_FSAP_SP_HO_BV_03() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var SAM v_sam; + timer t_minRetransTimer := f_getIutSamRetransmitTimer(); + timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); + var boolean v_firstMessageReceived := false; + var boolean v_samNotificationReceived := false; + + // Test control + if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { + log("*** TC_FSAP_SP_HO_BV_03: ERROR: 'PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_HO_BV_03: INFO: Preamble: IUT was setup properly ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGCscheduleWithNonIp(), + f_getIutServiceDataRegWithSession() + ); + log("*** TC_FSAP_SP_HO_BV_03: INFO: GCregServer registration request done ***"); + // Clause 'then' + tc_ac.start; + alt { + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherRemoteCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherRemoteCiid()) + ), + mw_linkId(f_getIutRemoteDestCiidBc(), (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherLocalCiid())) + )))) -> value v_fsapInd { + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); +// log("*** TC_FSAP_SP_HO_BV_03: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2sam(v_fntpNpdu.body, c_tbDone, v_sam); + log( + "*** TC_FSAP_SP_HO_BV_03: INFO: Expected SAM: ", + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithSessionAndNoChangeChannel()), + " ***"); + log("*** TC_FSAP_SP_HO_BV_03: INFO: SAM: ", v_sam, " ***"); + if (match( + v_sam, + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithSessionAndNoChangeChannel() + ))) { + if (v_firstMessageReceived == false) { // First message is reached, start timer now + v_firstMessageReceived := true; + t_maxRetransTimer.start; + tc_ac.start; + repeat; + } else { + if (v_samNotificationReceived == false) { + v_samNotificationReceived := true; + t_minRetransTimer.start; + t_maxRetransTimer.start; + // After the SAM received, check the retransmission + tc_ac.start; + repeat; + } + if (t_minRetransTimer.running) { + log("*** TC_FSAP_SP_HO_BV_03: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); + t_minRetransTimer.stop; + t_maxRetransTimer.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + t_maxRetransTimer.stop; + log("*** TC_FSAP_SP_HO_BV_03: PASS: SAM transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } + } else { + log("*** TC_FSAP_SP_HO_BV_03: FAIL: Unexpected SAM PDU ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + log("*** TC_FSAP_SP_HO_BV_03: FAIL: Unknown IN-SAP message received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] t_minRetransTimer.timeout { + log("*** TC_FSAP_SP_HO_BV_03: INFO: Ready for retransmission ***"); + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** TC_FSAP_SP_HO_BV_03: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SP_HO_BV_03: INCONC: Expected management message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_HO_BV_03: INFO: Test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SP_HO_BV_03 + + /** + * @desc Registration of ITS-S application with need for a session, with no request of specific access technology, and with request to change communication channel for session phase + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
+                 * Config Id: CF02
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT knows about availability of a suitable access technology in an ITS-S router
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request for an ITS-S application requiring non-IP communications, and requiring change of communication channel in the session phase
+                 *      }
+                 *      then {
+                 *          the IUT forwards this request to the proper ITS-S router ITS-SCU applying Inter-ITS-SCU communications
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/HO/BV/04 + */ + testcase TC_FSAP_SP_HO_BV_04() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var SAM v_sam; + timer t_minRetransTimer := f_getIutSamRetransmitTimer(); + timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); + var boolean v_firstMessageReceived := false; + var boolean v_samNotificationReceived := false; + + // Test control + if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { + log("*** TC_FSAP_SP_HO_BV_04: ERROR: 'PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_HO_BV_04: INFO: Preamble: IUT was setup properly ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGCscheduleWithNonIp(), + f_getIutServiceDataRegWithNoSessionAndChannelChange() + ); + log("*** TC_FSAP_SP_HO_BV_04: INFO: GCregServer registration request done ***"); + // Clause 'then' + tc_ac.start; + alt { + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherRemoteCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherRemoteCiid()) + ), + mw_linkId(f_getIutRemoteDestCiidBc(), (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherRemoteCiid())) + )))) -> value v_fsapInd { + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); +// log("*** TC_FSAP_SP_HO_BV_04: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2sam(v_fntpNpdu.body, c_tbDone, v_sam); + log( + "*** TC_FSAP_SP_HO_BV_04: INFO: Expected SAM: ", + mw_sam_channelList( + f_getIutClientId(), + f_getIutServicelistWithSessionAndChangeChannel(), + { + mw_sessionChannel( + f_getIutServicelistWithSessionAndChangeChannel()[0].sessionChannel + ) + } + ), + " ***"); + log("*** TC_FSAP_SP_HO_BV_04: INFO: SAM: ", v_sam, " ***"); + if (match( + v_sam, + mw_sam_channelList( + f_getIutClientId(), + f_getIutServicelistWithSessionAndChangeChannel(), + { + mw_sessionChannel( + f_getIutServicelistWithSessionAndChangeChannel()[0].sessionChannel + ) + } + ))) { + if (v_firstMessageReceived == false) { // First message is reached, start timer now + v_firstMessageReceived := true; + t_maxRetransTimer.start; + tc_ac.start; + repeat; + } else { + if (v_samNotificationReceived == false) { + v_samNotificationReceived := true; + t_minRetransTimer.start; + t_maxRetransTimer.start; + // After the SAM received, check the retransmission + tc_ac.start; + repeat; + } + if (t_minRetransTimer.running) { + log("*** TC_FSAP_SP_HO_BV_04: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); + t_minRetransTimer.stop; + t_maxRetransTimer.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + t_maxRetransTimer.stop; + log("*** TC_FSAP_SP_HO_BV_04: PASS: SAM transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } + } else { + log("*** TC_FSAP_SP_HO_BV_04: FAIL: Unexpected SAM PDU ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + log("*** TC_FSAP_SP_HO_BV_04: FAIL: Unknown IN-SAP message received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] t_minRetransTimer.timeout { + log("*** TC_FSAP_SP_HO_BV_04: INFO: Ready for retransmission ***"); + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** TC_FSAP_SP_HO_BV_04: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SP_HO_BV_04: INCONC: Expected management message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_HO_BV_04: INFO: Test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SP_HO_BV_04 + + /** + * @desc Finalization of SIP upon reception of CTX for non-IP session + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX
+                 * Config Id: CF02
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT awaiting reception of CTX messages
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a CTX as proper reply to a SAM
+                 *      }
+                 *      then {
+                 *          the IUT replies with the first session message (REQN or REQW) from the ITS-S application
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/HO/BV/05 + */ + testcase TC_FSAP_SP_HO_BV_05() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var SAM v_sam; + + // Test control + if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX)) { + log("*** TC_FSAP_SP_HO_BV_05: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_regServer( + f_getIutGcScheduleWithAccessTechAndNonIp(), +// f_getIutGcScheduleWithAccessTechAndNonIp(), // For debug purpose: f_getIutGcScheduleLongTPeriodTimeWithAccessTechAndNonIp(), + f_getIutServiceDataRegWithSession() + ); + // Check that the first SAM message was sent + tc_wait.start; + alt { + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + f_getIutMedTypeIso21215LocalCiid() + ), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutMedTypeIso21215LocalCiid()) + )))) -> value v_fsapInd { + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); + log("*** TC_FSAP_SP_HO_BV_05: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2sam(v_fntpNpdu.body, c_tbDone, v_sam); + log( + "*** TC_FSAP_SP_HO_BV_05: INFO: Expected SAM: ", + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithSessionAndNoChangeChannel()), + " ***"); + log("*** TC_FSAP_SP_HO_BV_05: INFO: SAM: ", v_sam, " ***"); + if (not match( + v_sam, + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithNoSessionAndNoChannelChange() + ))) { // preambule is done + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_HO_BV_05: INFO: Preamble: IUT was setup properly ***"); + } else { + log("*** TC_FSAP_SP_HO_BV_05: FAIL: SAM message not received yet ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + log("*** TC_FSAP_SP_HO_BV_05: FAIL: Unknown IN-SAP message received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + f_deregServer(); + log("*** TC_FSAP_SP_HO_BV_05: INCONC: Expected management message not received ***"); + } + } // End of 'alt' statement + + // Test Body + // Clause 'when' + f_sendCtx( + { portLong := c_portSam } , + { portLong := c_portSam }, + m_ctx_noip( + f_getLocalClientId(), // Same is expected in GcCTX + m_nonIpContext( + v_sam.serviceList[0].serviceID, + v_sam.serviceList[0].serviceData, + v_sam.serviceList[0].serverPort + ) + ) + ); + log("*** TC_FSAP_SP_HO_BV_05: INFO: CTX registration request done ***"); + // Clause 'then' + log("*** TC_FSAP_SP_HO_BV_05: DEBUG: Expected GcCTX template: ", + mw_fsapGcCtx( + mdw_gCctx( + f_getIutApplicationId(), + f_getLocalClientId(), // Same as in CTX + mdw_ctxServiceDataNonIp( + v_sam.serviceList[0].serviceID, + ?, + v_sam.serviceList[0].serverPort + )))); + tc_ac.start; + alt { + [] utPort.receive( + mw_fsapGcCtx( + mdw_gCctx( + f_getIutApplicationId(), + f_getLocalClientId(), // Same as in CTX + mdw_ctxServiceDataNonIp( + v_sam.serviceList[0].serviceID, + ?, + v_sam.serviceList[0].serverPort + )))) { + tc_ac.stop; + // And check for a MF-SAP.MF-REQUESTD/CTXrxNot message sent to the Groupcast Manager entity to update the forwarding table + if (PICS_ITS_MGT_NOT) { + f_fsapAwaitCtxRxNot( + m_ctxRxNot( + m_llServiceAddr( + m_linkId( + f_getIutWlLocalCiid(), + f_getIutWlLocalCiid())), + mdw_ctx(f_getIutClientId()) + ) + ); + } + log("*** TC_FSAP_SP_HO_BV_05: PASS: GCctx notification sent as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + [] utPort.receive(UtFsapEventInd:?) { + tc_ac.stop; + log("*** TC_FSAP_SP_HO_BV_05: FAIL: Unexpected GCctx message ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** TC_FSAP_SP_HO_BV_05: INCONC: Expected management message not received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_HO_BV_05: INFO: Test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SP_HO_BV_05 + + } // End of group validBehavior + + group invalidBehavior { + + /** + * @desc Registration of ITS-S application for message distribution only (no session phase) with request of specific but not available access technology + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
+                 * Config Id: CF02
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT does not know about existence of the requested access technology,
+                 *      the IUT knows about availability of a suitable access technology in an ITS-S router
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request for an ITS-S application for the purpose of message distribution
+                 *      }
+                 *      then {
+                 *          the IUT dows not forward this request to the proper ITS-S router ITS-SCU applying Inter-ITS-SCU communications
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/HO/BI/01 + */ + testcase TC_FSAP_SP_HO_BI_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + + // Test control + if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { + log("*** TC_FSAP_SP_HO_BI_01: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + fsapPort.clear; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_HO_BI_01: INFO: Preamble done ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGCscheduleWithUnknownAccessTechAndNonIp(), + f_getIutServiceDataRegWithNoSession() + ); + log("*** TC_FSAP_SP_HO_BI_01: INFO: GCregServer registration request sent ***"); + // Clause 'then' + tc_noac.start; // No message expected + alt { + [] fsapPort.receive { + tc_noac.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + log("*** TC_FSAP_SP_HO_BI_01: FAIL: No message was expected ***"); + } + [] tc_noac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_FSAP_SP_HO_BI_01: PASS: No message received as expected ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_HO_BI_01: INFO: test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SP_HO_BI_01 + + /** + * @desc Registration of ITS-S application with need for a session, with no request of specific access technology which is not available, and without request to change communication channel for session phase + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
+                 * Config Id: CF02
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT does not know about availability of a suitable access technology
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request for an ITS-S application offering a session phase
+                 *      }
+                 *      then {
+                 *          the IUT dows not forward this request to the proper ITS-S router ITS-SCU applying Inter-ITS-SCU communications
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/HO/BI/02 + */ + testcase TC_FSAP_SP_HO_BI_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + + // Test control + if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { + log("*** TC_FSAP_SP_HO_BI_02: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_HO_BI_02: INFO: Preamble done ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGCscheduleWithUnknownAccessTechAndNonIp(), + f_getIutServiceDataRegWithSession() + ); + log("*** TC_FSAP_SP_HO_BI_02: INFO: GCregServer registration request sent ***"); + // Clause 'then' + tc_noac.start; // No message expected + alt { + [] fsapPort.receive { + tc_noac.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + log("*** TC_FSAP_SP_HO_BI_02: FAIL: No message was expected ***"); + } + [] tc_noac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_FSAP_SP_HO_BI_02: PASS: No message received as expected ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_HO_BI_02: INFO: test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SP_HO_BI_02 + + } // End of group invalidBehavior + + } // End of group its_S_HostOnly + + // 9.1.3 ITS-S router only + group its_S_RouterOnly { + + group validBehavior { + + /** + * @desc Registration of ITS-S application for message distribution only (no session phase) with request of specific access technology + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
+                 * Config Id: CF02
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for SAM transmission,
+                 *      the IUT knows the requested access technology
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request via Inter-ITS-SCU communications for an ITS-S application including a required access technology and non-IP communications
+                 *      }
+                 *      then {
+                 *          the IUT periodically sends out SAM via the requested access technology with the requested repetition rate, not inviting for a reply
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/RO/BV/01 + */ + testcase TC_FSAP_SP_RO_BV_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var SAM v_sam; + timer t_minRetransTimer := f_getIutSamRetransmitTimer(); + timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); + var boolean v_firstMessageReceived := false; + var boolean v_samNotificationReceived := false; + + // Test control + if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { + log("*** TC_FSAP_SP_RO_BV_01: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_RO_BV_01: INFO: Preamble: IUT was setup properly ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGcScheduleWithAccessTechAndNonIp(), + f_getIutServiceDataRegWithNoSession() + ); + log("*** TC_FSAP_SP_RO_BV_01: INFO: GCregServer registration request done ***"); + // Clause 'then' + tc_ac.start; + t_maxRetransTimer.start; + alt { + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + f_getIutMedTypeIso21215LocalCiid() + ), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutMedTypeIso21215LocalCiid()) + )))) -> value v_fsapInd { + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); + log("*** TC_FSAP_SP_RO_BV_01: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2sam(v_fntpNpdu.body, c_tbDone, v_sam); + log( + "*** TC_FSAP_SP_RO_BV_01: INFO: Expected SAM: ", + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithNoSessionAndNoChannelChange()), + " ***"); + log("*** TC_FSAP_SP_RO_BV_01: INFO: SAM: ", v_sam, " ***"); + if (match( + v_sam, + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithNoSessionAndNoChannelChange() + ))) { + if (v_firstMessageReceived == false) { // First message is reached, start timer now + v_firstMessageReceived := true; + t_maxRetransTimer.start; + tc_ac.start; + repeat; + } else { + if (v_samNotificationReceived == false) { + v_samNotificationReceived := true; + t_minRetransTimer.start; + t_maxRetransTimer.start; + // After the SAM received, check the retransmission + tc_ac.start; + repeat; + } + if (t_minRetransTimer.running) { + log("*** TC_FSAP_SP_RO_BV_01: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); + t_minRetransTimer.stop; + t_maxRetransTimer.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + t_maxRetransTimer.stop; + log("*** TC_FSAP_SP_RO_BV_01: PASS: SAM transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } + } else { + log("*** TC_FSAP_SP_RO_BV_01: FAIL: Unexpected SAM message ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + log("*** TC_FSAP_SP_RO_BV_01: FAIL: Unknown FSAP message received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] t_minRetransTimer.timeout { + log("*** TC_FSAP_SP_RO_BV_01: INFO: Ready for retransmission ***"); + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** TC_FSAP_SP_RO_BV_01: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SP_RO_BV_01: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_RO_BV_01: INFO: Test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SP_RO_BV_01 + + /** + * @desc Registration of ITS-S application for message distribution only (no session phase) with no request of specific access technology + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT knows a suitable access technology
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request via Inter-ITS-SCU communications for an ITS-S application requiring non-IP communications
+                 *      }
+                 *      then {
+                 *          the IUT periodically sends out SAM via a suited access technology selected by the CI selection manager with the requested repetition rate, not inviting for a reply
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/RO/BV/02 + */ + testcase TC_FSAP_SP_RO_BV_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var SAM v_sam; + timer t_minRetransTimer := f_getIutSamRetransmitTimer(); + timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); + var boolean v_firstMessageReceived := false; + var boolean v_samNotificationReceived := false; + + // Test control + if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { + log("*** TC_FSAP_SP_RO_BV_02: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_RO_BV_02: INFO: Preamble: IUT was setup properly ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGCscheduleWithNonIp(), + f_getIutServiceDataRegWithNoSession() + ); + log("*** TC_FSAP_SP_RO_BV_02: INFO: GCregServer registration request done ***"); + // Clause 'then' + tc_ac.start; + alt { + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherLocalCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + (f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherLocalCiid()) + ), + mw_linkId( + f_getIutRemoteDestCiidBc(), + ?) +// (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherLocalCiid())) + )))) -> value v_fsapInd { + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); +// log("*** TC_FSAP_SP_RO_BV_02: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2sam(v_fntpNpdu.body, c_tbDone, v_sam); + log( + "*** TC_FSAP_SP_RO_BV_02: INFO: Expected SAM: ", + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithNoSessionAndNoChannelChange()), + " ***"); + log("*** TC_FSAP_SP_RO_BV_02: INFO: SAM: ", v_sam, " ***"); + if (match( + v_sam, + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithNoSessionAndNoChannelChange() + ))) { + if (v_firstMessageReceived == false) { // First message is reached, start timer now + v_firstMessageReceived := true; + t_maxRetransTimer.start; + tc_ac.start; + repeat; + } else { + if (v_samNotificationReceived == false) { + v_samNotificationReceived := true; + t_minRetransTimer.start; + t_maxRetransTimer.start; + // After the SAM received, check the retransmission + tc_ac.start; + repeat; + } + if (t_minRetransTimer.running) { + log("*** TC_FSAP_SP_RO_BV_02: WARNING: SAM not transmitted at prescribed periodicity (too early) ***"); + t_minRetransTimer.stop; + t_maxRetransTimer.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + t_maxRetransTimer.stop; + log("*** TC_FSAP_SP_RO_BV_02: PASS: SAM transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } + } else { + log("*** TC_FSAP_SP_RO_BV_02: FAIL: Unexpected SAM PDU ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + log("*** TC_FSAP_SP_RO_BV_02: FAIL: Unknown IN-SAP message received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] t_minRetransTimer.timeout { + log("*** TC_FSAP_SP_RO_BV_02: INFO: Ready for retransmission ***"); + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** TC_FSAP_SP_RO_BV_02: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SP_RO_BV_02: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_RO_BV_02: INFO: Test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SP_RO_BV_02 + + /** + * @desc Registration of ITS-S application with need for a session, with no request of specific access technology, and without request to change communication channel for session phase + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
+                 * Config Id: CF02
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT knows a suitable access technology
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request via Inter-ITS-SCU communications for an ITS-S application requiring non-IP communications
+                 *      }
+                 *      then {
+                 *          the IUT periodically sends out SAM via a suited access technology selected by the CI selection manager with the requested repetition rate, inviting for a reply
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/RO/BV/03 + */ + testcase TC_FSAP_SP_RO_BV_03() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var SAM v_sam; + timer t_minRetransTimer := f_getIutSamRetransmitTimer(); + timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); + var boolean v_firstMessageReceived := false; + var boolean v_samNotificationReceived := false; + + // Test control + if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { + log("*** TC_FSAP_SP_RO_BV_03: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_RO_BV_03: INFO: Preamble: IUT was setup properly ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGCscheduleWithNonIp(), + f_getIutServiceDataRegWithSession() + ); + log("*** TC_FSAP_SP_RO_BV_03: INFO: GCregServer registration request done ***"); + // Clause 'then' + tc_ac.start; + alt { + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherRemoteCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherRemoteCiid()) + ), + mw_linkId(f_getIutRemoteDestCiidBc(), (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherLocalCiid())) + )))) -> value v_fsapInd { + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); +// log("*** TC_FSAP_SP_RO_BV_03: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2sam(v_fntpNpdu.body, c_tbDone, v_sam); + log( + "*** TC_FSAP_SP_RO_BV_03: INFO: Expected SAM: ", + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithSessionAndNoChangeChannel()), + " ***"); + log("*** TC_FSAP_SP_RO_BV_03: INFO: SAM: ", v_sam, " ***"); + if (match( + v_sam, + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithSessionAndNoChangeChannel() + ))) { + if (v_firstMessageReceived == false) { // First message is reached, start timer now + v_firstMessageReceived := true; + t_maxRetransTimer.start; + tc_ac.start; + repeat; + } else { + if (v_samNotificationReceived == false) { + v_samNotificationReceived := true; + t_minRetransTimer.start; + t_maxRetransTimer.start; + // After the SAM received, check the retransmission + tc_ac.start; + repeat; + } + if (t_minRetransTimer.running) { + log("*** TC_FSAP_SP_RO_BV_03: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); + t_minRetransTimer.stop; + t_maxRetransTimer.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + t_maxRetransTimer.stop; + log("*** TC_FSAP_SP_RO_BV_03: PASS: SAM transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } + } else { + log("*** TC_FSAP_SP_RO_BV_03: FAIL: Unexpected SAM PDU ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + log("*** TC_FSAP_SP_RO_BV_03: FAIL: Unknown IN-SAP message received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] t_minRetransTimer.timeout { + log("*** TC_FSAP_SP_RO_BV_03: INFO: Ready for retransmission ***"); + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** TC_FSAP_SP_RO_BV_03: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SP_RO_BV_03: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_RO_BV_03: INFO: Test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SP_RO_BV_03 + + /** + * @desc Registration of ITS-S application with need for a session, with no request of specific access technology, and with request to change communication channel for session phase + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
+                 * Config Id: CF02
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT knows a suitable access technology
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request via Inter-ITS-SCU communications for an ITS-S application requiring non-IP communications, and requiring change of communication channel in the session phase
+                 *      }
+                 *      then {
+                 *          the IUT periodically sends out SAM via a suited access technology selected by the CI selection manager with the requested repetition rate, inviting for a reply, requesting a change of channel
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/RO/BV/04 + */ + testcase TC_FSAP_SP_RO_BV_04() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var SAM v_sam; + timer t_minRetransTimer := f_getIutSamRetransmitTimer(); + timer t_maxRetransTimer := f_getIutSamRetransmitTimer() + f_getIutSamMaxJitter(); + var boolean v_firstMessageReceived := false; + var boolean v_samNotificationReceived := false; + + // Test control + if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { + log("*** TC_FSAP_SP_RO_BV_04: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_RO_BV_04: INFO: Preamble: IUT was setup properly ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGCscheduleWithNonIp(), + f_getIutServiceDataRegWithNoSessionAndChannelChange() + ); + log("*** TC_FSAP_SP_RO_BV_04: INFO: GCregServer registration request done ***"); + // Clause 'then' + tc_ac.start; + alt { + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid(), f_getIutMedTypeOtherRemoteCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherRemoteCiid()) + ), + mw_linkId(f_getIutRemoteDestCiidBc(), (f_getIutMedTypeIso21215LocalCiid(), f_getIutMedTypeOtherRemoteCiid())) + )))) -> value v_fsapInd { + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); +// log("*** TC_FSAP_SP_RO_BV_04: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2sam(v_fntpNpdu.body, c_tbDone, v_sam); + log( + "*** TC_FSAP_SP_RO_BV_04: INFO: Expected SAM: ", + mw_sam_channelList( + f_getIutClientId(), + f_getIutServicelistWithSessionAndChangeChannel(), + { + mw_sessionChannel( + f_getIutServicelistWithSessionAndChangeChannel()[0].sessionChannel + ) + } + ), + " ***"); + log("*** TC_FSAP_SP_RO_BV_04: INFO: SAM: ", v_sam, " ***"); + if (match( + v_sam, + mw_sam_channelList( + f_getIutClientId(), + f_getIutServicelistWithSessionAndChangeChannel(), + { + mw_sessionChannel( + f_getIutServicelistWithSessionAndChangeChannel()[0].sessionChannel + ) + } + ))) { + if (v_firstMessageReceived == false) { // First message is reached, start timer now + v_firstMessageReceived := true; + t_maxRetransTimer.start; + tc_ac.start; + repeat; + } else { + if (v_samNotificationReceived == false) { + v_samNotificationReceived := true; + t_minRetransTimer.start; + t_maxRetransTimer.start; + // After the SAM received, check the retransmission + tc_ac.start; + repeat; + } + if (t_minRetransTimer.running) { + log("*** TC_FSAP_SP_RO_BV_04: FAIL: SAM not transmitted at prescribed periodicity (too early) ***"); + t_minRetransTimer.stop; + t_maxRetransTimer.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + t_maxRetransTimer.stop; + log("*** TC_FSAP_SP_RO_BV_04: PASS: SAM transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } + } else { + log("*** TC_FSAP_SP_RO_BV_04: FAIL: Unexpected SAM PDU ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + log("*** TC_FSAP_SP_RO_BV_04: FAIL: Unknown IN-SAP message received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] t_minRetransTimer.timeout { + log("*** TC_FSAP_SP_RO_BV_04: INFO: Ready for retransmission ***"); + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** TC_FSAP_SP_RO_BV_04: INCONC: SAM not transmitted at prescribed periodicity (too late) ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SP_RO_BV_04: INCONC: Expected message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_RO_BV_04: INFO: Test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SP_RO_BV_04 + + /** + * @desc Finalization of SIP upon reception of CTX for non-IP session + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX
+                 * Config Id: CF02
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT sending out periodically SAMs for one ITS-S application with non-IP based sessions
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a CTX as proper reply to a SAM
+                 *      }
+                 *      then {
+                 *          the IUT forwards the notification of CTX reception to the proper ITS-S host applying Inter-ITS-SCU communications
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/RO/BV/05 + */ + testcase TC_FSAP_SP_RO_BV_05() runs on ItsCalm system ItsCalmSystem { + // Local variables + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var SAM v_sam; + + // Test control + if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX)) { + log("*** TC_FSAP_SP_RO_BV_05: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_regServer( + f_getIutGcScheduleWithAccessTechAndNonIp(), +// f_getIutGcScheduleWithAccessTechAndNonIp(), // For debug purpose: f_getIutGcScheduleLongTPeriodTimeWithAccessTechAndNonIp(), + f_getIutServiceDataRegWithSession() + ); + // Check that the first SAM message was sent + tc_wait.start; + alt { + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, f_getIutMedTypeIso21215RemoteCiid()), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + f_getIutMedTypeIso21215LocalCiid() + ), + mw_linkId(f_getIutRemoteDestCiidBc(), f_getIutMedTypeIso21215LocalCiid()) + )))) -> value v_fsapInd { + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); + log("*** TC_FSAP_SP_RO_BV_05: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2sam(v_fntpNpdu.body, c_tbDone, v_sam); + log( + "*** TC_FSAP_SP_RO_BV_05: INFO: Expected SAM: ", + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithSessionAndNoChangeChannel()), + " ***"); + log("*** TC_FSAP_SP_RO_BV_05: INFO: SAM: ", v_sam, " ***"); + if (not match( + v_sam, + mw_sam( + f_getIutClientId(), + f_getIutServicelistWithNoSessionAndNoChannelChange() + ))) { // preambule is done + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_RO_BV_05: INFO: Preamble: IUT was setup properly ***"); + } else { + log("*** TC_FSAP_SP_RO_BV_05: FAIL: SAM message not received yet ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + log("*** TC_FSAP_SP_RO_BV_05: FAIL: Unknown IN-SAP message received ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + f_deregServer(); + log("*** TC_FSAP_SP_RO_BV_05: INCONC: Expected management message not received ***"); + } + } // End of 'alt' statement + + // Test Body + // Clause 'when' + f_sendCtx( + { portLong := c_portSam } , + { portLong := c_portSam }, + m_ctx_noip( + f_getLocalClientId(), // Same is expected in GcCTX + m_nonIpContext( + v_sam.serviceList[0].serviceID, + v_sam.serviceList[0].serviceData, + v_sam.serviceList[0].serverPort + ) + ) + ); + log("*** TC_FSAP_SP_RO_BV_05: INFO: CTX registration request done ***"); + // Clause 'then' + tc_ac.start; + alt { + [] utPort.receive( + mw_fsapGcCtx( + mdw_gCctx( + f_getIutApplicationId(), + f_getLocalClientId(), // Same as in CTX + mdw_ctxServiceDataNonIp( + v_sam.serviceList[0].serviceID, + ?, + v_sam.serviceList[0].serverPort + )))) { + tc_ac.stop; + // And check for a MF-SAP.MF-REQUESTD/CTXrxNot message sent to the Groupcast Manager entity to update the forwarding table + if (PICS_ITS_MGT_NOT) { + f_fsapAwaitCtxRxNot( + m_ctxRxNot( + m_llServiceAddr( + m_linkId( + f_getIutWlLocalCiid(), + f_getIutWlLocalCiid())), + mdw_ctx(f_getIutClientId()) + ) + ); + } + log("*** TC_FSAP_SP_RO_BV_05: PASS: GCctx notification sent as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + [] utPort.receive(UtFsapEventInd:?) { + tc_ac.stop; + log("*** TC_FSAP_SP_RO_BV_05: FAIL: Unexpected GCctx message ***"); + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SP_RO_BV_05: INCONC: Expected management message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_RO_BV_05: INFO: Test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SP_RO_BV_05 + + } // End of group validBehavior + + group invalidBehavior { + + /** + * @desc Registration of ITS-S application for message distribution only (no session phase) with request of specific but not available access technology + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
+                 * Config Id: CF02
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT does not know the requested access technology,
+                 *      the IUT knows another access technology suited for FSAP
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request via Inter-ITS-SCU communications for an ITS-S application for the purpose of message distribution
+                 *      }
+                 *      then {
+                 *          the IUT does not send out periodically SAMs via the known access technology
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/RO/BI/01 + */ + testcase TC_FSAP_SP_RO_BI_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + + // Test control + if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { + log("*** TC_FSAP_SP_RO_BI_01: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + fsapPort.clear; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_RO_BI_01: INFO: Preamble done ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGCscheduleWithUnknownAccessTechAndNonIp(), + f_getIutServiceDataRegWithNoSession() + ); + log("*** TC_FSAP_SP_RO_BI_01: INFO: GCregServer registration request done ***"); + // Clause 'then' + tc_noac.start; // No message expected + alt { + [] fsapPort.receive { + tc_noac.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + log("*** TC_FSAP_SP_RO_BI_01: FAIL: No message was expected ***"); + } + [] tc_noac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_FSAP_SP_RO_BI_01: PASS: No message received as expected ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_RO_BI_01: INFO: test body done ***"); + + // Postamble + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SP_RO_BI_01 + + /** + * @desc Registration of ITS-S application with need for a session, with no request of specific access technology which is not available, and without request to change communication channel for session phase + *
+                 * Pics Selection: PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
+                 * Config Id: CF02
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having not registered any ITS-S application for service announcement,
+                 *      the IUT does not know a suitable access technology
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a GCregServer registration request via Inter-ITS-SCU communications for an ITS-S application offering a session phase
+                 *      }
+                 *      then {
+                 *          the IUT does not send out periodically SAMs
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SP/RO/BI/02 + */ + testcase TC_FSAP_SP_RO_BI_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + + // Test control + if (not(PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { + log("*** TC_FSAP_SP_RO_BI_02: ERROR: 'PICS_FSAP_ROLE_SP AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + log("*** TC_FSAP_SP_RO_BI_02: INFO: Preamble done ***"); + + // Test Body + // Clause 'when' + f_regServer( + f_getIutGCscheduleWithUnknownAccessTechAndNonIp(), + f_getIutServiceDataRegWithSession() + ); + log("*** TC_FSAP_SP_RO_BI_02: INFO: GCregServer registration request done ***"); + // Clause 'then' + tc_noac.start; // No message expected + alt { + [] fsapPort.receive { + tc_noac.stop; + f_deregServer(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + log("*** TC_FSAP_SP_RO_BI_02: FAIL: No message was expected ***"); + } + [] tc_noac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_FSAP_SP_RO_BI_02: PASS: No message received as expected ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SP_RO_BI_02: INFO: test body done ***"); + + // Postamble + f_deregServer(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SP_RO_BI_02 + + } // End of group invalidBehavior + + } // End of group its_S_RouterOnly + + } // End of group serviceProvider + + // 9.2 Service user + group serviceUser { + + // 9.2.1 Combined ITS-S host and ITS-S router + group combinedITS_S_Host_ITS_S_Router { + + group validBehavior { + + /** + * @desc Registration of ITS-S application for message distribution only (no session phase) with request of specific access technology + *
+                 * Pics Selection: PICS_FSAP_ROLE_SU AND PICS_ROLE_RH
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having received GCregClient, 
+                 *      and having properly registered any ITS-S application without a session 
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a SAM containing the expected ITS-AID
+                 *      }
+                 *      then {
+                 *          the IUT forwards the related message to the ITS-S application using GCsam
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SU/HR/BV/01 + */ + testcase TC_FSAP_SU_HR_BV_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + + // Test control + if (not(PICS_FSAP_ROLE_SU and PICS_ROLE_RH)) { + log("*** TC_FSAP_SU_HR_BV_01: ERROR: 'PICS_FSAP_ROLE_SU AND PICS_ROLE_RH' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_regClient( + f_getIutApplicationId(), + f_getIutServiceId(), + m_gCregClientWithNoSessionAndNoCtx( + f_getIutApplicationId(), + f_getIutServiceId() + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + log("*** TC_FSAP_SU_HR_BV_01: INFO: GCregClient registration request done ***"); + + // Test Body + // Clause 'when' + f_startServiceProvider( + f_getIutServicelistWithNoSessionAndNoChannelChange(), + { portLong := c_portSam }, + { portLong := c_portSam } + ); + log("*** TC_FSAP_SU_HR_BV_01: INFO: SAM messages sent periodically ***"); + // Clause 'then' + log( + "*** TC_FSAP_SU_HR_BV_01: INFO: Expected GcSam: ", + mw_fsapGcSam( + mw_gcSam( + f_getIutApplicationId(), + f_getIutClientId(), + mw_samDataServerciceWithAccessTechAndNonIp( + f_getIutServiceId(), + f_getIutServicelistWithNoSessionAndNoChannelChange()[0].serviceData, + f_getIutServicelistWithNoSessionAndNoChannelChange()[0].serverPort, + mw_sessionChannel(8) + ), + mw_llServiceAddr( + mw_linkId(f_getIutRemoteDestCiidBc(), ?) + ))), + " ***"); + tc_ac.start; + alt { + [] utPort.receive( + mw_fsapGcSam( + mw_gcSam( + f_getIutApplicationId(), + f_getIutClientId(), + mw_samDataServerciceWithAccessTechAndNonIp( + f_getIutServiceId(), + f_getIutServicelistWithNoSessionAndNoChannelChange()[0].serviceData, + f_getIutServicelistWithNoSessionAndNoChannelChange()[0].serverPort, + mw_sessionChannel(8) + ), + mw_llServiceAddr( + mw_linkId(f_getIutRemoteDestCiidBc(), ?) + )))) { + tc_ac.stop; + log("*** TC_FSAP_SU_HR_BV_01: PASS: GCsam notification as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + [] utPort.receive(UtFsapEventInd:?) { + tc_ac.stop; + log("*** TC_FSAP_SU_HR_BV_01: FAIL: Unexpected GCsam primitive ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** TC_FSAP_SU_HR_BV_01: INCONC: Expected FA.indication primitive not received ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + log("*** TC_FSAP_SU_HR_BV_01: INFO: Test body done ***"); + + // Postamble + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_poDefault(); + f_cf01Down(); + + } // End of testcase TC_FSAP_SU_HR_BV_01 + + /** + * @desc Reception of SAM with need for a session, without request to change communication channel for session phase, with need to send CTX + *
+                 * Pics Selection: PICS_FSAP_ROLE_SU AND PICS_ROLE_RH AND PIC_SIP_W_CTX AND PICS_FSAP_CHANGE_COMM_CHANNEL
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having received GCregClient, and having properly registered any ITS-S application with session initialisation using CTX 
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a SAM containing the expected ITS-AID
+                 *      }
+                 *      then {
+                 *          the IUT forwards the related message to the ITS-S application using GCsamctx, with is acknowledged providing a port number for the session
+                 *          the IUT sends the requested CTX containing the port number received in the acknowledgement
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SU/HR/BV/02 + */ + testcase TC_FSAP_SU_HR_BV_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + var UtFsapEventInd v_utFsapEventInd; + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var CTX v_ctx; + + // Test control + if (not(PICS_FSAP_ROLE_SU and PICS_ROLE_RH and PICS_SIP_W_CTX)) { + log("*** TC_FSAP_SU_HR_BV_02: ERROR: 'PICS_FSAP_ROLE_SU AND PICS_ROLE_RH' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_regClient( + f_getIutApplicationId(), + f_getIutServiceId(), + m_gCregClientWithSessionAndCtx( + f_getIutApplicationId(), + f_getIutServiceId(), + f_getContextData() + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + log("*** TC_FSAP_SU_HR_BV_02: INFO: GCregClient registration request done ***"); + + // Test Body + // Clause 'when' + f_startServiceProvider( + f_getIutServicelistWithSessionAndNoChangeChannel(), + { portLong := c_portSam }, + { portLong := c_portSam } + ); + log("*** TC_FSAP_SU_HR_BV_02: INFO: SAM messages sent ***"); + // Clause 'then' + log( + "*** TC_FSAP_SU_HR_BV_02: INFO: Expected GcSamCtx: ", + mw_fsapGcSamCtx( + mw_gcSamCtx( + f_getIutApplicationId(), + f_getIutClientId(), + mw_serviceInfo_nonipService( + f_getIutServiceId(), + f_getIutSessionPort() + ), + mw_llServiceAddr(mw_linkId(f_getIutRemoteDestCiidBc(), ?)) + )), + " ***"); + tc_ac.start; + alt { + [] utPort.receive( + mw_fsapGcSamCtx( + mw_gcSamCtx( + f_getIutApplicationId(), + f_getIutClientId(), + mw_serviceInfo_nonipService( + f_getIutServiceId(), + f_getIutSessionPort() + ), + mw_llServiceAddr(mw_linkId(f_getIutRemoteDestCiidBc(), ?)) + ))) -> value v_utFsapEventInd { // 1. The IUT forwards the related message to the ITS-S application using GCsamctx + tc_ac.stop; + log("*** TC_FSAP_SU_HR_BV_02: INFO: GCsamctx notification as expected, acknowledged providing a port number ", v_utFsapEventInd.faSapPrimitivesUp.servPrimitive.GCsamctx.serviceInfo.info.nonipService.providerPort, " ***"); + f_fsapGenerateFaPrimitiveWithoutConfirm( // 2. With is acknowledged providing a port number for the session + m_generateFaSapPrimitivesDown( + m_faSapPrimitivesDown_gcSamCtxConf( + m_gcSamCtxConf( + f_getIutApplicationId(), + v_utFsapEventInd.faSapPrimitivesUp.servPrimitive.GCsamctx.link, + f_getIutSessionPort() + ) + ) + ) + ); + log("*** TC_FSAP_SU_HR_BV_02: INFO: Start waiting for CTX on fsap port now ***"); + tc_ac.start; + repeat; + } + [] utPort.receive(UtFsapEventInd:?) -> value v_utFsapEventInd { + tc_ac.stop; + log("*** TC_FSAP_SU_HR_BV_02: FAIL: Unexpected FA.indication primitive: ,", v_utFsapEventInd, " ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, ?), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + ? + ), + mw_linkId(f_getIutRemoteDestCiidBc(), ?) + )))) -> value v_fsapInd { // 3. The IUT sends the requested CTX + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); + log("*** TC_FSAP_SU_HR_BV_02: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2ctx(v_fntpNpdu.body, c_tbDone, v_ctx); + log( + "*** TC_FSAP_SU_HR_BV_02: INFO: Expected CTX: ", + mdw_ctx_nonIpContext( + f_getIutClientId(), + mw_nonIpContext_contextdata( + f_getIutServiceId(), + f_getIutSessionPort(), + f_getContextData() + )), + " ***"); + log("*** TC_FSAP_SU_HR_BV_02: INFO: CTX: ", v_ctx, " ***"); + if (match( + v_ctx, + mdw_ctx_nonIpContext( + f_getIutClientId(), + mw_nonIpContext_contextdata( + f_getIutServiceId(), + f_getIutSessionPort(), + f_getContextData() + ) + ))) { + log("*** TC_FSAP_SU_HR_BV_02: PASS: CTX notification as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** TC_FSAP_SU_HR_BV_02: FAIL: Unexpected CTX notification ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + tc_ac.stop; + log("*** TC_FSAP_SU_HR_BV_02: FAIL: Unexpected IN-SAP primitive ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** TC_FSAP_SU_HR_BV_02: INCONC: Expected management message not received ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + log("*** TC_FSAP_SU_HR_BV_02: INFO: Test body done ***"); + + // Postamble + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_poDefault(); + f_cf01Down(); + + } // End of testcase TC_FSAP_SU_HR_BV_02 + + /** + * @desc Reception of SAM with need for a session, with request to change communication channel for session phase, with need to send CTX + *
+                 * Pics Selection: PICS_FSAP_ROLE_SU AND PICS_ROLE_RH AND PICS_SIP_W_CTX AND PICS_FSAP_CHANGE_COMM_CHANNEL
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having received GCregClient, and having properly registered any ITS-S application with session initialisation using CTX 
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a SAM containing the expected ITS-AID
+                 *      }
+                 *      then {
+                 *          the IUT forwards the related message to the ITS-S application using GCsamctx, with is acknowledged providing a port number for the session
+                 *          the IUT sends the requested CTX in the new channel containing the port number received in the acknowledgement
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SU/HR/BV/03 + */ + testcase TC_FSAP_SU_HR_BV_03() runs on ItsCalm system ItsCalmSystem { + // Local variables + var UtFsapEventInd v_utFsapEventInd; + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var CTX v_ctx; + + // Test control + if (not(PICS_FSAP_ROLE_SU and PICS_ROLE_RH and PICS_SIP_W_CTX)) { + log("*** TC_FSAP_SU_HR_BV_03: ERROR: 'PICS_FSAP_ROLE_SU AND PICS_ROLE_RH AND PICS_SIP_W_CTX' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_regClient( + f_getIutClientApplicationId(), + f_getIutServiceId(), + m_gCregClientWithSessionAndCtx( + f_getIutApplicationId(), + f_getIutServiceId(), + f_getContextData() + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + log("*** TC_FSAP_SU_HR_BV_03: INFO: GCregClient registration request done ***"); + + // Test Body + // Clause 'when' + f_startServiceProvider( + f_getIutServicelistWithSessionAndChangeChannel(), + { portLong := c_portSam }, + { portLong := c_portSam } + ); + log("*** TC_FSAP_SU_HR_BV_03: INFO: SAM messages sent ***"); + // Clause 'then' + log( + "*** TC_FSAP_SU_HR_BV_03: INFO: Expected GcSamCtx: ", + mw_fsapGcSamCtx( + mw_gcSamCtx( + f_getIutApplicationId(), + f_getLocalClientId(), + mw_serviceInfo_nonipService( + f_getIutServiceId(), + f_getIutSessionPort() + ), + mw_llServiceAddr(mw_linkId(f_getIutRemoteDestCiidBc(), ?)) + )), + " ***"); + tc_ac.start; + alt { + [] utPort.receive( + mw_fsapGcSamCtx( + mw_gcSamCtx( + f_getIutApplicationId(), + f_getIutServerId(), + mw_serviceInfo_nonipService( + f_getIutServiceId(), + f_getIutSessionPort() + ), + mw_llServiceAddr(mw_linkId(f_getIutRemoteDestCiidBc(), ?)) + ))) -> value v_utFsapEventInd { // 1. The IUT forwards the related message to the ITS-S application using GCsamctx + tc_ac.stop; + log("*** TC_FSAP_SU_HR_BV_03: INFO: GCsamctx notification as expected, acknowledged providing a port number ", v_utFsapEventInd.faSapPrimitivesUp.servPrimitive.GCsamctx.serviceInfo.info.nonipService.providerPort, " ***"); + f_fsapGenerateFaPrimitiveWithoutConfirm( // 2. With is acknowledged providing a port number for the session + m_generateFaSapPrimitivesDown( + m_faSapPrimitivesDown_gcSamCtxConf( + m_gcSamCtxConf( + f_getIutApplicationId(), + v_utFsapEventInd.faSapPrimitivesUp.servPrimitive.GCsamctx.link, + f_getIutSessionPort() + ) + ) + ) + ); + tc_ac.start; + repeat; + } + [] utPort.receive(UtFsapEventInd:?) { + tc_ac.stop; + log("*** TC_FSAP_SU_HR_BV_03: FAIL: Unexpected FA.indication primitive ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, ?), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + ? + ), + mw_linkId(f_getIutRemoteDestCiidBc(), ?) + )))) -> value v_fsapInd { // 3. The IUT sends the requested CTX + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); + log("*** TC_FSAP_SU_HR_BV_03: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2ctx(v_fntpNpdu.body, c_tbDone, v_ctx); + log( + "*** TC_FSAP_SU_HR_BV_03: INFO: Expected CTX: ", + mdw_ctx_nonIpContext( + f_getLocalClientId(), + mw_nonIpContext( + f_getIutServiceId(), + f_getIutSessionPort() + ) + ), + " ***"); + log("*** TC_FSAP_SU_HR_BV_03: INFO: CTX: ", v_ctx, " ***"); + if (match( + v_ctx, + mdw_ctx_nonIpContext( + f_getLocalClientId(), + mw_nonIpContext( + f_getIutServiceId(), + f_getIutSessionPort() + ) + ))) { + log("*** TC_FSAP_SU_HR_BV_03: PASS: CTX notification as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** TC_FSAP_SU_HR_BV_03: FAIL: Unexpected CTX notification ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [PICS_FSAP_FNTP == false] fsapPort.receive( + mw_fsapInd_nfSap( + mw_fsapNfSapPrimitiveReq( + ?, // TODO To ne enhanced + ?, + ? + ))) -> value v_fsapInd { // 3. The IUT sends the requested CTX + tc_ac.stop; + f_oct2ctx(v_fntpNpdu.body, c_tbDone, v_ctx); + log( + "*** TC_FSAP_SU_HR_BV_03: INFO: Expected CTX: ", + mdw_ctx_nonIpContext( + f_getLocalClientId(), + mw_nonIpContext( + f_getIutServiceId(), + f_getIutSessionPort() + ) + ), + " ***"); + log("*** TC_FSAP_SU_HR_BV_03: INFO: CTX: ", v_ctx, " ***"); + if (match( + v_ctx, + mdw_ctx_nonIpContext( + f_getLocalClientId(), + mw_nonIpContext( + f_getIutServiceId(), + f_getIutSessionPort() + ) + ))) { + log("*** TC_FSAP_SU_HR_BV_03: PASS: CTX notification as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** TC_FSAP_SU_HR_BV_03: FAIL: Unexpected CTX notification ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + tc_ac.stop; + log("*** TC_FSAP_SU_HR_BV_03: FAIL: Unexpected IN-SAP primitive ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SU_HR_BV_03: INCONC: Expected management message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SU_HR_BV_03: INFO: Test body done ***"); + + // Postamble + f_stopServiceProvider(); + f_poDefault(); + f_cf01Down(); + + } // End of testcase TC_FSAP_SU_HR_BV_03 + + /** + * @desc Reception of SAM with need for a session, with request to change communication channel for session phase, with need to send CTX + *
+                 * Pics Selection: PICS_FSAP_ROLE_SU AND PICS_ROLE_RH
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having registered ITS applications, but not the one offered in the SAM 
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a SAM containing an unwanted ITS-AID
+                 *      }
+                 *      then {
+                 *          the IUT discards the SAM without further actions
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SU/HR/BV/04 + */ + testcase TC_FSAP_SU_HR_BV_04() runs on ItsCalm system ItsCalmSystem { + // Local variables + + // Test control + if (not(PICS_FSAP_ROLE_SU and PICS_ROLE_RH)) { + log("*** TC_FSAP_SU_HR_BV_04: ERROR: 'PICS_FSAP_ROLE_SU AND PICS_ROLE_RH' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_regClient( + f_getIutApplicationId(), // FIXME To be tested with Commsignia, applicationId shall be the same during all the transactions session + f_getIutServiceId(), + m_gCregClientWithSessionAndCtx( + f_getIutApplicationId(), + f_getIutServiceId(), + f_getContextData() + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + log("*** TC_FSAP_SU_HR_BV_04: INFO: GCregClient registration request done ***"); + + // Test Body + // Clause 'when' + f_startServiceProvider( + f_getIutServicelistWithSessionAndChangeChannel(), + { portLong := c_portSam }, + { portLong := c_portSam } + ); + log("*** TC_FSAP_SU_HR_BV_04: INFO: SAM messages sent ***"); + // Clause 'then' + tc_noac.start; // No message expected on success + alt { + [] fsapPort.receive { + tc_noac.stop; + log("*** TC_FSAP_SU_HR_BV_04: FAIL: No message was expected ***"); + } + [] tc_noac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + log("*** TC_FSAP_SU_HR_BV_04: PASS: GCregClient registration request done ***"); + } + } // End of 'alt' statement + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // End of testcase TC_FSAP_SU_HR_BV_04 + + /** + * @desc Reception of SAM with need for a session, with request to change communication channel for session phase, with the requested channel being unknown + *
+                 * Pics Selection: PICS_FSAP_ROLE_SU AND PICS_ROLE_RH
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having received GCregClient, and having properly registered any ITS-S application
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a SAM containing the expected ITS-AID with a request to change to an unknown channel
+                 *      }
+                 *      then {
+                 *          the IUT discards the SAM without further actions
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SU/HR/BV/05 + */ + testcase TC_FSAP_SU_HR_BV_05() runs on ItsCalm system ItsCalmSystem { + // Local variables + + // Test control + if (not(PICS_FSAP_ROLE_SU and PICS_ROLE_RH)) { + log("*** TC_FSAP_SU_HR_BV_05: ERROR: 'PICS_FSAP_ROLE_SU AND PICS_ROLE_RH' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_regClient( + f_getIutApplicationId(), // FIXME To be tested with Commsignia, applicationId shall be the same during all the transactions session + f_getIutServiceId(), + m_gCregClientWithSessionAndCtx( + f_getIutApplicationId(), + f_getIutServiceId(), + f_getContextData() + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + log("*** TC_FSAP_SU_HR_BV_05: INFO: GCregClient registration request done ***"); + + // Test Body + // Clause 'when' + f_startServiceProvider( + f_getIutServicelistWithUnknownServiceId(), + { portLong := c_portSam }, + { portLong := c_portSam } + ); + log("*** TC_FSAP_SU_HR_BV_05: INFO: SAM messages sent ***"); + // Clause 'then' + tc_noac.start; // No message expected on success + alt { + [] fsapPort.receive { + tc_noac.stop; + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + log("*** TC_FSAP_SU_HR_BV_05: FAIL: No message was expected ***"); + } + [] tc_noac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_FSAP_SU_HR_BV_05: PASS: SAM message was discarded as expected ***"); + } + } // End of 'alt' statement + + // Postamble + f_stopServiceProvider(); + f_poDefault(); + f_cf01Down(); + + } // End of testcase TC_FSAP_SU_HR_BV_05 + + } // End of group validBehavior + + group invalidBehavior { + + } // End of group invalidBehavior + + } // End of group combinedITS_S_Host_ITS_S_Router + + // 9.2.2 ITS-S host only + group its_S_HostOnly { + + group validBehavior { + + /** + * @desc Reception of SAM with need for a session with need to send CTX + *
+                 * Pics Selection: PICS_FSAP_ROLE_SU AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX
+                 * Config Id: CF02
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having received GCregClient, 
+                 *      and having properly registered any ITS-S application with session initialisation using CTX 
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a SAM from the ITS-S router via Inter-ITS-SCU communications containing the expected ITS-AID
+                 *      }
+                 *      then {
+                 *          the IUT notifies reception of the SAM to the ITS-S application, which is acknowledged with a port number. 
+                 *          the IUT sends the requested CTX to the ITS-S router applying Inter-ITS-SCU communications containing the port number received in the acknowledgement
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SU/HO/BV/01 + */ + testcase TC_FSAP_SU_HO_BV_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + + // Test control + if (not(PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX)) { + log("*** TC_FSAP_SU_HO_BV_01: ERROR: 'PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_regClient( + f_getIutApplicationId(), + f_getIutServiceId(), + m_gCregClientWithNoSessionAndNoCtx( + f_getIutApplicationId(), + f_getIutServiceId() + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_timeout); + log("*** TC_FSAP_SU_HO_BV_01: INFO: GCregServer registration request done ***"); + + // Test Body + // Clause 'when' + f_startServiceProvider( + f_getIutServicelistWithNoSessionAndNoChannelChange(), + { portLong := c_portSam }, + { portLong := c_portSam } + ); + log("*** TC_FSAP_SU_HO_BV_01: INFO: SAM messages sent ***"); + // Clause 'then' + tc_ac.start; + alt { + // TODO the IUT sends the requested CTX to the ITS-S router applying Inter-ITS-SCU communications containing the port number received in the acknowledgement + [] utPort.receive( + mw_fsapGcSam( + mw_gcSam( + f_getIutApplicationId(), + f_getIutClientId(), + mw_samDataServerciceWithAccessTechAndNonIp( + f_getIutServiceId(), + f_getIutServicelistWithNoSessionAndNoChannelChange()[0].serviceData, + f_getIutServicelistWithNoSessionAndNoChannelChange()[0].serverPort, + mw_sessionChannel(8) + ), + mw_llServiceAddr( + mw_linkId(f_getIutRemoteDestCiidBc(), ?) + )))) { + tc_ac.stop; + log("*** TC_FSAP_SU_HO_BV_01: PASS: GCsam notification as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + [] utPort.receive(UtFsapEventInd:?) { + tc_ac.stop; + log("*** TC_FSAP_SU_HO_BV_01: FAIL: Unexpected GCsam primitive ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SU_HO_BV_01: INCONC: Expected management message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SU_HO_BV_01: INFO: Test body done ***"); + + // Postamble + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SU_HO_BV_01 + + /** + * @desc Reception of SAM with need for a session with need to send CTX with need to change communication channel + *
+                 * Pics Selection: PICS_FSAP_ROLE_SU AND (PICS_ROLE_HONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having received GCregClient, 
+                 *      and having properly registered any ITS-S application with session initialisation using CTX 
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a SAM from the ITS-S router via Inter-ITS-SCU communications containing the expected ITS-AID
+                 *      }
+                 *      then {
+                 *          the IUT notifies reception of the SAM to the ITS-S application, which is acknowledged with a port number. 
+                 *          the IUT sends the requested CTX to the ITS-S router applying Inter-ITS-SCU communications containing the port number received in the acknowledgement
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SU/HO/BV/02 + */ + testcase TC_FSAP_SU_HO_BV_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + var UtFsapEventInd v_utFsapEventInd; + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var CTX v_ctx; + + // Test control + if (not(PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX)) { + log("*** TC_FSAP_SU_HO_BV_02: ERROR: 'PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_regClient( + f_getIutApplicationId(), + f_getIutServiceId(), + m_gCregClientWithSessionAndCtx( + f_getIutApplicationId(), + f_getIutServiceId(), + f_getContextData() + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + log("*** TC_FSAP_SU_HO_BV_02: INFO: GCregServer registration request done ***"); + + // Test Body + // Clause 'when' + f_startServiceProvider( + f_getIutServicelistWithSessionAndChangeChannel(), + { portLong := c_portSam }, + { portLong := c_portSam } + ); + log("*** TC_FSAP_SU_HO_BV_02: INFO: SAM messages sent ***"); + // Clause 'then' + tc_ac.start; + alt { + [] utPort.receive( + mw_fsapGcSamCtx( + mw_gcSamCtx( + f_getIutApplicationId(), + f_getIutClientId(), + mw_serviceInfo_nonipService( + f_getIutServiceId(), + f_getIutSessionPort() + ), + mw_llServiceAddr(mw_linkId(f_getIutRemoteDestCiidBc(), ?)) + ))) -> value v_utFsapEventInd { // 1. The IUT forwards the related message to the ITS-S application using GCsamctx + tc_ac.stop; + log("*** TC_FSAP_SU_HO_BV_02: INFO: GCsamctx notification as expected, acknowledged providing a port number ", v_utFsapEventInd.faSapPrimitivesUp.servPrimitive.GCsamctx.serviceInfo.info.nonipService.providerPort, " ***"); + f_fsapGenerateFaPrimitiveWithoutConfirm( // 2. With is acknowledged providing a port number for the session + m_generateFaSapPrimitivesDown( + m_faSapPrimitivesDown_gcSamCtxConf( + m_gcSamCtxConf( + f_getIutApplicationId(), + v_utFsapEventInd.faSapPrimitivesUp.servPrimitive.GCsamctx.link, + f_getIutSessionPort() + ) + ) + ) + ); + log("*** TC_FSAP_SU_HO_BV_02: INFO: Start waiting for CTX on fsap port now ***"); + tc_ac.start; + repeat; + } + [] utPort.receive(UtFsapEventInd:?) -> value v_utFsapEventInd { + tc_ac.stop; + log("*** TC_FSAP_SU_HO_BV_02: FAIL: Unexpected FA.indication primitive: ,", v_utFsapEventInd, " ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, ?), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + ? + ), + mw_linkId(f_getIutRemoteDestCiidBc(), ?) + )))) -> value v_fsapInd { // 3. The IUT sends the requested CTX + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); + log("*** TC_FSAP_SU_HO_BV_02: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2ctx(v_fntpNpdu.body, c_tbDone, v_ctx); + log( + "*** TC_FSAP_SU_HO_BV_02: INFO: Expected CTX: ", + mdw_ctx_nonIpContext( + f_getIutClientId(), + mw_nonIpContext_contextdata( + f_getIutServiceId(), + f_getIutSessionPort(), + f_getContextData() + )), + " ***"); + log("*** TC_FSAP_SU_HO_BV_02: INFO: CTX: ", v_ctx, " ***"); + if (match( + v_ctx, + mdw_ctx_nonIpContext( + f_getIutClientId(), + mw_nonIpContext_contextdata( + f_getIutServiceId(), + f_getIutSessionPort(), + f_getContextData() + ) + ))) { + log("*** TC_FSAP_SU_HO_BV_02: PASS: CTX notification as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** TC_FSAP_SU_HO_BV_02: FAIL: Unexpected CTX notification ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + tc_ac.stop; + log("*** TC_FSAP_SU_HO_BV_02: FAIL: Unexpected IN-SAP primitive ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SU_HO_BV_02: INCONC: Expected management message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SU_HO_BV_02: INFO: Test body done ***"); + + // Postamble + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SU_HO_BV_02 + + } // End of group validBehavior + + group invalidBehavior { + + } // End of group invalidBehavior + + } // End of group its_S_HostOnly + + // 9.2.3 ITS-S router only + group its_S_RouterOnly { + + group validBehavior { + + /** + * @desc Reception of SAM for message distribution only (no session phase) + *
+                 * Pics Selection: PICS_FSAP_ROLE_SU AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW))
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having received GCregClient, 
+                 *      and having properly registered any ITS-S application without a session 
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a SAM containing the expected ITS-AID
+                 *      }
+                 *      then {
+                 *          the IUT forwards the related message to the ITS-S application using GCsam via Inter-ITS-SCU communications
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SU/RO/BV/01 + */ + testcase TC_FSAP_SU_RO_BV_01() runs on ItsCalm system ItsCalmSystem { + // Local variables + + // Test control + if (not(PICS_FSAP_ROLE_SU and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)))) { + log("*** TC_FSAP_SU_RO_BV_01: ERROR: 'PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_regClient( + f_getIutApplicationId(), + f_getIutServiceId(), + m_gCregClientWithNoSessionAndNoCtx( + f_getIutApplicationId(), + f_getIutServiceId() + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + log("*** TC_FSAP_SU_RO_BV_01: INFO: GCregClient registration request done ***"); + + // Test Body + // Clause 'when' + log("*** TC_FSAP_SU_RO_BV_01: INFO: SAM messages sent ***"); + f_startServiceProvider( + f_getIutServicelistWithNoSessionAndNoChannelChange(), + { portLong := c_portSam }, + { portLong := c_portSam } + ); + // Clause 'then' + tc_ac.start; + alt { + [] utPort.receive( + mw_fsapGcSam( + mw_gcSam( + f_getIutApplicationId(), + f_getIutClientId(), + mw_samDataServerciceWithAccessTechAndNonIp( + f_getIutServiceId(), + f_getIutServicelistWithNoSessionAndNoChannelChange()[0].serviceData, + f_getIutServicelistWithNoSessionAndNoChannelChange()[0].serverPort, + mw_sessionChannel(8) + ), + mw_llServiceAddr( + mw_linkId(f_getIutRemoteDestCiidBc(), ?) + )))) { + tc_ac.stop; + log("*** TC_FSAP_SU_HR_BV_01: PASS: GCsam notification as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + [] utPort.receive(UtFsapEventInd:?) { + tc_ac.stop; + log("*** TC_FSAP_SU_HR_BV_01: FAIL: Unexpected GCsam primitive ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SU_RO_BV_01: INCONC: Expected management message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SU_RO_BV_01: INFO: Test body done ***"); + + // Postamble + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SU_RO_BV_01 + + /** + * @desc Reception of SAM with need for a session with need to send CTX + *
+                 * Pics Selection: PICS_FSAP_ROLE_SU AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having received GCregClient, 
+                 *      and having properly registered any ITS-S application without a session 
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a SAM containing the expected ITS-AID
+                 *      }
+                 *      then {
+                 *          the IUT forwards the related message to the ITS-S application using GCsam via Inter-ITS-SCU communications
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SU/RO/BV/02 + */ + testcase TC_FSAP_SU_RO_BV_02() runs on ItsCalm system ItsCalmSystem { + // Local variables + var UtFsapEventInd v_utFsapEventInd; + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var CTX v_ctx; + + // Test control + if (not(PICS_FSAP_ROLE_SU and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX)) { + log("*** TC_FSAP_SU_RO_BV_02: ERROR: 'PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_regClient( + f_getIutApplicationId(), + f_getIutServiceId(), + m_gCregClientWithSessionAndCtx( + f_getIutApplicationId(), + f_getIutServiceId(), + f_getContextData() + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + log("*** TC_FSAP_SU_RO_BV_02: INFO: GCregServer registration request done ***"); + + // Test Body + // Clause 'when' + f_startServiceProvider( + f_getIutServicelistWithSessionAndNoChangeChannel(), + { portLong := c_portSam }, + { portLong := c_portSam } + ); + log("*** TC_FSAP_SU_RO_BV_02: INFO: SAM messages sent ***"); + + // Clause 'then' + tc_ac.start; + alt { + [] utPort.receive( + mw_fsapGcSamCtx( + mw_gcSamCtx( + f_getIutApplicationId(), + f_getIutClientId(), + mw_serviceInfo_nonipService( + f_getIutServiceId(), + f_getIutSessionPort() + ), + mw_llServiceAddr(mw_linkId(f_getIutRemoteDestCiidBc(), ?)) + ))) -> value v_utFsapEventInd { // 1. The IUT forwards the related message to the ITS-S application using GCsamctx + tc_ac.stop; + log("*** TC_FSAP_SU_RO_BV_02: INFO: GCsamctx notification as expected, acknowledged providing a port number ", v_utFsapEventInd.faSapPrimitivesUp.servPrimitive.GCsamctx.serviceInfo.info.nonipService.providerPort, " ***"); + f_fsapGenerateFaPrimitiveWithoutConfirm( // 2. With is acknowledged providing a port number for the session + m_generateFaSapPrimitivesDown( + m_faSapPrimitivesDown_gcSamCtxConf( + m_gcSamCtxConf( + f_getIutApplicationId(), + v_utFsapEventInd.faSapPrimitivesUp.servPrimitive.GCsamctx.link, + f_getIutSessionPort() + ) + ) + ) + ); + log("*** TC_FSAP_SU_RO_BV_02: INFO: Start waiting for CTX on fsap port now ***"); + tc_ac.start; + repeat; + } + [] utPort.receive(UtFsapEventInd:?) -> value v_utFsapEventInd { + tc_ac.stop; + log("*** TC_FSAP_SU_RO_BV_02: FAIL: Unexpected FA.indication primitive: ,", v_utFsapEventInd, " ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, ?), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + ? + ), + mw_linkId(f_getIutRemoteDestCiidBc(), ?) + )))) -> value v_fsapInd { // 3. The IUT sends the requested CTX + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); + log("*** TC_FSAP_SU_RO_BV_02: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2ctx(v_fntpNpdu.body, c_tbDone, v_ctx); + log( + "*** TC_FSAP_SU_RO_BV_02: INFO: Expected CTX: ", + mdw_ctx_nonIpContext( + f_getIutClientId(), + mw_nonIpContext_contextdata( + f_getIutServiceId(), + f_getIutSessionPort(), + f_getContextData() + )), + " ***"); + log("*** TC_FSAP_SU_RO_BV_02: INFO: CTX: ", v_ctx, " ***"); + if (match( + v_ctx, + mdw_ctx_nonIpContext( + f_getIutClientId(), + mw_nonIpContext_contextdata( + f_getIutServiceId(), + f_getIutSessionPort(), + f_getContextData() + ) + ))) { + log("*** TC_FSAP_SU_RO_BV_02: PASS: CTX notification as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** TC_FSAP_SU_RO_BV_02: FAIL: Unexpected CTX notification ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + tc_ac.stop; + log("*** TC_FSAP_SU_RO_BV_02: FAIL: Unexpected IN-SAP primitive ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SU_RO_BV_02: INCONC: Expected management message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SU_RO_BV_02: INFO: Test body done ***"); + + // Postamble + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SU_RO_BV_02 + + /** + * @desc Reception of SAM with need for a session with need to send CTX with need to change communication channel + *
+                 * Pics Selection: PICS_FSAP_ROLE_SU AND (PICS_ROLE_RONLY OR (PICS_ROLE_RH AND PICS_ITS_S_INW)) AND PICS_SIP_W_CTX
+                 * Config Id: CF01
+                 * Initial conditions: 
+                 *  with {
+                 *      the IUT having received GCregClient, 
+                 *      and having properly registered any ITS-S application with session initialisation using CTX
+                 *  }
+                 * Expected behaviour:
+                 *  ensure that {
+                 *      when { 
+                 *          the IUT having received a SAM containing the expected ITS-AID
+                 *      }
+                 *      then {
+                 *          the IUT forwards the related message to the ITS-S application using GCsamctx via Inter-ITS-SCU communications
+                 *      }
+                 *  }
+                 * 
+ * + * @version 1.1.2 + * @see ETSI TS 102 797-2 v1.1.2 TP/FSAP/SU/RO/BV/03 + */ + testcase TC_FSAP_SU_RO_BV_03() runs on ItsCalm system ItsCalmSystem { + // Local variables + var UtFsapEventInd v_utFsapEventInd; + var FNTPNPDU v_fntpNpdu; + var FsapInd v_fsapInd; + var CTX v_ctx; + + // Test control + if (not(PICS_FSAP_ROLE_SU and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX)) { + log("*** TC_FSAP_SU_RO_BV_03: ERROR: 'PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX' required for executing the TC ***"); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Test adapter configuration + + // Preamble + // Clause 'Initial conditions' + f_regClient( + f_getIutApplicationId(), + f_getIutServiceId(), + m_gCregClientWithSessionAndCtx( + f_getIutApplicationId(), + f_getIutServiceId(), + f_getContextData() + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + log("*** TC_FSAP_SU_RO_BV_03: INFO: GCregServer registration request done ***"); + + // Test Body + // Clause 'when' + f_startServiceProvider( + f_getIutServicelistWithSessionAndChangeChannel(), + { portLong := c_portSam }, + { portLong := c_portSam } + ); + log("*** TC_FSAP_SU_RO_BV_03: INFO: SAM messages sent ***"); + + // Clause 'then' + tc_ac.start; + alt { + [] utPort.receive( + mw_fsapGcSamCtx( + mw_gcSamCtx( + f_getIutApplicationId(), + f_getIutClientId(), + mw_serviceInfo_nonipService( + f_getIutServiceId(), + f_getIutSessionPort() + ), + mw_llServiceAddr(mw_linkId(f_getIutRemoteDestCiidBc(), ?)) + ))) -> value v_utFsapEventInd { // 1. The IUT forwards the related message to the ITS-S application using GCsamctx + tc_ac.stop; + log("*** TC_FSAP_SU_RO_BV_03: INFO: GCsamctx notification as expected, acknowledged providing a port number ", v_utFsapEventInd.faSapPrimitivesUp.servPrimitive.GCsamctx.serviceInfo.info.nonipService.providerPort, " ***"); + f_fsapGenerateFaPrimitiveWithoutConfirm( // 2. With is acknowledged providing a port number for the session + m_generateFaSapPrimitivesDown( + m_faSapPrimitivesDown_gcSamCtxConf( + m_gcSamCtxConf( + f_getIutApplicationId(), + v_utFsapEventInd.faSapPrimitivesUp.servPrimitive.GCsamctx.link, + f_getIutSessionPort() + ) + ) + ) + ); + log("*** TC_FSAP_SU_RO_BV_03: INFO: Start waiting for CTX on fsap port now ***"); + tc_ac.start; + repeat; + } + [] utPort.receive(UtFsapEventInd:?) -> value v_utFsapEventInd { + tc_ac.stop; + log("*** TC_FSAP_SU_RO_BV_03: FAIL: Unexpected FA.indication primitive: ,", v_utFsapEventInd, " ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [PICS_FSAP_FNTP == true] fsapPort.receive( + mw_fsapInd_inSap( + mw_fsapInSapPrimitiveReq( + mdw_inUnitDataReq( + mw_linkId( + (c_dniCiid, ?), // See ISO 21218 Table 6 - Address parameters in e.g. IN-UNITDATA.request for CIs using 48-bit MAC addresses + ? + ), + mw_linkId(f_getIutRemoteDestCiidBc(), ?) + )))) -> value v_fsapInd { // 3. The IUT sends the requested CTX + tc_ac.stop; + f_oct2npdu(v_fsapInd.msgIn.msgIn_in.servPrimitive.IN_UNITDATA_request.data, c_tbDone, v_fntpNpdu); + log("*** TC_FSAP_SU_RO_BV_03: INFO: FNTPPDU: ", v_fntpNpdu, " ***"); + f_oct2ctx(v_fntpNpdu.body, c_tbDone, v_ctx); + log( + "*** TC_FSAP_SU_RO_BV_03: INFO: Expected CTX: ", + mdw_ctx_nonIpContext( + f_getIutClientId(), + mw_nonIpContext_contextdata( + f_getIutServiceId(), + f_getIutSessionPort(), + f_getContextData() + )), + " ***"); + log("*** TC_FSAP_SU_RO_BV_03: INFO: CTX: ", v_ctx, " ***"); + if (match( + v_ctx, + mdw_ctx_nonIpContext( + f_getIutClientId(), + mw_nonIpContext_contextdata( + f_getIutServiceId(), + f_getIutSessionPort(), + f_getContextData() + ) + ))) { + log("*** TC_FSAP_SU_RO_BV_03: PASS: CTX notification as expected ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** TC_FSAP_SU_RO_BV_03: FAIL: Unexpected CTX notification ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] fsapPort.receive(?) { + tc_ac.stop; + log("*** TC_FSAP_SU_RO_BV_03: FAIL: Unexpected IN-SAP primitive ***"); + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] tc_ac.timeout { + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + log("*** TC_FSAP_SU_RO_BV_03: INCONC: Expected management message not received ***"); + } + } // End of 'alt' statement + log("*** TC_FSAP_SU_RO_BV_03: INFO: Test body done ***"); + + // Postamble + f_deregClient(f_getIutApplicationId()); + f_stopServiceProvider(); + f_poDefault(); + f_cf02Down(); + + } // End of testcase TC_FSAP_SU_RO_BV_03 + + } // End of group validBehavior + + group invalidBehavior { + + } // End of group invalidBehavior + + } // End of group its_S_RouterOnly + + } // End of group serviceUser + } // End of module ItsFsap_TestCases \ No newline at end of file diff --git a/ttcn/AtsFSAP/ItsFsap_TestControl.ttcn3 b/ttcn/AtsFSAP/ItsFsap_TestControl.ttcn3 index 8ae63f44758936382e5dbbfb0f68197e6591675d..a1c866ddd687a82b92d2076ae0b5c7e5c3afe6e6 100644 --- a/ttcn/AtsFSAP/ItsFsap_TestControl.ttcn3 +++ b/ttcn/AtsFSAP/ItsFsap_TestControl.ttcn3 @@ -1,101 +1,114 @@ -/** - * @author ETSI / STF422_EETS - * @version $URL:$ - * $Id:$ - * @desc test control file for Fast service advertisement protocol (ISO 24102-5) - */ -module ItsFsap_TestControl { - - // ATS FSAP - import from ItsFsap_TestCases { - testcase all - }; - - // LibIts - import from LibItsFsap_Pics all; - - // Test Execution - control { - -// 9.1 Service provider -// 9.1.1,4,5 Combined ITS-S host and ITS-S router - valid behavior - if (PICS_FSAP_ROLE_SP and PICS_ROLE_RH) { - execute(TC_FSAP_SP_HR_BV_01()); - execute(TC_FSAP_SP_HR_BV_02()); - execute(TC_FSAP_SP_HR_BV_03()); - execute(TC_FSAP_SP_HR_BV_04()); - } - if (PICS_FSAP_ROLE_SP and PICS_ROLE_RH and PICS_SIP_W_CTX) { - execute(TC_FSAP_SP_HR_BV_05()); - } - -// 9.1.1,4,5 Combined ITS-S host and ITS-S router - invalid behavior - if (PICS_FSAP_ROLE_SP and PICS_ROLE_RH) { - execute(TC_FSAP_SP_HR_BI_01()); - execute(TC_FSAP_SP_HR_BI_02()); - } - -// 9.1.2 ITS-S host only - valid behavior - if (PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))) { - execute(TC_FSAP_SP_HO_BV_01()); - execute(TC_FSAP_SP_HO_BV_02()); - execute(TC_FSAP_SP_HO_BV_03()); - execute(TC_FSAP_SP_HO_BV_04()); - } - if (PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX) { - execute(TC_FSAP_SP_HO_BV_05()); - } - -// 9.1.2 ITS-S host only - invalid behavior - if (PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))) { - execute(TC_FSAP_SP_HO_BI_01()); - execute(TC_FSAP_SP_HO_BI_02()); - } - -// 9.2 ITS-S router only - valid behavior - if (PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))) { - execute(TC_FSAP_SP_RO_BV_01()); - execute(TC_FSAP_SP_RO_BV_02()); - execute(TC_FSAP_SP_RO_BV_03()); - } - if (PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX) { - execute(TC_FSAP_SP_RO_BV_04()); - execute(TC_FSAP_SP_RO_BV_05()); - } - -// 9.x ITS-S router only - invalid behavior - if (PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))) { - execute(TC_FSAP_SP_RO_BI_01()); - execute(TC_FSAP_SP_RO_BI_02()); - } - -// 9.2 Service user -// 9.2.1 Combined ITS-S host and ITS-S router - valid behavior - if (PICS_FSAP_ROLE_SU and PICS_ROLE_RH) { - execute(TC_FSAP_SU_HR_BV_01()); - execute(TC_FSAP_SU_HR_BV_04()); - execute(TC_FSAP_SU_HR_BV_05()); - } - if (PICS_FSAP_ROLE_SU and PICS_ROLE_RH and PICS_SIP_W_CTX) { - execute(TC_FSAP_SU_HR_BV_02()); - execute(TC_FSAP_SU_HR_BV_03()); - } - -// 9.2.2 ITS-S host only - valid behavior - if (PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX) { - execute(TC_FSAP_SU_HO_BV_01()); - execute(TC_FSAP_SU_HO_BV_02()); - } - - // 9.2.3 ITS-S router only - valid behavior - if (PICS_FSAP_ROLE_SU and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))) { - execute(TC_FSAP_SU_RO_BV_01()); - } - - if (PICS_FSAP_ROLE_SU and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX) { - execute(TC_FSAP_SU_RO_BV_02()); - execute(TC_FSAP_SU_RO_BV_03()); - } - } // End of control - +/** + * @author ETSI / STF422_EETS + * @version $URL:$ + * $Id:$ + * @desc test control file for Fast service advertisement protocol (ISO 24102-5) + */ +module ItsFsap_TestControl { + + // LibCommon + + // ATS FSAP + import from ItsFsap_TestCases { + testcase all + }; + + // LibIts + import from LibItsFsap_Pics all; + + // Test Execution + control { + +// 9.1 Service provider +// 9.1.1,4,5 Combined ITS-S host and ITS-S router - valid behavior + if (PICS_FSAP_ROLE_SP and PICS_ROLE_RH) { + execute(TC_FSAP_SP_HR_BV_01()); + execute(TC_FSAP_SP_HR_BV_02()); + execute(TC_FSAP_SP_HR_BV_03()); + } + + if (PICS_FSAP_ROLE_SP and PICS_ROLE_RH and PICS_FSAP_MULTIPLE_AL_TECHNOLOGIES) { + execute(TC_FSAP_SP_HR_BV_04()); + } + + if (PICS_FSAP_ROLE_SP and PICS_ROLE_RH and PICS_SIP_W_CTX) { + execute(TC_FSAP_SP_HR_BV_05()); + } + +// 9.1.1,4,5 Combined ITS-S host and ITS-S router - invalid behavior + if (PICS_FSAP_ROLE_SP and PICS_ROLE_RH) { + execute(TC_FSAP_SP_HR_BI_01()); + } + + if (PICS_FSAP_ROLE_SP and PICS_ROLE_RH and PICS_FSAP_MULTIPLE_AL_TECHNOLOGIES) { + execute(TC_FSAP_SP_HR_BI_02()); + } + +// 9.1.2 ITS-S host only - valid behavior + if (PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))) { + execute(TC_FSAP_SP_HO_BV_01()); + execute(TC_FSAP_SP_HO_BV_02()); + execute(TC_FSAP_SP_HO_BV_03()); + execute(TC_FSAP_SP_HO_BV_04()); + } + if (PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX) { + execute(TC_FSAP_SP_HO_BV_05()); + } + +// 9.1.2 ITS-S host only - invalid behavior + if (PICS_FSAP_ROLE_SP and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))) { + execute(TC_FSAP_SP_HO_BI_01()); + execute(TC_FSAP_SP_HO_BI_02()); + } + +// 9.2 ITS-S router only - valid behavior + if (PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))) { + execute(TC_FSAP_SP_RO_BV_01()); + execute(TC_FSAP_SP_RO_BV_02()); + execute(TC_FSAP_SP_RO_BV_03()); + } + if (PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX) { + execute(TC_FSAP_SP_RO_BV_04()); + execute(TC_FSAP_SP_RO_BV_05()); + } + +// 9.x ITS-S router only - invalid behavior + if (PICS_FSAP_ROLE_SP and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))) { + execute(TC_FSAP_SP_RO_BI_01()); + execute(TC_FSAP_SP_RO_BI_02()); + } + +// 9.2 Service user +// 9.2.1 Combined ITS-S host and ITS-S router - valid behavior + if (PICS_FSAP_ROLE_SU and PICS_ROLE_RH) { + execute(TC_FSAP_SU_HR_BV_01()); + } + + if (PICS_FSAP_ROLE_SU and PICS_ROLE_RH and PICS_SIP_W_CTX and PICS_FSAP_CHANGE_COMM_CHANNEL) { + execute(TC_FSAP_SU_HR_BV_02()); + execute(TC_FSAP_SU_HR_BV_03()); // Not applicable: + } + + if (PICS_FSAP_ROLE_SU and PICS_ROLE_RH and PICS_FSAP_CHANGE_COMM_CHANNEL) { + execute(TC_FSAP_SU_HR_BV_04()); + execute(TC_FSAP_SU_HR_BV_05()); // Not applicable: + } +// 9.2.2 ITS-S host only - valid behavior + if (PICS_FSAP_ROLE_SU and (PICS_ROLE_HONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX) { + execute(TC_FSAP_SU_HO_BV_01()); + execute(TC_FSAP_SU_HO_BV_02()); + } + + // 9.2.3 ITS-S router only - valid behavior + if (PICS_FSAP_ROLE_SU and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW))) { + execute(TC_FSAP_SU_RO_BV_01()); + } + + if (PICS_FSAP_ROLE_SU and (PICS_ROLE_RONLY or (PICS_ROLE_RH and PICS_ITS_S_INW)) and PICS_SIP_W_CTX) { + execute(TC_FSAP_SU_RO_BV_02()); + execute(TC_FSAP_SU_RO_BV_03()); + } + + } // End of control + } // End of module ItsFsap_TestControl \ No newline at end of file diff --git a/ttcn/AtsIICP/ItsIicp_TestCases.ttcn3 b/ttcn/AtsIICP/ItsIicp_TestCases.ttcn3 index 45485e395d3eb7c7948d9dc1cd2c0d81c0593592..fc03c07a51e36d6dbf7da208212e78afdb7c5502 100644 --- a/ttcn/AtsIICP/ItsIicp_TestCases.ttcn3 +++ b/ttcn/AtsIICP/ItsIicp_TestCases.ttcn3 @@ -16,32 +16,33 @@ module ItsIicp_TestCases { import from CALMmsap language "ASN.1:1997" { type CommandRef, - MF_Command, MN_Command , MI_Command, - MF_Request, MN_Request, MI_Request + MF_Command_request, MN_Command_request, MI_Command_request, + MF_Request_request, MN_Request_request, MI_Request_request, + MF_Command_confirm, MN_Command_confirm, MI_Command_confirm, + MI_Get_request, MI_Set_request, + MI_Get_confirm, MI_Set_confirm, + StateCInotify, FWTdelete, FWTdeleteConf }; import from LibItsFntp_TypesAndValues { const c_portSam; }; - import from LibItsIicp_TypesAndValues all; + import from LibItsIicp_TypesAndValues all; // TODO Remove 'all' import from LibItsIicp_Templates all; import from LibItsIicp_Functions all; import from LibItsIicp_Pixits all; import from LibItsIicp_Pics all; - import from LibItsMgt_TypesAndValues { - type IParamNoList, IParamList - }; import from LibItsMgt_Templates all; import from LibItsMgt_Functions { function - f_mgtMfTriggerRequest, f_mgtMnTriggerRequest, - f_getIutSourceItsScuId, f_getIutDestItsScuId, f_getIutOtherItsScuId, + f_getIutSourceItsScuId, f_getIutSourceItsScuIdAlive, f_getIutDestItsScuId, f_getIutOtherItsScuId, f_getIutMedType, f_getIutCiAccessClass, f_getIutCiClass, f_getNextCommandRef, f_getNextPduCounter }; - import from LibItsCalm_TestSystem all; import from LibItsCalm_Interface { - type ItsMgt, MgtMfSapCommandReq; - function f_utCommandRequestWithoutConfirm + type ItsCalm + }; + import from LibItsCalm_TestSystem { + type ItsCalmSystem }; // 8.1 Management @@ -59,7 +60,7 @@ module ItsIicp_TestCases { * the IUT having no knowledge about other ITS-SCUs in the SUT * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT starting * } @@ -71,11 +72,18 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/MGM/BV/01 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/MGM/BV/01 */ - testcase TC_IICP_MGM_BV_01() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_MGM_BV_01() runs on ItsCalm system ItsCalmSystem { // Local variables + timer t_minRetransTimer := f_getIutTaliveRetransmitTimer(); + timer t_maxRetransTimer := f_getIutTaliveRetransmitTimer() + f_getIutTaliveMaxJitter(); + var boolean v_firstMessageReceived := false; + +// log("*** TC_IICP_MGM_BV_01: t_minRetransTimer= ", f_getIutTaliveRetransmitTimer()); +// log("*** TC_IICP_MGM_BV_01: t_minRetransTimer= ", f_getIutTaliveRetransmitTimer() + f_getIutTaliveMaxJitter()); +// stop; // Test control if (not(PICS_IICP_MGM)) { @@ -96,25 +104,48 @@ module ItsIicp_TestCases { // Test Body // Clause 'when' - action("Start IUT"); // FIXME I have no idea on how to trigger this kind of event + // Clause 'then' + iicpPort.clear; tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_scuAlive( - 0, // Used to indicate "own/local ITS-SCU" (ISO/WD 24102-4 Table 2 — ITS-SCU-ID value assignment) - 65535, // Broadcast - mw_scuAlive( - 255, // ITS-SCUalive (new) message - f_getIutLocalItsType() - ) - )))) { + [] iicpPort.receive( + mw_iicpIndReq( + mdw_iicRequestTx_scuAlive( + f_getIutSourceItsScuIdAlive(), // Used to indicate "own/local ITS-SCU" (ISO/WD 24102-4 Table 2 — ITS-SCU-ID value assignment) + 65535, // Broadcast + mw_scuAlive( + 255, // ITS-SCUalive (new) message + f_getIutLocalItsType() + ) + ))) { tc_ac.stop; - log("*** TC_IICP_MGM_BV_01: INFO: The IUT has generated a MF-COMMAND IICrequestTX ***"); - tc_ac.start; - repeat; // Wait for final condition + log("*** TC_IICP_MGM_BV_01: INFO: The IUT has generated a IIC_Request/SCUAlive ***"); + if (v_firstMessageReceived == false) { // First message is reached, start timer now + v_firstMessageReceived := true; + t_maxRetransTimer.start; + t_minRetransTimer.start; + repeat; + } else { + if (t_minRetransTimer.running) { + log("*** TC_IICP_MGM_BV_01: FAIL: IIC_Request/SCUAlive not transmitted at prescribed periodicity (too early) ***"); + t_minRetransTimer.stop; + t_maxRetransTimer.stop; + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + t_maxRetransTimer.stop; + log("*** TC_IICP_MGM_BV_01: PASS: IIC_Request/SCUAlive transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } + } + [] t_minRetransTimer.timeout { + log("*** TC_IICP_MGM_BV_01: INFO: Ready for retransmission ***"); + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** TC_IICP_MGM_BV_01: INCONC: IIC_Request/SCUAlive not transmitted at prescribed periodicity (too late) ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -139,7 +170,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an ITS-SCUalive (new) message without address conflict * } @@ -149,11 +180,12 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/MGM/BV/02 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/MGM/BV/02 */ - testcase TC_IICP_MGM_BV_02() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_MGM_BV_02() runs on ItsCalm system ItsCalmSystem { // Local variables +// var IicpInd v_iicpSim; // Test control if (not(PICS_IICP_MGM)) { @@ -168,44 +200,51 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_MGM_BV_02: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), // The ITS SCU-ID of the sender - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_scuAlive( - m_scuAlive( - 255, // ITS-SCUalive (new) message - f_getIutSourceItsScuType() - ) - ) + f_sendAliveMessage( + f_getIutSourceItsScuId(), // The ITS SCU-ID of the sender + f_getIutDestItsScuId(), + m_scuAlive( + 255, // ITS-SCUalive (new) message + f_getIutSourceItsScuType() ) ); log("*** TC_IICP_MGM_BV_02: INFO: ITS-SCUalive (new) message without address conflict triggered ***"); + log( + "*** TC_IICP_MGM_BV_02: DEBUG: Expected template: ", + mw_iicpIndResp( + mdw_iicResponseTx_scuAlive( + f_getIutDestItsScuId(), + f_getIutSourceItsScuId(), + mw_scuAlive( + 255, // ITS-SCUalive (new) message + f_getIutLocalItsType() + ), + 0 // Check why TTWB raises an error using duplicateITS-scuId + )), + "***"); // Clause 'then' + iicpPort.clear; tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicResponseTx( - mdw_iicResponseTx_scuAlive( - f_getIutLocalItsScuId(), // The IUT has its own ITS SCU-ID - 65535, // Broadcast - mw_scuAlive( - 255, // ITS-SCUalive (new) message - f_getIutLocalItsType() - ), - 0 // Check why TTWB raises an error using success // Succeed - )))) { + [] iicpPort.receive( + mw_iicpIndResp( + mdw_iicResponseTx_scuAlive( + f_getIutDestItsScuId(), + f_getIutSourceItsScuId(), + mw_scuAlive( + 0, + f_getIutLocalItsType() + ), + 0 // Check why TTWB raises an error using duplicateITS-scuId + ))) { tc_ac.stop; - log("*** TC_IICP_MGM_BV_02: INFO: The IUT has generated a MF-COMMAND IICresponseTX ***"); - tc_ac.start; + log("*** TC_IICP_MGM_BV_02: PASS: The IUT has generated a MF-COMMAND IICresponseTX ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -230,7 +269,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an ITS-SCUalive (new) message with address conflict, i.e. from an ITS-SCU having the same ITS-SCU-ID * } @@ -240,10 +279,10 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/MGM/BV/03 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/MGM/BV/03 */ - testcase TC_IICP_MGM_BV_03() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_MGM_BV_03() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control @@ -265,38 +304,29 @@ module ItsIicp_TestCases { // Test Body // Clause 'when' - f_iicpTriggerRequest( - m_iicRequest( - f_getIutLocalItsScuId(), // Both source and destination are identical ==> conflict expected - f_getIutLocalItsScuId(), - f_getNextPduCounter(), - m_pduRequest_scuAlive( - m_scuAlive( - 255, // ITS-SCUalive (new) message - f_getIutSourceItsScuType() - ) - ) - ) - ); + f_sendAliveMessage( + f_getIutDestItsScuId(), // Both source and destination are identical ==> conflict expected + f_getIutDestItsScuId(), + m_scuAlive( + 255, // ITS-SCUalive (new) message + f_getIutSourceItsScuType() + ) + ); log("*** TC_IICP_MGM_BV_03: INFO: ITS-SCUalive (new) message with address conflict triggered ***"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicResponseTx( - mdw_iicResponseTx_scuAlive( - f_getIutLocalItsScuId(), // The IUT has its own ITS SCU-ID - 65535, // Broadcast - mw_scuAlive( - 255, // ITS-SCUalive (new) message - f_getIutLocalItsType() - ), - 2 // Check why TTWB raises an error using duplicateITS-scuId - )))) { + [] iicpPort.receive( + mw_iicpIndResp( + mdw_iicResponseTx_scuAlive( + f_getIutDestItsScuId(), + 65535, + ?, + 2 // Check why TTWB raises an error using duplicateITS-scuId + ))) { tc_ac.stop; - log("*** TC_IICP_MGM_BV_03: PASS: The IUT has generated a MF-COMMAND IICresponseTX ***"); - tc_ac.start; + log("*** TC_IICP_MGM_BV_03: PASS: The IUT has detetcted the address conflict ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -321,7 +351,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an ITS-SCUalive (alive) message without address conflict * } @@ -331,11 +361,13 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/MGM/BV/04 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/MGM/BV/04 */ - testcase TC_IICP_MGM_BV_04() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_MGM_BV_04() runs on ItsCalm system ItsCalmSystem { // Local variables + var template (value) PduRequest v_pduRequest; + var template (value) VCI_info_res v_vCI_info_res; // Test control if (not(PICS_IICP_MGM)) { @@ -356,28 +388,19 @@ module ItsIicp_TestCases { // Test Body // Clause 'when' - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), // The ITS SCU-ID of the sender - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_scuAlive( - m_scuAlive( - 0, // ITS-SCUalive (alive) message - f_getIutSourceItsScuType() - ) - ) + f_sendAliveMessage( + f_getIutSourceItsScuId(), // The ITS SCU-ID of the sender + f_getIutDestItsScuId(), + m_scuAlive( + 0, // ITS-SCUalive (alive) message + f_getIutSourceItsScuType() ) ); log("*** TC_IICP_MGM_BV_04: INFO: TS-SCUalive (alive) message without address conflict triggered ***"); // Clause 'then' tc_noac.start; alt { - [] mgtMfSapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_IICP_MGM_BV_04: FAIL: No message was expected ***"); - } + // The default altstep manages unsollicited messages [] tc_noac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_IICP_MGM_BV_04: PASS: No message received as expected ***"); @@ -401,7 +424,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having transmitted an ITS-SCUalive (alive) message with DestinationITS-SCU-ID=65535 * and with SourceITS-SCU-ID equal to the own ITS-SCU ID, which does not result in an address conflict @@ -412,11 +435,14 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/MGM/BV/05 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/MGM/BV/05 */ - testcase TC_IICP_MGM_BV_05() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_MGM_BV_05() runs on ItsCalm system ItsCalmSystem { // Local variables + timer t_minRetransTimer; + timer t_maxRetransTimer; + var boolean v_firstMessageReceived := false; // Test control if (not(PICS_IICP_MGM)) { @@ -437,47 +463,44 @@ module ItsIicp_TestCases { // Test Body // Clause 'when' - tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_scuAlive( - f_getIutLocalItsScuId(), // The IUT has its own ITS SCU-ID - 65535, // Broadcast - mw_scuAlive( - 0, // ITS-SCUalive (ALIVE) message - f_getIutLocalItsType() - ))))) { + [] iicpPort.receive( + mw_iicpIndReq( + mdw_iicRequestTx_scuAlive( + f_getIutDestItsScuId(), + 65535, // Broadcast + mw_scuAlive( + 0, // ITS-SCUalive (alive) message + ? + ) + ))) { tc_ac.stop; - log("*** TC_IICP_MGM_BV_05: INFO: ITS-SCUalive (alive) message without address conflict triggered ***"); + log("*** TC_IICP_MGM_BV_05: INFO: The IUT has generated a IIC_Request/SCUAlive ***"); + if (v_firstMessageReceived == false) { // First message is reached, start timer now + v_firstMessageReceived := true; + t_maxRetransTimer.start(int2float(f_getIutTalive()) * 1.1); // Wait for 110% of Talive + t_minRetransTimer.start(int2float(f_getIutTalive()) * 0.9); // Wait for 90% of Talive + repeat; + } else { + if (t_minRetransTimer.running) { + log("*** TC_IICP_MGM_BV_05: FAIL: IIC_Request/SCUAlive not transmitted at prescribed periodicity (too early) ***"); + t_minRetransTimer.stop; + t_maxRetransTimer.stop; + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } else { + t_maxRetransTimer.stop; + log("*** TC_IICP_MGM_BV_05: PASS: IIC_Request/SCUAlive transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + } } - [] tc_ac.timeout { - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); - log("*** TC_IICP_MGM_BV_05: INCONC: Expected message not received ***"); + [] t_minRetransTimer.timeout { + log("*** TC_IICP_MGM_BV_05: INFO: Ready for retransmission ***"); + repeat; } - } // End of 'alt' statement - // Clause 'then' - mgtMfSapPort.stop; - f_sleep(int2float(f_getIutTalive()) * 0.8); // Wait for 80% of Talive - mgtMfSapPort.start; - tc_ac.start; - alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicResponseTx( - mdw_iicResponseTx_scuAlive( - f_getIutLocalItsScuId(), // The IUT has its own ITS SCU-ID - 65535, // Broadcast - mw_scuAlive( - 0, // ITS-SCUalive (alive) message - f_getIutLocalItsType() - ), - 2 // Check why TTWB raises an error using duplicateITS-scuId - )))) { - tc_ac.stop; - log("*** TC_IICP_MGM_BV_05: INFO: The IUT has generated a MF-COMMAND IICresponseTX ***"); - tc_ac.start; + [] t_maxRetransTimer.timeout { + log("*** TC_IICP_MGM_BV_05: INCONC: IIC_Request/SCUAlive not transmitted at prescribed periodicity (too late) ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -502,7 +525,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT wants to shut down and stop operation * } @@ -512,10 +535,10 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/MGM/BV/06 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/MGM/BV/06 */ - testcase TC_IICP_MGM_BV_06() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_MGM_BV_06() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control @@ -537,23 +560,22 @@ module ItsIicp_TestCases { // Test Body // Clause 'when' - action("Shutdown IUT"); // FIXME I have no idea on how to trigger this kind of event + action("Shutdown IUT"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_scuAlive( - f_getIutLocalItsScuId(), // The IUT has its own ITS SCU-ID - 65535, // Broadcast - mw_scuAlive( - 1, // ITS-SCUalive (delete) message - f_getIutLocalItsType() - ))))) { + [] iicpPort.receive( + mw_iicpIndReq( + mdw_iicRequestTx_scuAlive( + f_getIutDestItsScuId(), // The IUT has its own ITS SCU-ID + 65535, // Broadcast + mw_scuAlive( + 1, // ITS-SCUalive (delete) message + f_getIutLocalItsType() + )))) { tc_ac.stop; - log("*** TC_IICP_MGM_BV_06: INFO: The IUT has generated a MF-COMMAND IICresponseTX ***"); - tc_ac.start; + log("*** TC_IICP_MGM_BV_06: PASS: The IUT has generated a ITS-SCUalive (delete) message ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -582,7 +604,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an ITS-SCUalive (alive) message with address conflict , i.e. from an ITS-SCU having the same ITS-SCU-ID * } @@ -593,10 +615,10 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/MGM/BI/01 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/MGM/BI/01 */ - testcase TC_IICP_MGM_BI_01() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_MGM_BI_01() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control @@ -615,41 +637,32 @@ module ItsIicp_TestCases { // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_MGM_BI_01: INFO: Preamble: IUT was setup properly ***"); - + // Test Body // Clause 'when' - f_iicpTriggerRequest( - m_iicRequest( - f_getIutLocalItsScuId(), // Here is the address conflict - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_scuAlive( - m_scuAlive( - 0, // ITS-SCUalive (alive) message - f_getIutSourceItsScuType() - ) - ) + f_sendAliveMessage( + f_getIutDestItsScuId(), // Both source and destination are identical ==> conflict expected + f_getIutDestItsScuId(), + m_scuAlive( + 0, // ITS-SCUalive (alive) message + f_getIutSourceItsScuType() ) ); log("*** TC_IICP_MGM_BI_01: INFO: ITS-SCUalive (alive) message with address conflict triggered ***"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicResponseTx( - mdw_iicResponseTx_scuAlive( - f_getIutLocalItsScuId(), // The IUT has its own ITS SCU-ID - 65535, // Broadcast - mw_scuAlive( - 0, // ITS-SCUalive (alive) message - f_getIutLocalItsType() - ), - 2 // Check why TTWB raises an error using duplicateITS-scuId - )))) { + [] iicpPort.receive( + mw_iicpIndResp( + mdw_iicResponseTx_scuAlive( + f_getIutDestItsScuId(), // The IUT has its own ITS SCU-ID + 65535, // Broadcast + ?, + 2 // Check why TTWB raises an error using duplicateITS-scuId + ))) { tc_ac.stop; - log("*** TC_IICP_MGM_BI_01: INFO: The IUT has generated a MF-COMMAND IICresponseTX ***"); - tc_ac.start; + log("*** TC_IICP_MGM_BI_01: PASS: The IUT has detetcted the address conflict ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -674,7 +687,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an ITS-SCUalive message with unknown AliveMessage * } @@ -684,10 +697,10 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/MGM/BI/02 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/MGM/BI/02 */ - testcase TC_IICP_MGM_BI_02() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_MGM_BI_02() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control @@ -709,38 +722,29 @@ module ItsIicp_TestCases { // Test Body // Clause 'when' - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), // ITS SCU-ID of the sender - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_scuAlive( - m_scuAlive( - 128, // 128 is an undefined AliveMessage - f_getIutSourceItsScuType() - ) - ) + f_sendAliveMessage( + f_getIutLocalItsScuId(), + f_getIutDestItsScuId(), + m_scuAlive( + 128, // 128 is an undefined AliveMessage + f_getIutSourceItsScuType() ) ); log("*** TC_IICP_MGM_BI_02: INFO: Unknown ITS-SCUalive AliveMessage message triggered ***"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicResponseTx( - mdw_iicResponseTx_scuAlive( - f_getIutLocalItsScuId(), // The IUT has its own ITS SCU-ID - 65535, // Broadcast - mw_scuAlive( - 0, // ITS-SCUalive (alive) message - f_getIutLocalItsType() - ), - 3 // Check why TTWB raises an error using duplicateITS-scuId - )))) { + [] iicpPort.receive( + mw_iicpIndResp( + mdw_iicResponseTx_scuAlive( + f_getIutDestItsScuId(), + ?, + ?, + 3 // Check why TTWB raises an error using duplicateITS-scuId + ))) { tc_ac.stop; - log("*** TC_IICP_MGM_BI_02: INFO: The IUT has generated a MF-COMMAND IICresponseTX ***"); - tc_ac.start; + log("*** TC_IICP_MGM_BI_02: INFO: The IUT has detetcted the invalid AliveMessage ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -765,7 +769,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an ITS-SCUalive message with unknown ITS-SCU type * } @@ -775,10 +779,10 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/MGM/BI/03 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/MGM/BI/03 */ - testcase TC_IICP_MGM_BI_03() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_MGM_BI_03() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control @@ -800,38 +804,29 @@ module ItsIicp_TestCases { // Test Body // Clause 'when' - f_iicpTriggerRequest( - m_iicRequest( - f_getIutSourceItsScuId(), // The ITS SCU-ID of the sender - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_scuAlive( - m_scuAlive( - 0, // ITS-SCUalive (alive) message - 128 // 128 is an undefined AliveMessage - ) - ) + f_sendAliveMessage( + f_getIutLocalItsScuId(), + f_getIutDestItsScuId(), + m_scuAlive( + 0, // ITS-SCUalive (alive) message + 15 // Unknown ITS-SCU type ) ); log("*** TC_IICP_MGM_BI_03: INFO: Unknown ITS-SCUalive with unknown ITS-SCU type message triggered ***"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicResponseTx( - mdw_iicResponseTx_scuAlive( - f_getIutLocalItsScuId(), // The IUT has its own ITS SCU-ID - 65535, // Broadcast - mw_scuAlive( - 0, // ITS-SCUalive (alive) message - f_getIutLocalItsType() - ), - 4 // Check why TTWB raises an error using duplicateITS-scuId - )))) { + [] iicpPort.receive( + mw_iicpIndResp( + mdw_iicResponseTx_scuAlive( + f_getIutDestItsScuId(), + ?, + ?, + 4 // Check why TTWB raises an error using duplicateITS-scuId + ))) { tc_ac.stop; - log("*** TC_IICP_MGM_BI_03: INFO: The IUT has generated a MF-COMMAND IICresponseTX ***"); - tc_ac.start; + log("*** TC_IICP_MGM_BI_03: INFO: The IUT has detetcted the invalid AliveMessage type ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -865,7 +860,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received the request to send an VCI-info message to all ITS-SCUs * } @@ -877,11 +872,13 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/01 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/01 */ - testcase TC_IICP_COM_BV_01() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_01() runs on ItsCalm system ItsCalmSystem { // Local variables + var template (value) PduRequest v_pduRequest; + var template (value) VCI_info_res v_vCI_info_res; // Test control // No PICS to be checked @@ -899,41 +896,69 @@ module ItsIicp_TestCases { // Test Body // Clause 'when' - f_mgtMfTriggerRequest( // Message triggerd by Falility layer (IICA) - m_mfRequestRequest_iicRequestRx( - f_getNextCommandRef(), - m_mfRequestRx( - 0, // Used to indicate "own/local ITS-SCU" (ISO/WD 24102-4 Table 2 — ITS-SCU-ID value assignment) - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_vciInfoReq( - m_vciInfoReq( - f_getIutMedType(), - f_getIutCiAccessClass(), - f_getIutCiClass() - ) - ) - ) + v_pduRequest := m_pduRequest_vciInfoReq( + m_vciInfoReq( + f_getIutMedType(), + f_getIutCiAccessClass(), + f_getIutCiClass() + ) + ); + f_iicpEvent_IIC_Request( + m_iicRequest( + f_getIutSourceItsScuId(), // The IUT has its own ITS SCU-ID + 65535, // Broadcast + f_getNextPduCounter(), + v_pduRequest ) ); log("*** TC_IICP_COM_BV_01: INFO: Request to send an VCI-info message to all ITS-SCUs triggered ***"); // Clause 'then' + v_vCI_info_res := m_vciInfoRes( + m_vciInfo( + f_getIutCiLinkId(), + f_getIutMedType(), + f_getIutCiAccessClass(), + f_getIutCiClass(), + 8 // Active, see CIstatus_active_ + ) // End of 'm_vciInfo' field + ); // End of 'm_vciInfoRes' field tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_vciInfoReq( - f_getIutLocalItsScuId(), // The own ITS-SCU ID - 65535, // Broadcast - mw_vciInfoReq( - f_getIutMedType(), - f_getIutCiAccessClass(), - f_getIutCiClass() - ))))) { + [] utPort.receive( + mw_utIicpEventInd_McmdRq( + v_pduRequest.iicpReq.McmdRq + )) { tc_ac.stop; - log("*** TC_IICP_COM_BV_01: INFO: The IUT has generated a MF-COMMAND IICresponseTX ***"); + log("*** TC_IICP_COM_BV_01: INFO: Receive McmdRq from MX-SAP ***"); + f_utIicpEvent( + m_utIicpEvent_McmdRs( + m_mcmdRs_vciInfoRes( + v_vCI_info_res + ) // End of 'm_mcmdRs_vciInfoRes' field + ) + ); + log("*** TC_IICP_COM_BV_01: INFO: VCI-info-Res sent ***"); + log("*** TC_IICP_COM_BV_01: DEBUG: ", + mw_iicpIndResp( + mw_iicpResponse_vciInfoRes( + f_getIutDestItsScuId(), + ?, //f_getIutSourceItsScuId(), + v_vCI_info_res + )), + " ***"); tc_ac.start; + repeat; + } + [] iicpPort.receive( + mw_iicpIndResp( + mw_iicpResponse_vciInfoRes( + f_getIutDestItsScuId(), + ?, //f_getIutSourceItsScuId(), + v_vCI_info_res + ))) { + tc_ac.stop; + log("*** TC_IICP_COM_BV_01: PASS: The IUT has generated a McmdRs IICresponse ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -958,7 +983,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received the request to send an VCI-info message to all ITS-SCUs * } @@ -970,11 +995,13 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/02 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/02 */ - testcase TC_IICP_COM_BV_02() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_02() runs on ItsCalm system ItsCalmSystem { // Local variables + var template (value) PduRequest v_pduRequest; + var template (value) VCI_info_res v_vCI_info_res; // Test control // No PICS to be checked @@ -992,40 +1019,61 @@ module ItsIicp_TestCases { // Test Body // Clause 'when' - - // FIXME Check it with HJ: How to request to the IUT to send an VCI-info request? using action? - f_iicpTriggerRequest( + v_pduRequest := m_pduRequest_vciInfoReq( + m_vciInfoReq( + f_getIutMedType(), + f_getIutCiAccessClass(), + f_getIutCiClass() + ) + ); + f_iicpEvent_IIC_Request( m_iicRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), + f_getIutSourceItsScuId(), // The IUT has its own ITS SCU-ID + f_getIutDestItsScuId(), f_getNextPduCounter(), - m_pduRequest_vciInfoReq( - m_vciInfoReq( - f_getIutMedType(), - f_getIutCiAccessClass(), - f_getIutCiClass() - ) - ) + v_pduRequest ) ); log("*** TC_IICP_COM_BV_02: INFO: Request to send an VCI-info message to all ITS-SCUs triggered ***"); // Clause 'then' + v_vCI_info_res := m_vciInfoRes( + m_vciInfo( + f_getIutCiLinkId(), + f_getIutMedType(), + f_getIutCiAccessClass(), + f_getIutCiClass(), + 8 // Active, see CIstatus_active_ + ) // End of 'm_vciInfo' field + ); // End of 'm_vciInfoRes' field tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_vciInfoReq( - f_getIutLocalItsScuId(), // The own ITS-SCU ID - 2, - mw_vciInfoReq( - f_getIutMedType(), - f_getIutCiAccessClass(), - f_getIutCiClass() - ))))) { + [] utPort.receive( + mw_utIicpEventInd_McmdRq( + v_pduRequest.iicpReq.McmdRq + )) { tc_ac.stop; - log("*** TC_IICP_COM_BV_02: INFO: The IUT has generated a MF-COMMAND IICresponseTX ***"); + log("*** TC_IICP_COM_BV_02: INFO: Receive McmdRq from MX-SAP ***"); + f_utIicpEvent( + m_utIicpEvent_McmdRs( + m_mcmdRs_vciInfoRes( + v_vCI_info_res + ) // End of 'm_mcmdRs_vciInfoRes' field + ) + ); + log("*** TC_IICP_COM_BV_02: INFO: VCI-info-Res sent ***"); tc_ac.start; + repeat; + } + [] iicpPort.receive( + mw_iicpIndResp( + mw_iicpResponse_vciInfoRes( + f_getIutDestItsScuId(), + ?, + v_vCI_info_res + ))) { + tc_ac.stop; + log("*** TC_IICP_COM_BV_02: PASS: The IUT has generated a McmdRs IICresponse ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -1050,7 +1098,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received the request to send an VCI-info message to all ITS-SCUs * } @@ -1062,12 +1110,13 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/03 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/03 */ - testcase TC_IICP_COM_BV_03() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_03() runs on ItsCalm system ItsCalmSystem { // Local variables - var MgtMfSapCommandReq v_commandReq; + var template (value) PduRequest v_pduRequest; + var template (value) VCI_info_res v_vCI_info_res; // Test control if (not(PICS_ROLE_HONLY or PICS_ROLE_RH)) { @@ -1088,57 +1137,61 @@ module ItsIicp_TestCases { // Test Body // Clause 'when' - f_iicpTriggerRequest( + v_pduRequest := m_pduRequest_vciInfoReq( + m_vciInfoReq( + f_getIutMedType(), + f_getIutCiAccessClass(), + f_getIutCiClass() + ) + ); + f_iicpEvent_IIC_Request( m_iicRequest( - f_getIutSourceItsScuId(), - f_getIutDestItsScuId(), + f_getIutSourceItsScuId(), // The IUT has its own ITS SCU-ID + 65535, // Broadcast f_getNextPduCounter(), - m_pduRequest_vciInfoReq( - m_vciInfoReq( - f_getIutMedType(), - f_getIutCiAccessClass(), - f_getIutCiClass() - ) - ) + v_pduRequest ) ); log("*** TC_IICP_COM_BV_03: INFO: Request to send an VCI-info message to all ITS-SCUs triggered ***"); // Clause 'then' + v_vCI_info_res := m_vciInfoRes( + m_vciInfo( + f_getIutCiLinkId(), + f_getIutMedType(), + f_getIutCiAccessClass(), + f_getIutCiClass(), + 8 // Active, see CIstatus_active_ + ) // End of 'm_vciInfo' field + ); // End of 'm_vciInfoRes' field tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicResponseTx( - mdw_iicResponseTx_vciInfoRes( - f_getIutLocalItsScuId(), // The own ITS-SCU ID - 1, - ?/*superset( - mw_vciInfo( - ?, - f_getIutMedType(), - f_getIutCiAccessClass(), - f_getIutCiClass(), - 8 // Active - ) - )*/ - )))) -> value v_commandReq{ + [] utPort.receive( + mw_utIicpEventInd_McmdRq( + v_pduRequest.iicpReq.McmdRq + )) { tc_ac.stop; - if (f_superset_VCI_Info( - v_commandReq.msgIn.command_param.mfCmd.iICresponseTX.pduResponse.responses.vCI_info, - mw_vciInfo( - ?, - f_getIutMedType(), - f_getIutCiAccessClass(), - f_getIutCiClass(), - 8 // Active - ) - ) == false) { - log("*** TC_IICP_COM_BV_02: FAIL: Unexpected VCI-Info value ***"); - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - } else { - log("*** TC_IICP_COM_BV_02: INFO: The IUT has generated a MF-COMMAND IICresponseTX ***"); - tc_ac.start; - } + log("*** TC_IICP_COM_BV_01: INFO: Receive McmdRq from MX-SAP ***"); + f_utIicpEvent( + m_utIicpEvent_McmdRs( + m_mcmdRs_vciInfoRes( + v_vCI_info_res + ) // End of 'm_mcmdRs_vciInfoRes' field + ) + ); + log("*** TC_IICP_COM_BV_03: INFO: VCI-info-Res sent ***"); + tc_ac.start; + repeat; + } + [] iicpPort.receive( + mw_iicpIndResp( + mw_iicpResponse_vciInfoRes( + f_getIutDestItsScuId(), + ?, + v_vCI_info_res + ))) { + tc_ac.stop; + log("*** TC_IICP_COM_BV_01: PASS: The IUT has generated a McmdRs IICresponse ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -1163,7 +1216,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT wants to provide an update of its own VCI information to all ITS-SCUs * } @@ -1175,12 +1228,11 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/04 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/04 */ - testcase TC_IICP_COM_BV_04() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_04() runs on ItsCalm system ItsCalmSystem { // Local variables - var MgtMfSapCommandReq v_commandReq; // Test control // No PICS to be checked @@ -1189,7 +1241,7 @@ module ItsIicp_TestCases { f_cf01Up(); // Test adapter configuration - + // Preamble // Clause 'Initial conditions' // Assume that 'Initial conditions' are achieved @@ -1202,39 +1254,16 @@ module ItsIicp_TestCases { // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_vciUpdate( - 0, // Used to indicate "own/local ITS-SCU" (ISO/WD 24102-4 Table 2 — ITS-SCU-ID value assignment) - 65535, // Broadcast - ?/*superset( - mw_vciInfo( - ?, - f_getIutMedType(), - f_getIutCiAccessClass(), - f_getIutCiClass(), - 8 // Active - ) - )*/ - )))) -> value v_commandReq { + [] iicpPort.receive( + mw_iicpIndReq( + mdw_iicRequestTx_vciUpdate( + ?, + 65535, // Broadcast + { } // Empty list + ))) { tc_ac.stop; - if (f_superset_VCI_Update( - v_commandReq.msgIn.command_param.mfCmd.iICrequestTX.pduRequest.requests.vCI_update, - mw_vciInfo( - ?, - f_getIutMedType(), - f_getIutCiAccessClass(), - f_getIutCiClass(), - 8 // Active - ) - ) == false) { - log("*** TC_IICP_COM_BV_04: FAIL: Unexpected VCI-Info value ***"); - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - } else { - log("*** TC_IICP_COM_BV_04: INFO: The IUT has generated a MF-COMMAND IICresponseTX ***"); - tc_ac.start; - } + log("*** TC_IICP_COM_BV_04: PASS: the IUT generates an VCI-update message ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -1259,7 +1288,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an VCI-update request message * } @@ -1269,10 +1298,10 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/05 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/05 */ - testcase TC_IICP_COM_BV_05() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_05() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control @@ -1291,38 +1320,19 @@ module ItsIicp_TestCases { // Test Body // Clause 'when' - - // FIXME Check it with HJ: How to request to the IUT to send an VCI-info request? using action? - f_mgtMfTriggerRequest( // Message triggerd by Falility layer (IICA) - m_mfRequestRequest_iicRequestRx( - f_getNextCommandRef(), - m_mfRequestRx( - 0, // Used to indicate "own/local ITS-SCU" (ISO/WD 24102-4 Table 2 — ITS-SCU-ID value assignment) - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_pduRequest_vciUpdate( - { - m_vciInfo( - f_getIutCiLinkId(), - f_getIutMedType(), - f_getIutCiAccessClass(), - f_getIutCiClass(), - 8 // Active, see CIstatus_active_ - ) - } - ) - ) + f_iicpEvent_IIC_Request( + m_iicRequest( + f_getIutSourceItsScuId(), // The IUT has its own ITS SCU-ID + f_getIutDestItsScuId(), + f_getNextPduCounter(), + m_pduRequest_vciUpdateReq_empty ) ); log("*** TC_IICP_COM_BV_05: INFO: VCI-update request message triggered ***"); // Clause 'then' tc_noac.start; // No message expected alt { - [] mgtMfSapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_IICP_COM_BV_05: FAIL: No message was expected ***"); - } + // Default altstep manages unsollicited message [] tc_noac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_IICP_COM_BV_05: PASS: No message received as expected ***"); @@ -1347,7 +1357,7 @@ module ItsIicp_TestCases { * and knows the private ITS-SCU-ID "other" of another ITS-SCU * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the ITS-S management requests remote access to the MF-SAP in another ITS-SCU * } @@ -1359,13 +1369,12 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/06 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/06 */ - testcase TC_IICP_COM_BV_06() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_06() runs on ItsCalm system ItsCalmSystem { // Local variables - var CommandRef v_commandRef; - var MF_Command v_mfCommand; + var template (value) MF_Request_request v_mf_Request_request; // Test control // No PICS to be checked @@ -1377,31 +1386,32 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_06: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mfCommand := f_getIutRemoteCmdForMfCommand(); - //f_mgtMfTriggerRequest(); FIXME How to trigger event + v_mf_Request_request := m_mfRequestRequest_ldmRegister( // Any MF-Request-request that could trigger a remote request at Management layer + f_getNextCommandRef(), + f_getIutRemoteCmdForMfRequest() + ); + f_utIicpEvent( + UtIicpEvent: { mf_Request_request := v_mf_Request_request } + ); + log("*** TC_IICP_COM_BV_06: INFO: MF-Request-request message triggered ***"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfCommandRequest( // iICrequestTX - f_getIutSourceItsScuId(), - f_getIutOtherItsScuId(), - mw_mfCommandRequest( - v_commandRef, - v_mfCommand - ))))) { + [] iicpPort.receive( + mw_iicpIndReq( + mdw_iicRequestTx_mfRequestRequest( + f_getIutDestItsScuId(), + f_getIutOtherItsScuId(), + v_mf_Request_request + ))) { tc_ac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_IICP_COM_BV_06: PASS: The IUT has generated a MF-COMMAND IICrequestTX ***"); + log("*** TC_IICP_COM_BV_06: PASS: The IUT has generated a MF-Request-request IICrequestTX ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -1427,7 +1437,7 @@ module ItsIicp_TestCases { * and knows the private ITS-SCU-ID "other" of another ITS-SCU * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the ITS-S management requests remote access to the MN-SAP in another ITS-SCU * } @@ -1439,13 +1449,12 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/07 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/07 */ - testcase TC_IICP_COM_BV_07() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_07() runs on ItsCalm system ItsCalmSystem { // Local variables - var CommandRef v_commandRef; - var MN_Command v_mnCommand; + var template (value) MN_Request_request v_mn_Request_request; // Test control // No PICS to be checked @@ -1457,31 +1466,32 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_07: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_mnCommand := f_getIutRemoteCmdForMnCommand(); - //f_mgtMfTriggerRequest(); FIXME How to trigger event + v_mn_Request_request := m_mnRequestRequest_setNotFNTP( // Any MN-Request-request that could trigger a remote request at Management layer + f_getNextCommandRef(), + f_getIutRemoteCmdForMnRequest() + ); + f_utIicpEvent( + UtIicpEvent: { mn_Request_request := v_mn_Request_request } + ); + log("*** TC_IICP_COM_BV_07: INFO: MN-Request-request message triggered ***"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mnCommandRequest( // iICrequestTX - f_getIutSourceItsScuId(), - f_getIutOtherItsScuId(), - mw_mnCommandRequest( - v_commandRef, - v_mnCommand - ))))) { + [] iicpPort.receive( + mw_iicpIndReq( + mdw_iicRequestTx_mnRequestRequest( + f_getIutDestItsScuId(), + f_getIutOtherItsScuId(), + v_mn_Request_request + ))) { tc_ac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_IICP_COM_BV_07: PASS: The IUT has generated a MN-COMMAND IICrequestTX ***"); + log("*** TC_IICP_COM_BV_07: PASS: The IUT has generated a MN-Request-request IICrequestTX ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -1507,7 +1517,7 @@ module ItsIicp_TestCases { * and knows the private ITS-SCU-ID "other" of another ITS-SCU * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the ITS-S management requests remote access to the MI-SAP in another ITS-SCU * } @@ -1519,13 +1529,12 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/08 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/08 */ - testcase TC_IICP_COM_BV_08() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_08() runs on ItsCalm system ItsCalmSystem { // Local variables - var CommandRef v_commandRef; - var MI_Command v_miCommand; + var template (value) MI_Request_request v_mi_Request_request; // Test control // No PICS to be checked @@ -1543,26 +1552,28 @@ module ItsIicp_TestCases { // Test Body // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_miCommand := f_getIutRemoteCmdForMiCommand(); - //f_mgtMfTriggerRequest(); FIXME How to trigger event + v_mi_Request_request := m_miRequestRequest_regReq( // Any MI-Request-request that could trigger a remote request at Management layer + f_getIutRemoteCmdForMiRequestLinkID(), + f_getNextCommandRef(), + f_getIutRemoteCmdForMiRequest() + ); + f_utIicpEvent( + UtIicpEvent: { mi_Request_request := v_mi_Request_request } + ); + log("*** TC_IICP_COM_BV_08: INFO: MI-Request-request message triggered ***"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_miCommandRequest( // iICrequestTX - f_getIutSourceItsScuId(), - f_getIutOtherItsScuId(), - mw_miCommandRequest( - f_getIutCiLinkId(), - v_commandRef, - v_miCommand - ))))) { + [] iicpPort.receive( + mw_iicpIndReq( + mdw_iicRequestTx_miRequestRequest( + f_getIutDestItsScuId(), + f_getIutOtherItsScuId(), + v_mi_Request_request + ))) { tc_ac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_IICP_COM_BV_08: PASS: The IUT has generated a MF-COMMAND IICrequestTX ***"); + log("*** TC_IICP_COM_BV_08: PASS: The IUT has generated a MI-Request-request IICrequestTX ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -1588,7 +1599,7 @@ module ItsIicp_TestCases { * and knows the private ITS-SCU-ID "other" of another ITS-SCU * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the ITS-S management requests remote access to the MI-SAP in another ITS-SCU in order to get the value of an I-Parameter * } @@ -1600,13 +1611,12 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/09 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/09 */ - testcase TC_IICP_COM_BV_09() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_09() runs on ItsCalm system ItsCalmSystem { // Local variables - var CommandRef v_commandRef; - var IParamNoList v_iParamNoList; + var template (value) MI_Get_request v_mi_Get_request; // Test control // No PICS to be checked @@ -1618,32 +1628,33 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_09: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_iParamNoList := f_getIutIparamNoList(); - //f_mgtMfTriggerRequest(); FIXME How to trigger event + v_mi_Get_request := m_miGetRequest( // Any MI-Get-request that could trigger a remote request at Management layer + f_getIutRemoteCmdForMiRequestLinkID(), + f_getNextCommandRef(), + f_getIutIparamNoList() + ); + f_utIicpEvent( + UtIicpEvent: { mi_Get_request := v_mi_Get_request } + ); + log("*** TC_IICP_COM_BV_09: INFO: MI-Get-request message triggered ***"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_miGetRequest( // iICrequestTX - f_getIutSourceItsScuId(), - f_getIutOtherItsScuId(), - mw_miGetRequest( - f_getIutCiLinkId(), - v_commandRef, - v_iParamNoList - ))))) { + [] iicpPort.receive( + mw_iicpIndReq( + mdw_iicRequestTx_miGetRequest( + f_getIutDestItsScuId(), + f_getIutOtherItsScuId(), + v_mi_Get_request + ))) { tc_ac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_IICP_COM_BV_09: PASS: The IUT has generated a MF-COMMAND IICrequestTX ***"); + log("*** TC_IICP_COM_BV_09: PASS: The IUT has generated a MI-Get-request IICrequestTX ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -1669,7 +1680,7 @@ module ItsIicp_TestCases { * and knows the private ITS-SCU-ID "other" of another ITS-SCU * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the ITS-S management requests remote access to the MI-SAP in another ITS-SCU in order to set the value of an I-Parameter * } @@ -1681,13 +1692,12 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/10 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/10 */ - testcase TC_IICP_COM_BV_10() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_10() runs on ItsCalm system ItsCalmSystem { // Local variables - var CommandRef v_commandRef; - var IParamList v_iParamList; + var template (value) MI_Set_request v_mi_Set_request; // Test control // No PICS to be checked @@ -1699,32 +1709,33 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_10: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - v_commandRef := f_getNextCommandRef(); - v_iParamList := f_getIutIparamList(); - //f_mgtMfTriggerRequest(); FIXME How to trigger event + v_mi_Set_request := m_miSetRequest( // Any MI-Set-request that could trigger a remote request at Management layer + f_getIutRemoteCmdForMiRequestLinkID(), + f_getNextCommandRef(), + f_getIutIparamList() + ); + f_utIicpEvent( + UtIicpEvent: { mi_Set_request := v_mi_Set_request } + ); + log("*** TC_IICP_COM_BV_10: INFO: MI-Set-request message triggered ***"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_miSetRequest( // iICrequestTX - f_getIutSourceItsScuId(), - f_getIutOtherItsScuId(), - mw_miSetRequest( - f_getIutCiLinkId(), - v_commandRef, - v_iParamList - ))))) { + [] iicpPort.receive( + mw_iicpIndReq( + mdw_iicRequestTx_miSetRequest( + f_getIutDestItsScuId(), + f_getIutOtherItsScuId(), + v_mi_Set_request + ))) { tc_ac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_IICP_COM_BV_10: PASS: The IUT has generated a MF-COMMAND IICrequestTX ***"); + log("*** TC_IICP_COM_BV_10: PASS: The IUT has generated a MI-Set-request IICrequestTX ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -1749,7 +1760,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU ID "own" * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an MF-rcmd request message from an ITS-SCU with ITS-SCU-ID="other" which requires a response * } @@ -1761,11 +1772,14 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/11 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/11 */ - testcase TC_IICP_COM_BV_11() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_11() runs on ItsCalm system ItsCalmSystem { // Local variables + var template (value) PduRequest v_pduRequest; + var template (value) MF_Command_request v_mf_Command_request; + var template (value) MF_Command_confirm v_mf_Command_confirm; // Test control // No PICS to be checked @@ -1777,38 +1791,55 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_11: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - f_iicpTriggerRequest( - m_iicRequest( - f_getIutOtherItsScuId(), - f_getIutDestItsScuId(), + v_mf_Command_request := m_mfCommandRequest_stateCInotify( // Any MF-Command-request which requires a response + f_getNextCommandRef(), + f_getIutRemoteCmdForMfCommand() + ); + v_pduRequest := m_pduRequest_mfCommandReq( + v_mf_Command_request + ); + f_iicpEvent_IIC_Request( + m_iicRequest( + f_getIutOtherItsScuId(), + f_getIutDestItsScuId(), f_getNextPduCounter(), - m_pduRequest_mfCommandReq( - m_mfCommandRequest( - f_getNextCommandRef(), - f_getIutRemoteCmdForMfCommand() - ) - ) - ) - ); + v_pduRequest + ) + ); log("*** TC_IICP_COM_BV_11: INFO: MF-rcmd request message done ***"); // Clause 'then' + v_mf_Command_confirm := m_mfCommand_confirm_stateCInotify( + v_mf_Command_request.commandRef + ); tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicResponseTx( - mdw_iicResponseTx_mfCommandRequest( // iICresponseTX - f_getIutDestItsScuId(), - f_getIutOtherItsScuId(), - mdw_mfCommandConfirm( - 0 - ))))) { + [] utPort.receive( + mw_utIicpEventInd_MfCommandRequest( + v_pduRequest.iicpReq.MF_Command_request + )) { + tc_ac.stop; + log("*** TC_IICP_COM_BV_11: INFO: Receive MF-Command-request from 'other' IICP ***"); + f_utIicpEvent( + m_utIicpEvent_MfCommandConfirm( + v_mf_Command_confirm + ) + ); + log("*** TC_IICP_COM_BV_11: INFO: MF-Command-confirm sent ***"); + tc_ac.start; + repeat; + } + [] iicpPort.receive( + mw_iicpIndResp( + mdw_iicpResponse_mfCommandConfirm( + f_getIutDestItsScuId(), + ?, //f_getIutSourceItsScuId(), + v_mf_Command_confirm + ))) { tc_ac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_IICP_COM_BV_11: PASS: The IUT has generated a MF-COMMAND IICresponseTX ***"); @@ -1836,7 +1867,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU ID "own" * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an MN-rcmd request message from an ITS-SCU with ITS-SCU-ID="other" which requires a response * } @@ -1848,11 +1879,14 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/12 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/12 */ - testcase TC_IICP_COM_BV_12() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_12() runs on ItsCalm system ItsCalmSystem { // Local variables + var template (value) PduRequest v_pduRequest; + var template (value) MN_Command_request v_mn_Command_request; + var template (value) MN_Command_confirm v_mn_Command_confirm; // Test control // No PICS to be checked @@ -1864,41 +1898,65 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_12: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - f_iicpTriggerRequest( - m_iicRequest( - f_getIutOtherItsScuId(), - f_getIutDestItsScuId(), + v_mn_Command_request := m_mnCommandRequest_deleteFntp( // Any MN-Command-request which requires a response + f_getNextCommandRef(), + f_getIutRemoteCmdForMnCommand() + ); + v_pduRequest := m_pduRequest_mnCommandReq( + v_mn_Command_request + ); + f_iicpEvent_IIC_Request( + m_iicRequest( + f_getIutOtherItsScuId(), + f_getIutDestItsScuId(), f_getNextPduCounter(), - m_pduRequest_mnCommandReq( - m_mnCommandRequest( - f_getNextCommandRef(), - f_getIutRemoteCmdForMnCommand() - ) - ) - ) - ); - log("*** TC_IICP_COM_BV_12: INFO: MF-rcmd request message done ***"); + v_pduRequest + ) + ); + log("*** TC_IICP_COM_BV_12: INFO: MN-rcmd request message done ***"); // Clause 'then' + v_mn_Command_confirm := mw_mnCommandConfirm_deleteFntpConf( + v_mn_Command_request.commandRef, + f_getIutRemoteCmdForMnCommand() + ); + log("*** TC_IICP_COM_BV_12: DEBUG: ", + mw_utIicpEventInd_MnCommandRequest( + v_pduRequest.iicpReq.MN_Command_request + ), + " ***" + ); tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicResponseTx( - mdw_iicResponseTx_mnCommandRequest( // iICresponseTX - f_getIutDestItsScuId(), - f_getIutOtherItsScuId(), - mdw_mnCommandConfirm( - 0 - ))))) { + [] utPort.receive( + mw_utIicpEventInd_MnCommandRequest( + v_pduRequest.iicpReq.MN_Command_request + )) { + tc_ac.stop; + log("*** TC_IICP_COM_BV_12: INFO: Receive MN-Command-request from 'other' IICP ***"); + f_utIicpEvent( + m_utIicpEvent_MnCommandConfirm( + v_mn_Command_confirm + ) + ); + log("*** TC_IICP_COM_BV_12: INFO: MN-Command-confirm sent ***"); + tc_ac.start; + repeat; + } + [] iicpPort.receive( + mw_iicpIndResp( + mdw_iicpResponseTx_mnCommandConfirm( + f_getIutDestItsScuId(), + ?, //f_getIutSourceItsScuId(), + v_mn_Command_confirm + ))) { tc_ac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_IICP_COM_BV_12: PASS: The IUT has generated a MF-COMMAND IICresponseTX ***"); + log("*** TC_IICP_COM_BV_12: PASS: The IUT has generated a MN-COMMAND IICresponseTX ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -1923,7 +1981,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU ID "own" * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an MI-rcmd request message from an ITS-SCU with ITS-SCU-ID="other" which requires a response * } @@ -1935,11 +1993,14 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/13 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/13 */ - testcase TC_IICP_COM_BV_13() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_13() runs on ItsCalm system ItsCalmSystem { // Local variables + var template (value) PduRequest v_pduRequest; + var template (value) MI_Command_request v_mi_Command_request; + var template (value) MI_Command_confirm v_mi_Command_confirm; // Test control // No PICS to be checked @@ -1951,42 +2012,60 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_13: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - f_iicpTriggerRequest( - m_iicRequest( - f_getIutOtherItsScuId(), - f_getIutDestItsScuId(), + v_mi_Command_request := m_miCommandRequest_wakeUp( // Any MI-Command-request which requires a response + f_getIutRemoteCmdForMiRequestLinkID(), + f_getNextCommandRef(), + f_getIutRemoteCmdForMiCommand() + ); + v_pduRequest := m_pduRequest_miCommandReq( + v_mi_Command_request + ); + f_iicpEvent_IIC_Request( + m_iicRequest( + f_getIutOtherItsScuId(), + f_getIutDestItsScuId(), f_getNextPduCounter(), - m_pduRequest_miCommandReq( - m_miCommandRequest( - f_getIutCiLinkId(), - f_getNextCommandRef(), - f_getIutRemoteCmdForMiCommand() - ) - ) - ) - ); - log("*** TC_IICP_COM_BV_13: INFO: MF-rcmd request message done ***"); + v_pduRequest + ) + ); + log("*** TC_IICP_COM_BV_13: INFO: MI-rcmd request message done ***"); // Clause 'then' + v_mi_Command_confirm := mw_miCommandConfirm_wakeUp( + f_getIutRemoteCmdForMiRequestLinkID(), + v_mi_Command_request.commandRef + ); tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicResponseTx( - mdw_iicResponseTx_miCommandRequest( // iICresponseTX - f_getIutDestItsScuId(), - f_getIutOtherItsScuId(), - mw_miCommandConfirm( - 0 - ))))) { + [] utPort.receive( + mw_utIicpEventInd_MiCommandRequest( + v_pduRequest.iicpReq.MI_Command_request + )) { + tc_ac.stop; + log("*** TC_IICP_COM_BV_13: INFO: Receive MI-Command-request from 'other' IICP ***"); + f_utIicpEvent( + m_utIicpEvent_MiCommandConfirm( + v_mi_Command_confirm + ) + ); + log("*** TC_IICP_COM_BV_13: INFO: MI-Command-confirm sent ***"); + tc_ac.start; + repeat; + } + [] iicpPort.receive( + mw_iicpIndResp( + mdw_iicpResponseTx_miCommandConfirm( + f_getIutDestItsScuId(), + ?, //f_getIutSourceItsScuId(), + v_mi_Command_confirm + ))) { tc_ac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_IICP_COM_BV_13: PASS: The IUT has generated a MF-COMMAND IICresponseTX ***"); + log("*** TC_IICP_COM_BV_13: PASS: The IUT has generated a MI-COMMAND IICresponseTX ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -2011,7 +2090,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU ID "own" * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an MI-rcmd request message from an ITS-SCU with ITS-SCU-ID="other" which constitutes an authorized get request * } @@ -2023,12 +2102,14 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/14 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/14 */ - testcase TC_IICP_COM_BV_14() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_14() runs on ItsCalm system ItsCalmSystem { // Local variables - var CommandRef v_commandRef; + var template (value) PduRequest v_pduRequest; + var template (value) MI_Get_request v_mi_Get_request; + var template (value) MI_Get_confirm v_mi_Get_confirm; // Test control // No PICS to be checked @@ -2040,43 +2121,61 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_14: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - v_commandRef := f_getNextCommandRef(); - f_iicpTriggerRequest( - m_iicRequest( - f_getIutOtherItsScuId(), - f_getIutDestItsScuId(), + v_mi_Get_request := m_miGetRequest( // Any MI-Command-request which requires a response + f_getIutRemoteCmdForMiRequestLinkID(), + f_getNextCommandRef(), + f_getIutIparamNoList() + ); + v_pduRequest := m_pduRequest_miGetReq( + v_mi_Get_request + ); + f_iicpEvent_IIC_Request( + m_iicRequest( + f_getIutOtherItsScuId(), + f_getIutDestItsScuId(), f_getNextPduCounter(), - m_pduRequest_miGetReq( - m_miGetRequest( - f_getIutCiLinkId(), - v_commandRef, - f_getIutIparamNoList() - ) - ) - ) - ); - log("*** TC_IICP_COM_BV_14: INFO: MF-rcmd request message done ***"); + v_pduRequest + ) + ); + log("*** TC_IICP_COM_BV_14: INFO: MI-rcmd request message done ***"); // Clause 'then' + v_mi_Get_confirm := mw_miGetConfirm( + f_getIutRemoteCmdForMiRequestLinkID(), + v_mi_Get_request.commandRef, + f_getIutIparamList() + ); tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicResponseTx( - mdw_iicResponseTx_miGetRequest( // iICresponseTX - f_getIutDestItsScuId(), - f_getIutOtherItsScuId(), - mw_miGetConfirm( - f_getIutIparamList() - ))))) { + [] utPort.receive( + mw_utIicpEventInd_MiGetRequest( + v_pduRequest.iicpReq.MI_Get_request + )) { + tc_ac.stop; + log("*** TC_IICP_COM_BV_14: INFO: Receive MI-Get-request from 'other' IICP ***"); + f_utIicpEvent( + m_utIicpEvent_MiGetConfirm( + v_mi_Get_confirm + ) + ); + log("*** TC_IICP_COM_BV_14: INFO: MI-Get-confirm sent ***"); + tc_ac.start; + repeat; + } + [] iicpPort.receive( + mw_iicpIndResp( + mdw_iicpResponseTx_miGetConfirm( + f_getIutDestItsScuId(), + ?, //f_getIutSourceItsScuId(), + v_mi_Get_confirm + ))) { tc_ac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_IICP_COM_BV_14: PASS: The IUT has generated a MF-COMMAND IICresponseTX ***"); + log("*** TC_IICP_COM_BV_14: PASS: The IUT has generated a MI-GET IICresponseTX ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -2084,12 +2183,12 @@ module ItsIicp_TestCases { } } // End of 'alt' statement log("*** TC_IICP_COM_BV_14: INFO: Test body done ***"); - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of testcase TC_IICP_COM_BV_14 + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // End of testcase TC_IICP_COM_BV_14 /** * @desc Transmission of MI-rset response message @@ -2101,23 +2200,26 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU ID "own" * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an MI-rset request message from an ITS-SCU with ITS-SCU-ID="other" which constitutes an unauthorized set request * } * then { * the IUT generates an MI-rset response message providing the requested value with DestinationITS-SCU-ID="other" * and with SourceITS-SCU-ID "own", indicating the proper error code, - * and forwards this with MF-COMMAND IICresponseTX to the IICA + * and forwards this with MI-COMMAND IICresponseTX to the IICA * } * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/15 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/15 */ - testcase TC_IICP_COM_BV_15() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_15() runs on ItsCalm system ItsCalmSystem { // Local variables + var template (value) PduRequest v_pduRequest; + var template (value) MI_Set_request v_mi_Set_request; + var template (value) MI_Set_confirm v_mi_Set_confirm; // Test control // No PICS to be checked @@ -2129,42 +2231,61 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_15: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - f_iicpTriggerRequest( - m_iicRequest( - f_getIutOtherItsScuId(), - f_getIutDestItsScuId(), + v_mi_Set_request := m_miSetRequest( // Any MI-Command-request which requires a response + f_getIutRemoteCmdForMiRequestLinkID(), + f_getNextCommandRef(), + f_getIutIparamList() + ); + v_pduRequest := m_pduRequest_miSetReq( + v_mi_Set_request + ); + f_iicpEvent_IIC_Request( + m_iicRequest( + f_getIutOtherItsScuId(), + f_getIutDestItsScuId(), f_getNextPduCounter(), - m_pduRequest_miSetReq( - m_miSetRequest( - f_getIutCiLinkId(), - f_getNextCommandRef(), - f_getIutIparamList() - ) - ) - ) - ); - log("*** TC_IICP_COM_BV_15: INFO: MF-rcmd request message done ***"); + v_pduRequest + ) + ); + log("*** TC_IICP_COM_BV_15: INFO: MI-rcmd request message done ***"); // Clause 'then' + v_mi_Set_confirm := mw_miSetConfirm( + f_getIutRemoteCmdForMiRequestLinkID(), + v_mi_Set_request.commandRef, + f_getIutErrorsList() + ); tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicResponseTx( - mdw_iicResponseTx_miSetRequest( // iICresponseTX - f_getIutDestItsScuId(), - f_getIutOtherItsScuId(), - mw_miSetConfirm( - f_getIutErrorsList() - ))))) { + [] utPort.receive( + mw_utIicpEventInd_MiSetRequest( + v_pduRequest.iicpReq.MI_Set_request + )) { + tc_ac.stop; + log("*** TC_IICP_COM_BV_15: INFO: Receive MI-Set-request from 'other' IICP ***"); + f_utIicpEvent( + m_utIicpEvent_MiSetConfirm( + v_mi_Set_confirm + ) + ); + log("*** TC_IICP_COM_BV_15: INFO: MI-Set-confirm sent ***"); + tc_ac.start; + repeat; + } + [] iicpPort.receive( + mw_iicpIndResp( + mdw_iicpResponseTx_miSetConfirm( + f_getIutDestItsScuId(), + ?, //f_getIutSourceItsScuId(), + v_mi_Set_confirm + ))) { tc_ac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_IICP_COM_BV_15: PASS: The IUT has generated a MF-COMMAND IICresponseTX ***"); + log("*** TC_IICP_COM_BV_15: PASS: The IUT has generated a MI-SET IICresponseTX ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -2180,7 +2301,7 @@ module ItsIicp_TestCases { } // End of testcase TC_IICP_COM_BV_15 /** - * @desc Reception of MI-rset request message + * @desc Reception of MF-rreq request message to a specific ITS-SCU *
              * Pics Selection: 
              * Config Id: CF01
@@ -2190,7 +2311,7 @@ module ItsIicp_TestCases {
              *      and knows the private ITS-SCU-ID "other" of another ITS-SCU
              *  }
              * Expected behaviour:
-             *  evaluate whether {
+             *  ensure that {
              *      when { 
              *          ITS-S management entity is used by ITS-S facilities layer to request access to a remote management
              *      }
@@ -2202,12 +2323,12 @@ module ItsIicp_TestCases {
              *  }
              * 
* - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/16 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/16 */ - testcase TC_IICP_COM_BV_16() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_16() runs on ItsCalm system ItsCalmSystem { // Local variables - var MF_Request v_mfRequest; + var template (value) MF_Request_request v_mf_Request_request; // Test control // No PICS to be checked @@ -2219,45 +2340,32 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_16: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - v_mfRequest := f_getIutRemoteCmdForMfRequest(); - f_mgtMfTriggerRequest( - m_mfRequestRequest( - f_getNextCommandRef(), - m_mfRequest_iicRequestRx( - m_iicRequestRx_mfRequestRequest( - f_getIutOtherItsScuId(), - f_getIutDestItsScuId(), - f_getNextPduCounter(), - m_mfRequestRequest( - f_getNextCommandRef(), - v_mfRequest - ) - ) - ) - ) - ); + v_mf_Request_request := m_mfRequestRequest_ldmRegister( // Any MF-Request-request that could trigger a remote request at Management layer + f_getNextCommandRef(), + f_getIutRemoteCmdForMfRequest() + ); + f_utIicpEvent( + UtIicpEvent: { mf_Request_request := v_mf_Request_request } + ); + log("*** TC_IICP_COM_BV_16: INFO: MF-Request-request message triggered ***"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mfRequestRequest( // iICrequestTX - f_getIutSourceItsScuId(), - f_getIutOtherItsScuId(), - mw_mfRequestRequest( - ?, - v_mfRequest - ))))) { + [] iicpPort.receive( + mw_iicpIndReq( + mdw_iicRequestTx_mfCommandRequest( + f_getIutDestItsScuId(), + f_getIutOtherItsScuId(), + v_mf_Request_request + ))) { tc_ac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_IICP_COM_BV_16: PASS: The IUT has generated a MF-COMMAND IICrequestTX ***"); + log("*** TC_IICP_COM_BV_16: PASS: The IUT has generated a MF-Command-request IICrequestTX ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -2265,7 +2373,7 @@ module ItsIicp_TestCases { } } // End of 'alt' statement log("*** TC_IICP_COM_BV_16: INFO: Test body done ***"); - + // Postamble f_poDefault(); f_cf01Down(); @@ -2283,24 +2391,24 @@ module ItsIicp_TestCases { * and knows the private ITS-SCU-ID "other" of another ITS-SCU * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * ITS-S management entity is used by ITS-S networking&transport layer to request access to a remote management * } * then { * the IUT generates an MN-rreq message with DestinationITS-SCU-ID="other" * and with SourceITS-SCU-ID "own", - * and forwards this with MF-COMMAND IICrequestTX to the IICA + * and forwards this with MN-COMMAND IICrequestTX to the IICA * } * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/17 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/17 */ - testcase TC_IICP_COM_BV_17() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_17() runs on ItsCalm system ItsCalmSystem { // Local variables - var MN_Request v_mnRequest; + var template (value) MN_Request_request v_mn_Request_request; // Test control // No PICS to be checked @@ -2312,45 +2420,32 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_17: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - v_mnRequest := f_getIutRemoteCmdForMnRequest(); -// f_mgtMnTriggerRequest( FIXME How to trigger event -// m_mnRequestRequest( -// f_getNextCommandRef(), -// m_mnRequest_iICrequestRX( -// m_iicRequestRx_mnRequestRequest( -// f_getIutOtherItsScuId(), -// f_getIutDestItsScuId(), -// f_getNextPduCounter(), -// m_mnRequestRequest( -// f_getNextCommandRef(), -// v_mnRequest -// ) -// ) -// ) -// ) -// ); + v_mn_Request_request := m_mnRequestRequest_setNotFNTP( // Any MN-Request-request that could trigger a remote request at Management layer + f_getNextCommandRef(), + f_getIutRemoteCmdForMnRequest() + ); + f_utIicpEvent( + UtIicpEvent: { mn_Request_request := v_mn_Request_request } + ); + log("*** TC_IICP_COM_BV_17: INFO: MN-Request-request message triggered ***"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_mnRequestRequest( // iICrequestTX - f_getIutSourceItsScuId(), - f_getIutOtherItsScuId(), - mw_mnRequestRequest( - ?, - v_mnRequest - ))))) { + [] iicpPort.receive( + mw_iicpIndReq( + mdw_iicRequestTx_mnCommandRequest( + f_getIutDestItsScuId(), + f_getIutOtherItsScuId(), + v_mn_Request_request + ))) { tc_ac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_IICP_COM_BV_17: PASS: The IUT has generated a MF-COMMAND IICrequestTX ***"); + log("*** TC_IICP_COM_BV_17: PASS: The IUT has generated a MN-Command-request IICrequestTX ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -2366,7 +2461,7 @@ module ItsIicp_TestCases { } // End of testcase TC_IICP_COM_BV_17 /** - * @desc Transmission of IIC-Request MN-rreq to a specific ITS-SCU + * @desc Transmission of IIC-Request MI-rreq to a specific ITS-SCU *
              * Pics Selection: PICS_IICP_MGM
              * Config Id: CF01
@@ -2376,24 +2471,24 @@ module ItsIicp_TestCases {
              *      and knows the private ITS-SCU-ID "other" of another ITS-SCU
              *  }
              * Expected behaviour:
-             *  evaluate whether {
+             *  ensure that {
              *      when { 
              *          the ITS-S management entity requests a remote access to the management entity in another ITS-SCU
              *      }
              *      then {
-             *          the IUT generates an MN-rreq message with DestinationITS-SCU-ID="other" 
+             *          the IUT generates an MI-rreq message with DestinationITS-SCU-ID="other" 
              *          and with SourceITS-SCU-ID "own", 
-             *          and forwards this with MF-COMMAND IICrequestTX to the IIC Communication Manager
+             *          and forwards this with MI-COMMAND IICrequestTX to the IIC Communication Manager
              *      }
              *  }
              * 
* - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/18 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/18 */ - testcase TC_IICP_COM_BV_18() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_18() runs on ItsCalm system ItsCalmSystem { // Local variables - var MI_Request v_miRequest; + var template (value) MI_Request_request v_mi_Request_request; // Test control // No PICS to be checked @@ -2405,30 +2500,33 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_18: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - v_miRequest := f_getIutRemoteCmdForMiRequest(); + v_mi_Request_request := m_miRequestRequest_regReq( // Any MI-Request-request that could trigger a remote request at Management layer + f_getIutRemoteCmdForMiRequestLinkID(), + f_getNextCommandRef(), + f_getIutRemoteCmdForMiRequest() + ); + f_utIicpEvent( + UtIicpEvent: { mi_Request_request := v_mi_Request_request } + ); + log("*** TC_IICP_COM_BV_18: INFO: MI-Request-request message triggered ***"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicRequestTx( - mdw_iicRequestTx_miRequestRequest( // iICrequestTX - f_getIutSourceItsScuId(), - f_getIutOtherItsScuId(), - mw_miRequestRequest( - ?, - ?, - v_miRequest - ))))) { + [] iicpPort.receive( + mw_iicpIndReq( + mdw_iicRequestTx_miCommandRequest( + f_getIutDestItsScuId(), + f_getIutOtherItsScuId(), + v_mi_Request_request + ))) { tc_ac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); - log("*** TC_IICP_COM_BV_18: PASS: The IUT has generated a MF-COMMAND IICrequestTX ***"); + log("*** TC_IICP_COM_BV_18: PASS: The IUT has generated a MI-Command-request IICrequestTX ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -2453,23 +2551,24 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID "own" * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { - * the IUT having received an MF-rreq request message from an ITS-SCU with ITS-SCU-ID="other" which requires a response + * the IUT having received an MI-rreq request message from an ITS-SCU with ITS-SCU-ID="other" which requires a response * } * then { - * the IUT generates an MF-rreq response message with DestinationITS-SCU-ID="other" + * the IUT generates an MI-rreq response message with DestinationITS-SCU-ID="other" * and with SourceITS-SCU-ID "own", - * and forwards this with MF-COMMAND IICresponseTX to the IICA + * and forwards this with MI-COMMAND IICresponseTX to the IICA * } * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/19 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/19 */ - testcase TC_IICP_COM_BV_19() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_19() runs on ItsCalm system ItsCalmSystem { // Local variables + var template (value) PduRequest v_pduRequest; // Test control // No PICS to be checked @@ -2481,41 +2580,40 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_19: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - f_iicpTriggerRequest( + v_pduRequest := m_pduRequest_miRequestRequest( + m_miRequestRequest_regReq( // Any MI-Request-request that could trigger a remote request at Management layer + f_getIutRemoteCmdForMiRequestLinkID(), + f_getNextCommandRef(), + f_getIutRemoteCmdForMiRequest() + ) + ); + f_iicpEvent_IIC_Request( m_iicRequest( - f_getIutSourceItsScuId(), // The ITS SCU-ID of the sender - f_getIutDestItsScuId(), + f_getIutOtherItsScuId(), // The IUT has its own ITS SCU-ID + f_getIutDestItsScuId(), // 'own' f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - f_getNextCommandRef(), - f_getIutRemoteCmdForMfRequest() - ) - ) + v_pduRequest ) ); - log("*** TC_IICP_COM_BV_19: INFO: MF-rreq request message triggered ***"); + log("*** TC_IICP_COM_BV_19: INFO: MI-Request-request message triggered ***"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicResponseTx( - mdw_iicResponseTx_mfRequestRequest( - f_getIutSourceItsScuId(), - f_getIutOtherItsScuId(), - mw_mfRequestConfirm( - 0 - ))))) { + [] iicpPort.receive( + mw_iicpIndResp( + mdw_iicResponseTx_miCommandConfirm( + f_getIutDestItsScuId(), + f_getIutOtherItsScuId(), + ? + ))) { tc_ac.stop; - log("*** TC_IICP_COM_BV_19: INFO: The IUT has generated a MF-rreq IICresponseTX ***"); - tc_ac.start; + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + log("*** TC_IICP_COM_BV_19: PASS: The IUT has generated a MI-Command-confirm IICresponseTX ***"); } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -2523,7 +2621,7 @@ module ItsIicp_TestCases { } } // End of 'alt' statement log("*** TC_IICP_COM_BV_19: INFO: Test body done ***"); - + // Postamble f_poDefault(); f_cf01Down(); @@ -2540,23 +2638,24 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID "own" * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an MN-rreq request message from an ITS-SCU with ITS-SCU-ID="other" which requires a response * } * then { * the IUT generates an MN-rreq response message with DestinationITS-SCU-ID="other" * and with SourceITS-SCU-ID "own", - * and forwards this with MF-COMMAND IICresponseTX to the IICA + * and forwards this with MN-COMMAND IICresponseTX to the IICA * } * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/20 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/20 */ - testcase TC_IICP_COM_BV_20() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_20() runs on ItsCalm system ItsCalmSystem { // Local variables + var template (value) PduRequest v_pduRequest; // Test control // No PICS to be checked @@ -2568,41 +2667,39 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_20: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - f_iicpTriggerRequest( + v_pduRequest := m_pduRequest_mnRequestRequest( + m_mnRequestRequest_setNotFNTP( // Any MN-Request-request that could trigger a remote request at Management layer + f_getNextCommandRef(), + f_getIutRemoteCmdForMnRequest() + ) + ); + f_iicpEvent_IIC_Request( m_iicRequest( - f_getIutSourceItsScuId(), // The ITS SCU-ID of the sender - f_getIutDestItsScuId(), + f_getIutOtherItsScuId(), // The IUT has its own ITS SCU-ID + f_getIutDestItsScuId(), // 'own' f_getNextPduCounter(), - m_pduRequest_mnRequestRequest( - m_mnRequestRequest( - f_getNextCommandRef(), - f_getIutRemoteCmdForMnRequest() - ) - ) + v_pduRequest ) ); log("*** TC_IICP_COM_BV_20: INFO: MN-rreq request message triggered ***"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicResponseTx( - mdw_iicResponseTx_mnRequestRequest( - f_getIutSourceItsScuId(), - f_getIutOtherItsScuId(), - mw_mnRequestConfirm( - 0 - ))))) { + [] iicpPort.receive( + mw_iicpIndResp( + mdw_iicpResponseTx_mnCommandConfirm( + f_getIutDestItsScuId(), + f_getIutOtherItsScuId(), + ? + ))) { tc_ac.stop; + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_IICP_COM_BV_20: INFO: The IUT has generated a MN-rreq IICresponseTX ***"); - tc_ac.start; } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -2627,23 +2724,24 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID "own" * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an MI-rreq request message from an ITS-SCU with ITS-SCU-ID="other" which requires a response * } * then { * the IUT generates an MI-rreq response message with DestinationITS-SCU-ID="other" * and with SourceITS-SCU-ID "own", - * and forwards this with MF-COMMAND IICresponseTX to the IICA + * and forwards this with MI-COMMAND IICresponseTX to the IICA * } * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/21 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/21 */ - testcase TC_IICP_COM_BV_21() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_21() runs on ItsCalm system ItsCalmSystem { // Local variables + var template (value) PduRequest v_pduRequest; // Test control // No PICS to be checked @@ -2655,42 +2753,40 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_21: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - f_iicpTriggerRequest( + v_pduRequest := m_pduRequest_miRequestRequest( + m_miRequestRequest_regReq( // Any MI-Request-request that could trigger a remote request at Management layer + f_getIutCiLinkId(), + f_getNextCommandRef(), + f_getIutRemoteCmdForMiRequest() + ) + ); + f_iicpEvent_IIC_Request( m_iicRequest( - f_getIutSourceItsScuId(), // The ITS SCU-ID of the sender - f_getIutDestItsScuId(), + f_getIutOtherItsScuId(), // The IUT has its own ITS SCU-ID + f_getIutDestItsScuId(), // 'own' f_getNextPduCounter(), - m_pduRequest_miRequestRequest( - m_miRequestRequest( - f_getIutCiLinkId(), - f_getNextCommandRef(), - f_getIutRemoteCmdForMiRequest() - ) - ) + v_pduRequest ) ); log("*** TC_IICP_COM_BV_21: INFO: MI-rreq request message triggered ***"); // Clause 'then' tc_ac.start; alt { - [] mgtMfSapPort.receive( - mw_mgtMfSapCommandReq( - mdw_mfCommandRequest_iicResponseTx( - mdw_iicResponseTx_miRequestRequest( - f_getIutSourceItsScuId(), - f_getIutOtherItsScuId(), - mw_miRequestConfirm( - 0 - ))))) { + [] iicpPort.receive( + mw_iicpIndResp( + mdw_iicResponseTx_miCommandConfirm( + f_getIutDestItsScuId(), + f_getIutOtherItsScuId(), + ? + ))) { tc_ac.stop; + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_IICP_COM_BV_21: INFO: The IUT has generated a MI-rreq IICresponseTX ***"); - tc_ac.start; } [] tc_ac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); @@ -2715,7 +2811,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID "own" * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an ICC-Request message with invalid DestinationITS-SCU-ID=1 (ITS-S host) * } @@ -2725,10 +2821,10 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/22 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/22 */ - testcase TC_IICP_COM_BV_22() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_22() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control @@ -2741,21 +2837,21 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_22: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - f_iicpTriggerRequest( + f_iicpEvent_IIC_Request( m_iicRequest( - f_getIutSourceItsScuId(), - 1, // Invalid DestinationITS-SCU-ID=1 (ITS-S host) - f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - f_getNextCommandRef(), - f_getIutRemoteCmdForMfRequest() + f_getIutSourceItsScuId(), // The IUT has its own ITS SCU-ID + 1, // Invalid DestinationITS-SCU-ID (ITS-S host) + f_getNextPduCounter(), + m_pduRequest_vciInfoReq( + m_vciInfoReq( + f_getIutMedType(), + f_getIutCiAccessClass(), + f_getIutCiClass() ) ) ) @@ -2764,11 +2860,7 @@ module ItsIicp_TestCases { // Clause 'then' tc_noac.start; alt { - [] mgtMfSapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_IICP_COM_BV_22: FAIL: No message was expected ***"); - } + // Default altstep manages unsollicited messages [] tc_noac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_IICP_COM_BV_22: PASS: No message received as expected ***"); @@ -2792,7 +2884,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID "own" * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an ICC-Request message with invalid DestinationITS-SCU-ID=2 (ITS-S router) * } @@ -2802,10 +2894,10 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BV/23 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BV/23 */ - testcase TC_IICP_COM_BV_23() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BV_23() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control @@ -2818,21 +2910,21 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BV_23: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - f_iicpTriggerRequest( + f_iicpEvent_IIC_Request( m_iicRequest( - f_getIutSourceItsScuId(), - 2, // Invalid DestinationITS-SCU-ID=2 (ITS-S router) - f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - f_getNextCommandRef(), - f_getIutRemoteCmdForMfRequest() + f_getIutSourceItsScuId(), // The IUT has its own ITS SCU-ID + 2, // Invalid DestinationITS-SCU-ID (ITS-S router) + f_getNextPduCounter(), + m_pduRequest_vciInfoReq( + m_vciInfoReq( + f_getIutMedType(), + f_getIutCiAccessClass(), + f_getIutCiClass() ) ) ) @@ -2841,11 +2933,7 @@ module ItsIicp_TestCases { // Clause 'then' tc_noac.start; alt { - [] mgtMfSapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_IICP_COM_BV_23: FAIL: No message was expected ***"); - } + // Default altstep manages unsollicited messages [] tc_noac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_IICP_COM_BV_23: PASS: No message received as expected ***"); @@ -2873,7 +2961,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an ICC-Request message with invalid DestinationITS-SCU-ID (reserved) * } @@ -2883,10 +2971,10 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BI/01 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BI/01 */ - testcase TC_IICP_COM_BI_01() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BI_01() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control @@ -2899,21 +2987,21 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BI_01: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - f_iicpTriggerRequest( + f_iicpEvent_IIC_Request( m_iicRequest( - f_getIutSourceItsScuId(), - 5, // Invalid DestinationITS-SCU-ID (reserved) - f_getNextPduCounter(), - m_pduRequest_mfRequestRequest( - m_mfRequestRequest( - f_getNextCommandRef(), - f_getIutRemoteCmdForMfRequest() + f_getIutSourceItsScuId(), // The IUT has its own ITS SCU-ID + 5, // Invalid DestinationITS-SCU-ID (reserved) + f_getNextPduCounter(), + m_pduRequest_vciInfoReq( + m_vciInfoReq( + f_getIutMedType(), + f_getIutCiAccessClass(), + f_getIutCiClass() ) ) ) @@ -2922,11 +3010,7 @@ module ItsIicp_TestCases { // Clause 'then' tc_noac.start; alt { - [] mgtMfSapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_IICP_COM_BI_01: FAIL: No message was expected ***"); - } + // Default altstep manages unsollicited messages [] tc_noac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_IICP_COM_BI_01: PASS: No message received as expected ***"); @@ -2950,7 +3034,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an ICC-Response message with invalid DestinationITS-SCU-ID=1 (ITS-S host) * } @@ -2960,10 +3044,10 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BI/02 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BI/02 */ - testcase TC_IICP_COM_BI_02() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BI_02() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control @@ -2985,12 +3069,11 @@ module ItsIicp_TestCases { // Test Body // Clause 'when' - f_iicpTriggerResponse( + f_iicpEvent_IIC_Response( m_iicResponse( - f_getIutSourceItsScuId(), + f_getIutSourceItsScuId(), // The IUT has its own ITS SCU-ID 1, // Invalid DestinationITS-SCU-ID=1 (ITS-S host) - f_getNextPduCounter(), - 0, + f_getNextPduCounter(), m_pduResponse_mfRequestConfirm( f_getIutIicResponse() ) @@ -3000,7 +3083,7 @@ module ItsIicp_TestCases { // Clause 'then' tc_noac.start; alt { - [] mgtMfSapPort.receive { + [] iicpPort.receive { tc_noac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_IICP_COM_BI_02: FAIL: No message was expected ***"); @@ -3028,8 +3111,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { - * when { + * ensure that { * the IUT having received an ICC-Response message with invalid DestinationITS-SCU-ID (reserved) * } * then { @@ -3038,10 +3120,10 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BI/03 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BI/03 */ - testcase TC_IICP_COM_BI_03() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BI_03() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control @@ -3057,18 +3139,16 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BI_03: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - f_iicpTriggerResponse( + f_iicpEvent_IIC_Response( m_iicResponse( - f_getIutSourceItsScuId(), + f_getIutSourceItsScuId(), // The IUT has its own ITS SCU-ID 2, // Invalid DestinationITS-SCU-ID=2 (ITS-S router) - f_getNextPduCounter(), - 0, + f_getNextPduCounter(), m_pduResponse_mfRequestConfirm( f_getIutIicResponse() ) @@ -3078,7 +3158,7 @@ module ItsIicp_TestCases { // Clause 'then' tc_noac.start; alt { - [] mgtMfSapPort.receive { + [] iicpPort.receive { tc_noac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_IICP_COM_BI_03: FAIL: No message was expected ***"); @@ -3106,7 +3186,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an ICC-Response message with invalid DestinationITS-SCU-ID (reserved) * } @@ -3116,10 +3196,10 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BI/04 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BI/04 */ - testcase TC_IICP_COM_BI_04() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BI_04() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control @@ -3132,18 +3212,16 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BI_04: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - f_iicpTriggerResponse( + f_iicpEvent_IIC_Response( m_iicResponse( - f_getIutSourceItsScuId(), + f_getIutSourceItsScuId(), // The IUT has its own ITS SCU-ID 5, // Invalid DestinationITS-SCU-ID (reserved) - f_getNextPduCounter(), - 0, + f_getNextPduCounter(), m_pduResponse_mfRequestConfirm( f_getIutIicResponse() ) @@ -3153,7 +3231,7 @@ module ItsIicp_TestCases { // Clause 'then' tc_noac.start; alt { - [] mgtMfSapPort.receive { + [] iicpPort.receive { tc_noac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_IICP_COM_BI_04: FAIL: No message was expected ***"); @@ -3181,7 +3259,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an IIC-Request message with odd "PDU-Counter" value * } @@ -3191,10 +3269,10 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BI/05 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BI/05 */ - testcase TC_IICP_COM_BI_05() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BI_05() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control @@ -3213,19 +3291,16 @@ module ItsIicp_TestCases { // Test Body // Clause 'when' - f_mgtMfTriggerRequest( // Message triggerd by Falility layer (IICA) - m_mfRequestRequest_iicRequestRx( - f_getNextCommandRef(), - m_mfRequestRx( - 0, // Used to indicate "own/local ITS-SCU" (ISO/WD 24102-4 Table 2 — ITS-SCU-ID value assignment) - f_getIutDestItsScuId(), - f_getNextPduCounter() + 1 , // Odd "PDU-Counter" value - m_pduRequest_vciInfoReq( - m_vciInfoReq( - f_getIutMedType(), - f_getIutCiAccessClass(), - f_getIutCiClass() - ) + f_iicpEvent_IIC_Request( + m_iicRequest( + f_getIutSourceItsScuId(), // The IUT has its own ITS SCU-ID + 65535, // Broadcast + f_getNextPduCounter() + 1, // Odd "PDU-Counter" value + m_pduRequest_vciInfoReq( + m_vciInfoReq( + f_getIutMedType(), + f_getIutCiAccessClass(), + f_getIutCiClass() ) ) ) @@ -3234,11 +3309,7 @@ module ItsIicp_TestCases { // Clause 'then' tc_noac.start; alt { - [] mgtMfSapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_IICP_COM_BI_05: FAIL: No message was expected ***"); - } + // Default altstep manages unsollicited messages [] tc_noac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_IICP_COM_BI_05: PASS: No message received as expected ***"); @@ -3262,7 +3333,7 @@ module ItsIicp_TestCases { * the IUT having its own ITS-SCU-ID * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received an IIC-Response message with even "PDU-Counter" value * } @@ -3272,10 +3343,10 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BI/06 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BI/06 */ - testcase TC_IICP_COM_BI_06() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BI_06() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control @@ -3288,18 +3359,16 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BI_06: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - f_iicpTriggerResponse( + f_iicpEvent_IIC_Response( m_iicResponse( f_getIutSourceItsScuId(), 65535, // Valid DestinationITS-SCU-ID f_getNextPduCounter() + 1, // Odd "PDU-Counter" value - 0, m_pduResponse_mfRequestConfirm( f_getIutIicResponse() ) @@ -3309,7 +3378,7 @@ module ItsIicp_TestCases { // Clause 'then' tc_noac.start; alt { - [] mgtMfSapPort.receive { + [] iicpPort.receive { tc_noac.stop; f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); log("*** TC_IICP_COM_BI_06: FAIL: No message was expected ***"); @@ -3338,7 +3407,7 @@ module ItsIicp_TestCases { * the ITU not awaiting an IIC-Response message * } * Expected behaviour: - * evaluate whether { + * ensure that { * when { * the IUT having received a privately addressed IIC-Response message with odd "PDU-Counter" value * } @@ -3348,10 +3417,10 @@ module ItsIicp_TestCases { * } * * - * @version 0.0.8 - * @see ETSI TS 102 797-2 v0.0.8 IICP/COM/BI/07 + * @version 1.2.1 + * @see ETSI TS 102 797-2 v1.2.1 IICP/COM/BI/07 */ - testcase TC_IICP_COM_BI_07() runs on ItsMgt system ItsCalmSystem { + testcase TC_IICP_COM_BI_07() runs on ItsCalm system ItsCalmSystem { // Local variables // Test control @@ -3364,20 +3433,22 @@ module ItsIicp_TestCases { // Preamble // Clause 'Initial conditions' - // Assume that 'Initial conditions' are achieved f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); log("*** TC_IICP_COM_BI_07: INFO: Preamble: IUT was setup properly ***"); // Test Body // Clause 'when' - f_iicpTriggerResponse( - m_iicResponse( - f_getIutSourceItsScuId(), - 65535, // Valid DestinationITS-SCU-ID - f_getNextPduCounter() + 1, // Odd "PDU-Counter" value - 0, - m_pduResponse_mfRequestConfirm( - f_getIutIicResponse() + f_iicpEvent_IIC_Request( + m_iicRequest( + f_getIutSourceItsScuId(), // The IUT has its own ITS SCU-ID + 65535, // Broadcast + f_getNextPduCounter() + 1, // Odd "PDU-Counter" value + m_pduRequest_vciInfoReq( + m_vciInfoReq( + f_getIutMedType(), + f_getIutCiAccessClass(), + f_getIutCiClass() + ) ) ) ); @@ -3385,11 +3456,7 @@ module ItsIicp_TestCases { // Clause 'then' tc_noac.start; alt { - [] mgtMfSapPort.receive { - tc_noac.stop; - f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); - log("*** TC_IICP_COM_BI_07: FAIL: No message was expected ***"); - } + // Default altstep manages unsollicited messages [] tc_noac.timeout { f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); log("*** TC_IICP_COM_BI_07: PASS: No message received as expected ***"); diff --git a/ttcn/AtsIICP/ItsIicp_TestControl.ttcn3 b/ttcn/AtsIICP/ItsIicp_TestControl.ttcn3 index adf2c02e6a508e968ecb7bbe44549724b54a50ab..b2c21cb53fb6d0538a306870af9dc6d2cfdb24c5 100644 --- a/ttcn/AtsIICP/ItsIicp_TestControl.ttcn3 +++ b/ttcn/AtsIICP/ItsIicp_TestControl.ttcn3 @@ -1,74 +1,74 @@ -/** - * @author ETSI / STF422_EETS - * @version $URL:$ - * $Id:$ - * @desc test control file for ITS station-internal management communications protocol (ISO 24102-4) - */ -module ItsIicp_TestControl { - - // ATS IICP - import from ItsIicp_TestCases {testcase all}; - - // LibIts - import from LibItsIicp_Pics all; - - // Test Execution - control { - -// 8.1 Management - if (PICS_IICP_MGM) { - execute(TC_IICP_MGM_BV_01()); - execute(TC_IICP_MGM_BV_02()); - execute(TC_IICP_MGM_BV_03()); - execute(TC_IICP_MGM_BV_04()); - execute(TC_IICP_MGM_BV_05()); - execute(TC_IICP_MGM_BV_06()); - } - if (PICS_IICP_MGM) { - execute(TC_IICP_MGM_BI_01()); - execute(TC_IICP_MGM_BI_02()); - execute(TC_IICP_MGM_BI_03()); - } - - // 8.2 Communications - execute(TC_IICP_COM_BV_01()); - execute(TC_IICP_COM_BV_02()); - if (PICS_ROLE_HONLY or PICS_ROLE_RH) { - execute(TC_IICP_COM_BV_03()); - } - execute(TC_IICP_COM_BV_04()); - execute(TC_IICP_COM_BV_05()); - execute(TC_IICP_COM_BV_06()); - execute(TC_IICP_COM_BV_07()); - execute(TC_IICP_COM_BV_08()); - execute(TC_IICP_COM_BV_09()); - execute(TC_IICP_COM_BV_10()); - execute(TC_IICP_COM_BV_11()); - execute(TC_IICP_COM_BV_12()); - execute(TC_IICP_COM_BV_13()); - execute(TC_IICP_COM_BV_14()); - execute(TC_IICP_COM_BV_15()); - execute(TC_IICP_COM_BV_16()); - execute(TC_IICP_COM_BV_17()); - execute(TC_IICP_COM_BV_18()); - execute(TC_IICP_COM_BV_19()); - execute(TC_IICP_COM_BV_20()); - execute(TC_IICP_COM_BV_21()); - execute(TC_IICP_COM_BV_22()); - execute(TC_IICP_COM_BV_23()); - - execute(TC_IICP_COM_BI_01()); - if (PICS_ROLE_RONLY) { - execute(TC_IICP_COM_BI_02()); - } - if (PICS_ROLE_HONLY) { - execute(TC_IICP_COM_BI_03()); - } - execute(TC_IICP_COM_BI_04()); - execute(TC_IICP_COM_BI_05()); - execute(TC_IICP_COM_BI_06()); - execute(TC_IICP_COM_BI_07()); - - } // End of control - +/** + * @author ETSI / STF422_EETS + * @version $URL:$ + * $Id:$ + * @desc test control file for ITS station-internal management communications protocol (ISO 24102-4) + */ +module ItsIicp_TestControl { + + // ATS IICP + import from ItsIicp_TestCases {testcase all}; + + // LibIts + import from LibItsIicp_Pics all; + + // Test Execution + control { + +// 8.1 Management + if (PICS_IICP_MGM) { +/* execute(TC_IICP_MGM_BV_01()); + execute(TC_IICP_MGM_BV_02()); + execute(TC_IICP_MGM_BV_03()); + execute(TC_IICP_MGM_BV_04()); + execute(TC_IICP_MGM_BV_05()); + execute(TC_IICP_MGM_BV_06());*/ + } + if (PICS_IICP_MGM) { +/* execute(TC_IICP_MGM_BI_01()); + execute(TC_IICP_MGM_BI_02()); + execute(TC_IICP_MGM_BI_03());*/ + } + + // 8.2 Communications +/* execute(TC_IICP_COM_BV_01()); + execute(TC_IICP_COM_BV_02());*/ +/* if (PICS_ROLE_HONLY or PICS_ROLE_RH) { + execute(TC_IICP_COM_BV_03()); + }*/ +/* execute(TC_IICP_COM_BV_04()); + execute(TC_IICP_COM_BV_05()); + execute(TC_IICP_COM_BV_06()); + execute(TC_IICP_COM_BV_07()); + execute(TC_IICP_COM_BV_08()); + execute(TC_IICP_COM_BV_09()); + execute(TC_IICP_COM_BV_10()); + execute(TC_IICP_COM_BV_11());*/ + execute(TC_IICP_COM_BV_12()); +/* execute(TC_IICP_COM_BV_13()); + execute(TC_IICP_COM_BV_14()); + execute(TC_IICP_COM_BV_15()); + execute(TC_IICP_COM_BV_16()); + execute(TC_IICP_COM_BV_17()); + execute(TC_IICP_COM_BV_18()); + execute(TC_IICP_COM_BV_19()); + execute(TC_IICP_COM_BV_20()); + execute(TC_IICP_COM_BV_21()); + execute(TC_IICP_COM_BV_22()); + execute(TC_IICP_COM_BV_23());*/ + +/* execute(TC_IICP_COM_BI_01());*/ + if (PICS_ROLE_RONLY) { +/* execute(TC_IICP_COM_BI_02());*/ + } + if (PICS_ROLE_HONLY) { +/* execute(TC_IICP_COM_BI_03());*/ + } +/* execute(TC_IICP_COM_BI_04()); + execute(TC_IICP_COM_BI_05()); + execute(TC_IICP_COM_BI_06()); + execute(TC_IICP_COM_BI_07());*/ + + } // End of control + } // End of module ItsFsap_TestControl \ No newline at end of file