Loading ItsAvm_TestCases.ttcn +74 −10 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ module ItsAvm_TestCases { * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/AVM/MSD/FMT/BV-01 * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/BV-01 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MIM_DISS_BV_01() runs on ItsAvm system ItsAvmSystem { Loading @@ -66,7 +66,7 @@ module ItsAvm_TestCases { * Pics Selection: PICS_RO_ROLE and PICS_MIM_GENERATION * Initial conditions: * with { * a MIM is generated * AVM entity is active * } * Expected behaviour: * ensure that { Loading @@ -82,7 +82,7 @@ module ItsAvm_TestCases { * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/AVM/MSD/FMT/BV-02 * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/BV-02 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MIM_DISS_BV_02() runs on ItsAvm system ItsAvmSystem { Loading @@ -97,7 +97,7 @@ module ItsAvm_TestCases { * Pics Selection: PICS_RO_ROLE and PICS_MIM_GENERATION * Initial conditions: * with { * a MIM is generated * AVM entity is active * } * Expected behaviour: * ensure that { Loading @@ -113,7 +113,7 @@ module ItsAvm_TestCases { * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/AVM/MSD/FMT/BV-03 * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/BV-03 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MIM_DISS_BV_03() runs on ItsAvm system ItsAvmSystem { Loading @@ -128,7 +128,7 @@ module ItsAvm_TestCases { * Pics Selection: PICS_RO_ROLE and PICS_MIM_GENERATION * Initial conditions: * with { * a MIM is generated * AVM entity is active * } * Expected behaviour: * ensure that { Loading @@ -141,7 +141,7 @@ module ItsAvm_TestCases { * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/AVM/MSD/FMT/BV-04 * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/BV-04 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MIM_DISS_BV_04() runs on ItsAvm system ItsAvmSystem { Loading @@ -150,13 +150,77 @@ module ItsAvm_TestCases { } // End of TC_MIM_DISS_BV_04 /** * @desc Check that MIM messages containing a Mim container addressing any of the SV ITS-S under control are generated after T_GenMIM has elapsed * <pre> * Pics Selection: PICS_RO_ROLE and PICS_MIM_GENERATION * Initial conditions: * with { * AVM entity is active * and a MIM has been sent at T_0 * } * Expected behaviour: * ensure that { * when { * T_GenMIM has elapsed at T_1 * } * then { * the IUT sends a MIM * containing mims * containing at least one Mim * } * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/TI/01 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MIM_DISS_TI_01() runs on ItsAvm system ItsAvmSystem { f_MIM_DISS_TI_01_02(); } // End of TC_MIM_DISS_TI_01 /** * @desc Check that MIM messages include all Mim containers generated longer than T_GenMIM ago * <pre> * Pics Selection: PICS_RO_ROLE and PICS_MIM_GENERATION * Initial conditions: * with { * AVM entity is active * and a MIM has been sent at T_0 * containing mims * containing a set of Mim containers C generated at T_-1 < T_0 * } * Expected behaviour: * ensure that { * when { * T_GenMIM has elapsed at T_1 * } * then { * the IUT sends a MIM * containing mims * containing at least one Mim * } * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/TI/02 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MIM_DISS_TI_02() runs on ItsAvm system ItsAvmSystem { f_MIM_DISS_TI_01_02(); } // End of TC_MIM_DISS_TI_01 /** * @desc Check that the IUT generates e2eProtection CRC properly. * <pre> * Pics Selection: PICS_MIM_GENERATION * Initial conditions: * with { * the IUT being in the "initial state" * AVM entity is active * } * Expected behaviour: * ensure that { Loading @@ -172,7 +236,7 @@ module ItsAvm_TestCases { * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/AVM/MSD/FMT/BV-02 * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/BV-02 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MIM_DISS_BV_0x() runs on ItsAvm system ItsAvmSystem { Loading Loading @@ -312,7 +376,7 @@ module ItsAvm_TestCases { * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/AVM/MSD/FMT/BV-01 * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/BV-01 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MVM_MSD_FMT_BV_01() runs on ItsAvm system ItsAvmSystem { Loading ItsAvm_TestControl.ttcn +3 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,9 @@ module ItsAvm_TestControl { execute(TC_MIM_MSD_PAR_BV_01()); execute(TC_MIM_MSD_PAR_BV_02()); execute(TC_MIM_MSD_PAR_BV_03()); execute(TC_MIM_DISS_TI_01()); execute(TC_MIM_DISS_TI_02()); } if (PICS_VO_ROLE) { Loading ItsAvm_TpFunctions.ttcn +90 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,96 @@ module ItsAvm_TpFunctions { } // End of function f_MIM_DISS_BV_04 /** * @desc TP Function for TC_MIM_DISS_TI_01/TC_MIM_DISS_TI_02 */ function f_MIM_DISS_TI_01_02() runs on ItsAvm { // Local variables timer t_minTransInterval := PICS_T_GENMIMMIN * PX_INC_TIMER_CONTROL_FACTOR; timer t_maxTransInterval := PICS_T_GENMIMMAX * PX_INC_TIMER_CONTROL_FACTOR; var MimInd v_avmInd_i, v_avmInd; // Test control if (not PICS_RO_ROLE or not PICS_MIM_GENERATION) { log("*** " & testcasename() & ": PICS_RO_ROLE and PICS_MIM_GENERATION required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); avmPort.clear; tc_ac.start; alt { [] avmPort.receive( mw_mimInd( mw_mimMsg( -, mw_mim ))) -> value v_avmInd_i { tc_ac.stop; t_minTransInterval.start; t_maxTransInterval.start; log("*** " & testcasename() & ": INFO: Initial conditions: First MI message received ***"); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Initial conditions: MI message not received ***"); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); stop; } } // Test Body tc_ac.start; alt { [] avmPort.receive( mw_mimInd( mw_mimMsg( -, mw_mim ))) -> value v_avmInd { tc_ac.stop; if (t_minTransInterval.running) { log("*** " & testcasename() & ": FAIL: MIM received before T_GenMIMMin ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } else if (not t_minTransInterval.running and t_maxTransInterval.running) { // TODO FSCOM: Compare v_avmInd_i & v_avmInd log("*** " & testcasename() & ": PASS: MIM received after T_GenMIMMin and before T_GenMIMMax ***"); t_maxTransInterval.stop; f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } else { log("*** " & testcasename() & ": FAIL: MIM message received but timers not running ***"); // This case should not happen, but added for completeness f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } [] t_minTransInterval.timeout { log("*** " & testcasename() & ": INFO: min timer expired ***"); repeat; } [] t_maxTransInterval.timeout { log("*** " & testcasename() & ": FAIL: MIM not received before T_GenMIMMax ***"); tc_ac.stop; } [] tc_ac.timeout { log("*** " & testcasename() & ": FAIL: No MIM received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // Postamble f_poDefault(); f_cfDown(); } // End of function f_MIM_DISS_TI_01_02 /** * @desc TP Function for TC_MIM_DISS_BV_0x */ Loading lib/LibItsAvm_Pics.ttcn +17 −2 Original line number Diff line number Diff line Loading @@ -49,6 +49,21 @@ module LibItsAvm_Pics { * @see ETSI TS 104 202-1 Table A.6 */ modulepar integer PICS_MIM_MTU := 1500; } // end avmPics } // end LibItsAvm_Pics /** * @desc Maximum time interval between MIM generations (in seconds). * Default value, as per base standard: 1.0s * @see ETSI TS 104 202-1 Table A.6 */ modulepar float PICS_T_GENMIMMAX := 1.000; /** * @desc Minimum time interval between MIM generations (in seconds). * Default value, as per base standard: 0.1s * @see ETSI TS 104 202-1 Table A.6 */ modulepar float PICS_T_GENMIMMIN := 0.100; } // End of avmPics } // End of LibItsAvm_Pics lib/LibItsAvm_Pixits.ttcn +10 −0 Original line number Diff line number Diff line Loading @@ -22,4 +22,14 @@ module LibItsAvm_Pixits { modulepar integer PX_MAX_REPETITION := 10; /** * @desc Multiply timer value by this control factor to increase it */ modulepar float PX_INC_TIMER_CONTROL_FACTOR := 1.10; /** * @desc Multiply timer value by this control factor to decrease it */ modulepar float PX_DEC_TIMER_CONTROL_FACTOR := 0.9; } // End of module LibItsAvm_Pixits No newline at end of file Loading
ItsAvm_TestCases.ttcn +74 −10 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ module ItsAvm_TestCases { * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/AVM/MSD/FMT/BV-01 * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/BV-01 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MIM_DISS_BV_01() runs on ItsAvm system ItsAvmSystem { Loading @@ -66,7 +66,7 @@ module ItsAvm_TestCases { * Pics Selection: PICS_RO_ROLE and PICS_MIM_GENERATION * Initial conditions: * with { * a MIM is generated * AVM entity is active * } * Expected behaviour: * ensure that { Loading @@ -82,7 +82,7 @@ module ItsAvm_TestCases { * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/AVM/MSD/FMT/BV-02 * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/BV-02 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MIM_DISS_BV_02() runs on ItsAvm system ItsAvmSystem { Loading @@ -97,7 +97,7 @@ module ItsAvm_TestCases { * Pics Selection: PICS_RO_ROLE and PICS_MIM_GENERATION * Initial conditions: * with { * a MIM is generated * AVM entity is active * } * Expected behaviour: * ensure that { Loading @@ -113,7 +113,7 @@ module ItsAvm_TestCases { * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/AVM/MSD/FMT/BV-03 * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/BV-03 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MIM_DISS_BV_03() runs on ItsAvm system ItsAvmSystem { Loading @@ -128,7 +128,7 @@ module ItsAvm_TestCases { * Pics Selection: PICS_RO_ROLE and PICS_MIM_GENERATION * Initial conditions: * with { * a MIM is generated * AVM entity is active * } * Expected behaviour: * ensure that { Loading @@ -141,7 +141,7 @@ module ItsAvm_TestCases { * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/AVM/MSD/FMT/BV-04 * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/BV-04 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MIM_DISS_BV_04() runs on ItsAvm system ItsAvmSystem { Loading @@ -150,13 +150,77 @@ module ItsAvm_TestCases { } // End of TC_MIM_DISS_BV_04 /** * @desc Check that MIM messages containing a Mim container addressing any of the SV ITS-S under control are generated after T_GenMIM has elapsed * <pre> * Pics Selection: PICS_RO_ROLE and PICS_MIM_GENERATION * Initial conditions: * with { * AVM entity is active * and a MIM has been sent at T_0 * } * Expected behaviour: * ensure that { * when { * T_GenMIM has elapsed at T_1 * } * then { * the IUT sends a MIM * containing mims * containing at least one Mim * } * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/TI/01 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MIM_DISS_TI_01() runs on ItsAvm system ItsAvmSystem { f_MIM_DISS_TI_01_02(); } // End of TC_MIM_DISS_TI_01 /** * @desc Check that MIM messages include all Mim containers generated longer than T_GenMIM ago * <pre> * Pics Selection: PICS_RO_ROLE and PICS_MIM_GENERATION * Initial conditions: * with { * AVM entity is active * and a MIM has been sent at T_0 * containing mims * containing a set of Mim containers C generated at T_-1 < T_0 * } * Expected behaviour: * ensure that { * when { * T_GenMIM has elapsed at T_1 * } * then { * the IUT sends a MIM * containing mims * containing at least one Mim * } * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/TI/02 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MIM_DISS_TI_02() runs on ItsAvm system ItsAvmSystem { f_MIM_DISS_TI_01_02(); } // End of TC_MIM_DISS_TI_01 /** * @desc Check that the IUT generates e2eProtection CRC properly. * <pre> * Pics Selection: PICS_MIM_GENERATION * Initial conditions: * with { * the IUT being in the "initial state" * AVM entity is active * } * Expected behaviour: * ensure that { Loading @@ -172,7 +236,7 @@ module ItsAvm_TestCases { * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/AVM/MSD/FMT/BV-02 * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/BV-02 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MIM_DISS_BV_0x() runs on ItsAvm system ItsAvmSystem { Loading Loading @@ -312,7 +376,7 @@ module ItsAvm_TestCases { * } * </pre> * * @see ETSI TS 104 202-2 v2.2.1 TP/AVM/MSD/FMT/BV-01 * @see ETSI TS 104 202-2 v2.2.1 TP/MIM/DISS/BV-01 * @reference ETSI TS 103 882 v2.2.1, Annex B */ testcase TC_MVM_MSD_FMT_BV_01() runs on ItsAvm system ItsAvmSystem { Loading
ItsAvm_TestControl.ttcn +3 −0 Original line number Diff line number Diff line Loading @@ -30,6 +30,9 @@ module ItsAvm_TestControl { execute(TC_MIM_MSD_PAR_BV_01()); execute(TC_MIM_MSD_PAR_BV_02()); execute(TC_MIM_MSD_PAR_BV_03()); execute(TC_MIM_DISS_TI_01()); execute(TC_MIM_DISS_TI_02()); } if (PICS_VO_ROLE) { Loading
ItsAvm_TpFunctions.ttcn +90 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,96 @@ module ItsAvm_TpFunctions { } // End of function f_MIM_DISS_BV_04 /** * @desc TP Function for TC_MIM_DISS_TI_01/TC_MIM_DISS_TI_02 */ function f_MIM_DISS_TI_01_02() runs on ItsAvm { // Local variables timer t_minTransInterval := PICS_T_GENMIMMIN * PX_INC_TIMER_CONTROL_FACTOR; timer t_maxTransInterval := PICS_T_GENMIMMAX * PX_INC_TIMER_CONTROL_FACTOR; var MimInd v_avmInd_i, v_avmInd; // Test control if (not PICS_RO_ROLE or not PICS_MIM_GENERATION) { log("*** " & testcasename() & ": PICS_RO_ROLE and PICS_MIM_GENERATION required for executing the TC ***"); setverdict(inconc); stop; } // Test component configuration f_cfUp(); // Test adapter configuration // Preamble f_prInitialState(); avmPort.clear; tc_ac.start; alt { [] avmPort.receive( mw_mimInd( mw_mimMsg( -, mw_mim ))) -> value v_avmInd_i { tc_ac.stop; t_minTransInterval.start; t_maxTransInterval.start; log("*** " & testcasename() & ": INFO: Initial conditions: First MI message received ***"); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); } [] tc_ac.timeout { log("*** " & testcasename() & ": INCONC: Initial conditions: MI message not received ***"); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); stop; } } // Test Body tc_ac.start; alt { [] avmPort.receive( mw_mimInd( mw_mimMsg( -, mw_mim ))) -> value v_avmInd { tc_ac.stop; if (t_minTransInterval.running) { log("*** " & testcasename() & ": FAIL: MIM received before T_GenMIMMin ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } else if (not t_minTransInterval.running and t_maxTransInterval.running) { // TODO FSCOM: Compare v_avmInd_i & v_avmInd log("*** " & testcasename() & ": PASS: MIM received after T_GenMIMMin and before T_GenMIMMax ***"); t_maxTransInterval.stop; f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } else { log("*** " & testcasename() & ": FAIL: MIM message received but timers not running ***"); // This case should not happen, but added for completeness f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } [] t_minTransInterval.timeout { log("*** " & testcasename() & ": INFO: min timer expired ***"); repeat; } [] t_maxTransInterval.timeout { log("*** " & testcasename() & ": FAIL: MIM not received before T_GenMIMMax ***"); tc_ac.stop; } [] tc_ac.timeout { log("*** " & testcasename() & ": FAIL: No MIM received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // Postamble f_poDefault(); f_cfDown(); } // End of function f_MIM_DISS_TI_01_02 /** * @desc TP Function for TC_MIM_DISS_BV_0x */ Loading
lib/LibItsAvm_Pics.ttcn +17 −2 Original line number Diff line number Diff line Loading @@ -49,6 +49,21 @@ module LibItsAvm_Pics { * @see ETSI TS 104 202-1 Table A.6 */ modulepar integer PICS_MIM_MTU := 1500; } // end avmPics } // end LibItsAvm_Pics /** * @desc Maximum time interval between MIM generations (in seconds). * Default value, as per base standard: 1.0s * @see ETSI TS 104 202-1 Table A.6 */ modulepar float PICS_T_GENMIMMAX := 1.000; /** * @desc Minimum time interval between MIM generations (in seconds). * Default value, as per base standard: 0.1s * @see ETSI TS 104 202-1 Table A.6 */ modulepar float PICS_T_GENMIMMIN := 0.100; } // End of avmPics } // End of LibItsAvm_Pics
lib/LibItsAvm_Pixits.ttcn +10 −0 Original line number Diff line number Diff line Loading @@ -22,4 +22,14 @@ module LibItsAvm_Pixits { modulepar integer PX_MAX_REPETITION := 10; /** * @desc Multiply timer value by this control factor to increase it */ modulepar float PX_INC_TIMER_CONTROL_FACTOR := 1.10; /** * @desc Multiply timer value by this control factor to decrease it */ modulepar float PX_DEC_TIMER_CONTROL_FACTOR := 0.9; } // End of module LibItsAvm_Pixits No newline at end of file