diff --git a/ItsGeoNetworking_TestCases.ttcn b/ItsGeoNetworking_TestCases.ttcn index 017f0c727e370d070cc797e028c1c30360b007cf..ef154cdfa5925eb6715a73fb4a3e22f5f5e24ff3 100644 --- a/ItsGeoNetworking_TestCases.ttcn +++ b/ItsGeoNetworking_TestCases.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / STF405 / STF449 / STF484 + * @author ETSI / STF405 / STF449 / STF484 / TTF T042 * @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestCases.ttcn $ * $Id: ItsGeoNetworking_TestCases.ttcn 2700 2017-05-29 13:17:49Z berge $ * @desc GeoNetworking Testcases @@ -48,8 +48,9 @@ module ItsGeoNetworking_TestCases { * } * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/FDV/BAH/BV-01 - * @reference EN 302 636-4-1 [1], clauses 9.3.2 , 8.6.2 and Annex G + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/BAH/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.2, 9.6.2 and Annex H + * ETSI TS 103 836-4-1 [5], clauses 9.6.2 and 10.3.2 and Annex H */ testcase TC_GEONW_FDV_BAH_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -85,8 +86,9 @@ module ItsGeoNetworking_TestCases { * } * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/FDV/BAH/BI-02 - * @reference EN 302 636-4-1 [1], clauses 9.3.3 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/BAH/BI-02 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.3 */ testcase TC_GEONW_FDV_BAH_BI_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -125,9 +127,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/FDV/COH/BV-01 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.6 and 9.3.6 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/COH/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clauses 9.7.2, 9.7.4, 9.8.6 and 10.3.6 + * ETSI TS 103 836-4-1 [5], clauses 9.7.2 and 10.3.6 */ testcase TC_GEONW_FDV_COH_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -164,9 +167,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/FDV/COH/BV-02 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.4, 9.3.4 and 9.3.10 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/COH/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clauses 9.7.2, 9.7.4, 9.8.4, 10.3.4 and 10.3.10 + * ETSI TS 103 836-4-1 [5], clause 9.7.2, 10.3.4 and 10.3.10 */ testcase TC_GEONW_FDV_COH_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -198,10 +202,11 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @version 0.0.11 - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/FDV/COH/BV-03 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.8.2, 9.3.4 and Annex G + * + * @version 2.0.0 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/COH/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clauses 9.7.2, 9.8.5, 10.3.4 and Annex H + * ETSI TS 103 836-4-1 [5], clauses 9.7.2, 10.3.4 and Annex H */ testcase TC_GEONW_FDV_COH_BV_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -236,10 +241,11 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @version 0.0.11 - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/FDV/COH/BO-04 - * @reference EN 302 636-4-1 [1], clauses 9.3.5 + * + * @version 2.0.0 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/COH/BO-04 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.5 + * ETSI TS 103 836-4-1 [5], clause 10.5.2 */ testcase TC_GEONW_FDV_COH_BO_04() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -281,9 +287,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/FDV/BEA/BV-01 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.8.6 and 9.3.6 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/BEA/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clauses 9.7.2, 9.8.6 and 10.3.6 + * ETSI TS 103 836-4-1 [5], clause 9.7.2, 9.8.6 and 10.3.6 */ testcase TC_GEONW_FDV_BEA_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -316,11 +323,12 @@ module ItsGeoNetworking_TestCases { * } * } * NOTE: Correct Source GeoNetworking address value: itsGnLocalGnAddr MIB parameter value. - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/FDV/BEA/BV-02 - * @reference EN 302 636-4-1 [1], clauses 6.3 and 8.8.6.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/BEA/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clauses 6.3 and 9.8.6.2 + * ETSI TS 103 836-4-1 [5], clauses 6.3 and 9.8.6.2 */ testcase TC_GEONW_FDV_BEA_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -349,9 +357,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/FDV/BEA/BV-03 - * @reference EN 302 636-4-1 [1], clauses 8.5.2.2 and 8.8.6.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/BEA/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clauses 9.5.2.2 and 9.8.6.2 + * ETSI TS 103 836-4-1 [5], clauses 9.5.2.2 and 9.8.6.2 */ testcase TC_GEONW_FDV_BEA_BV_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -380,9 +389,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/FDV/BEA/BV-04 - * @reference EN 302 636-4-1 [1], clauses 8.5.2.2 and 8.8.6.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/BEA/BV-04 + * @reference ETSI EN 302 636-4-1 [1], clauses 9.5.2.2 and 9.8.6.2 + * ETSI TS 103 836-4-1 [5], clause 9.5.2.2 and 9.8.6.2 */ testcase TC_GEONW_FDV_BEA_BV_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -390,6 +400,38 @@ module ItsGeoNetworking_TestCases { } // End of testcase TC_GEONW_FDV_BEA_BV_04 + /** + * @desc GeoNetworking address validity test for LTE C-V2X media dependent functionality + *
+             * Pics Selection: PICS_GN_BEACON_SRC and PICS_DCC_NET and PICS_RADIO_COMM == e_its_g5
+             * Config Id: CF01
+             * Initial conditions:
+             *  with {
+             *      the IUT being in the "initial state"
+             *  }
+             * Expected behaviour:
+             *  ensure that {
+             *      when {
+             *          the IUT generates a Beacon packet
+             *      }
+             *      then {
+             *          the IUT sends a GeoNetworking packet
+             *              containing MID field
+             *                  indicating the the 48-bit MAC address of the ITS-G5
+             *      }
+             *  }
+             * 
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/BEA/BV-05 + * @reference ETSI EN 302 636-4-1 [1], clauses 9.5.2.2 and 9.8.6.2 + * ETSI TS 103 836-4-1 [5], clause 9.5.2.2 and 9.8.6.2 + */ + testcase TC_GEONW_FDV_BEA_BV_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_FDV_BEA_BV_04(); // Covered by TP/GEONW/FDV/BEA/BV-04 + + } // End of testcase TC_GEONW_FDV_BEA_BV_05 + } // End of group geoFdvBeacon // 6.2.1.4 @@ -425,9 +467,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/FDV/GUC/BV-01 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.8.2.2 and 9.3.8 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/GUC/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clauses 9.7.2, 9.7.4, 9.8.2.2 and 10.3.8 + * ETSI TS 103 836-4-1 [5], clauses 9.7.2, 9.7.4, 9.8.2.2 and 10.3.8 */ testcase TC_GEONW_FDV_GUC_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -466,9 +509,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/FDV/GBC/BV-01 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.5.2 and 9.3.11 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/GBC/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clauses 9.7.2, 9.7.4, 9.8.5.2 and 10.3.11 + * ETSI TS 103 836-4-1 [5], clauses 9.7.2, 9.7.4, 9.8.5.2 and 10.3.11 */ testcase TC_GEONW_FDV_GBC_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -507,9 +551,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/FDV/GAC/BV-01 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.5.2 and 9.3.12 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/GAC/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clauses 9.7.2, 9.7.4, 9.8.5.2 and 10.3.12 + * ETSI TS 103 836-4-1 [5], clauses 9.7.2, 9.7.4, 9.8.5.2 and 10.3.12 */ testcase TC_GEONW_FDV_GAC_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -552,9 +597,11 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/FDV/SHB/BV-01 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 9.3.4, 8.8.4.2 and 9.3.10 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/SHB/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clauses 9.7.2, 9.7.4, 10.3.4, 9.8.4.2 and 10.3.10 + * ETSI TS 103 836-4-1 [5], clauses 9.7.2, 9.7.4, 10.3.4, 9.8.4.2 and 10.3.10 + */ testcase TC_GEONW_FDV_SHB_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -562,6 +609,79 @@ module ItsGeoNetworking_TestCases { } // End of testcase TC_GEONW_FDV_SHB_BV_01 + /** + * @desc SHB header validity for ITS G5 media dependent functionality + *
+             * Pics Selection: PICS_GN_SHB_SRC and PICS_RADIO_COMM == 0 (ITS-G5)
+             * Config Id: CF01
+             * Initial conditions:
+             *  with {
+             *      the IUT being in the "initial state" and
+             *      the IUT having received Beacon information from the ItsNodeB
+             *  }
+             * Expected behaviour:
+             *  ensure that {
+             *      when {
+             *          the IUT is requested to send a SHB packet
+             *      }
+             *      then {
+             *          the IUT sends a GeoNetworking packet
+             *              containing Extended Header
+             *                  containing DCC-MCO
+             *                      containing CBR_L_0_Hop
+             *                      and containing CBR_L_1_Hop
+             *                      and containing Transmit Power
+             *       }
+             *  }
+             * 
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/SHB/BV-02 + * @reference ETSI TS 102 636-4-2 [2], clauses 5.3.3 and 5.3.4 + * ETSI TS 103 836-4-2 [6], clause 5.3, 5.4 and 7.2 + */ + testcase TC_GEONW_FDV_SHB_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_FDV_SHB_BV_02(); + + } // End of testcase TC_GEONW_FDV_SHB_BV_02 + + /** + * @desc SHB header validity for ITS G5 media dependent functionality + *
+             * Pics Selection: PICS_GN_SHB_SRC AND PICS_RADIO_COMM == 1 (LTE C-V2X) AND PICS_GN_LTE_TIME_SYNCH
+             * Config Id: CF01
+             * Initial conditions:
+             *  with {
+             *      the IUT being in the "initial state" and
+             *      the IUT having received Beacon information from the ItsNodeB
+             *  }
+             * Expected behaviour:
+             *  ensure that {
+             *      when {
+             *          the IUT is requested to send a SHB packet
+             *      }
+             *      then {
+             *          the IUT sends a GeoNetworking packet
+             *              containing Extended Header
+             *                  containing Timesynchronization
+             *                      containing Version
+             *                          indicating 1 (Time synchronization is supported)
+             *                      and containing Compact Time Confidence (CTC)
+             *                          indcating any_value
+             *       }
+             *  }
+             * 
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/SHB/BV-03 + * @reference ETSI TS 102 636-4-2 [2], clauses 5.3.3 and 5.3.4 + * ETSI TS 103 836-4-2 [6], clauses 5.3, 5.4 and 7.2 + */ + testcase TC_GEONW_FDV_SHB_BV_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_FDV_SHB_BV_03(); + + } // End of testcase TC_GEONW_FDV_SHB_BV_03 + } // End of group geoFdvSingleHopBroadcast // 6.2.1.8 @@ -595,9 +715,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/FDV/TSB/BV-01 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.3.2 and 9.3.9 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/FDV/TSB/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clauses 9.7.2, 9.7.4, 9.8.3.2 and 10.3.9 + * ETSI TS 103 836-4-1 [5], clauses 9.7.2, 9.7.4, 9.8.3.2 and 10.3.9 */ testcase TC_GEONW_FDV_TSB_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -648,9 +769,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-01 - * @reference EN 302 636-4-1 [1], clauses 9.3.10.3, 9.3.6.2 and 9.3.8.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.10.3, 10.3.6.2 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.10.3, 10.3.6.2 and 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -699,9 +821,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-02 - * @reference EN 302 636-4-1 [1], clauses 9.3.7.1.4, 9.3.7.1.2 and 9.3.8.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.7.1.4, 10.3.7.1.2 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.7.1.4, 10.3.7.1.2 and 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -744,9 +867,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_03_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -789,9 +913,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_03_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -835,8 +960,9 @@ module ItsGeoNetworking_TestCases { * } * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_03_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -880,8 +1006,9 @@ module ItsGeoNetworking_TestCases { * } * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_03_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -925,8 +1052,9 @@ module ItsGeoNetworking_TestCases { * } * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_03_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -970,8 +1098,9 @@ module ItsGeoNetworking_TestCases { * } * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_03_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1015,8 +1144,9 @@ module ItsGeoNetworking_TestCases { * } * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_03_07() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1060,8 +1190,9 @@ module ItsGeoNetworking_TestCases { * } * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3 and 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_03_08() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1093,9 +1224,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-04 - * @reference EN 302 636-4-1 [1], clauses 7.1.3, 9.3.8.2, 9.3.7.1.2 and Annex G + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-04 + * @reference ETSI EN 302 636-4-1 [1], clauses 8.1.3, 10.3.8.2, 10.3.7.1.2 and Annex H + * ETSI TS 103 836-4-1 [5], clauses 8.2.3, 10.3.8.2, 10.3.7.1.2 and Annex H */ testcase TC_GEONW_PON_LOT_BV_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1120,7 +1252,7 @@ module ItsGeoNetworking_TestCases { * indicating a different position than the position of the last Beacon packet * } * MESSAGE: GUC packet - * + * * Expected behaviour: * ensure that { * when { @@ -1141,9 +1273,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-05 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-05-X + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3, 10.3.8.2 and C.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3, 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_05_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1168,7 +1301,7 @@ module ItsGeoNetworking_TestCases { * indicating a different position than the position of the last Beacon packet * } * MESSAGE: GAC packet - * + * * Expected behaviour: * ensure that { * when { @@ -1189,9 +1322,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-05 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-05 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3, 10.3.8.2 and C.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3, 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_05_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1216,7 +1350,7 @@ module ItsGeoNetworking_TestCases { * indicating a different position than the position of the last Beacon packet * } * MESSAGE: GBC packet - * + * * Expected behaviour: * ensure that { * when { @@ -1237,9 +1371,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-05 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-05 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3, 10.3.8.2 and C.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3, 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_05_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1264,7 +1399,7 @@ module ItsGeoNetworking_TestCases { * indicating a different position than the position of the last Beacon packet * } * MESSAGE: TSB packet - * + * * Expected behaviour: * ensure that { * when { @@ -1285,9 +1420,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-05 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-05 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3, 10.3.8.2 and C.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3, 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_05_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1312,7 +1448,7 @@ module ItsGeoNetworking_TestCases { * indicating a different position than the position of the last Beacon packet * } * MESSAGE: SHB packet - * + * * Expected behaviour: * ensure that { * when { @@ -1333,9 +1469,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-05 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-05 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3, 10.3.8.2 and C.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3, 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_05_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1360,7 +1497,7 @@ module ItsGeoNetworking_TestCases { * indicating a different position than the position of the last Beacon packet * } * MESSAGE: LS Request packet - * + * * Expected behaviour: * ensure that { * when { @@ -1381,9 +1518,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-05 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-05 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3, 10.3.8.2 and C.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3, 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_05_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1408,7 +1546,7 @@ module ItsGeoNetworking_TestCases { * indicating a different position than the position of the last Beacon packet * } * MESSAGE: LS Reply packet - * + * * Expected behaviour: * ensure that { * when { @@ -1429,9 +1567,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOT/BV-05 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOT/BV-05 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3, 10.3.8.2 and C.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.12.3, 10.3.11.3, 10.3.9.3, 10.3.10.3, 10.3.7.3, 10.3.8.2 */ testcase TC_GEONW_PON_LOT_BV_05_07() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1472,9 +1611,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LPV/BV-01 - * @reference EN 302 636-4-1 [1], clauses 7.2.3, 9.2.2.2, 9.3.6.1 and Annex G + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LPV/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clauses 8.2.3, 10.2.2.2, 10.3.6.1 and Annex H + * ETSI TS 103 836-4-1 [5], clauses 8.3.3, 10.2.2.2, 10.3.6.1 and Annex H */ testcase TC_GEONW_PON_LPV_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1514,9 +1654,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/SQN/BV-01 - * @reference EN 302 636-4-1 [1], clauses 7.3.2, 9.3.8.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/SQN/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clauses 8.3.2 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 8.4.2 and 10.3.8.2 */ testcase TC_GEONW_PON_SQN_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1553,9 +1694,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/SQN/BV-02 - * @reference EN 302 636-4-1 [1], clauses 7.2.3, 9.3.8.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/SQN/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clauses 8.3.2 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 8.4.2 and 10.3.8.2 */ testcase TC_GEONW_PON_SQN_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1598,9 +1740,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-01 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.2, 9.2.4, 6.3 and 9.3.7.1.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.2, 10.2.4, 6.3 and 10.3.7.1.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.2, 10.2.4, 6.3 and 10.3.7.1.2 */ testcase TC_GEONW_PON_LOS_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1635,11 +1778,12 @@ module ItsGeoNetworking_TestCases { * } * } * NOTE: at least not before the LS_REQUEST retransmission timer expires - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-02 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.2, 9.2.4 and 9.3.7.1.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.2, 10.2.4 and 10.3.7.1.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.2, 10.2.4 and 10.3.7.1.2 */ testcase TC_GEONW_PON_LOS_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1674,11 +1818,12 @@ module ItsGeoNetworking_TestCases { * } * } * NOTE: Waiting Time == time difference between LS_REQUEST sending and LS_REPLY reception. - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-03 - * @reference EN 302 636-4-1 [1], clauses 7.4.3, 9.3.7.1.4, 9.3.8.2, 9.2.4 and 9.3.7.1.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clauses 8.4.3, 10.3.7.1.4, 10.3.7.1.2,9.3.8.2 and 10.2.4 + * ETSI TS 103 836-4-1 [5], clauses 8.5.3, 10.3.7.1.4, 10.3.7.1.2,9.3.8.2 and 10.2.4 */ testcase TC_GEONW_PON_LOS_BV_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1725,9 +1870,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-04 - * @reference EN 302 636-4-1 [1], clauses 7.4.3, 9.3.8.2, 9.2.4 and 9.3.7.1.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-04 + * @reference ETSI EN 302 636-4-1 [1], clauses 8.4.3, 10.2.4, 10.3.7.1.2 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 8.5.3, 10.2.4, 10.3.7.1.2 and 10.3.8.2 */ testcase TC_GEONW_PON_LOS_BV_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1760,9 +1906,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-05 - * @reference EN 302 636-4-1 [1], clauses 7.4.3, 9.3.8.2, 9.2.4 and 9.3.7.1.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-05 + * @reference ETSI EN 302 636-4-1 [1], clauses 8.4.3, 10.2.4, 10.3.7.1.2 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 8.5.3, 10.2.4, 10.3.7.1.2 and 10.3.8.2 */ testcase TC_GEONW_PON_LOS_BV_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1797,9 +1944,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-06 - * @reference EN 302 636-4-1 [1], clauses 9.3.7.1.3, 9.3.7.1.2 and 9.3.8.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-06 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.7.1.2, 10.3.7.1.3 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.7.1.2, 10.3.7.1.3 and 10.3.8.2 */ testcase TC_GEONW_PON_LOS_TI_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1833,9 +1981,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-07 - * @reference EN 302 636-4-1 [1], clauses 9.3.7.1.2, 9.3.7.1.3 and 9.3.8.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-07 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.7.1.2, 10.3.7.1.3, 10.3.8.2 and Aannex H + * ETSI TS 103 836-4-1 [5], clauses 10.3.7.1.2, 10.3.7.1.3, 10.3.8.2 and Annex H */ testcase TC_GEONW_PON_LOS_BV_07() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1869,10 +2018,11 @@ module ItsGeoNetworking_TestCases { * indicating same position as the SOPV value of the received LS_REQUEST * } * } - * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-08 - * @reference EN 302 636-4-1 [1], clauses 9.3.7.3 and 9.3.5 + * + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-08 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.7.3 and 10.3.5 + * ETSI TS 103 836-4-1 [5], clauses 10.3.7.3 and 10.3.5 */ testcase TC_GEONW_PON_LOS_BV_08() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -1901,9 +2051,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BO-09 - * @reference EN 302 636-4-1 [1], clauses 9.3.7.3 and 9.3.5 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BO-09 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.7.3 and 10.3.5 + * ETSI TS 103 836-4-1 [5], clauses 10.3.7.3 and 10.3.5 */ testcase TC_GEONW_PON_LOS_BO_09() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -1944,9 +2095,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-10 - * @reference EN 302 636-4-1 [1], clauses 9.3.7.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-10 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.7.2 and 10.3.8.3 + * ETSI TS 103 836-4-1 [5], clauses 10.3.7.2 and 10.3.8.3 */ testcase TC_GEONW_PON_LOS_BV_10() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -1981,9 +2133,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-11 - * @reference EN 302 636-4-1 [1], clauses 9.3.7.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-11 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.7.2 and 10.3.8.3 + * ETSI TS 103 836-4-1 [5], clauses 10.3.7.2 and 10.3.8.3 */ testcase TC_GEONW_PON_LOS_BV_11() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2015,9 +2168,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-12 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.7.1.2 and 7.4.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-12 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.7.1.2 and 8.4.3 + * ETSI TS 103 836-4-1 [5], clauses 8.5.3, 10.3.8.4, 10.3.7.1.2 */ testcase TC_GEONW_PON_LOS_BV_12() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -2062,9 +2216,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-13 - * @reference EN 302 636-4-1 [1], clauses 7.4.3, 9.3.7.1.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-13 + * @reference ETSI EN 302 636-4-1 [1], clauses 8.4.3 and 10.3.7.1.2 + * ETSI TS 103 836-4-1 [5], clauses 8.5.3 and 10.3.7.1.2 */ testcase TC_GEONW_PON_LOS_BV_13() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -2098,11 +2253,12 @@ module ItsGeoNetworking_TestCases { * } * } * NOTE: Stored GUC packets have been discarded upon LS failure - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-14 - * @reference EN 302 636-4-1 [1], clauses 7.4.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-14 + * @reference ETSI EN 302 636-4-1 [1], clause 8.4.3 + * ETSI TS 103 836-4-1 [5], clause 8.5.3 */ testcase TC_GEONW_PON_LOS_BV_14() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -2134,9 +2290,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-15 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.3, 9.3.7.1.2 and 7.4.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-15 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.3, 10.3.7.1.2 and 8.4.2 + * ETSI TS 103 836-4-1 [5], clauses 8.5.2, 10.3.8.3 and 10.3.7.1.2 */ testcase TC_GEONW_PON_LOS_BV_15() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -2170,9 +2327,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-16 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.7.1.2, 9.3.7.1.3 and 9.3.8.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-16 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4, 10.3.7.1.2, 10.3.7.1.3 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.4, 10.3.7.1.2, 10.3.7.1.3 and 10.3.8.2 */ testcase TC_GEONW_PON_LOS_BV_16() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -2206,9 +2364,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/LOS/BV-17 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.3, 9.3.7.1.2, 9.3.7.1.3 and 9.3.8.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/LOS/BV-17 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.3, 10.3.7.1.2, 10.3.7.1.3 and 10.3.8.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.3, 10.3.7.1.2, 10.3.7.1.3 and 10.3.8.2 */ testcase TC_GEONW_PON_LOS_BV_17() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -2246,11 +2405,12 @@ module ItsGeoNetworking_TestCases { * } * } * NOTE: Location Table Entry is created by sending any GeoNetworking packet, originated by ItsNodeA, from ItsNodeC to IUT - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-01 - * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3, 9.3.4.2 and 9.3.8.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clauses 8.5.3, 10.3.6.3, 10.3.8.2 and 10.3.8.3 + * ETSI TS 103 836-4-1 [5], clauses 8.6.3, 10.3.6.3, 10.3.8.2 and 10.3.8.3 */ testcase TC_GEONW_PON_FPB_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2296,9 +2456,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-02 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.3, 7.5.3, 9.3.6.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.3, 8.5.3 and 10.3.6.3 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.3, 8.5.3 and 10.3.6.3 */ testcase TC_GEONW_PON_FPB_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2355,9 +2516,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-03 - * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.8.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clauses 8.5.3, 10.3.6.3 and 10.3.8.3 + * ETSI TS 103 836-4-1 [5], clauses 8.6.3, 10.3.6.3 and 10.3.8.3 */ testcase TC_GEONW_PON_FPB_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2393,9 +2555,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-03 - * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.8.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clauses 8.5.3, 10.3.6.3 and 10.3.8.3 + * ETSI TS 103 836-4-1 [5], clauses 8.6.3, 10.3.6.3 and 10.3.8.3 */ testcase TC_GEONW_PON_FPB_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2426,9 +2589,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-06 - * @reference EN 302 636-4-1 [1], clauses 9.3.5, 7.5.3, 9.3.6.3 and 9.3.11.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-06 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.5, 8.5.3, 10.3.6.3 and 10.3.11.2 + * ETSI TS 103 836-4-1 [5], clauses 10.3.5, 8.5.3, 10.3.6.3 and 10.3.11.2 */ testcase TC_GEONW_PON_FPB_BV_06() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2481,9 +2645,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-07 - * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.11.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-07 + * @reference ETSI EN 302 636-4-1 [1], clauses 8.5.3, 10.3.6.3 and 10.3.11.2 + * ETSI TS 103 836-4-1 [5], clauses 8.6.3, 10.3.6.3 and 10.3.11.2 */ testcase TC_GEONW_PON_FPB_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2523,9 +2688,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-08 - * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.11.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-08 + * @reference ETSI EN 302 636-4-1 [1], clauses 8.5.3, 10.3.6.3 and 10.3.11.2 + * ETSI TS 103 836-4-1 [5], clauses 8.6.3, 10.3.6.3 and 10.3.11.2 */ testcase TC_GEONW_PON_FPB_BV_08() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2560,11 +2726,12 @@ module ItsGeoNetworking_TestCases { * } * } * NOTE: WaitingTime == time difference between Upper layer packet generation and the neighbour Beacon reception - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-09 - * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.8.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-09 + * @reference ETSI EN 302 636-4-1 [1], clauses 8.5.3, 10.3.6.3 and 10.3.11.2 + * ETSI TS 103 836-4-1 [5], clauses 8.6.3, 10.3.6.3 and 10.3.11.2 */ testcase TC_GEONW_PON_FPB_BV_09() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2598,11 +2765,12 @@ module ItsGeoNetworking_TestCases { * } * } * NOTE: WaitingTime == time difference between Upper layer packet generation and the neighbour Beacon reception - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-10 - * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.11.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-10 + * @reference ETSI EN 302 636-4-1 [1], clauses 8.5.3, 10.3.6.3 and 10.3.11.2 + * ETSI TS 103 836-4-1 [5], clauses 8.6.3, 10.3.6.3 and 10.3.11.2 */ testcase TC_GEONW_PON_FPB_BV_10() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2621,9 +2789,9 @@ module ItsGeoNetworking_TestCases { * the IUT not having received any Beacon information from ItsNodeB and * the IUT having a Location Table Entry for ItsNodeA (see note) * } - * + * * MESSAGE : GUC packet addressed to ItsNodeA - * + * * Expected behaviour: * ensure that { * when { @@ -2634,11 +2802,12 @@ module ItsGeoNetworking_TestCases { * the IUT broadcast the MESSAGE immediately * } * } - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-11-X - * @reference EN 302 636-4-1 [1], Annex D2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-11-X + * @reference ETSI EN 302 636-4-1 [1], Annex D.2 + * ETSI TS 103 836-4-1 [5], Annex D.2 */ testcase TC_GEONW_PON_FPB_BV_11_01() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2672,11 +2841,12 @@ module ItsGeoNetworking_TestCases { * the IUT broadcast the MESSAGE immediately * } * } - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-11-X - * @reference EN 302 636-4-1 [1], Annex D2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-11-X + * @reference ETSI EN 302 636-4-1 [1], Annex D.2 + * ETSI TS 103 836-4-1 [5], Annex D.2 */ testcase TC_GEONW_PON_FPB_BV_11_02() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2695,11 +2865,11 @@ module ItsGeoNetworking_TestCases { * the IUT not having received any Beacon information from ItsNodeB and * the IUT having a Location Table Entry for ItsNodeA (see note) * } - * + * * MESSAGE : GBC packet * containing DestinationArea * indicating AREA2 - * + * * Expected behaviour: * ensure that { * when { @@ -2710,11 +2880,12 @@ module ItsGeoNetworking_TestCases { * the IUT broadcast the MESSAGE immediately * } * } - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-11-X - * @reference EN 302 636-4-1 [1], Annex D2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-11-X + * @reference ETSI EN 302 636-4-1 [1], Annex D.2 + * ETSI TS 103 836-4-1 [5], Annex D.2 */ testcase TC_GEONW_PON_FPB_BV_11_03() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2733,9 +2904,9 @@ module ItsGeoNetworking_TestCases { * the IUT not having received any Beacon information from ItsNodeB and * the IUT having a Location Table Entry for ItsNodeA (see note) * } - * + * * MESSAGE : TSB packet - * + * * Expected behaviour: * ensure that { * when { @@ -2746,11 +2917,12 @@ module ItsGeoNetworking_TestCases { * the IUT broadcast the MESSAGE immediately * } * } - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-11-X - * @reference EN 302 636-4-1 [1], Annex D2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-11-X + * @reference ETSI EN 302 636-4-1 [1], Annex D.2 + * ETSI TS 103 836-4-1 [5], Annex D.2 */ testcase TC_GEONW_PON_FPB_BV_11_04() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2769,9 +2941,9 @@ module ItsGeoNetworking_TestCases { * the IUT not having received any Beacon information from ItsNodeB and * the IUT having a Location Table Entry for ItsNodeA (see note) * } - * + * * MESSAGE : SHB packet - * + * * Expected behaviour: * ensure that { * when { @@ -2782,11 +2954,12 @@ module ItsGeoNetworking_TestCases { * the IUT broadcast the MESSAGE immediately * } * } - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-11-X - * @reference EN 302 636-4-1 [1], Annex D2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-11-X + * @reference ETSI EN 302 636-4-1 [1], Annex D.2 + * ETSI TS 103 836-4-1 [5], Annex D.2 */ testcase TC_GEONW_PON_FPB_BV_11_05() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2804,9 +2977,9 @@ module ItsGeoNetworking_TestCases { * the IUT being in the "initial state" and * the IUT not having received any Beacon information from ItsNodeB * } - * + * * MESSAGE : GUC packet addressed to ItsNodeA - * + * * Expected behaviour: * ensure that { * when { @@ -2817,11 +2990,12 @@ module ItsGeoNetworking_TestCases { * the IUT broadcast the MESSAGE immediately * } * } - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-12-X - * @reference EN 302 636-4-1 [1], Annex D2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-12-X + * @reference ETSI EN 302 636-4-1 [1], Annex D.2 + * ETSI TS 103 836-4-1 [5], Annex D.2 */ testcase TC_GEONW_PON_FPB_BV_12_01() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2839,11 +3013,11 @@ module ItsGeoNetworking_TestCases { * the IUT being in the "initial state" and * the IUT not having received any Beacon information from ItsNodeB * } - * + * * MESSAGE : GAC packet * containing DestinationArea * indicating AREA2 - * + * * Expected behaviour: * ensure that { * when { @@ -2854,11 +3028,12 @@ module ItsGeoNetworking_TestCases { * the IUT broadcast the MESSAGE immediately * } * } - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-12-X - * @reference EN 302 636-4-1 [1], Annex D2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-12-X + * @reference ETSI EN 302 636-4-1 [1], Annex D.2 + * ETSI TS 103 836-4-1 [5], Annex D.2 */ testcase TC_GEONW_PON_FPB_BV_12_02() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2876,11 +3051,11 @@ module ItsGeoNetworking_TestCases { * the IUT being in the "initial state" and * the IUT not having received any Beacon information from ItsNodeB * } - * + * * MESSAGE : GBC packet * containing DestinationArea * indicating AREA2 - * + * * Expected behaviour: * ensure that { * when { @@ -2891,11 +3066,12 @@ module ItsGeoNetworking_TestCases { * the IUT broadcast the MESSAGE immediately * } * } - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-12-X - * @reference EN 302 636-4-1 [1], Annex D2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-12-X + * @reference ETSI EN 302 636-4-1 [1], Annex D.2 + * ETSI TS 103 836-4-1 [5], Annex D.2 */ testcase TC_GEONW_PON_FPB_BV_12_03() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2913,9 +3089,9 @@ module ItsGeoNetworking_TestCases { * the IUT being in the "initial state" and * the IUT not having received any Beacon information from ItsNodeB * } - * + * * MESSAGE : TSB packet - * + * * Expected behaviour: * ensure that { * when { @@ -2926,11 +3102,12 @@ module ItsGeoNetworking_TestCases { * the IUT broadcast the MESSAGE immediately * } * } - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/FPB/BV-12-X - * @reference EN 302 636-4-1 [1], Annex D2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/FPB/BV-12-X + * @reference ETSI EN 302 636-4-1 [1], Annex D.2 + * ETSI TS 103 836-4-1 [5], Annex D.2 */ testcase TC_GEONW_PON_FPB_BV_12_04() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -2972,9 +3149,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GNA/BV-01 - * @reference EN 302 636-4-1 [1], clauses 9.2.1.2 and 9.3.6.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GNA/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.2.1.2 and 10.3.6.2 + * ETSI TS 103 836-4-1 [5], clauses 10.2.1.2 and 10.3.6.2 */ testcase TC_GEONW_PON_GNA_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -3010,9 +3188,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GNA/BV-02 - * @reference EN 302 636-4-1 [1], clauses 9.2.1.4 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GNA/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clause 10.2.1.5 + * ETSI TS 103 836-4-1 [5], clause 10.2.1.5 */ testcase TC_GEONW_PON_GNA_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -3047,9 +3226,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/BEA/TI-01 - * @reference EN 302 636-4-1 [1], clauses 9.3.6.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/BEA/TI-01 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.6.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.6.2 */ testcase TC_GEONW_PON_BEA_TI_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -3080,9 +3260,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/BEA/TI-02 - * @reference EN 302 636-4-1 [1], clauses 9.2.3 and 9.3.10.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/BEA/TI-02 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.2.3 and 10.3.10.2 + * ETSI TS 103 836-4-1 [5], clauses 10.2.3 and 10.3.10.2 */ testcase TC_GEONW_PON_BEA_TI_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -3140,9 +3321,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GUC/ALL/BV-03 - * @reference EN 302 636-4-1 [1], clauses 10.3.8.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GUC/ALL/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.8.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.8.3 */ testcase TC_GEONW_PON_GUC_ALL_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -3175,9 +3357,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GUC/ALL/BO-04 - * @reference EN 302 636-4-1 [1], clauses 10.3.8.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GUC/ALL/BO-04 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.8.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.8.3 */ testcase TC_GEONW_PON_GUC_ALL_BO_04() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -3205,9 +3388,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GUC/ALL/BV-05 - * @reference EN 302 636-4-1 [1], clauses 10.3.8.4 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GUC/ALL/BV-05 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4 + * ETSI TS 103 836-4-1 [5], clause 10.3.8.4 */ testcase TC_GEONW_PON_GUC_ALL_BV_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -3237,9 +3421,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GUC/ALL/BV-06 - * @reference EN 302 636-4-1 [1], clauses 10.3.8.4 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GUC/ALL/BV-06 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.4 + * ETSI TS 103 836-4-1 [5], clause 10.3.8.4 */ testcase TC_GEONW_PON_GUC_ALL_BV_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -3277,9 +3462,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GUC/ALL/BO-08 - * @reference EN 302 636-4-1 [1], clause 10.3.9.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GUC/ALL/BO-08 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.9.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.9.3 */ testcase TC_GEONW_PON_GUC_ALL_BO_08() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -3318,9 +3504,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GUC/GRD/BV-01 - * @reference EN 302 636-4-1 [1], clauses 10.3.8.2, Annex E.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GUC/GRD/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.8.2 and Annex E.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.8.2 and Annex E.2 */ testcase TC_GEONW_PON_GUC_GRD_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -3356,9 +3543,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GUC/GRD/BV-02 - * @reference EN 302 636-4-1 [1], clauses 10.3.8.3, Annex E.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GUC/GRD/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.9.3 and Annex E.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.9.2 and Annex E.2 */ testcase TC_GEONW_PON_GUC_GRD_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -3397,8 +3585,9 @@ module ItsGeoNetworking_TestCases { * } * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GUC/GRD/BO-07 - * @reference EN 302 636-4-1 [1], clause 10.3.9.3, Annex E.2 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GUC/GRD/BO-07 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.9.3 and Annex E.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.9.2 and Annex E.2 */ testcase TC_GEONW_PON_GUC_GRD_BO_07() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -3436,9 +3625,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GUC/CBF/BV-01 - * @reference EN 302 636-4-1 [1], clauses 10.3.8.2, 10.3.8.3, Annex E.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GUC/CBF/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.8.2, 10.3.6.3 and Annex E.3 + * ETSI TS 103 836-4-1 [5], clauses 10.3.8.2, 10.3.6.3 and Annex E.3 */ testcase TC_GEONW_PON_GUC_CBF_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -3477,11 +3667,12 @@ module ItsGeoNetworking_TestCases { * NOTE: The CBF delay timer value is calculated from the itsGnDefaultMaxCommunicationRange, * itsGnCbfMinTime, and itsGnCbfMaxTime MIB attributes, and the distance value * between IUT and ItsNodeC - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GUC/CBF/BV-02 - * @reference EN 302 636-4-1 [1], clauses 10.3.8.3, Annex E.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GUC/CBF/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.8.3 and Annex E.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.8.3 and Annex E.3 */ testcase TC_GEONW_PON_GUC_CBF_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -3522,11 +3713,12 @@ module ItsGeoNetworking_TestCases { * NOTE: the CBF delay timer value is calculated from the itsGnDefaultMaxCommunicationRange, * itsGnCbfMinTime, and itsGnCbfMaxTime MIB attributes, and the * distance value between IUT and ItsNodeC - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GUC/CBF/BV-07 - * @reference EN 302 636-4-1 [1], clauses 10.3.8.3, Annex E.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GUC/CBF/BV-07 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.8.3 and Annex E.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.8.3 and Annex E.3 */ testcase TC_GEONW_PON_GUC_CBF_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -3563,9 +3755,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GUC/CBF/BV-20 - * @reference EN 302 636-4-1 [1], clauses 10.3.8.3, Annex E.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GUC/CBF/BV-20 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.8.3 and Annex E.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.8.3 and Annex E.3 */ testcase TC_GEONW_PON_GUC_CBF_BV_20() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -3601,11 +3794,12 @@ module ItsGeoNetworking_TestCases { * upon expiry of CBF_MAX * } * } - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GUC/CBF/BV-21 - * @reference EN 302 636-4-1 [1], clauses 10.3.8.3, Annex E.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GUC/CBF/BV-21 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.8.3 and Annex E.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.8.3 and Annex E.3 */ testcase TC_GEONW_PON_GUC_CBF_BV_21() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -3643,11 +3837,12 @@ module ItsGeoNetworking_TestCases { * upon expiry of CBF_MAX * } * } - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GUC/CBF/BV-22 - * @reference EN 302 636-4-1 [1], clauses 10.3.8.3, Annex E.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GUC/CBF/BV-22 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.8.3 and Annex E.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.8.3 and Annex E.3 */ testcase TC_GEONW_PON_GUC_CBF_BV_22() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -3666,154 +3861,158 @@ module ItsGeoNetworking_TestCases { group gbcNonAreaAllForwardingAlgorithm { - /** + /** * @desc Check that the protocol header fields (RHL) are correctly updated during a GBC forwarding step - *
-             * Pics Selection:  PICS_GN_GBC_FWD
+                * 
+                * Pics Selection:  PICS_GN_GBC_FWD
                 * Config Id: CF03
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from ItsNodeB
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
+                *      the IUT having received Beacon information from ItsNodeB
                 *      the IUT having received Beacon information from ItsNodeC
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives a GBC packet from ItsNodeC
-             *              containing TrafficClass.SCF set to 1
-             *              containing Basic Header
-             *                  containing RHL field
-             *                      indicating value HL1 higher than 1
-             *              containing Common Header
-             *                  containing MHL field
-             *                      indicating value MHL1
-             *              containing DestinationArea
+                *              containing TrafficClass.SCF set to 1
+                *              containing Basic Header
+                *                  containing RHL field
+                *                      indicating value HL1 higher than 1
+                *              containing Common Header
+                *                  containing MHL field
+                *                      indicating value MHL1
+                *              containing DestinationArea
                 *                  indicating AREA2
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT retransmits the GBC packet
-             *              containing Basic Header
-             *                  containing RHL field
-             *                      indicating value (HL1 -1)
-             *              containing Common Header
-             *                  containing MHL field
-             *                      indicating value MHL1
+                *              containing Basic Header
+                *                  containing RHL field
+                *                      indicating value (HL1 -1)
+                *              containing Common Header
+                *                  containing MHL field
+                *                      indicating value MHL1
                 *              containing DestinationArea
                 *                  indicating AREA2
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/NONAREA/ALL/BV-03 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.3 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/NONAREA/ALL/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.3 + */ testcase TC_GEONW_PON_GBC_NONAREA_ALL_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_NONAREA_ALL_BV_03(); } // End of testcase TC_GEONW_PON_GBC_NONAREA_ALL_BV_03 - /** + /** * @desc Check that the RHL restriction is correctly handled at a GBC forwarding step - *
-             * Pics Selection: PICS_GN_GBC_FWD
+                * 
+                * Pics Selection: PICS_GN_GBC_FWD
                 * Config Id: CF03
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from ItsNodeB
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
+                *      the IUT having received Beacon information from ItsNodeB
                 *      the IUT having received Beacon information from ItsNodeC
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives a GBC packet from ItsNodeC
-             *              containing TrafficClass.SCF set to 1
-             *              containing Basic Header
-             *                  containing RHL field
-             *                      indicating 1
-             *              containing GBC Extended Header
-             *                  containing DestinationArea
+                *              containing TrafficClass.SCF set to 1
+                *              containing Basic Header
+                *                  containing RHL field
+                *                      indicating 1
+                *              containing GBC Extended Header
+                *                  containing DestinationArea
                 *                      indicating AREA2
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT does not retransmit the GBC packet
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/NONAREA/ALL/BV-04 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.3 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/NONAREA/ALL/BV-04 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.3 + */ testcase TC_GEONW_PON_GBC_NONAREA_ALL_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_NONAREA_ALL_BV_04(); } // End of testcase TC_GEONW_PON_GBC_NONAREA_ALL_BV_04 - /** + /** * @desc Check that a received GBC packet is not passed over the Gn SAP if it is received for the * first time outside the GBC destination area - *
+                * 
                 * Pics Selection: PICS_GN_GBC_FWD
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from ItsNodeB
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT receives a GBC packet
-             *              containing TrafficClass.SCF set to 1
-             *              containing DestinationArea
+                * Config Id: CF01
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
+                *      the IUT having received Beacon information from ItsNodeB
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
+                *          the IUT receives a GBC packet
+                *              containing TrafficClass.SCF set to 1
+                *              containing DestinationArea
                 *                  indicating AREA2
-             *      }
-             *      then {
-             *          the IUT does not pass the received GBC packet to any Upper Layer protocol
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/NONAREA/ALL/BV-06 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.3 - */ + * } + * then { + * the IUT does not pass the received GBC packet to any Upper Layer protocol + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/NONAREA/ALL/BV-06 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.3 + */ testcase TC_GEONW_PON_GBC_NONAREA_ALL_BV_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_NONAREA_ALL_BV_06(); } // End of testcase TC_GEONW_PON_GBC_NONAREA_ALL_BV_06 - /** + /** * @desc Check that a received GBC packet is discarded when indicating a too big GeoArea - *
-             * Pics Selection: PICS_GN_GBC_FWD
+                * 
+                * Pics Selection: PICS_GN_GBC_FWD
                 * Config Id: CF04
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from ItsNodeB
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
+                *      the IUT having received Beacon information from ItsNodeB
                 *      the IUT having received Beacon information from ItsNodeD
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives a GBC packet from ItsNodeC
-             *              containing TrafficClass.SCF set to 1
-             *              containing DestinationArea
+                *              containing TrafficClass.SCF set to 1
+                *              containing DestinationArea
                 *                  indicating a geoArea bigger than itsGnMaxGeoAreaSize
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT does not retransmit the received GBC packet
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/NONAREA/ALL/BO-09 - * @reference EN 302 636-4-1 [1], Annex B.3 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/NONAREA/ALL/BO-09 + * @reference ETSI EN 302 636-4-1 [1], Annex B.3 + * ETSI TS 103 836-4-1 [5], Annex B.3 + */ testcase TC_GEONW_PON_GBC_NONAREA_ALL_BO_09() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_NONAREA_ALL_BO_09(); @@ -3832,26 +4031,27 @@ module ItsGeoNetworking_TestCases { * the IUT having received Beacon information from ItsNodeB and * the IUT having received Beacon information from ItsNodeC and * the IUT having received Beacon information from ItsNodeD - * } - * Expected behaviour: - * ensure that { - * when { + * } + * Expected behaviour: + * ensure that { + * when { * the IUT receives the a GBC packet from ItsNodeD - * containing TrafficClass.SCF set to 1 + * containing TrafficClass.SCF set to 1 * containing GBC Extended Header - * containing DestinationArea + * containing DestinationArea * indicating AREA2 - * } - * then { + * } + * then { * the IUT discards the received GBC packet - * } - * } - * - * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/NONAREA/ALL/BO-10 - * @reference EN 302 636-4-1 [1], Annex D - */ + * } + * } + * + * + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/NONAREA/ALL/BO-10 + * @reference ETSI EN 302 636-4-1 [1], Annex D + * ETSI TS 103 836-4-1 [5], Annex D + */ testcase TC_GEONW_PON_GBC_NONAREA_ALL_BO_10() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_NONAREA_ALL_BO_10(); @@ -3862,96 +4062,98 @@ module ItsGeoNetworking_TestCases { group gbcNonAreaGreedyForwarding { - /** + /** * @desc Check that a GBC request over upper Gn SAP triggers line forwarding if the IUT is outside the Destination Area - *
+                * 
                 * Pics Selection: PICS_GN_GBC_SRC AND (PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'GREEDY'
                 *                                       OR PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'UNSPECIFIED')
                 * Config Id: CF02
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
                 *      the IUT having received Beacon information from ItsNodeD and
-             *      the IUT having received Beacon information from ItsNodeB
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *      the IUT having received Beacon information from ItsNodeB
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT is requested to send a GBC packet
-             *              containing TrafficClass.SCF set to 1
-             *              containing DestinationArea
+                *              containing TrafficClass.SCF set to 1
+                *              containing DestinationArea
                 *                  indicating AREA2
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT selects ItsNodeB as the next hop and
                 *          the IUT sends the GBC packet (see note)
-             *      }
-             *  }
+                *      }
+                *  }
                 *  NOTE: Next hop ITS Station being identified by the MAC layer address of ItsNodeB
-                    *
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/NONAREA/GRD/BV-01 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.2, Annex E.2 - */ + * + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/NONAREA/GRD/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.2 and Annex E.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.2 and Annex E.2 + */ testcase TC_GEONW_PON_GBC_NONAREA_GRD_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_NONAREA_GRD_BV_01(); } // End of testcase TC_GEONW_PON_GBC_NONAREA_GRD_BV_01 - /** + /** * @desc Check that a received GBC packet is triggering line forwarding if received out of its * destination area for the first time from a known ITS-Station - *
+                * 
                 * Pics Selection: PICS_GN_GBC_FWD AND (PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'GREEDY'
                 *                                       OR PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'UNSPECIFIED')
-             * Config Id: CF04
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from ItsNodeB and
+                * Config Id: CF04
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
+                *      the IUT having received Beacon information from ItsNodeB and
                 *      the IUT having received Beacon information from ItsNodeD and
                 *      the IUT having received Beacon information from ItsNodeC
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives a GBC packet generated by ItsNodeC
-             *              containing TrafficClass.SCF set to 1
-             *              containing DestinationArea
-             *                  indicating AREA2
-             *      }
-             *      then {
+                *              containing TrafficClass.SCF set to 1
+                *              containing DestinationArea
+                *                  indicating AREA2
+                *      }
+                *      then {
                 *          the IUT selects ItsNodeB as the next hop and
                 *          the IUT forwards the GBC packet (see note)
-             *      }
-             *  }
+                *      }
+                *  }
                 *  NOTE: Next hop ITS Station being identified by the MAC layer address of ItsNodeB
-                    *
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/NONAREA/GRD/BV-02 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.3, Annex E.2 - */ + * + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/NONAREA/GRD/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.3 and Annex E.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.3 and Annex E.2 + */ testcase TC_GEONW_PON_GBC_NONAREA_GRD_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_NONAREA_GRD_BV_02(); } // End of testcase TC_GEONW_PON_GBC_NONAREA_GRD_BV_02 - /** + /** * @desc Check that a received GBC packet is not triggering line forwarding if received out of its * destination area twice or more - *
+                * 
                 * Pics Selection: PICS_GN_GBC_FWD AND (PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'GREEDY'
                 *                                       OR PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'UNSPECIFIED')
-             * Config Id: CF04
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from ItsNodeB and
-             *      the IUT having received Beacon information from ItsNodeD
+                * Config Id: CF04
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
+                *      the IUT having received Beacon information from ItsNodeB and
+                *      the IUT having received Beacon information from ItsNodeD
                 *      the IUT having received a GBC packet from ItsNodeC
                 *          containing TrafficClass.SCF set to 1
                 *          containing Basic Header
@@ -3963,10 +4165,10 @@ module ItsGeoNetworking_TestCases {
                 *              containing DestinationArea
                 *                  indicating AREA2
                 *      the IUT having forwarded the received GBC packet
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives the same GBC packet from ItsNodeD
                 *              containing Basic Header
                 *                  containing RHL field
@@ -3974,16 +4176,17 @@ module ItsGeoNetworking_TestCases {
                 *              containing GBC Extended Header
                 *                  containing SN field
                 *                      indicating value SN1
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT does not forward the received GBC packet
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/NONAREA/GRD/BO-07 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.3 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/NONAREA/GRD/BO-07 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.3 + */ testcase TC_GEONW_PON_GBC_NONAREA_GRD_BO_07() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_NONAREA_GRD_BO_07(); @@ -3994,105 +4197,107 @@ module ItsGeoNetworking_TestCases { group gbcNonAreaContentionBasedForwarding { - /** + /** * @desc Check that a GBC request over upper Gn SAP triggers the broadcasting of a GBC packet if the IUT is outside the Destination Area - *
+                * 
                 * Pics Selection:  PICS_GN_GBC_SRC AND PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'CBF'
-             * Config Id: CF02
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
+                * Config Id: CF02
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
                 *      the IUT having received Beacon information from ItsNodeD and
                 *      the IUT having received Beacon information from ItsNodeB
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                *      when {
+                * Expected behaviour:
+                *  ensure that {
                 *          the IUT is requested to send a GBC packet
                 *              containing TrafficClass.SCF set to 1
                 *              containing DestinationArea
                 *                  indicating AREA2
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT broadcasts immediately the GBC packet
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-01 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.2, Annex E.3 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.2 and Annex E.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.2 and Annex E.3 + */ testcase TC_GEONW_PON_GBC_NONAREA_CBF_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_NONAREA_CBF_BV_01(); } // End of testcase TC_GEONW_PON_GBC_NONAREA_CBF_BV_01 - /** + /** * @desc Check that a received GBC packet is forwarded at the correct time according to the contention * based forwarding rules - *
+                * 
                 * Pics Selection:  PICS_GN_GBC_FWD AND PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'CBF'
                 * Config Id: CF03
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
                 *      the IUT having received Beacon information from ItsNodeB and
                 *      the IUT having received Beacon information from ItsNodeC and
                 *      the distance between IUT and ItsNodeA being
                 *          less than itsGnDefaultMaxCommunicationRange MIB attribute
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives a GBC packet addressed to ItsNodeA from ItsNodeC
                 *              containing TrafficClass.SCF set to 1
-             *              containing Basic Header
-             *                  containing RHL field
+                *              containing Basic Header
+                *                  containing RHL field
                 *                      indicating value greater than 1
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT re-broadcasts the received GBC packet
                 *              upon expiry of calculated CBF delay (see note)
-             *      }
-             *  }
+                *      }
+                *  }
                 *  NOTE: The CBF delay timer value is calculated from the itsGnDefaultMaxCommunicationRange, 
                 *        itsGnGeoCbfMinTime, and itsGnGeoCbfMaxTime MIB attributes, and the distance value between IUT and ItsNodeC.
                 *  
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-02 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.3, Annex E.3 - */ + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.3 and Annex E.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.3 and Annex E.3 + */ testcase TC_GEONW_PON_GBC_NONAREA_CBF_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_NONAREA_CBF_BV_02(); } // End of testcase TC_GEONW_PON_GBC_NONAREA_CBF_BV_02 - /** + /** * @desc Check that GBC packet forwarding correctly avoids packet duplication according to the * contention based forwarding rules - *
+                * 
                 * Pics Selection:  PICS_GN_GBC_FWD AND PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'CBF'
                 * Config Id: CF03
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from ItsNodeB and
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
+                *      the IUT having received Beacon information from ItsNodeB and
                 *      the IUT having received Beacon information from ItsNodeC and
                 *      the distance between IUT and ItsNodeA being 
                 *          less than the itsGnDefaultMaxCommunicationRange MIB attribute and
                 *      the IUT having received a GBC packet addressed to ItsNodeA from ItsNodeC
                 *          containing TrafficClass.SCF set to 1
-             *          containing Basic Header
-             *              containing RHL field
+                *          containing Basic Header
+                *              containing RHL field
                 *                  indicating value greater than 1 and 
                 *      the IUT having started a CBF timer for this packet (see note)
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives the same GBC packet from ItsNodeB
                 *              before expiration of the CBF timer
                 *      }
@@ -4104,17 +4309,18 @@ module ItsGeoNetworking_TestCases {
                 *        itsGnGeoCbfMinTime, and itsGnGeoCbfMaxTime MIB attributes, and the distance value between IUT and ItsNodeC.
                 *  
                 * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-07 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.3, Annex E.3 - */ + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-07 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.3 and Annex E.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.3 and Annex E.3 + */ testcase TC_GEONW_PON_GBC_NONAREA_CBF_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_NONAREA_CBF_BV_07(); } // End of testcase TC_GEONW_PON_GBC_NONAREA_CBF_BV_07 - /** + /** * @desc Check that a received GBC packet forwarding is correctly handling the minimum delay value * according to the contention based forwarding rules *
@@ -4133,27 +4339,28 @@ module ItsGeoNetworking_TestCases {
                 *      when {
                 *          the IUT receives a GBC packet addressed to ItsNodeA from ItsNodeC
                 *              containing TrafficClass.SCF set to 1
-             *              containing Basic Header
-             *                  containing RHL field
+                *              containing Basic Header
+                *                  containing RHL field
                 *                      indicating value greater than 1
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT re-broadcasts the received GBC packet
                 *              upon expiry of itsGnGeoCbfMinTime delay
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-20 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.3, Annex E.3 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-20 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.3 and Annex E.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.3 and Annex E.3 + */ testcase TC_GEONW_PON_GBC_NONAREA_CBF_BV_20() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_NONAREA_CBF_BV_20(); } // End of testcase TC_GEONW_PON_GBC_NONAREA_CBF_BV_20 - /** + /** * @desc Check that a received GBC packet is forwarded at the correct time according to the contention * based forwarding rules if received for the first time when IUT is outside of the destination area * from an unknown sender @@ -4180,19 +4387,20 @@ module ItsGeoNetworking_TestCases { * upon expiry of CBF_MAX * } * } - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-21 - * @reference EN 302 636-4-1 [1], Annex E.3 - */ + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-21 + * @reference ETSI EN 302 636-4-1 [1], Annex E.3 + * ETSI TS 103 836-4-1 [5], Annex E.3 + */ testcase TC_GEONW_PON_GBC_NONAREA_CBF_BV_21() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_NONAREA_CBF_BV_21(); } // End of testcase TC_GEONW_PON_GBC_NONAREA_CBF_BV_21 - /** + /** * @desc Check that a received GBC packet is forwarded at the correct time according to the contention * based forwarding rules if received for the first time when IUT is outside of the destination area * from a known sender having an uncertain position (PAI = 0) @@ -4223,12 +4431,13 @@ module ItsGeoNetworking_TestCases { * upon expiry of CBF_MAX * } * } - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-22 - * @reference EN 302 636-4-1 [1], Annex E.3 - */ + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-22 + * @reference ETSI EN 302 636-4-1 [1], Annex E.3 + * ETSI TS 103 836-4-1 [5], Annex E.3 + */ testcase TC_GEONW_PON_GBC_NONAREA_CBF_BV_22() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_NONAREA_CBF_BV_22(); @@ -4243,7 +4452,7 @@ module ItsGeoNetworking_TestCases { group gbcAreaAllForwardingAlgorithm { - /** + /** * @desc Check that a GBC request over upper Gn SAP triggers broadcasting of a GBC packet if the IUT is within the Destination Area *
                 * Pics Selection: PICS_GN_GBC_SRC
@@ -4269,177 +4478,182 @@ module ItsGeoNetworking_TestCases {
                 *      }
                 *  }
                 * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/ALL/BV-01 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.2 - */ + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/ALL/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.2 + */ testcase TC_GEONW_PON_GBC_AREA_ALL_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_AREA_ALL_BV_01(); } // End of testcase TC_GEONW_PON_GBC_AREA_ALL_BV_01 - /** + /** * @desc Check that the protocol header fields (RHL) are correctly updated during a GBC re- - * broadcasting step - *
+                *          broadcasting step
+                * 
                 * Pics Selection:  PICS_GN_GBC_FWD
-             * Config Id: CF02
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from ItsNodeD and
-             *      the IUT having received Beacon information from ItsNodeB
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                * Config Id: CF02
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
+                *      the IUT having received Beacon information from ItsNodeD and
+                *      the IUT having received Beacon information from ItsNodeB
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives a GBC packet
                 *              containing TrafficClass.SCF set to 1
-             *              containing Basic Header
-             *                  containing RHL field
+                *              containing Basic Header
+                *                  containing RHL field
                 *                      indicating value HL1 higher than 1
-             *              containing Common Header
-             *                  containing MHL field
-             *                      indicating value MHL1
+                *              containing Common Header
+                *                  containing MHL field
+                *                      indicating value MHL1
                 *              containing DestinationArea
                 *                      indicating AREA1
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT retransmits the GBC packet
-             *              containing Basic Header
-             *                  containing RHL field
-             *                      indicating value (HL1 -1)
-             *              containing Common Header
-             *                  containing MHL field
-             *                      indicating value MHL1
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/ALL/BV-03 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.3 - */ + * containing Basic Header + * containing RHL field + * indicating value (HL1 -1) + * containing Common Header + * containing MHL field + * indicating value MHL1 + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/ALL/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.3 + */ testcase TC_GEONW_PON_GBC_AREA_ALL_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_AREA_ALL_BV_03(); } // End of testcase TC_GEONW_PON_GBC_AREA_ALL_BV_03 - /** + /** * @desc Check that the RHL restriction is correctly handled at a GBC re-broadcasting step - *
+                * 
                 * Pics Selection: PICS_GN_GBC_FWD
-             * Config Id: CF02
-             * Initial conditions:
-             *  with {
+                * Config Id: CF02
+                * Initial conditions:
+                *  with {
                 *      the IUT being in the "initial state" and
                 *      the IUT having received Beacon information from ItsNodeD and
                 *      the IUT having received Beacon information from ItsNodeB
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives a GBC packet
                 *              containing TrafficClass.SCF set to 1
-             *              containing Basic Header
-             *                  containing RHL field
-             *                      indicating 1
+                *              containing Basic Header
+                *                  containing RHL field
+                *                      indicating 1
                 *              containing GBC Extended Header
                 *                  containing DestinationArea
                 *                      indicating AREA1
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT does not retransmit the GBC packet
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/ALL/BV-04 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.3 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/ALL/BV-04 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.3 + */ testcase TC_GEONW_PON_GBC_AREA_ALL_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_AREA_ALL_BV_04(); } // End of testcase TC_GEONW_PON_GB_AREA_ALLC_BV_04 - /** + /** * @desc Check that a received GBC packet is passed over the Gn SAP to the correct upper * protocol if it is received for the first time within the GBC destination area - *
+                * 
                 * Pics Selection: PICS_GN_GBC_DST
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
+                * Config Id: CF01
+                * Initial conditions:
+                *  with {
                 *      the IUT being in the "initial state" and
                 *      the IUT having received Beacon information from ItsNodeB
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *    when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *    when {
                 *          the IUT receives a GBC packet
                 *              containing TrafficClass.SCF set to 1
                 *              containing DestinationArea
                 *                  indicating AREA1
-             *    }
-             *    then {
+                *    }
+                *    then {
                 *          the IUT passes the received GBC packet to the correct Upper Layer protocol
-             *    }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/ALL/BV-05 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.3 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/ALL/BV-05 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.3 + */ testcase TC_GEONW_PON_GBC_AREA_ALL_BV_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_AREA_ALL_BV_05(); } // End of testcase TC_GEONW_PON_GBC_AREA_ALL_BV_05 - /** + /** * @desc Check that a received GBC packet is not passed over the Gn SAP if it is received for the * second or more time - *
+                * 
                 * Pics Selection: PICS_GN_GBC_DST
-             * Config Id: CF02
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
+                * Config Id: CF02
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
                 *      the IUT having received Beacon information from ItsNodeD and
                 *      the IUT having received Beacon information from ItsNodeB and
                 *      the IUT having received a GBC packet from ItsNodeB
                 *          containing TrafficClass.SCF set to 1
-             *          containing Basic Header
-             *              containing RHL field
+                *          containing Basic Header
+                *              containing RHL field
                 *                  indicating HL1
                 *          containing GBC Extended Header
-             *              containing SN field
+                *              containing SN field
                 *                  indicating value SN1
                 *              containing DestinationArea
                 *                  indicating AREA1 and
                 *      the IUT having passed the received GBC packet to the correct Upper Layer protocol
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives the same GBC packet from ItsNodeD
-             *              containing Basic Header
-             *                  containing RHL field
+                *              containing Basic Header
+                *                  containing RHL field
                 *                      indicating value lower than HL1
-             *                  containing SN field
-             *                      indicating value SN1
-             *      }
-             *      then {
+                *                  containing SN field
+                *                      indicating value SN1
+                *      }
+                *      then {
                 *          the IUT does not pass the received GBC packet to any Upper Layer protocol
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/ALL/BO-08 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.3 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/ALL/BO-08 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.3 + */ testcase TC_GEONW_PON_GBC_AREA_ALL_BO_08() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_AREA_ALL_BO_08(); @@ -4450,7 +4664,7 @@ module ItsGeoNetworking_TestCases { group gbcAreaSimpleForwarding { - /** + /** * @desc Check that a received GBC packet is triggering re-broadcasting if received for the first * time within its destination area *
@@ -4476,17 +4690,18 @@ module ItsGeoNetworking_TestCases {
                 *      }
                 *  }
                 * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/SMP/BV-02 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.3, Annex E.2 - */ + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/SMP/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.3 and Annex E.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.3 and Annex E.2 + */ testcase TC_GEONW_PON_GBC_AREA_SMP_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_AREA_SMP_BV_02(); } // End of testcase TC_GEONW_PON_GBC_AREA_SMP_BV_02 - /** + /** * @desc Check that a received GBC packet is not triggering re-broadcasting if received for * the second or more time (duplicate packet detection) *
@@ -4526,10 +4741,11 @@ module ItsGeoNetworking_TestCases {
                 *      }
                 *  }
                 * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/SMP/BO-07 - * @reference EN 302 636-4-1 [1], clauses 10.3.11.3, Annex A.2 - */ + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/SMP/BO-07 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.11.3 and Annex E.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.11.3 and Annex E.2 + */ testcase TC_GEONW_PON_GBC_AREA_SMP_BO_07() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_AREA_SMP_BO_07(); @@ -4540,53 +4756,54 @@ module ItsGeoNetworking_TestCases { group gbcAreaContentionBasedForwarding { - /** + /** * @desc Check that a received GBC packet is triggering contention if received for the first time from a known sender * when inside of the destination area - *
+                * 
                 * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_AREA_FORWARDING_ALGORITHM == 'CBF'
                 * Config Id: CF04
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
                 *      the IUT having received Beacon information from ItsNodeB and
-             *      the IUT having received Beacon information from ItsNodeD and
+                *      the IUT having received Beacon information from ItsNodeD and
                 *      the IUT having received Beacon information from ItsNodeC
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives the a GBC packet from ItsNodeC
                 *              containing TrafficClass.SCF set to 1
                 *              containing GBC Extended Header
                 *                  containing DestinationArea
                 *                      indicating AREA1
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT saves the GBC packet into the CBF buffer and
                 *          the IUT starts the contention timer and
                 *          the IUT re-broadcasts the received GBC packet
                 *              upon expiry of the contention timer
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/CBF/BV-02 - * @reference EN 302 636-4-1 [1], Annex E.3 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/CBF/BV-02 + * @reference ETSI EN 302 636-4-1 [1], Annex E.3 + * ETSI TS 103 836-4-1 [5], Annex E.3 + */ testcase TC_GEONW_PON_GBC_AREA_CBF_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_AREA_CBF_BV_02(); } // End of testcase TC_GEONW_PON_GBC_AREA_CBF_BV_02 - /** + /** * @desc Check that a received GBC packet is discarded if received twice or more - *
+                * 
                 * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_AREA_FORWARDING_ALGORITHM == 'CBF'
                 * Config Id: CF04
-             * Initial conditions:
-             *  with {
+                * Initial conditions:
+                *  with {
                 *      the IUT being in the "initial state" and
                 *      the IUT having received Beacon information from ItsNodeB and
                 *      the IUT having received Beacon information from ItsNodeD
@@ -4596,62 +4813,64 @@ module ItsGeoNetworking_TestCases {
                 *              containing DestinationArea
                 *                  indicating AREA1
                 *      the IUT having saved the packet into CBF buffer
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives the same GBC packet from ItsNodeD
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT removes the GBC packet from the CBF buffer
                 *          the IUT discards the new received GBC packet
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/CBF/BV-07 - * @reference EN 302 636-4-1 [1], Annex E.3 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/CBF/BV-07 + * @reference ETSI EN 302 636-4-1 [1], Annex E.3 + * ETSI TS 103 836-4-1 [5], Annex E.3 + */ testcase TC_GEONW_PON_GBC_AREA_CBF_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_AREA_CBF_BV_07(); } // End of testcase TC_GEONW_PON_GBC_AREA_CBF_BV_07 - /** + /** * @desc Check that a received GBC packet is triggering contention if received for the first time * when IUT is inside of the destination area from an unknown sender - *
+                * 
                 * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_AREA_FORWARDING_ALGORITHM == 'CBF'
                 * Config Id: CF04
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
                 *      the IUT having received Beacon information from ItsNodeB and
                 *      the IUT not having received any message from ItsNodeD
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives the a GBC packet generated by ItsNodeC from ItsNodeD
-             *              containing TrafficClass.SCF set to 1
+                *              containing TrafficClass.SCF set to 1
                 *              containing GBC Extended Header
-             *              containing DestinationArea
-             *                  indicating AREA1
-             *      }
-             *      then {
+                *              containing DestinationArea
+                *                  indicating AREA1
+                *      }
+                *      then {
                 *          the IUT saves the GBC packet into the CBF buffer and
                 *          the IUT starts the contention timer set to CBF_MAX and
                 *          the IUT broadcasts the received GeoBroedcast packet
                 *              upon expiry of the contention timer
-             *      }
-             *  }
-                    *
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/CBF/BV-21 - * @reference EN 302 636-4-1 [1], Annex E.3 - */ + * } + * } + * + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/CBF/BV-21 + * @reference ETSI EN 302 636-4-1 [1], Annex E.3 + * ETSI TS 103 836-4-1 [5], Annex E.3 + */ testcase TC_GEONW_PON_GBC_AREA_CBF_BV_21() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_AREA_CBF_BV_21(); @@ -4659,44 +4878,45 @@ module ItsGeoNetworking_TestCases { } // End of testcase TC_GEONW_PON_GBC_AREA_CBF_BV_21 - /** + /** * @desc Check that a received GBC packet is triggering contention if received for the first time * when IUT is inside of the destination area from an unknown sender - *
+                * 
                 * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_AREA_FORWARDING_ALGORITHM == 'CBF'
                 * Config Id: CF04
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
                 *      the IUT having received Beacon information from ItsNodeB and
                 *      the IUT having received Beacon information from ItsNodeD
                 *        containing Beacon ExtendedHeader
                 *            containing SOPV field
                 *                containing PAI
                 *                    set to '0'
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives the a GBC packet generated by ItsNodeC from ItsNodeD
-             *              containing TrafficClass.SCF set to 1
+                *              containing TrafficClass.SCF set to 1
                 *              containing GBC Extended Header
-             *              containing DestinationArea
+                *              containing DestinationArea
                 *                      indicating AREA1
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT saves the GBC packet into the CBF buffer and
                 *          the IUT starts the contention timer set to CBF_MAX and
                 *          the IUT re-broadcasts the received GeoBroedcast packet
                 *              upon expiry of the contention timer
-             *      }
-             *  }
-            *
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/CBF/BV-22 - * @reference EN 302 636-4-1 [1], Annex E.3 - */ + * } + * } + * + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/CBF/BV-22 + * @reference ETSI EN 302 636-4-1 [1], Annex E.3 + * ETSI TS 103 836-4-1 [5], Annex E.3 + */ testcase TC_GEONW_PON_GBC_AREA_CBF_BV_22() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GBC_AREA_CBF_BV_22(); @@ -4740,8 +4960,8 @@ module ItsGeoNetworking_TestCases { * * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/ADV/BV-21 - * @reference EN 302 636-4-1 [1], Annex F.4 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/ADV/BV-21 + * @reference ETSI EN 302 636-4-1 [1], Annex F.4 */ testcase TC_GEONW_PON_GBC_AREA_ADV_BV_21() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -4781,8 +5001,8 @@ module ItsGeoNetworking_TestCases { * * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/ADV/BV-23 - * @reference EN 302 636-4-1 [1], Annex F.4 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/ADV/BV-23 + * @reference ETSI EN 302 636-4-1 [1], Annex F.4 */ testcase TC_GEONW_PON_GBC_AREA_ADV_BV_23() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -4822,8 +5042,8 @@ module ItsGeoNetworking_TestCases { * * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/ADV/BV-24 - * @reference EN 302 636-4-1 [1], Annex F.4 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/ADV/BV-24 + * @reference ETSI EN 302 636-4-1 [1], Annex F.4 */ testcase TC_GEONW_PON_GBC_AREA_ADV_BV_24() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -4866,8 +5086,8 @@ module ItsGeoNetworking_TestCases { * Note: In this configuration IUT is outside sectorial area of ItsNodeB to the angle FSR * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/ADV/BV-25 - * @reference EN 302 636-4-1 [1], Annex F.4 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/ADV/BV-25 + * @reference ETSI EN 302 636-4-1 [1], Annex F.4 */ testcase TC_GEONW_PON_GBC_AREA_ADV_BV_25() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -4910,8 +5130,8 @@ module ItsGeoNetworking_TestCases { * Note: In this configuration IUT is outside sectorial area of ItsNodeB because of dist_R > dist_F * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/ADV/BV-26 - * @reference EN 302 636-4-1 [1], Annex F.4 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/ADV/BV-26 + * @reference ETSI EN 302 636-4-1 [1], Annex F.4 */ testcase TC_GEONW_PON_GBC_AREA_ADV_BV_26() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -4949,8 +5169,8 @@ module ItsGeoNetworking_TestCases { * * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/ADV/BV-27 - * @reference EN 302 636-4-1 [1], Annex F.4 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/ADV/BV-27 + * @reference ETSI EN 302 636-4-1 [1], Annex F.4 */ testcase TC_GEONW_PON_GBC_AREA_ADV_BV_27() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -4988,8 +5208,8 @@ module ItsGeoNetworking_TestCases { * } * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/ADV/BV-28 - * @reference EN 302 636-4-1 [1], Annex F.4 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/ADV/BV-28 + * @reference ETSI EN 302 636-4-1 [1], Annex F.4 */ testcase TC_GEONW_PON_GBC_AREA_ADV_BV_28() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -5028,8 +5248,8 @@ module ItsGeoNetworking_TestCases { * * * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GBC/AREA/ADV/BV-29 - * @reference EN 302 636-4-1 [1], Annex F.4 + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GBC/AREA/ADV/BV-29 + * @reference ETSI EN 302 636-4-1 [1], Annex F.4 */ testcase TC_GEONW_PON_GBC_AREA_ADV_BV_29() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -5068,9 +5288,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/TSB/BV-01 - * @reference EN 302 636-4-1 [1], clauses 10.3.9.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/TSB/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.9.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.9.2 */ testcase TC_GEONW_PON_TSB_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -5102,9 +5323,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/TSB/BV-02 - * @reference EN 302 636-4-1 [1], clauses 10.3.9.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/TSB/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.9.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.9.3 */ testcase TC_GEONW_PON_TSB_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -5146,9 +5368,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/TSB/BV-03 - * @reference EN 302 636-4-1 [1], clauses 10.3.9.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/TSB/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.9.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.9.3 */ testcase TC_GEONW_PON_TSB_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -5178,9 +5401,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/TSB/BO-04 - * @reference EN 302 636-4-1 [1], clauses 10.3.9.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/TSB/BO-04 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.9.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.9.3 */ testcase TC_GEONW_PON_TSB_BO_04() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -5208,9 +5432,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/TSB/BV-05 - * @reference EN 302 636-4-1 [1], clauses 10.3.9.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/TSB/BV-05 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.9.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.9.3 */ testcase TC_GEONW_PON_TSB_BV_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -5254,9 +5479,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/TSB/BO-07 - * @reference EN 302 636-4-1 [1], clauses 10.3.9.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/TSB/BO-07 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.9.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.9.3 */ testcase TC_GEONW_PON_TSB_BO_07() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -5264,7 +5490,6 @@ module ItsGeoNetworking_TestCases { } // End of testcase TC_GEONW_PON_TSB_BO_07 - /** * @desc Check that a received TSB packet is not passed over the Gn SAP if it is received for the second * or more time @@ -5299,9 +5524,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/TSB/BO-08 - * @reference EN 302 636-4-1 [1], clauses 10.3.9.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/TSB/BO-08 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.9.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.9.3 */ testcase TC_GEONW_PON_TSB_BO_08() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -5336,9 +5562,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/SHB/BV-01 - * @reference EN 302 636-4-1 [1], clauses 10.3.10.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/SHB/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.10.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.10.2 */ testcase TC_GEONW_PON_SHB_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -5366,9 +5593,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/SHB/BV-05 - * @reference EN 302 636-4-1 [1], clauses 10.3.10.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/SHB/BV-05 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.10.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.10.3 */ testcase TC_GEONW_PON_SHB_BV_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -5385,33 +5613,33 @@ module ItsGeoNetworking_TestCases { group gacNonAreaAllForwardingAlgorithm { - /** + /** * @desc Check that the protocol header fields (RHL) are correctly updated during a GAC * forwarding step *
                 * Pics Selection: PICS_GN_GAC_FWD
                 * Config Id: CF03
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
                 *      the IUT having received Beacon information from ItsNodeB
-             *      the IUT having received Beacon information from ItsNodeC
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *      the IUT having received Beacon information from ItsNodeC
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives a GAC packet from ItsNodeC
-             *              containing TrafficClass.SCF set to 1
+                *              containing TrafficClass.SCF set to 1
                 *              containing Basic Header
                 *                  containing RHL field
                 *                      indicating value HL1 higher than 1
                 *              containing Common Header
                 *                  containing MHL field
                 *                      indicating value MHL1
-             *                  containing DestinationArea
+                *                  containing DestinationArea
                 *                  indicating AREA2
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT retrnasmits the GAC packet
                 *              containing Basic Header
                 *                  containing RHL field
@@ -5421,155 +5649,160 @@ module ItsGeoNetworking_TestCases {
                 *                      indicating value MHL1
                 *              containing DestinationArea
                 *                  indicating AREA2
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/NONAREA/ALL/BV-03 - * @reference EN 302 636-4-1 [1], clauses 10.3.6.3 and 10.3.12.3 - */ + * } + * } + * + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/NONAREA/ALL/BV-03 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.6.3 and 10.3.12.3 + * ETSI TS 103 836-4-1 [5], clauses 10.3.6.3 and 10.3.12.3 + */ testcase TC_GEONW_PON_GAC_NONAREA_ALL_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GAC_NONAREA_ALL_BV_03(); } // End of testcase TC_GEONW_PON_GAC_NONAREA_ALL_BV_03 - /** + /** * @desc Check that the RHL restriction is correctly handled at a GAC forwarding step - *
+                * 
                 * Pics Selection: PICS_GN_GAC_FWD
                 * Config Id: CF03
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
                 *      the IUT having received Beacon information from ItsNodeB
-             *      the IUT having received Beacon information from ItsNodeC
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *      the IUT having received Beacon information from ItsNodeC
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives a GAC packet from ItsNodeC
-             *              containing TrafficClass.SCF set to 1
+                *              containing TrafficClass.SCF set to 1
                 *              containing Basic Header
                 *                  containing RHL field
                 *                      indicating 1
                 *              containing GAC Extended Header
-             *                  containing DestinationArea
-             *                      indicating AREA2
-             *      }
-             *      then {
+                *                  containing DestinationArea
+                *                      indicating AREA2
+                *      }
+                *      then {
                 *         the IUT does not retransmit the GAC packet
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/NONAREA/ALL/BO-04 - * @reference EN 302 636-4-1 [1], clauses 10.3.12.3 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/NONAREA/ALL/BO-04 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.6.3 and 10.3.12.3 + * ETSI TS 103 836-4-1 [5], clauses 10.3.6.3 and 10.3.12.3 + */ testcase TC_GEONW_PON_GAC_NONAREA_ALL_BO_04() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GAC_NONAREA_ALL_BO_04(); } // End of testcase TC_GEONW_PON_GAC_NONAREA_ALL_BO_04 - /** + /** * @desc Check that a received GAC packet is not passed over the Gn SAP if it is received for the * first time outside the GAC destination area - *
+                * 
                 * Pics Selection: PICS_GN_GAC_FWD
                 * Config Id: CF01
-             * Initial conditions:
-             *  with {
+                * Initial conditions:
+                *  with {
                 *      the IUT being in the "initial state"
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives a GAC packet from ItsNodeB
-             *              containing TrafficClass.SCF set to 1
-             *                  containing DestinationArea
-             *                      indicating AREA2
-             *      }
-             *      then {
+                *              containing TrafficClass.SCF set to 1
+                *                  containing DestinationArea
+                *                      indicating AREA2
+                *      }
+                *      then {
                 *          the IUT does not pass the received GAC packet to any Upper Layer protocol
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/BV-06 - * @reference EN 302 636-4-1 [1], clauses 10.3.12.3 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/BV-06 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.6.3 and 10.3.12.3 + * ETSI TS 103 836-4-1 [5], clauses 10.3.6.3 and 10.3.12.3 + */ testcase TC_GEONW_PON_GAC_NONAREA_ALL_BV_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { f_GEONW_PON_GAC_NONAREA_ALL_BV_06(); } // End of testcase TC_GEONW_PON_GAC_NONAREA_ALL_BV_06 - /** + /** * @desc Check that a received GAC packet is discarded when indicating a too big GeoArea - *
+                * 
                 * Pics Selection: PICS_GN_GAC_FWD
-             * Config Id: CF04
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from ItsNodeB and
+                * Config Id: CF04
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
+                *      the IUT having received Beacon information from ItsNodeB and
                 *      the IUT having received Beacon information from ItsNodeD
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives a GAC packet from ItsNodeC
-             *              containing TrafficClass.SCF set to 1
-             *                  containing DestinationArea
+                *              containing TrafficClass.SCF set to 1
+                *                  containing DestinationArea
                 *                  indicating a geoArea bigger than itsGnMaxGeoAreaSize
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT does not retransmit the received GAC packet
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/NONAREA/ALL/BO-09 - * @reference EN 302 636-4-1 [1], Annex B.3 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/NONAREA/ALL/BO-09 + * @reference ETSI EN 302 636-4-1 [1], Annex B.3 + * ETSI TS 103 836-4-1 [5], Annex B.3 + */ testcase TC_GEONW_PON_GAC_NONAREA_ALL_BO_09() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GAC_NONAREA_ALL_BO_09(); } // End of testcase TC_GEONW_PON_GAC_NONAREA_ALL_BO_09 - /** + /** * @desc Check that a received GAC packet from inside the destination area is discarded if received for * the first time from a known sender when IUT is outside the destination area. - *
+                * 
                 * Pics Selection: PICS_GN_GAC_FWD
-             * Config Id: CF04
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from ItsNodeB and
+                * Config Id: CF04
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
+                *      the IUT having received Beacon information from ItsNodeB and
                 *      the IUT having received Beacon information from ItsNodeC and
                 *      the IUT having received Beacon information from ItsNodeD
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives a GAC packet from ItsNodeD
-             *              containing TrafficClass.SCF set to 1
+                *              containing TrafficClass.SCF set to 1
                 *              containing GAC Extended Header
-             *                  containing DestinationArea
-             *                      indicating AREA2
-             *      }
-             *      then {
+                *                  containing DestinationArea
+                *                      indicating AREA2
+                *      }
+                *      then {
                 *          the IUT discards the received GAC packet
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/NONAREA/ALL/BV-10 - * @reference EN 302 636-4-1 [1], Annex D - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/NONAREA/ALL/BV-10 + * @reference ETSI EN 302 636-4-1 [1], Annex D + * ETSI TS 103 836-4-1 [5], Annex D + */ testcase TC_GEONW_PON_GAC_NONAREA_ALL_BV_10() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GAC_NONAREA_ALL_BV_10(); @@ -5580,109 +5813,111 @@ module ItsGeoNetworking_TestCases { group gacNonAreaGreedyForwarding { - /** + /** * @desc Check that a GAC request over upper Gn SAP triggers line forwarding if the IUT is outside the Destination Area - *
+                * 
                 * Pics Selection: PICS_GN_GAC_SRC  AND (PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'GREEDY' OR PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'UNSPECIFIED')
                 * Config Id: CF02
-             * Initial conditions:
-             * with {
-             *    the IUT being in the "initial state" and
+                * Initial conditions:
+                * with {
+                *    the IUT being in the "initial state" and
                 *      the IUT having received Beacon information from ItsNodeD and
                 *      the IUT having received Beacon information from ItsNodeB
-             * }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                * }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT is requested to send a GAC packet
-             *              containing TrafficClass.SCF set to 1
-             *                  containing DestinationArea
-             *                      indicating AREA2
-             *      }
-             *      then {
+                *              containing TrafficClass.SCF set to 1
+                *                  containing DestinationArea
+                *                      indicating AREA2
+                *      }
+                *      then {
                 *          the IUT selects ItsNodeB as the next hop and
                 *          the IUT sends the GAC packet (see note)
                 *              containing DestinationArea
                 *                  indicating AREA2
-             *      }
-             *  }
+                *      }
+                *  }
                 *  NOTE: Next hop ITS Station being identified by the MAC layer address of ItsNodeB
-            *
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/NONAREA/GRD/BV-02 - * @reference EN 302 636-4-1 [1], clauses 10.3.12.2, Annex E.2 - */ + * + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/NONAREA/GRD/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.12.2 and Annex E.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.12.2 and Annex E.2 + */ testcase TC_GEONW_PON_GAC_NONAREA_GRD_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GAC_NONAREA_GRD_BV_01(); } // End of testcase TC_GEONW_PON_GAC_NONAREA_GRD_BV_01 - /** + /** * @desc Check that a received GAC packet is triggering line forwarding if received out of its * destination area for the first time - *
+                * 
                 * Pics Selection: PICS_GN_GAC_FWD AND (PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'GREEDY' OR PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'UNSPECIFIED')
-             * Config Id: CF04
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
+                * Config Id: CF04
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
                 *      the IUT having received Beacon information from ItsNodeB
-             *      the IUT having received Beacon information from ItsNodeD
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *      the IUT having received Beacon information from ItsNodeD
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives a GAC packet from ItsNodeC
-             *              containing TrafficClass.SCF set to 1
-             *                  containing DestinationArea
+                *              containing TrafficClass.SCF set to 1
+                *                  containing DestinationArea
                 *                  indicating AREA2
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT selects ItsNodeB as the next hop and
                 *          the IUT forwards the GAC packet (see note)
-             *      }
-             *  }
+                *      }
+                *  }
                 *  NOTE: Next hop ITS Station being identified by the MAC layer address of ItsNodeB
-            *
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/NONAREA/GRD/BV-02 - * @reference EN 302 636-4-1 [1], clauses 10.3.12.3, Annex E.2 - */ + * + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/NONAREA/GRD/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.12.3 and Annex E.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.12.3 and Annex E.2 + */ testcase TC_GEONW_PON_GAC_NONAREA_GRD_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GAC_NONAREA_GRD_BV_02(); } // End of testcase TC_GEONW_PON_GAC_BV_02 - /** + /** * @desc Check that a received GAC packet is not triggering line forwarding if received out of its * destination area for the second or more time - *
+                * 
                 * Pics Selection: PICS_GN_GAC_FWD AND (PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'GREEDY' OR PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'UNSPECIFIED')
                 * Config Id: CF04
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
                 *      the IUT having received Beacon information from ItsNodeB
                 *      the IUT having received Beacon information from ItsNodeD
                 *      the IUT having received a GAC packet from ItsNodeC
-             *          containing TrafficClass.SCF set to 1
+                *          containing TrafficClass.SCF set to 1
                 *          containing Basic Header
                 *              containing RHL field
                 *                  indicating value HL1 higher than 1
                 *          containing GAC Extended Header
                 *              containing SN field
                 *                  indicating value SN1 and
-             *              containing DestinationArea
+                *              containing DestinationArea
                 *                  indicating AREA2
                 *      the IUT having forwarded the GAC packet
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *          the IUT receives the same GAC packet from other neighbour
                 *              containing Basic Header
                 *                  containing RHL field
@@ -5690,16 +5925,17 @@ module ItsGeoNetworking_TestCases {
                 *              containing GAC Extended Header
                 *                  containing SN field
                 *                      indicating value SN1
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *          the IUT does not forward the received GAC packet
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/NONAREA/GRD/BO-07 - * @reference EN 302 636-4-1 [1], clauses 10.3.12.3 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/NONAREA/GRD/BO-07 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.12.3 and Annex E.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.12.3 and Annex E.2 + */ testcase TC_GEONW_PON_GAC_NONAREA_GRD_BO_07() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GAC_NONAREA_GRD_BO_07(); @@ -5710,93 +5946,95 @@ module ItsGeoNetworking_TestCases { group gacNonAreaContentionBasedForwarding { - /** + /** * @desc Check that a GAC request over upper Gn SAP triggers immediate broadcasting of a * GAC packet if the IUT is outside the Destination Area - *
+                * 
                 * Pics Selection: PICS_GN_GAC_SRC AND PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'CBF'
                 * Config Id: CF02
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
                 *   the IUT having received Beacon information from ItsNodeD and
                 *   the IUT having received Beacon information from ItsNodeB
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *       the IUT is requested to send a GAC packet
                 *           containing TrafficClass.SCF set to 1
                 *           containing DestinationArea
                 *               indicating AREA2
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *       the IUT broadcasts immediately the GAC packet 
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-01 - * @reference EN 302 636-4-1 [1], clauses 10.3.12.2 - */ + * } + * } + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.12.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.12.2 + */ testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GAC_NONAREA_CBF_BV_01(); } // End of testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_01 - /** + /** * @desc Check that a received GAC packet is forwarded at the correct time according to the contention * based forwarding rules - *
+                * 
                 * Pics Selection: PICS_GN_GAC_SRC AND PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'CBF'
                 * Config Id: CF03
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from ItsNodeB and
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
+                *      the IUT having received Beacon information from ItsNodeB and
                 *   the IUT having received Beacon information from ItsNodeC and
                 *   the distance between IUT and ItsNodeA being 
                 *       less than itsGnDefaultMaxCommunicationRange MIB attribute
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *       the IUT receives a GAC packet addressed to ItsNodeA from ItsNodeC
                 *           containing TrafficClass.SCF set to 1
                 *           containing Basic Header
                 *               containing RHL field
                 *                   indicating value greater than 1
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *       the IUT re-broadcasts the received GAC packet
                 *           upon expiry of calculated CBF delay (see note)
-             *      }
-             *  }
+                *      }
+                *  }
                 * NOTE: The CBF delay timer value is calculated from the itsGnDefaultMaxCommunicationRange, itsGnCbfMinTime, 
                 *       and itsGnCbfMaxTime MIB attributes, and the distance value between IUT and ItsNodeC.  
-            *
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-02 - * @reference EN 302 636-4-1 [1], clauses 10.3.12.2, Annex E3 - */ + * + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.12.3 and Annex E.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.12.3 and Annex E.3 + */ testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GAC_NONAREA_CBF_BV_02(); } // End of testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_02 - /** + /** * @desc Check that GAC packet forwarding correctly avoids packet duplication according to the contention * based forwarding rules - *
+                * 
                 * Pics Selection: PICS_GN_GAC_SRC AND PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'CBF'
                 * Config Id: CF03
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from ItsNodeB and
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
+                *      the IUT having received Beacon information from ItsNodeB and
                 *   the IUT having received Beacon information from ItsNodeC and
                 *   the distance between IUT and ItsNodeA being 
                 *       less than the itsGnDefaultMaxCommunicationRange MIB attribute and
@@ -5806,147 +6044,151 @@ module ItsGeoNetworking_TestCases {
                 *           containing RHL field
                 *               indicating value greater than 1 and 
                 *   the IUT having started a CBF timer for this packet (see note)
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *       the IUT receives the same GAC packet from ItsNodeB
                 *           before expiration of the CBF timer
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *       the IUT does not re-broadcast the GAC packet 
-             *      }
-             *  }
+                *      }
+                *  }
                 * NOTE: The CBF delay timer value is calculated from the itsGnDefaultMaxCommunicationRange, itsGnCbfMinTime, 
                 *       and itsGnCbfMaxTime MIB attributes, and the distance value between IUT and ItsNodeC.  
-            *
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-07 - * @reference EN 302 636-4-1 [1], clauses 10.3.12.3, Annex E3 - */ + * + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-07 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.12.3 and Annex E.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.12.3 and Annex E.3 + */ testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GAC_NONAREA_CBF_BV_07(); } // End of testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_07 - /** + /** * @desc Check that a received GAC packet forwarding is correctly handling the minimum delay value * according to the contention based forwarding rules - *
+                * 
                 * Pics Selection: PICS_GN_GAC_SRC AND PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'CBF'
                 * Config Id: CF03
-             * Initial conditions:
-             *  with {
-             *  	the IUT being in the "initial state" and
-             *  	the IUT having received Beacon information from ItsNodeB and
+                * Initial conditions:
+                *  with {
+                *  	the IUT being in the "initial state" and
+                *  	the IUT having received Beacon information from ItsNodeB and
                 *   the IUT having received Beacon information from ItsNodeC and
                 *   the distance between IUT and ItsNodeC being 
                 *       larger than the itsGnDefaultMaxCommunicationRange MIB attribute
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *  	when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *  	when {
                 *       the IUT receives a GAC packet addressed to ItsNodeA from ItsNodeC
-             *  			containing TrafficClass.SCF set to 1
+                *  			containing TrafficClass.SCF set to 1
                 *           containing Basic Header
                 *               containing RHL field
                 *                   indicating value greater than 1
-             *  	}
-             *  	then {
+                *  	}
+                *  	then {
                 *       the IUT re-broadcasts the received GAC packet
                 *           upon expiry of itsGnCbfMinTime delay
-             *  	}
-             *  }
+                *  	}
+                *  }
                 *  
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-20 - * @reference EN 302 636-4-1 [1], clauses 10.3.12.3, Annex E3 - */ + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-20 + * @reference ETSI EN 302 636-4-1 [1], clauses 10.3.12.3 and Annex E.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.12.3 and Annex E.3 + */ testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_20() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GAC_NONAREA_CBF_BV_20(); } // End of testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_20 - /** + /** * @desc Check that a received GAC packet is forwarded at the correct time according to the contention * based forwarding rules if received for the first time when IUT is outside of the destination area * from an unknown sender - *
+                * 
                 * Pics Selection: PICS_GN_GAC_SRC AND PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'CBF'
                 * Config Id: CF04
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from ItsNodeB and
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
+                *      the IUT having received Beacon information from ItsNodeB and
                 *   the IUT not having received any message from ItsNodeD
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *       the IUT receives a GAC packet generated by ItsNodeC from ItsNodeD
-             *              containing TrafficClass.SCF set to 1
+                *              containing TrafficClass.SCF set to 1
                 *           containing GAC Extended Header
-             *                  containing DestinationArea
+                *                  containing DestinationArea
                 *                   indicating AREA2
-             *      }
-             *      then {
+                *      }
+                *      then {
                 *       the IUT re-broadcasts the GAC packet
                 *           upon expiry of CBF_MAX
-             *      }
-             *  }
-            *
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-21 - * @reference EN 302 636-4-1 [1], Annex E3 - */ + * } + * } + * + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-21 + * @reference ETSI EN 302 636-4-1 [1], Annex E.3 + * ETSI TS 103 836-4-1 [5], Annex E.3 + */ testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_21() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GAC_NONAREA_CBF_BV_21(); } // End of testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_21 - /** + /** * @desc Check that a received GAC packet is forwarded at the correct time according to the contention * based forwarding rules if received for the first time when IUT is outside of the destination area * from a known sender having an uncertain position (PAI = 0) - *
+                * 
                 * Pics Selection: PICS_GN_GAC_SRC AND PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'CBF'
-             * Config Id: CF04
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from ItsNodeB and
-             *      the IUT having received Beacon information from ItsNodeD
+                * Config Id: CF04
+                * Initial conditions:
+                *  with {
+                *      the IUT being in the "initial state" and
+                *      the IUT having received Beacon information from ItsNodeB and
+                *      the IUT having received Beacon information from ItsNodeD
                 *       containing Beacon ExtendedHeader 
                 *           containing SOPV field
                 *               containing PAI
                 *                   set to ‘0’
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
                 *       the IUT receives a GAC packet generated by ItsNodeC from ItsNodeD
-             *              containing TrafficClass.SCF set to 1
+                *              containing TrafficClass.SCF set to 1
                 *           containing GAC Extended Header
-             *                  containing DestinationArea
-             *                      indicating AREA2
-             *      }
-             *      then {
+                *                  containing DestinationArea
+                *                      indicating AREA2
+                *      }
+                *      then {
                 *       the IUT re-broadcasts the GAC packet
                 *           upon expiry of CBF_MAX
-             *      }
-             *  }
-            *
-             * 
- * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-22 - * @reference EN 302 636-4-1 [1], Annex E3 - */ + * } + * } + * + *
+ * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-22 + * @reference ETSI EN 302 636-4-1 [1], Annex E.3 + * ETSI TS 103 836-4-1 [5], Annex E.3 + */ testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_22() runs on ItsMtc system ItsGeoNetworkingSystem { f_GEONW_PON_GAC_NONAREA_CBF_BV_22(); @@ -5985,9 +6227,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/AREA/ALL/BV-01 - * @reference EN 302 636-4-1 [1], clauses 10.3.12.2 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/AREA/ALL/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.12.2 + * ETSI TS 103 836-4-1 [5], clause 10.3.12.2 */ testcase TC_GEONW_PON_GAC_AREA_ALL_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -6020,9 +6263,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/AREA/ALL/BV-02 - * @reference EN 302 636-4-1 [1], clauses 10.3.12.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/AREA/ALL/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.12.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.12.3 */ testcase TC_GEONW_PON_GAC_AREA_ALL_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -6053,9 +6297,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/AREA/ALL/BV-05 - * @reference EN 302 636-4-1 [1], clauses 10.3.12.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/AREA/ALL/BV-05 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.12.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.12.3 */ testcase TC_GEONW_PON_GAC_AREA_ALL_BV_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -6100,9 +6345,10 @@ module ItsGeoNetworking_TestCases { * } * } * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/PON/GAC/AREA/ALL/BO-08 - * @reference EN 302 636-4-1 [1], clauses 10.3.12.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/PON/GAC/AREA/ALL/BO-08 + * @reference ETSI EN 302 636-4-1 [1], clause 10.3.12.3 + * ETSI TS 103 836-4-1 [5], clause 10.3.12.3 */ testcase TC_GEONW_PON_GAC_AREA_ALL_BO_08() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -6153,11 +6399,12 @@ module ItsGeoNetworking_TestCases { * NOTE 1: The amount of stored data exceeds Location Service buffer capacity defined by the * itsGnLocationServicePacketBufferSize MIB parameter * NOTE 2: Buffered packets will be delivered upon reception of LS_REPLY message - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/CAP/LOS/BV-01 - * @reference EN 302 636-4-1 [1], clauses 7.4.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/CAP/LOS/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clause 8.4.3 + * ETSI TS 103 836-4-1 [5], clause 8.5.3 */ testcase TC_GEONW_CAP_LOS_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { @@ -6201,11 +6448,12 @@ module ItsGeoNetworking_TestCases { * NOTE 1: The amount of stored data exceeds UC forwarding packet capacity defined by the * itsGnUcForwardingPacketBufferSize MIB parameter * NOTE 2: Buffered packets will be delivered upon reception of Beacon message from ItsNodeB - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/CAP/FPB/BV-01 - * @reference EN 302 636-4-1 [1], clauses 7.5.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/CAP/FPB/BV-01 + * @reference ETSI EN 302 636-4-1 [1], clause 8.5.3 + * ETSI TS 103 836-4-1 [5], clause 8.6.3 */ testcase TC_GEONW_CAP_FPB_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { @@ -6247,11 +6495,12 @@ module ItsGeoNetworking_TestCases { * NOTE 1: The amount of stored data exceeds BC forwarding buffer capacity defined by the * itsGnBcForwardingPacketBufferSize MIB parameter * NOTE 2: Buffered packets will be delivered upon reception of Beacon message from ItsNodeB - * + * * - * - * @see ETSI TS 102 871-2 v1.5.1 TP/GEONW/CAP/FPB/BV-02 - * @reference EN 302 636-4-1 [1], clauses 7.5.3 + * + * @see ETSI TS 102 871-2 V2.1.1 TP/GEONW/CAP/FPB/BV-02 + * @reference ETSI EN 302 636-4-1 [1], clause 8.5.3 + * ETSI TS 103 836-4-1 [5], clause 8.6.3 */ testcase TC_GEONW_CAP_FPB_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { diff --git a/ItsGeoNetworking_TestControl.ttcn b/ItsGeoNetworking_TestControl.ttcn index 3cc3c88329c0a5c2d5b337f2063122e0bec23584..540c5025b6b33181e629ee68cfe62dbd7438e1f5 100644 --- a/ItsGeoNetworking_TestControl.ttcn +++ b/ItsGeoNetworking_TestControl.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / STF405 / STF449 / STF484 + * @author ETSI / STF405 / STF449 / STF484 / TTF T042 * @version $URL$ * $Id$ * @desc Test Control file for GeoNetworking @@ -10,19 +10,19 @@ * */ module ItsGeoNetworking_TestControl { - + // ATS GeoNetworking import from ItsGeoNetworking_TestCases all; - + // LibItsGeoNetworking import from LibItsGeoNetworking_Pics all; import from LibItsGeoNetworking_TypesAndValues all; - + // Test Execution control { - + /* FDV */ - + if(PICS_GN_BASIC_HEADER) { execute(TC_GEONW_FDV_BAH_BV_01()); execute(TC_GEONW_FDV_BAH_BI_02()); @@ -33,149 +33,149 @@ module ItsGeoNetworking_TestControl { execute(TC_GEONW_FDV_COH_BV_02()); execute(TC_GEONW_FDV_COH_BV_03()); execute(TC_GEONW_FDV_COH_BO_04()); - } - + } + if(PICS_GN_BEACON_SRC) { execute(TC_GEONW_FDV_BEA_BV_01()); execute(TC_GEONW_FDV_BEA_BV_02()); execute(TC_GEONW_FDV_BEA_BV_03()); execute(TC_GEONW_FDV_BEA_BV_04()); } - + if(PICS_GN_GUC_SRC) { - execute(TC_GEONW_FDV_GUC_BV_01()); + execute(TC_GEONW_FDV_GUC_BV_01()); } - + if(PICS_GN_GBC_SRC) { - execute(TC_GEONW_FDV_GBC_BV_01()); + execute(TC_GEONW_FDV_GBC_BV_01()); } - + if(PICS_GN_GAC_SRC) { - execute(TC_GEONW_FDV_GAC_BV_01()); + execute(TC_GEONW_FDV_GAC_BV_01()); } - + if(PICS_GN_SHB_SRC) { - execute(TC_GEONW_FDV_SHB_BV_01()); + execute(TC_GEONW_FDV_SHB_BV_01()); } - + if(PICS_GN_TSB_SRC) { - execute(TC_GEONW_FDV_TSB_BV_01()); + execute(TC_GEONW_FDV_TSB_BV_01()); } - /* PON/LOT */ + /* PON/LOT */ if(PICS_GN_GUC_SRC and PICS_GN_BEACON_DST) { - execute(TC_GEONW_PON_LOT_BV_01()); + execute(TC_GEONW_PON_LOT_BV_01()); } - + if(PICS_GN_LS_REQ_SRC and PICS_GN_LS_REP_DST) { - execute(TC_GEONW_PON_LOT_BV_02()); + execute(TC_GEONW_PON_LOT_BV_02()); } - + if(PICS_GN_BEACON_DST) { - execute(TC_GEONW_PON_LOT_BV_03_01()); + execute(TC_GEONW_PON_LOT_BV_03_01()); } - + if(PICS_GN_GUC_DST) { - execute(TC_GEONW_PON_LOT_BV_03_02()); + execute(TC_GEONW_PON_LOT_BV_03_02()); } - + if(PICS_GN_GAC_DST) { - execute(TC_GEONW_PON_LOT_BV_03_03()); + execute(TC_GEONW_PON_LOT_BV_03_03()); } - + if(PICS_GN_GBC_DST) { - execute(TC_GEONW_PON_LOT_BV_03_04()); + execute(TC_GEONW_PON_LOT_BV_03_04()); } - + if(PICS_GN_TSB_DST) { - execute(TC_GEONW_PON_LOT_BV_03_05()); + execute(TC_GEONW_PON_LOT_BV_03_05()); } - + if(PICS_GN_SHB_DST) { - execute(TC_GEONW_PON_LOT_BV_03_06()); + execute(TC_GEONW_PON_LOT_BV_03_06()); } - + if(PICS_GN_LS_REQ_DST) { - execute(TC_GEONW_PON_LOT_BV_03_07()); + execute(TC_GEONW_PON_LOT_BV_03_07()); } - + if(PICS_GN_LS_REP_DST) { - execute(TC_GEONW_PON_LOT_BV_03_08()); + execute(TC_GEONW_PON_LOT_BV_03_08()); } - + if(PICS_GN_LS_REQ_SRC) { - execute(TC_GEONW_PON_LOT_BV_04()); + execute(TC_GEONW_PON_LOT_BV_04()); } - + if(PICS_GN_GUC_DST) { - execute(TC_GEONW_PON_LOT_BV_05_01()); + execute(TC_GEONW_PON_LOT_BV_05_01()); } - + if(PICS_GN_GAC_DST) { - execute(TC_GEONW_PON_LOT_BV_05_02()); + execute(TC_GEONW_PON_LOT_BV_05_02()); } - + if(PICS_GN_GBC_DST) { - execute(TC_GEONW_PON_LOT_BV_05_03()); + execute(TC_GEONW_PON_LOT_BV_05_03()); } - + if(PICS_GN_TSB_DST) { - execute(TC_GEONW_PON_LOT_BV_05_04()); + execute(TC_GEONW_PON_LOT_BV_05_04()); } - + if(PICS_GN_SHB_DST) { - execute(TC_GEONW_PON_LOT_BV_05_05()); + execute(TC_GEONW_PON_LOT_BV_05_05()); } - + if(PICS_GN_LS_REQ_DST) { - execute(TC_GEONW_PON_LOT_BV_05_06()); + execute(TC_GEONW_PON_LOT_BV_05_06()); } - + if(PICS_GN_LS_REP_DST) { - execute(TC_GEONW_PON_LOT_BV_05_07()); + execute(TC_GEONW_PON_LOT_BV_05_07()); } - + /* PON/LPV */ - + if(PICS_GN_BEACON_SRC) { - execute(TC_GEONW_PON_LPV_BV_01()); + execute(TC_GEONW_PON_LPV_BV_01()); } - + /* PON/SQN */ - + if(PICS_GN_GBC_SRC) { execute(TC_GEONW_PON_SQN_BV_01()); execute(TC_GEONW_PON_SQN_BV_02()); } - + /* PON/LOS */ - + if(PICS_GN_LS_REQ_SRC) { execute(TC_GEONW_PON_LOS_BV_01()); execute(TC_GEONW_PON_LOS_BV_02()); - if(PICS_GN_LS_REP_DST) { + if(PICS_GN_LS_REP_DST) { execute(TC_GEONW_PON_LOS_BV_03()); execute(TC_GEONW_PON_LOS_BV_04()); - } + } execute(TC_GEONW_PON_LOS_BV_05()); } - + if(PICS_GN_LS_REQ_RETRANSMISSION) { execute(TC_GEONW_PON_LOS_TI_06()); execute(TC_GEONW_PON_LOS_BV_07()); } - + if(PICS_GN_LS_REQ_DST) { execute(TC_GEONW_PON_LOS_BV_08()); execute(TC_GEONW_PON_LOS_BO_09()); } - + if(PICS_GN_LS_FWD) { execute(TC_GEONW_PON_LOS_BV_10()); execute(TC_GEONW_PON_LOS_BV_11()); } - + if(PICS_GN_LS_REQ_SRC) { execute(TC_GEONW_PON_LOS_BV_12()); execute(TC_GEONW_PON_LOS_BV_13()); @@ -184,311 +184,309 @@ module ItsGeoNetworking_TestControl { execute(TC_GEONW_PON_LOS_BV_16()); execute(TC_GEONW_PON_LOS_BV_17()); } - + /* PON/FPB */ - + if(PICS_GN_GUC_SRC) { execute(TC_GEONW_PON_FPB_BV_01()); execute(TC_GEONW_PON_FPB_BV_02()); execute(TC_GEONW_PON_FPB_BV_03()); execute(TC_GEONW_PON_FPB_BV_04()); } - + if(PICS_GN_TSB_SRC) { execute(TC_GEONW_PON_FPB_BV_06()); execute(TC_GEONW_PON_FPB_BV_07()); execute(TC_GEONW_PON_FPB_BV_08()); } - + if(PICS_GN_GUC_SRC) { - execute(TC_GEONW_PON_FPB_BV_09()); + execute(TC_GEONW_PON_FPB_BV_09()); } - + if(PICS_GN_TSB_SRC) { - execute(TC_GEONW_PON_FPB_BV_10()); + execute(TC_GEONW_PON_FPB_BV_10()); } - + if(PICS_GN_GUC_SRC) { - execute(TC_GEONW_PON_FPB_BV_11_01()); + execute(TC_GEONW_PON_FPB_BV_11_01()); } - + if(PICS_GN_GAC_SRC) { - execute(TC_GEONW_PON_FPB_BV_11_02()); + execute(TC_GEONW_PON_FPB_BV_11_02()); } - + if(PICS_GN_GBC_SRC) { - execute(TC_GEONW_PON_FPB_BV_11_03()); + execute(TC_GEONW_PON_FPB_BV_11_03()); } - + if(PICS_GN_TSB_SRC) { - execute(TC_GEONW_PON_FPB_BV_11_04()); + execute(TC_GEONW_PON_FPB_BV_11_04()); } - + if(PICS_GN_SHB_SRC) { - execute(TC_GEONW_PON_FPB_BV_11_05()); + execute(TC_GEONW_PON_FPB_BV_11_05()); } - + if(PICS_GN_GUC_SRC) { execute(TC_GEONW_PON_FPB_BV_12_01()); } - + if(PICS_GN_GAC_SRC) { execute(TC_GEONW_PON_FPB_BV_12_02()); } - + if(PICS_GN_GBC_SRC) { execute(TC_GEONW_PON_FPB_BV_12_03()); } - + if(PICS_GN_TSB_SRC) { execute(TC_GEONW_PON_FPB_BV_12_04()); } - + /* PON/GNA */ - + if(PICS_GN_ADDR_AUTO) { if (PICS_GN_LOCAL_ADDR_CONF_METHOD == e_auto) { execute(TC_GEONW_PON_GNA_BV_01()); } } - + if(PICS_GN_DAD) { - execute(TC_GEONW_PON_GNA_BV_02()); + execute(TC_GEONW_PON_GNA_BV_02()); } - + /* PON/BEA */ - + if(PICS_GN_BEACON_SRC) { execute(TC_GEONW_PON_BEA_TI_01()); execute(TC_GEONW_PON_BEA_TI_02()); } - + /* PON/GUC */ - if(PICS_GN_GUC) { - - if(PICS_GN_GUC_FWD) { - execute(TC_GEONW_PON_GUC_ALL_BV_03()); - execute(TC_GEONW_PON_GUC_ALL_BO_04()); - execute(TC_GEONW_PON_GUC_ALL_BV_06()); + if(PICS_GN_GUC) { + + if(PICS_GN_GUC_FWD) { + execute(TC_GEONW_PON_GUC_ALL_BV_03()); + execute(TC_GEONW_PON_GUC_ALL_BO_04()); + execute(TC_GEONW_PON_GUC_ALL_BV_06()); + } + + if(PICS_GN_GUC_DST) { + execute(TC_GEONW_PON_GUC_ALL_BV_05()); + execute(TC_GEONW_PON_GUC_ALL_BO_08()); } - - if(PICS_GN_GUC_DST) { - execute(TC_GEONW_PON_GUC_ALL_BV_05()); - execute(TC_GEONW_PON_GUC_ALL_BO_08()); - } if((PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_greedy) or (PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_unspecified)) { - - if(PICS_GN_GUC_SRC) { - execute(TC_GEONW_PON_GUC_GRD_BV_01()); + + if(PICS_GN_GUC_SRC) { + execute(TC_GEONW_PON_GUC_GRD_BV_01()); } if(PICS_GN_GUC_FWD) { execute(TC_GEONW_PON_GUC_GRD_BV_02()); execute(TC_GEONW_PON_GUC_GRD_BO_07()); - } + } } - + if(PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf) { - if(PICS_GN_GUC_SRC) { - execute(TC_GEONW_PON_GUC_CBF_BV_01()); + if(PICS_GN_GUC_SRC) { + execute(TC_GEONW_PON_GUC_CBF_BV_01()); } - - if(PICS_GN_GUC_FWD) { - execute(TC_GEONW_PON_GUC_CBF_BV_02()); - execute(TC_GEONW_PON_GUC_CBF_BV_07()); - execute(TC_GEONW_PON_GUC_CBF_BV_20()); - execute(TC_GEONW_PON_GUC_CBF_BV_21()); - execute(TC_GEONW_PON_GUC_CBF_BV_22()); + + if(PICS_GN_GUC_FWD) { + execute(TC_GEONW_PON_GUC_CBF_BV_02()); + execute(TC_GEONW_PON_GUC_CBF_BV_07()); + execute(TC_GEONW_PON_GUC_CBF_BV_20()); + execute(TC_GEONW_PON_GUC_CBF_BV_21()); + execute(TC_GEONW_PON_GUC_CBF_BV_22()); } } } - - /* PON/GBC */ - if(PICS_GN_GBC) { - - if(PICS_GN_GBC_FWD) { - execute(TC_GEONW_PON_GBC_NONAREA_ALL_BV_03()); - execute(TC_GEONW_PON_GBC_NONAREA_ALL_BV_04()); - execute(TC_GEONW_PON_GBC_NONAREA_ALL_BV_06()); - execute(TC_GEONW_PON_GBC_NONAREA_ALL_BO_09()); - execute(TC_GEONW_PON_GBC_NONAREA_ALL_BO_10()); - } - + + /* PON/GBC */ + if(PICS_GN_GBC) { + + if(PICS_GN_GBC_FWD) { + execute(TC_GEONW_PON_GBC_NONAREA_ALL_BV_03()); + execute(TC_GEONW_PON_GBC_NONAREA_ALL_BV_04()); + execute(TC_GEONW_PON_GBC_NONAREA_ALL_BV_06()); + execute(TC_GEONW_PON_GBC_NONAREA_ALL_BO_09()); + execute(TC_GEONW_PON_GBC_NONAREA_ALL_BO_10()); + } + if((PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_greedy) or (PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_unspecified)) { - + if(PICS_GN_GBC_SRC) { execute(TC_GEONW_PON_GBC_NONAREA_GRD_BV_01()); } - - if(PICS_GN_GBC_FWD) { - execute(TC_GEONW_PON_GBC_NONAREA_GRD_BV_02()); - execute(TC_GEONW_PON_GBC_NONAREA_GRD_BO_07()); + + if(PICS_GN_GBC_FWD) { + execute(TC_GEONW_PON_GBC_NONAREA_GRD_BV_02()); + execute(TC_GEONW_PON_GBC_NONAREA_GRD_BO_07()); } } - - if(PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf) { - - if(PICS_GN_GBC_SRC) { - execute(TC_GEONW_PON_GBC_NONAREA_CBF_BV_01()); + + if(PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf) { + + if(PICS_GN_GBC_SRC) { + execute(TC_GEONW_PON_GBC_NONAREA_CBF_BV_01()); } - if(PICS_GN_GBC_FWD) { - execute(TC_GEONW_PON_GBC_NONAREA_CBF_BV_02()); - execute(TC_GEONW_PON_GBC_NONAREA_CBF_BV_07()); - execute(TC_GEONW_PON_GBC_NONAREA_CBF_BV_20()); - execute(TC_GEONW_PON_GBC_NONAREA_CBF_BV_21()); - execute(TC_GEONW_PON_GBC_NONAREA_CBF_BV_22()); + if(PICS_GN_GBC_FWD) { + execute(TC_GEONW_PON_GBC_NONAREA_CBF_BV_02()); + execute(TC_GEONW_PON_GBC_NONAREA_CBF_BV_07()); + execute(TC_GEONW_PON_GBC_NONAREA_CBF_BV_20()); + execute(TC_GEONW_PON_GBC_NONAREA_CBF_BV_21()); + execute(TC_GEONW_PON_GBC_NONAREA_CBF_BV_22()); } - } - - if(PICS_GN_GBC_SRC) { - execute(TC_GEONW_PON_GBC_AREA_ALL_BV_01()); - } - - if(PICS_GN_GBC_FWD) { - execute(TC_GEONW_PON_GBC_AREA_ALL_BV_03()); - execute(TC_GEONW_PON_GBC_AREA_ALL_BV_04()); + } + + if(PICS_GN_GBC_SRC) { + execute(TC_GEONW_PON_GBC_AREA_ALL_BV_01()); + } + + if(PICS_GN_GBC_FWD) { + execute(TC_GEONW_PON_GBC_AREA_ALL_BV_03()); + execute(TC_GEONW_PON_GBC_AREA_ALL_BV_04()); } if(PICS_GN_GBC_DST) { - execute(TC_GEONW_PON_GBC_AREA_ALL_BV_05()); - execute(TC_GEONW_PON_GBC_AREA_ALL_BO_08()); - } - - if((PICS_GN_AREA_FORWARDING_ALGORITHM == e_simple) or (PICS_GN_AREA_FORWARDING_ALGORITHM == e_unspecified)) { - - if(PICS_GN_GBC_FWD) { - execute(TC_GEONW_PON_GBC_AREA_SMP_BV_02()); - execute(TC_GEONW_PON_GBC_AREA_SMP_BO_07()); - } - } - - if(PICS_GN_AREA_FORWARDING_ALGORITHM == e_cbf) { - - if(PICS_GN_GBC_FWD) { - execute(TC_GEONW_PON_GBC_AREA_CBF_BV_02()); - execute(TC_GEONW_PON_GBC_AREA_CBF_BV_07()); - execute(TC_GEONW_PON_GBC_AREA_CBF_BV_21()); - execute(TC_GEONW_PON_GBC_AREA_CBF_BV_22()); - } - } - - if(PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced) { - - if(PICS_GN_GBC_FWD) { - execute(TC_GEONW_PON_GBC_AREA_ADV_BV_21()); - execute(TC_GEONW_PON_GBC_AREA_ADV_BV_23()); - execute(TC_GEONW_PON_GBC_AREA_ADV_BV_24()); - execute(TC_GEONW_PON_GBC_AREA_ADV_BV_25()); - execute(TC_GEONW_PON_GBC_AREA_ADV_BV_26()); - execute(TC_GEONW_PON_GBC_AREA_ADV_BV_27()); - execute(TC_GEONW_PON_GBC_AREA_ADV_BV_28()); - execute(TC_GEONW_PON_GBC_AREA_ADV_BV_29()); - } + execute(TC_GEONW_PON_GBC_AREA_ALL_BV_05()); + execute(TC_GEONW_PON_GBC_AREA_ALL_BO_08()); + } + + if((PICS_GN_AREA_FORWARDING_ALGORITHM == e_simple) or (PICS_GN_AREA_FORWARDING_ALGORITHM == e_unspecified)) { + + if(PICS_GN_GBC_FWD) { + execute(TC_GEONW_PON_GBC_AREA_SMP_BV_02()); + execute(TC_GEONW_PON_GBC_AREA_SMP_BO_07()); + } + } + + if(PICS_GN_AREA_FORWARDING_ALGORITHM == e_cbf) { + + if(PICS_GN_GBC_FWD) { + execute(TC_GEONW_PON_GBC_AREA_CBF_BV_02()); + execute(TC_GEONW_PON_GBC_AREA_CBF_BV_07()); + execute(TC_GEONW_PON_GBC_AREA_CBF_BV_21()); + execute(TC_GEONW_PON_GBC_AREA_CBF_BV_22()); + } + } + + if(PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced) { + + execute(TC_GEONW_PON_GBC_AREA_ADV_BV_21()); + execute(TC_GEONW_PON_GBC_AREA_ADV_BV_23()); + execute(TC_GEONW_PON_GBC_AREA_ADV_BV_24()); + execute(TC_GEONW_PON_GBC_AREA_ADV_BV_25()); + execute(TC_GEONW_PON_GBC_AREA_ADV_BV_26()); + execute(TC_GEONW_PON_GBC_AREA_ADV_BV_27()); + execute(TC_GEONW_PON_GBC_AREA_ADV_BV_28()); + execute(TC_GEONW_PON_GBC_AREA_ADV_BV_29()); } } - + /* PON/TSB */ - if(PICS_GN_TSB) { - - if(PICS_GN_TSB_SRC) { - execute(TC_GEONW_PON_TSB_BV_01()); - } - - if(PICS_GN_TSB_FWD) { - execute(TC_GEONW_PON_TSB_BV_02()); - execute(TC_GEONW_PON_TSB_BV_03()); - execute(TC_GEONW_PON_TSB_BO_04()); - execute(TC_GEONW_PON_TSB_BO_07()); - } - - if(PICS_GN_TSB_DST) { - execute(TC_GEONW_PON_TSB_BV_05()); - execute(TC_GEONW_PON_TSB_BO_08()); - } - } - + if(PICS_GN_TSB) { + + if(PICS_GN_TSB_SRC) { + execute(TC_GEONW_PON_TSB_BV_01()); + } + + if(PICS_GN_TSB_FWD) { + execute(TC_GEONW_PON_TSB_BV_02()); + execute(TC_GEONW_PON_TSB_BV_03()); + execute(TC_GEONW_PON_TSB_BO_04()); + execute(TC_GEONW_PON_TSB_BO_07()); + } + + if(PICS_GN_TSB_DST) { + execute(TC_GEONW_PON_TSB_BV_05()); + execute(TC_GEONW_PON_TSB_BO_08()); + } + } + /* PON/SHB */ - if(PICS_GN_SHB) { - + if(PICS_GN_SHB) { + if(PICS_GN_SHB_SRC) { execute(TC_GEONW_PON_SHB_BV_01()); } - - if(PICS_GN_SHB_DST) { - execute(TC_GEONW_PON_SHB_BV_05()); + + if(PICS_GN_SHB_DST) { + execute(TC_GEONW_PON_SHB_BV_05()); } - } - + } + /* PON/GAC */ - if(PICS_GN_GAC) { - - if(PICS_GN_GAC_FWD) { - execute(TC_GEONW_PON_GAC_NONAREA_ALL_BV_03()); - execute(TC_GEONW_PON_GAC_NONAREA_ALL_BO_04()); - execute(TC_GEONW_PON_GAC_NONAREA_ALL_BV_06()); - execute(TC_GEONW_PON_GAC_NONAREA_ALL_BO_09()); - execute(TC_GEONW_PON_GAC_NONAREA_ALL_BV_10()); - } - - if((PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_greedy) or (PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_unspecified)) { - - if(PICS_GN_GAC_SRC) { - execute(TC_GEONW_PON_GAC_NONAREA_GRD_BV_01()); + if(PICS_GN_GAC) { + + if(PICS_GN_GAC_FWD) { + execute(TC_GEONW_PON_GAC_NONAREA_ALL_BV_03()); + execute(TC_GEONW_PON_GAC_NONAREA_ALL_BO_04()); + execute(TC_GEONW_PON_GAC_NONAREA_ALL_BV_06()); + execute(TC_GEONW_PON_GAC_NONAREA_ALL_BO_09()); + execute(TC_GEONW_PON_GAC_NONAREA_ALL_BV_10()); + } + + if((PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_greedy) or (PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_unspecified)) { + + if(PICS_GN_GAC_SRC) { + execute(TC_GEONW_PON_GAC_NONAREA_GRD_BV_01()); + } + + if(PICS_GN_GAC_FWD) { + execute(TC_GEONW_PON_GAC_NONAREA_GRD_BV_02()); + execute(TC_GEONW_PON_GAC_NONAREA_GRD_BO_07()); + } + } + + if(PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf) { + + if(PICS_GN_GAC_SRC) { + execute(TC_GEONW_PON_GAC_NONAREA_CBF_BV_01()); } - if(PICS_GN_GAC_FWD) { - execute(TC_GEONW_PON_GAC_NONAREA_GRD_BV_02()); - execute(TC_GEONW_PON_GAC_NONAREA_GRD_BO_07()); + if(PICS_GN_GAC_FWD) { + execute(TC_GEONW_PON_GAC_NONAREA_CBF_BV_02()); + execute(TC_GEONW_PON_GAC_NONAREA_CBF_BV_07()); + execute(TC_GEONW_PON_GAC_NONAREA_CBF_BV_20()); + execute(TC_GEONW_PON_GAC_NONAREA_CBF_BV_21()); + execute(TC_GEONW_PON_GAC_NONAREA_CBF_BV_22()); } } - - if(PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf) { - - if(PICS_GN_GAC_SRC) { - execute(TC_GEONW_PON_GAC_NONAREA_CBF_BV_01()); - } - - if(PICS_GN_GAC_FWD) { - execute(TC_GEONW_PON_GAC_NONAREA_CBF_BV_02()); - execute(TC_GEONW_PON_GAC_NONAREA_CBF_BV_07()); - execute(TC_GEONW_PON_GAC_NONAREA_CBF_BV_20()); - execute(TC_GEONW_PON_GAC_NONAREA_CBF_BV_21()); - execute(TC_GEONW_PON_GAC_NONAREA_CBF_BV_22()); - } + + if(PICS_GN_GAC_SRC) { + execute(TC_GEONW_PON_GAC_AREA_ALL_BV_01()); } - - if(PICS_GN_GAC_SRC) { - execute(TC_GEONW_PON_GAC_AREA_ALL_BV_01()); + + if(PICS_GN_GAC_FWD) { + execute(TC_GEONW_PON_GAC_AREA_ALL_BV_02()); } - - if(PICS_GN_GAC_FWD) { - execute(TC_GEONW_PON_GAC_AREA_ALL_BV_02()); - } - - if(PICS_GN_GAC_DST) { - execute(TC_GEONW_PON_GAC_AREA_ALL_BV_05()); - execute(TC_GEONW_PON_GAC_AREA_ALL_BO_08()); + + if(PICS_GN_GAC_DST) { + execute(TC_GEONW_PON_GAC_AREA_ALL_BV_05()); + execute(TC_GEONW_PON_GAC_AREA_ALL_BO_08()); } } - - /* CAP */ - - if(PICS_GN_LS_REQ_SRC) { - execute(TC_GEONW_CAP_LOS_BV_01()); + + /* CAP */ + + if(PICS_GN_LS_REQ_SRC) { + execute(TC_GEONW_CAP_LOS_BV_01()); } - - if(PICS_GN_GUC_FWD) { - execute(TC_GEONW_CAP_FPB_BV_01()); + + if(PICS_GN_GUC_FWD) { + execute(TC_GEONW_CAP_FPB_BV_01()); } - + if(PICS_GN_GBC_FWD) { - execute(TC_GEONW_CAP_FPB_BV_02()); + execute(TC_GEONW_CAP_FPB_BV_02()); } - + } - + } // End of module ItsGeoNetworking_TestControl diff --git a/ItsGeoNetworking_TpFunctions.ttcn b/ItsGeoNetworking_TpFunctions.ttcn index 1ea48090cb2792e5d8a4bba518877fc548fd38db..7084657cdc23891624fa3ca4b9de784606b758aa 100644 --- a/ItsGeoNetworking_TpFunctions.ttcn +++ b/ItsGeoNetworking_TpFunctions.ttcn @@ -1,17120 +1,17237 @@ -/** - * @author ETSI / STF405 / STF449 / STF484 / STF525 - * @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsGeoNetworking/ItsGeoNetworking_TpFunctions.ttcn $ - * $Id: ItsGeoNetworking_TpFunctions.ttcn,v 1.5 2019/08/05 15:18:56 dte Exp $ - * @desc GeoNetworking TP Functions - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * - */ -module ItsGeoNetworking_TpFunctions { - - // Libcommon - import from LibCommon_BasicTypesAndValues all; - import from LibCommon_DataStrings all; - import from LibCommon_Time all; - import from LibCommon_VerdictControl all; - import from LibCommon_Sync all; - - // LibHelpers - import from LibHelpers_Functions all; - - // LibItsCommon - import from LibItsCommon_Functions all; - - // LibItsGeoNetworking - import from LibItsGeoNetworking_TestSystem all; - import from LibItsGeoNetworking_Functions all; - import from LibItsGeoNetworking_Templates all; - import from LibItsGeoNetworking_TypesAndValues all; - import from LibItsGeoNetworking_Pics all; - import from LibItsGeoNetworking_Pixits all; - - // 6.2.1 - group geoFormatingAndDataValidity { - - // 6.2.1.1 - group geoFdvBasicHeader { - - /** - * @desc TP Function for TC_GEONW_FDV_BAH_BV_01 - */ - function f_GEONW_FDV_BAH_BV_01() runs on ItsGeoNetworking { - - // Local variables - - // Test control - if (not PICS_GN_BASIC_HEADER) { - log("*** " & testcasename() & ": PICS_GN_BASIC_HEADER required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if(not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1)))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket(?, ?), -, f_getDefaultHopLimit()))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Basic Header correctly formatted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_FDV_BAH_BV_01 - - /** - * @desc TP Function for TC_GEONW_FDV_BAH_BI_02 - */ - function f_GEONW_FDV_BAH_BI_02() runs on ItsGeoNetworking { - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - - // Test control - if (not PICS_GN_BASIC_HEADER) { - log("*** " & testcasename() & ": PICS_GN_BASIC_HEADER required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - v_gnPacket := m_geoNwPdu(m_geoNwShbPacket(v_longPosVectorNodeB)); - v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); - f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_gnPacket))); - - f_sleep(PX_TAC); - - if(0 < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); - //flush received upper indications - vc_utInds := {}; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - else { - log("*** " & testcasename() & ": INCONC: GN was not transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - - // Test Body - v_gnPacket.basicHeader.version := valueof(v_gnPacket.basicHeader.version) + 1; - - f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_gnPacket))); - - f_sleep(PX_TAC); - - if(0 != lengthof(vc_utInds)) { - log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GN was discarded and not transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_FDV_BAH_BI_02 - - } // end geoFdvBasicHeader - - // 6.2.1.2 - group geoFdvCommonHeader { - - /** - * @desc TP Function for TC_GEONW_FDV_COH_BV_01 - */ - function f_GEONW_FDV_COH_BV_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_COMMON_HEADER) { - log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(?)))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Common Header correclty formatted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - f_acTriggerEvent(m_stopPassBeaconing); - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_FDV_COH_BV_01 - - /** - * @desc TP Function for TC_GEONW_FDV_COH_BV_02 - */ - function f_GEONW_FDV_COH_BV_02() runs on ItsGeoNetworking { - - // Local variables - var GeoNetworkingInd v_geoNwInd; - var octetstring v_payload := char2oct("PAYLOAD"); - - // Test control - if (not PICS_GN_COMMON_HEADER) { - log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateShbMessageWithPayload(v_payload)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwShbPacket))) -> value v_geoNwInd { - tc_ac.stop; - if(ispresent(v_geoNwInd.msgIn.gnPacket.packet.payload)) { - if(v_geoNwInd.msgIn.gnPacket.packet.commonHeader.plLength == lengthof(v_geoNwInd.msgIn.gnPacket.packet.payload)) { - log("*** " & testcasename() & ": PASS: PL field correctly indicates payload size ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: PL does correctly not indicate payload size (" - & int2str(v_geoNwInd.msgIn.gnPacket.packet.commonHeader.plLength) - & " != " - & int2str(lengthof(v_geoNwInd.msgIn.gnPacket.packet.payload)) - & ")***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - else { - if(v_geoNwInd.msgIn.gnPacket.packet.commonHeader.plLength == 0) { - log("*** " & testcasename() & ": PASS: PL field correctly indicates empty payload ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: PL does not indicate empty payload ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_FDV_COH_BV_02 - - /** - * @desc TP Function for TC_GEONW_FDV_COH_BV_03 - */ - function f_GEONW_FDV_COH_BV_03( - in template (present) UInt8 p_hopLimit := f_getDefaultHopLimit(), - in template (present) Bit8 p_flags := f_isMobile() - ) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_COMMON_HEADER) { - log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if(not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1)))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithHlAndFlags(mw_longPosVectorPosition(v_longPosVectorIut), ?, p_hopLimit, p_flags)))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Correct GeoNetworking Common Header received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] a_receiveGeoBroadcast(mw_longPosVectorPosition(v_longPosVectorIut), ?) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Incorrect GeoNetworking Common Header received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_FDV_COH_BV_03 - - group GEONW_FDV_COH_BO_04 { - - /** - * @desc TP Function for TC_GEONW_FDV_COH_BO_04 - */ - function f_GEONW_FDV_COH_BO_04() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_COMMON_HEADER) { - log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_FDV_COH_BO_04_nodeB()); - v_nodeD.start(f_GEONW_FDV_COH_BO_04_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_FDV_COH_BV_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_FDV_COH_BV_04) - */ - function f_GEONW_FDV_COH_BO_04_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var UInt8 v_hopLimit := f_getDefaultHopLimit(); - var template (value) GeoNetworkingPdu v_gnPacket; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu( - m_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeB, - v_hopLimit-1 - ), - -, - v_hopLimit - ); - v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); - f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_gnPacket))); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: TSB packet was not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: TSB was correctly discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_FDV_COH_BO_04_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_FDV_COH_BV_04) - */ - function f_GEONW_FDV_COH_BO_04_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: TSB packet was not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: TSB was correctly discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_FDV_COH_BO_04_nodeD - - } // end GEONW_FDV_COH_BO_04 - - } // end geoFdvCommonHeader - - // 6.2.1.3 - group geoFdvBeacon { - - /** - * @desc TP Function for TC_GEONW_FDV_BEA_BV_01 - */ - function f_GEONW_FDV_BEA_BV_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_BEACON_SRC) { - log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(mw_longPosVectorPosition(v_longPosVectorIut), e_any)))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Common Header correclty formatted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_FDV_BEA_BV_01 - - /** - * @desc TP Function for TC_GEONW_FDV_BEA_BV_02 - */ - function f_GEONW_FDV_BEA_BV_02() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_BEACON_SRC) { - log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket( - mw_longPosVectorAny(f_getIutGnLocalAddress()))))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GN address correctly received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_FDV_BEA_BV_02 - - /** - * @desc TP Function for TC_GEONW_FDV_BEA_BV_03 - */ - function f_GEONW_FDV_BEA_BV_03() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_BEACON_SRC) { - log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(mw_longPosVectorPosition(v_longPosVectorIut))))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Position equaling GN-MNGT primitive value received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_FDV_BEA_BV_03 - - /** - * @desc TP Function for TC_GEONW_FDV_BEA_BV_04 - */ - function f_GEONW_FDV_BEA_BV_04() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_BEACON_SRC) { - log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(mw_longPosVectorPosition(v_longPosVectorIut))))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Timestamp equaling GN-MNGT primitive value received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_FDV_BEA_BV_04 - - } // end geoFdvBeacon - - // 6.2.1.4 - group geoFdvGeoUnicast { - - /** - * @desc TP Function for TC_GEONW_FDV_GUC_BV_01 - */ - function f_GEONW_FDV_GUC_BV_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_GUC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - v_longPosVectorIut := f_getPosition(c_compIut); - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacketWithSourcePv( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), // DEPV - ?, // sequence number - mw_longPosVectorPosition(v_longPosVectorIut) //SOPV - ) - ) - ) - ) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: Fields of the received GUC message correctly set ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: GUC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_FDV_GUC_BV_01 - - } // end geoFdvGeoUnicast - - // 6.2.1.5 - group geoFdvGeoBroadcast { - - /** - * @desc TP Function for TC_GEONW_FDV_GBC_BV_01 - */ - function f_GEONW_FDV_GBC_BV_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - var octetstring v_payload := char2oct("PAYLOAD"); - - // Test control - if (not PICS_GN_GBC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_longPosVectorIut := f_getPosition(c_compIut); - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoBroadcastMessageWithPayload(f_getArea(c_area1), v_payload)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - f_receiveGeoNetMessageWithPayload( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), // SOPV - ? // sequence number - ) - ) - ), - ? - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Fields of the received GBC message correctly set ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_FDV_GBC_BV_01 - - } // end geoFdvGeoBroadcast - - // 6.2.1.6 - group geoFdvGeoAnycast { - - /** - * @desc TP Function for TC_GEONW_FDV_GAC_BV_01 - */ - function f_GEONW_FDV_GAC_BV_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut; - var octetstring v_payload := char2oct("PAYLOAD"); - - // Test control - if (not PICS_GN_GAC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_longPosVectorIut := f_getPosition(c_compIut); - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoAnycastMessageWithPayload(f_getArea(c_area1), v_payload)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - f_receiveGeoNetMessageWithPayload( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwAnycastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), // SOPV - ? // sequence number - ) - ) - ), - ? - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Fields of the received GAC message correctly set ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: GAC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_FDV_GAC_BV_01 - - } // end geoFdvGeoAnycast - - // 6.2.1.7 - group geoFdvSingleHopBroadcast { - - /** - * @desc TP Function for TC_GEONW_FDV_SHB_BV_01 - */ - function f_GEONW_FDV_SHB_BV_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_SHB_SRC) { - log("*** " & testcasename() & ": PICS_GN_SHB_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_longPosVectorIut := f_getPosition(c_compIut); - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateShbMessage) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacket( - mw_longPosVectorPosition(v_longPosVectorIut), // SOPV - 1 //MHL - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Fields of the received SHB message correctly set ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: SHB message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_FDV_SHB_BV_01 - - } // end geoFdvSingleHopBroadcast - - // 6.2.1.8 - group geoFdvTopologicallyScopedBroadcast { - - /** - * @desc TP Function for TC_GEONW_FDV_TSB_BV_01 - */ - function f_GEONW_FDV_TSB_BV_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_TSB_SRC) { - log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_longPosVectorIut := f_getPosition(c_compIut); - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateTsbMessage) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, // sequence number - mw_longPosVectorPosition(v_longPosVectorIut) // SOPV - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: message received with correct common and extended headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: TSB message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_FDV_TSB_BV_01 - - } // end geoFdvTopologicallyScopedBroadcast - - } // end geoFormatingAndDataValidity - - // 6.2.2 - group geoProtocolOperation { - - // 6.2.2.1 - group geoLocationTable { - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_01 - */ - function f_GEONW_PON_LOT_BV_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - - // Test control - if (not PICS_GN_GUC_SRC or not PICS_GN_BEACON_DST) { - log("*** " & testcasename() & ": PICS_GN_GUC_SRC and PICS_GN_BEACON_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GUC packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] a_receiveGeoUnicastWithDestination(?) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: GUC packet has some inconsistence ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] a_receiveAnyLsRequest() { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": TIMEOUT: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_LOT_BV_01 - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_02 - */ - function f_GEONW_PON_LOT_BV_02() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - var GN_Address v_gnAddressNodeA; - var boolean v_lsRequestReceived := false; - - // Test control - if (not PICS_GN_LS_REQ_SRC or not PICS_GN_LS_REP_DST) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC AND PICS_GN_LS_REP_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - v_gnAddressNodeA := v_longPosVectorNodeA.gnAddr; - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequestAndReply( - ?, v_gnAddressNodeA.mid, - v_longPosVectorNodeA - ) { - v_lsRequestReceived := true; - log("*** " & testcasename() & ": Pre-conditions: Received and answered Location Service Request ***"); - repeat; - } - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { - tc_ac.stop; - if(v_lsRequestReceived == true) { - log("*** " & testcasename() & ": Pre-conditions: First GUC message received correctly ***"); - } - else { - log("*** " & testcasename() & ": Pre-conditions: GUC packet received without LS Request ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Pre-conditions: Initial conditions not satisfied. ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_gnAddressNodeA.mid, v_longPosVectorIut) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Received second GUC packet without LS Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_LOT_BV_02 - - group GEONW_PON_LOT_BV_03 { - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_03_01 - */ - function f_GEONW_PON_LOT_BV_03_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeB); - - // Test control - if (not PICS_GN_BEACON_DST) { - log("*** " & testcasename() & ": PICS_GN_BEACON_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwBeaconPacket( - v_longPosVectorNode - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); - - } // End of function f_GEONW_PON_LOT_BV_03_01 - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_03_02 - */ - function f_GEONW_PON_LOT_BV_03_02() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeA); - - // Test control - if (not PICS_GN_GUC_DST) { - log("*** " & testcasename() & ": PICS_GN_GUC_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwUnicastPacket( - v_longPosVectorNode, - f_getIutShortPosVector(), - vc_localSeqNumber - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); - - } // End of function f_GEONW_PON_LOT_BV_03_02 - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_03_03 - */ - function f_GEONW_PON_LOT_BV_03_03() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeA); - - // Test control - if (not PICS_GN_GAC_DST) { - log("*** " & testcasename() & ": PICS_GN_GAC_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwAnycastPacket( - v_longPosVectorNode, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area1) - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); - - } // End of function f_GEONW_PON_LOT_BV_03_03 - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_03_04 - */ - function f_GEONW_PON_LOT_BV_03_04() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeA); - - // Test control - if (not PICS_GN_GBC_DST) { - log("*** " & testcasename() & ": PICS_GN_GBC_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwBroadcastPacket( - v_longPosVectorNode, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1) - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); - - } // End of function f_GEONW_PON_LOT_BV_03_04 - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_03_05 - */ - function f_GEONW_PON_LOT_BV_03_05() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeA); - - // Test control - if (not PICS_GN_TSB_DST) { - log("*** " & testcasename() & ": PICS_GN_TSB_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNode - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); - - } // End of function f_GEONW_PON_LOT_BV_03_05 - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_03_06 - */ - function f_GEONW_PON_LOT_BV_03_06() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeB); - - // Test control - if (not PICS_GN_SHB_DST) { - log("*** " & testcasename() & ": PICS_GN_SHB_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwShbPacket( - v_longPosVectorNode - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); - - } // End of function f_GEONW_PON_LOT_BV_03_06 - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_03_07 - */ - function f_GEONW_PON_LOT_BV_03_07() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeA); - - // Test control - if (not PICS_GN_LS_REQ_DST) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - activate(a_receiveAnyLsReply()); - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwLsRequestPacket( - v_longPosVectorNode, - vc_localSeqNumber, - f_getIutGnLocalAddress() - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); - - } // End of function f_GEONW_PON_LOT_BV_03_07 - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_03_08 - */ - function f_GEONW_PON_LOT_BV_03_08() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeA); - - // Test control - if (not PICS_GN_LS_REP_DST) { - log("*** " & testcasename() & ": PICS_GN_LS_REP_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwLsReplyPacket( - v_longPosVectorNode, - f_getIutShortPosVector(), - vc_localSeqNumber - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); - - } // End of function f_GEONW_PON_LOT_BV_03_08 - - /** - * @desc Function including first preamble part (TC_GEONW_PON_LOT_BV_03) - */ - function f_TP_GEONW_PON_LOT_BV_03_pre_1(in charstring p_nodeName) runs on ItsGeoNetworking return LongPosVector { - - // Local variables - var LongPosVector v_longPosVectorNode; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNode := f_getPosition(p_nodeName); - - // Test adapter configuration - - // Preamble part I - if(p_nodeName == c_compNodeA) { - f_prNeighbour(); - } - else { - f_prNonNeighbour(); - } - - return v_longPosVectorNode; - } // End of function f_TP_GEONW_PON_LOT_BV_03_pre_1 - - /** - * @desc Function including second preamble part (TC_GEONW_PON_LOT_BV_03) - */ - function f_TP_GEONW_PON_LOT_BV_03_pre_2(in template (value) GnNonSecuredPacket p_packet) runs on ItsGeoNetworking { - var template (value) GeoNetworkingPdu v_gnPacket; - - //preamble part II - v_gnPacket := m_geoNwPdu(p_packet, -, c_hopLimit1); - v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast(v_gnPacket)) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } // End of function f_TP_GEONW_PON_LOT_BV_03_pre_2 - - /** - * @desc Function including test body and postamble part (TC_GEONW_PON_LOT_BV_03) - */ - function f_TP_GEONW_PON_LOT_BV_03_main(in template (value) LongPosVector p_longPosVectorNode) runs on ItsGeoNetworking { - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(valueof(p_longPosVectorNode.gnAddr))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveAnyLsRequest() { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_longPosVectorNode)))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GUC packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_TP_GEONW_PON_LOT_BV_03_main - - } //end GEONW_PON_LOT_BV_03 - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_04 - */ - function f_GEONW_PON_LOT_BV_04() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_LS_REQ_SRC) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prDefault(); // NodeB will send Beacon only once - f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(m_geoNwBeaconPacket(v_longPosVectorNodeB), -, c_hopLimit1)))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(f_getLifetimeLocTableEntry() + PX_T_DELTA); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeB.gnAddr.mid, v_longPosVectorIut ) { - log("*** " & testcasename() & ": PASS: LS Request received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: LS Request not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of function f_GEONW_PON_LOT_BV_04 - - group GEONW_PON_LOT_BV_05 { - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_05_01 - */ - function f_GEONW_PON_LOT_BV_05_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_obsoleteLongPosVectorNodeB; - - // Test control - if (not PICS_GN_GUC_DST) { - log("*** " & testcasename() & ": PICS_GN_GUC_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - f_TP_GEONW_PON_LOT_BV_05_pre_2( - m_geoNwUnicastPacket( - v_obsoleteLongPosVectorNodeB, - f_getIutShortPosVector(), - vc_localSeqNumber - ) - ); - - f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - } // End of function f_GEONW_PON_LOT_BV_05_01 - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_05_02 - */ - function f_GEONW_PON_LOT_BV_05_02() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_obsoleteLongPosVectorNodeB; - - // Test control - if (not PICS_GN_GAC_DST) { - log("*** " & testcasename() & ": PICS_GN_GAC_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - f_TP_GEONW_PON_LOT_BV_05_pre_2( - m_geoNwAnycastPacket( - v_obsoleteLongPosVectorNodeB, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area1) - ) - ); - - f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - } // End of function f_GEONW_PON_LOT_BV_05_02 - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_05_03 - */ - function f_GEONW_PON_LOT_BV_05_03() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_obsoleteLongPosVectorNodeB; - - // Test control - if (not PICS_GN_GBC_DST) { - log("*** " & testcasename() & ": PICS_GN_GBC_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - f_TP_GEONW_PON_LOT_BV_05_pre_2( - m_geoNwBroadcastPacket( - v_obsoleteLongPosVectorNodeB, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1) - ) - ); - - f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - } // End of function f_GEONW_PON_LOT_BV_05_03 - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_05_04 - */ - function f_GEONW_PON_LOT_BV_05_04() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_obsoleteLongPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - - // Test control - if (not PICS_GN_TSB_DST) { - log("*** " & testcasename() & ": PICS_GN_TSB_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - f_TP_GEONW_PON_LOT_BV_05_pre_2( - m_geoNwTsbPacket( - vc_localSeqNumber, - v_obsoleteLongPosVectorNodeB - ) - ); - - f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - } // End of function f_GEONW_PON_LOT_BV_05_04 - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_05_05 - */ - function f_GEONW_PON_LOT_BV_05_05() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_obsoleteLongPosVectorNodeB; - - // Test control - if (not PICS_GN_SHB_DST) { - log("*** " & testcasename() & ": PICS_GN_SHB_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - f_TP_GEONW_PON_LOT_BV_05_pre_2( - m_geoNwShbPacket( - v_obsoleteLongPosVectorNodeB - ) - ); - - f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - } // End of function f_GEONW_PON_LOT_BV_05_05 - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_05_06 - */ - function f_GEONW_PON_LOT_BV_05_06() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_obsoleteLongPosVectorNodeB; - - // Test control - if (not PICS_GN_LS_REQ_DST) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - activate(a_receiveAnyLsReply()); - - f_TP_GEONW_PON_LOT_BV_05_pre_2( - m_geoNwLsRequestPacket( - v_obsoleteLongPosVectorNodeB, - vc_localSeqNumber, - f_getIutGnLocalAddress() - ) - ); - - f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - } // End of function f_GEONW_PON_LOT_BV_05_06 - - /** - * @desc TP Function for TC_GEONW_PON_LOT_BV_05_07 - */ - function f_GEONW_PON_LOT_BV_05_07() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_obsoleteLongPosVectorNodeB; - - // Test control - if (not PICS_GN_LS_REQ_DST) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - f_TP_GEONW_PON_LOT_BV_05_pre_2( - m_geoNwLsReplyPacket( - v_obsoleteLongPosVectorNodeB, - f_getIutShortPosVector(), - vc_localSeqNumber - ) - ); - - f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - } // End of function f_GEONW_PON_LOT_BV_05_07 - - /** - * @desc Function including first preamble part (TC_GEONW_PON_LOT_BV_05) - */ - function f_TP_GEONW_PON_LOT_BV_05_pre_1(out LongPosVector p_longPosVectorNodeB, out LongPosVector p_obsoleteLongPosVectorNodeB) runs on ItsGeoNetworking { - - // Local variables - - // Test control - - // Test component configuration - f_cf01Up(); - p_longPosVectorNodeB := f_getPosition(c_compNodeB); - p_obsoleteLongPosVectorNodeB := p_longPosVectorNodeB; - p_obsoleteLongPosVectorNodeB.timestamp_ := p_obsoleteLongPosVectorNodeB.timestamp_ - 1000; - p_obsoleteLongPosVectorNodeB.latitude := p_obsoleteLongPosVectorNodeB.latitude - (PX_POS_DELTA * 3); - - // Test adapter configuration - - // Preamble - f_prDefault(); - - // Act as a neighbor and send one beacon - f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(m_geoNwBeaconPacket(p_longPosVectorNodeB), -, c_hopLimit1)))); - } // End of function f_TP_GEONW_PON_LOT_BV_05_pre_1 - - /** - * @desc Function including second preamble part (TC_GEONW_PON_LOT_BV_05) - */ - function f_TP_GEONW_PON_LOT_BV_05_pre_2(in template (value) GnNonSecuredPacket p_packet) runs on ItsGeoNetworking { - var template (value) GeoNetworkingPdu v_gnPacket; - - //preamble part II - v_gnPacket := m_geoNwPdu(p_packet); - v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(p_packet))) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } // End of function f_TP_GEONW_PON_LOT_BV_05_pre_2 - - /** - * @desc Function including test body and postamble part (TC_GEONW_PON_LOT_BV_05) - */ - function f_TP_GEONW_PON_LOT_BV_05_main(in template (value) LongPosVector p_longPosVectorNodeB, in template (value) LongPosVector p_obsoleteLongPosVectorNodeB) runs on ItsGeoNetworking { - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(valueof(p_longPosVectorNodeB.gnAddr)))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveAnyLsRequest() { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_obsoleteLongPosVectorNodeB)))) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: GN packet received with obsolete Destination Position Vector ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_longPosVectorNodeB)))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GN packet packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of function f_TP_GEONW_PON_LOT_BV_05_main - - } // end group GEONW_PON_LOT_BV_05 - - } // end geoLocationTable - - // 6.2.2.2 - group geoLocalPositionVector { - - /** - * @desc TP Function for TC_GEONW_PON_LPV_BV_01 - */ - function f_GEONW_PON_LPV_BV_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut; - var template LongPosVector v_previouslongPosVectorIut; - var GeoNetworkingInd v_geoNwInd; - - // Test control - if (not PICS_GN_BEACON_SRC) { - log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up();//FIXME ac change position, not used by C2C - v_longPosVectorIut := f_getPosition(c_compIut); - v_previouslongPosVectorIut := v_longPosVectorIut; - v_previouslongPosVectorIut.timestamp_ := ?; - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( - mw_geoNwBeaconPacket( - mw_longPosVectorAny(v_longPosVectorIut.gnAddr) - ) - ))) -> value v_geoNwInd { - tc_ac.stop; - log("*** " & testcasename() & ": Pre-conditions: Beacon received ***"); - v_longPosVectorIut := v_geoNwInd.msgIn.gnPacket.packet.extendedHeader.beaconHeader.srcPosVector; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - f_utChangePosition(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - geoNetworkingPort.clear; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( - mw_geoNwBeaconPacket( - mw_longPosVectorAny(v_longPosVectorIut.gnAddr) - ) - ))) -> value v_geoNwInd { - tc_ac.stop; - //check if the position vector has changed - if (match(v_geoNwInd.msgIn.gnPacket.packet.extendedHeader.beaconHeader.srcPosVector, v_previouslongPosVectorIut)) { - log("*** " & testcasename() & ": FAIL: Sender Postion Vector not correctly updated ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: Sender Postion Vector correctly updated ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - f_acTriggerEvent(m_stopPassBeaconing); - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_LPV_BV_01 - - } // end geoLocalPositionVector - - // 6.2.2.3 - group geoSequenceNumber { - - /** - * @desc TP Function for TC_GEONW_PON_SQN_BV_01 - */ - function f_GEONW_PON_SQN_BV_01() runs on ItsGeoNetworking { - - // Local variables - var UInt16 v_expectedSequenceNumber := 0; - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_GBC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if (not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveGeoBroadcast( - mw_longPosVectorPosition(v_longPosVectorIut), - v_expectedSequenceNumber) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] a_receiveGeoBroadcast( - mw_longPosVectorPosition(v_longPosVectorIut), - ?) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: GBC packet received with incorrect sequence number ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_SQN_BV_01 - - /** - * @desc TP Function for TC_GEONW_PON_SQN_BV_02 - */ - function f_GEONW_PON_SQN_BV_02() runs on ItsGeoNetworking { - - // Local variables - var UInt16 v_expectedSequenceNumber := 0; - var integer v_nbReceivedPackets := 0; - var GeoNetworkingInd v_geoNwInd; - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_GBC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_sleep(10.0); - // receive first packet - if (not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1)))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - ? - )))) -> value v_geoNwInd { - tc_ac.stop; - log("*** " & testcasename() & ": Pre-conditions: First GUC packet received ***"); - v_expectedSequenceNumber := v_geoNwInd.msgIn.gnPacket.packet.extendedHeader.geoBroadcastHeader.seqNumber + 1; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if (not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1)))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveGeoBroadcast( - mw_longPosVectorPosition(v_longPosVectorIut), - v_expectedSequenceNumber) { - tc_ac.stop; - v_nbReceivedPackets := v_nbReceivedPackets + 1; - if(v_nbReceivedPackets >= vc_multipleMessagesCount) { - log("*** " & testcasename() & ": PASS: GBC packets received with correct sequence numbers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - v_expectedSequenceNumber := v_expectedSequenceNumber + 1; - if (not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1)))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - repeat; - } - } - [] a_receiveGeoBroadcast( - mw_longPosVectorPosition(v_longPosVectorIut), - ?) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: GBC packet received with incorrect sequence number ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_SQN_BV_02 - - } // end geoSequenceNumber - - // 6.2.2.4 - group geoLocationService { - - /** - * @desc TP Function for TC_GEONW_PON_LOS_BV_01 - */ - function f_GEONW_PON_LOS_BV_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut; - var GN_Address v_gnAddressNodeA; - - // Test control - if (not PICS_GN_LS_REQ_SRC) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_gnAddressNodeA := f_getPosition(c_compNodeA).gnAddr; - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_gnAddressNodeA)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveLsRequest( - ?, - v_gnAddressNodeA.mid, - v_longPosVectorIut - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: LS Request received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] a_receiveAnyLsRequest() { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: LS Request does not contain GN Address of nodeA ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_LOS_BV_01 - - /** - * @desc TP Function for TC_GEONW_PON_LOS_BV_02 - */ - function f_GEONW_PON_LOS_BV_02() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut; - var GN_Address v_gnAddressNodeA; - - // Test control - if (not PICS_GN_LS_REQ_SRC) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_gnAddressNodeA := f_getPosition(c_compNodeA).gnAddr; - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_gnAddressNodeA)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_gnAddressNodeA.mid, v_longPosVectorIut) { - tc_ac.stop; - //start retransmission timer - tc_ac.start(f_getLsRetransmitTimer() - f_getDeltaTimer()); - } - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_gnAddressNodeA)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - alt { - [] a_receiveLsRequest(?, v_gnAddressNodeA.mid, v_longPosVectorIut) { - tc_ac.stop; - log("*** " & testcasename() & ": Second LS_REQUEST received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": No second LS_REQUEST received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_LOS_BV_02 - - /** - * @desc TP Function for TC_GEONW_PON_LOS_BV_03 - */ - function f_GEONW_PON_LOS_BV_03() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorIut; - var GeoNetworkingInd v_geoNetInd; - - // Test control - if (not PICS_GN_LS_REQ_SRC or not PICS_GN_LS_REP_DST) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC AND PICS_GN_LS_REP_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - } - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwLsReplyPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ) - ) - )); - - tc_ac.start; - alt { - - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ) - ) -> value v_geoNetInd { - tc_ac.stop; - //we only check that the lifetime is less than the default lifetime due to - //we do not know exactly the time passed at IUT - if (f_getLifetimeValue(v_geoNetInd.msgIn.basicHeader.lifeTime) v_maxNbrRetrans) { - //first LS request is not counted as a retransmission - log("*** " & testcasename() & ": LS_REQUEST retransmitted more than itsGnLocationServiceMaxRetrans times ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - tc_ac.start; - repeat; - } - } - [] tc_ac.timeout { - if(v_nbLsReceived == (v_maxNbrRetrans)) { - //first LS request is not counted as a retransmission - log("*** " & testcasename() & ": LS_REQUEST retransmitted itsGnLocationServiceMaxRetrans times ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": LS_REQUEST retransmitted less than itsGnLocationServiceMaxRetrans times ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_LOS_BV_07 - - /** - * @desc TP Function for TC_GEONW_PON_LOS_BV_08 - */ - function f_GEONW_PON_LOS_BV_08() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorIut; - var GN_Address v_iutGnAddress; - var UInt16 v_seqNbr := vc_localSeqNumber; - var FncRetCode v_ret := e_error; - - // Test control - if (not PICS_GN_LS_REQ_DST) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - v_iutGnAddress := f_getPosition(c_compIut).gnAddr; - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_ret := f_processLocationService(v_longPosVectorNodeA, v_seqNbr, v_iutGnAddress, v_longPosVectorIut); - if (v_ret == e_success) { - log("*** " & testcasename() & ": LS_REPLY packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": LS_REPLY packet not received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_LOS_BV_08 - - group GEONW_PON_LOS_BO_09 { - - /** - * @desc TP Function for TC_GEONW_PON_LOS_BO_09 - */ - function f_GEONW_PON_LOS_BO_09() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_LS_REQ_DST) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_LOS_BO_09_nodeB()); - v_nodeD.start(f_GEONW_PON_LOS_BO_09_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_LOS_BO_09 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_LOS_BO_09) - */ - function f_GEONW_PON_LOS_BO_09_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var FncRetCode v_ret := e_error; - - // Preamble - f_prNeighbour(); - v_ret := f_processLocationService( - v_longPosVectorNodeB, - vc_localSeqNumber, - v_longPosVectorIut.gnAddr, - v_longPosVectorIut); - if (v_ret == e_error) { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwLsReplyPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)) - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: LS_REQUEST has not been discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: LS_REQUEST discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_LOS_BO_09_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_LOS_BO_09) - */ - function f_GEONW_PON_LOS_BO_09_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GN_Address v_iutGnAddress := f_getPosition(c_compIut).gnAddr; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwLsRequestPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - v_iutGnAddress - ) - ) - ) - )); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwLsReplyPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)) - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: LS_REQUEST has not been discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: LS_REQUEST discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_LOS_BO_09_nodeD - - } // end GEONW_PON_LOS_BO_09 - - group GEONW_PON_LOS_BV_10 { - - /** - * @desc TP Function for TC_GEONW_PON_LOS_BV_10 - */ - function f_GEONW_PON_LOS_BV_10() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_LS_FWD) { - log("*** " & testcasename() & ": PICS_GN_LS_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_LOS_BV_10_nodeB()); - v_nodeC.start(f_GEONW_PON_LOS_BV_10_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_LOS_BV_10 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_LOS_BV_10) - */ - function f_GEONW_PON_LOS_BV_10_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwLsRequestPacket( - ?, - v_longPosVectorNodeB.gnAddr.mid - ), - -, - c_defaultHopLimit - 1 - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Re-broadcasted LS Request received with HL field decreased by 1 ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: LS Request was not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_LOS_BV_10_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_LOS_BV_10) - */ - function f_GEONW_PON_LOS_BV_10_nodeC() runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwLsRequestPacket( - f_getPosition(c_compNodeA), - vc_localSeqNumber, - f_getPosition(c_compNodeB).gnAddr - ), - -, - c_defaultHopLimit - ) - ) - )); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_LOS_BV_10_nodeC - - } // end GEONW_PON_LOS_BV_10 - - group GEONW_PON_LOS_BV_11 { - - /** - * @desc TP Function for TC_GEONW_PON_LOS_BV_11 - */ - function f_GEONW_PON_LOS_BV_11() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_LS_FWD) { - log("*** " & testcasename() & ": PICS_GN_LS_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_LOS_BV_11_nodeB()); - v_nodeC.start(f_GEONW_PON_LOS_BV_11_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_LOS_BV_11 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_LOS_BV_11) - */ - function f_GEONW_PON_LOS_BV_11_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwLsReplyPacket( - mw_longPosVectorPosition(v_longPosVectorNodeA), - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)) - ), - -, - c_defaultHopLimit - 1 - ) - ) - ) { - log("*** " & testcasename() & ": PASS: Forwarded LS Reply received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: LS Reply was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_LOS_BV_11_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_LOS_BV_11) - */ - function f_GEONW_PON_LOS_BV_11_nodeC() runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwLsReplyPacket( - f_getPosition(c_compNodeA), - f_longPosVector2ShortPosVector(f_getPosition(c_compNodeB)), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - ) - ) - )); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_LOS_BV_11_nodeC - - } // end GEONW_PON_LOS_BV_11 - - /** - * @desc TP Function for TC_GEONW_PON_LOS_BV_12 - */ - function f_GEONW_PON_LOS_BV_12() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorIut; - var UInt16 v_seqNbr := vc_localSeqNumber; - - // Test control - if (not PICS_GN_LS_REQ_SRC) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ) - ) - )); - - tc_ac.start; - alt { - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GUC packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_LOS_BV_12 - - /** - * @desc TP Function for TC_GEONW_PON_LOS_BV_13 - */ - function f_GEONW_PON_LOS_BV_13() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorIut; - var integer v_lt1 := f_getLsMaxRetrans()*float2int(f_getLsRetransmitTimer()); - var integer v_lt2 := float2int(int2float(v_lt1)/2.0); - var octetstring v_payload1 := char2oct("PAYLOAD_1"); - var octetstring v_payload2 := char2oct("PAYLOAD_2"); - var boolean v_msg1Received := false; - - // Test control - if (not PICS_GN_LS_REQ_SRC) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithLifetimeWithPayload(v_longPosVectorNodeA.gnAddr, v_lt2*1000, v_payload2)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithLifetimeWithPayload(v_longPosVectorNodeA.gnAddr, v_lt1*1000, v_payload1)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - //Send LS-REPLY after LT2 expiry - f_sleepIgnoreDef(int2float(v_lt2)); - - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwLsReplyPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ) - ) - )); - - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - log("*** " & testcasename() & ": INFO: LS Request retransmission ignored ***"); - repeat; - } - [] geoNetworkingPort.receive( - f_receiveGeoNetMessageWithPayload( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ), - v_payload1 - ) - ) { - v_msg1Received := true; - repeat; - } - [] geoNetworkingPort.receive( - f_receiveGeoNetMessageWithPayload( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ), - v_payload2 - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: message with elapsed lifetime received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - if(v_msg1Received == true) { - log("*** " & testcasename() & ": PASS: message with running lifetime received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: message with running lifetime not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_LOS_BV_13 - - /** - * @desc TP Function for TC_GEONW_PON_LOS_BV_13 - */ - function f_GEONW_PON_LOS_BV_14() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorIut; - var integer v_maxNbrRetrans := f_getLsMaxRetrans(); - var integer v_nbLsReceived := 0; - var UInt16 v_LT1; - - // Test control - if (not PICS_GN_LS_REQ_SRC) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - v_LT1 := float2int(int2float(v_maxNbrRetrans + 2) * f_getLsRetransmitTimer() * 1000.0); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithLifetime(v_longPosVectorNodeA.gnAddr,v_LT1)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - - tc_wait.start(int2float(v_LT1)); - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - v_nbLsReceived := v_nbLsReceived + 1; - if(v_nbLsReceived > v_maxNbrRetrans) { - //first LS request is not counted as a retransmission - log("*** " & testcasename() & ": Pre-conditions: LS_REQUEST retransmitted more than itsGnLocationServiceMaxRetrans times ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - else { - tc_ac.start; - repeat; - } - } - [] tc_ac.timeout { - if(v_nbLsReceived == (v_maxNbrRetrans)) { - //first LS request is not counted as a retransmission - log("*** " & testcasename() & ": Pre-conditions: LS_REQUEST retransmitted itsGnLocationServiceMaxRetrans times ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - else { - log("*** " & testcasename() & ": Pre-conditions: LS_REQUEST retransmitted less than itsGnLocationServiceMaxRetrans times ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - } - } - - // Test Body - if (tc_wait.running) { - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ) - ) - )); - tc_wait.stop; - - tc_noac.start; - alt { - // no check for ItsNodeA address as no other trigger for messages exists - [] geoNetworkingPort.receive { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Unexpected message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message was sent ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - } - else { - log("*** " & testcasename() & ": FAIL: LT1 expired ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_LOS_BV_14 - - /** - * @desc TP Function for TC_GEONW_PON_LOS_BV_15 - */ - function f_GEONW_PON_LOS_BV_15() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_LS_REQ_SRC) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorNodeB), - vc_localSeqNumber - ) - ) - ) - )); - - tc_ac.start; - alt { - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GUC packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_LOS_BV_15 - - /** - * @desc TP Function for TC_GEONW_PON_LOS_BV_16 - */ - function f_GEONW_PON_LOS_BV_16() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_LS_REQ_SRC) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ) - ) - )); - - tc_noac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: LS Request retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { - log("*** " & testcasename() & ": INFO: GUC packet received ***"); - repeat; - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: LS Request not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_LOS_BV_16 - - /** - * @desc TP Function for TC_GEONW_PON_LOS_BV_17 - */ - function f_GEONW_PON_LOS_BV_17() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_LS_REQ_SRC) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorNodeB), - vc_localSeqNumber - ) - ) - ) - )); - - tc_noac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: LS Request retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { - log("*** " & testcasename() & ": INFO: GUC packet received ***"); - repeat; - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: LS Request not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_LOS_BV_17 - - } // end geoLocationService - - // 6.2.2.5 - group geoForwardingPacketBuffer { - - group GEONW_PON_FPB_BV_01 { - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_01 - */ - function f_GEONW_PON_FPB_BV_01() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GUC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_01_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_01_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_FPB_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_01) - */ - function f_GEONW_PON_FPB_BV_01_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prDefault(); // NodeB is not yet a neighbour - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleepIgnoreDef(1.0); - f_startBeingNeighbour(); - - tc_ac.start; - alt { - [] a_receiveAnyLsRequest() { - tc_ac.stop; - log("*** " & testcasename() & ": INCONC: Received Location Service Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ?)))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: packet correctly forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_FPB_BV_01_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_01) - */ - function f_GEONW_PON_FPB_BV_01_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - - // Make sure IUT has LocE for NodeA by sending unsolicited LS_REPLY - f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu( - m_geoNwLsReplyPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - )))); - - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - // /!\ This pre-condition has impact on test body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GUC packet received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_FPB_BV_01_nodeC - - } // end GEONW_PON_FPB_BV_01 - - group GEONW_PON_FPB_BV_02 { - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_02 - */ - function f_GEONW_PON_FPB_BV_02() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var UInt16 c_sequenceNumberC := f_getInitialSequenceNumber(); - - // Test control - if (not PICS_GN_GUC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_02_nodeB(c_sequenceNumberC)); - v_nodeC.start(f_GEONW_PON_FPB_BV_02_nodeC(c_sequenceNumberC)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_FPB_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_02) - */ - function f_GEONW_PON_FPB_BV_02_nodeB(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prDefault(); // NodeB is not yet a neighbour - vc_localSeqNumber := p_sequenceNumberC; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(1.0); - f_startBeingNeighbour(); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - 1 - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Packet correctly forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_FPB_BV_02_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_02) - */ - function f_GEONW_PON_FPB_BV_02_nodeC(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - vc_localSeqNumber := p_sequenceNumberC; - - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeC, - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - ) - ) - )); - - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_FPB_BV_02_nodeC - - } // end GEONW_PON_FPB_BV_02 - - group GEONW_PON_FPB_BV_03 { - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_03 - */ - function f_GEONW_PON_FPB_BV_03() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var UInt16 c_sequenceNumberC := f_getInitialSequenceNumber(); - const integer c_messageCount := 2; - - // Test control - if (not PICS_GN_GUC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_03_nodeB(c_sequenceNumberC, c_messageCount)); - v_nodeC.start(f_GEONW_PON_FPB_BV_03_nodeC(c_sequenceNumberC, c_messageCount)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_FPB_BV_03 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_03) - */ - function f_GEONW_PON_FPB_BV_03_nodeB(in UInt16 p_sequenceNumberC, in integer p_messageCount) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var UInt16 v_expectedSequenceNumber := p_sequenceNumberC; - var integer v_nbReceivedPackets := 0; - - // Preamble - f_prDefault(); // NodeB is not yet a neighbour - vc_multipleMessagesCount := p_messageCount; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(1.0); - f_startBeingNeighbour(); - - tc_ac.start; - alt { - [] a_receiveGeoUnicast( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - v_expectedSequenceNumber) { - tc_ac.stop; - v_nbReceivedPackets := v_nbReceivedPackets + 1; - if(v_nbReceivedPackets >= vc_multipleMessagesCount) { - log("*** " & testcasename() & ": PASS: GUC packets received in correct order ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - v_expectedSequenceNumber := v_expectedSequenceNumber + 1; - tc_ac.start; - repeat; - } - } - [] a_receiveGeoUnicast( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ?) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: GUC packet received in incorrect order ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_FPB_BV_03_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_03) - */ - function f_GEONW_PON_FPB_BV_03_nodeC(in UInt16 p_sequenceNumberC, in integer p_messageCount) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var integer i := 0; - - // Preamble - f_prNeighbour(); - vc_localSeqNumber := p_sequenceNumberC; - vc_multipleMessagesCount := p_messageCount; - - for(i:=0; i < vc_multipleMessagesCount; i:=i+1) { - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeC, - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - vc_localSeqNumber - ) - ) - ) - )); - } - - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_FPB_BV_03_nodeC - - } // end GEONW_PON_FPB_BV_03 - - group GEONW_PON_FPB_BV_04 { - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_04 - */ - function f_GEONW_PON_FPB_BV_04() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - const UInt6 c_packetLifetime := 10; // 10s - - // Test control - if (not PICS_GN_GUC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_04_nodeB(c_packetLifetime)); - v_nodeC.start(f_GEONW_PON_FPB_BV_04_nodeC(c_packetLifetime)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_FPB_BV_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_04) - */ - function f_GEONW_PON_FPB_BV_04_nodeB(in UInt6 p_packetLifetime) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prDefault(); // NodeB is not yet a neighbour - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(int2float(p_packetLifetime + 1)); - f_startBeingNeighbour(); - - tc_noac.start; - alt { - [] a_receiveGeoUnicast( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ?) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GUC packet received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_FPB_BV_04_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_04) - */ - function f_GEONW_PON_FPB_BV_04_nodeC(in UInt6 p_packetLifetime) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeC, - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - vc_localSeqNumber - ), - m_lifetimeBase1s(p_packetLifetime), - c_defaultHopLimit - ) - ) - )); - - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_FPB_BV_04_nodeC - - } // end GEONW_PON_FPB_BV_04 - - group GEONW_PON_FPB_BV_06 { - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_06 - */ - function f_GEONW_PON_FPB_BV_06() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_FPB_BV_06_nodeB()); - v_nodeD.start(f_GEONW_PON_FPB_BV_06_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_FPB_BV_06 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_06) - */ - function f_GEONW_PON_FPB_BV_06_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GeoNetworkingInd v_geoNetInd; - - // Preamble - f_prDefault(); - if (not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(1.0); - f_startBeingNeighbour(); - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - ?)))) -> value v_geoNetInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_FPB_BV_06_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_06) - */ - function f_GEONW_PON_FPB_BV_06_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GeoNetworkingInd v_geoNetInd; - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - ?)))) -> value v_geoNetInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_06_nodeD - - } // end GEONW_PON_FPB_BV_06 - - group GEONW_PON_FPB_BV_07 { - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_07 - */ - function f_GEONW_PON_FPB_BV_07() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - const integer v_messageCount := 2; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_FPB_BV_07_nodeB(v_messageCount)); - v_nodeD.start(f_GEONW_PON_FPB_BV_07_nodeD(v_messageCount)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_FPB_BV_07 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_07) - */ - function f_GEONW_PON_FPB_BV_07_nodeB(in integer p_messageCount) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GeoNetworkingInd v_geoNetInd; - var template (present) UInt16 v_expectedSequenceNumber := ?; - var integer v_nbReceivedPackets := 0; - var integer i := 0; - - // Preamble - f_prDefault(); - vc_multipleMessagesCount := p_messageCount; - for(i:=0; i < vc_multipleMessagesCount; i:=i+1) { - if(not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - tc_ac.start(1.0); - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - ?)))) { - tc_ac.stop; - log("*** " & testcasename() & ": INCONC: GBC packet not buffered ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": PASS: GBC packet buffered ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - } - - // Test Body - f_startBeingNeighbour(); - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - v_expectedSequenceNumber)))) -> value v_geoNetInd { - tc_ac.stop; - v_nbReceivedPackets := v_nbReceivedPackets + 1; - if(v_nbReceivedPackets >= vc_multipleMessagesCount) { - log("*** " & testcasename() & ": PASS: GBC packets received in correct order ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - v_expectedSequenceNumber := v_geoNetInd.msgIn.gnPacket.packet.extendedHeader.geoBroadcastHeader.seqNumber + 1; - tc_ac.start; - repeat; - } - } - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - ?)))) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: GBC packet received in incorrect order ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_FPB_BV_07_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_07) - */ - function f_GEONW_PON_FPB_BV_07_nodeD(in integer p_messageCount) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GeoNetworkingInd v_geoNetInd; - var template (present) UInt16 v_expectedSequenceNumber := ?; - var integer v_nbReceivedPackets := 0; - - // Preamble - f_prDefault(); - vc_multipleMessagesCount := p_messageCount; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - v_expectedSequenceNumber)))) -> value v_geoNetInd { - tc_ac.stop; - v_nbReceivedPackets := v_nbReceivedPackets + 1; - if(v_nbReceivedPackets >= vc_multipleMessagesCount) { - log("*** " & testcasename() & ": PASS: GBC packets received in correct order ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - v_expectedSequenceNumber := v_geoNetInd.msgIn.gnPacket.packet.extendedHeader.geoBroadcastHeader.seqNumber + 1; - tc_ac.start; - repeat; - } - } - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - ?)))) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: GBC packet received in incorrect order ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_07_nodeD - - } // end GEONW_PON_FPB_BV_07 - - group GEONW_PON_FPB_BV_08 { - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_08 - */ - function f_GEONW_PON_FPB_BV_08() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_FPB_BV_08_nodeB()); - v_nodeD.start(f_GEONW_PON_FPB_BV_08_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_FPB_BV_08 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_08) - */ - function f_GEONW_PON_FPB_BV_08_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prDefault(); - if(not f_utTriggerEvent(m_generateGeoBroadcastMessageWithLifetime(f_getArea(c_area1), c_lifetime )) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - if(not f_utTriggerEvent(m_generateGeoBroadcastMessageWithLifetime(f_getArea(c_area1), c_lifetime)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(int2float(c_defaultLifetime + 1)); - f_startBeingNeighbour(); - - tc_noac.start; - alt { - - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - ?)))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC packet received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_FPB_BV_08_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_08) - */ - function f_GEONW_PON_FPB_BV_08_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(int2float(c_defaultLifetime + 1)); - f_startBeingNeighbour(); - - tc_noac.start; - alt { - - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - ?)))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC packet received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_FPB_BV_08_nodeD - - } // end GEONW_PON_FPB_BV_08 - - group GEONW_PON_FPB_BV_09 { - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_09 - */ - function f_GEONW_PON_FPB_BV_09() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GUC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_09_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_09_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_FPB_BV_09 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_09) - */ - function f_GEONW_PON_FPB_BV_09_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var GeoNetworkingInd v_geoNetInd; - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(1.0); - f_startBeingNeighbour(); - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ?)))) -> value v_geoNetInd { - tc_ac.stop; - - //we only check that the lifetime is less than the default lifetime due to - //we do not know exactly the time passed at IUT - if (f_getLifetimeValue(v_geoNetInd.msgIn.basicHeader.lifeTime) < f_getMaxPacketLifeTime()) { - log("*** " & testcasename() & ": PASS: Lifetime was handled properly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: Lifetime was not handled properly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_FPB_BV_09_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_09) - */ - function f_GEONW_PON_FPB_BV_09_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - - // Make sure IUT has LocE for NodeA by sending unsolicited LS_REPLY - f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu( - m_geoNwLsReplyPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - )))); - - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_FPB_BV_09_nodeC - - } // end GEONW_PON_FPB_BV_09 - - group GEONW_PON_FPB_BV_10 { - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_10 - */ - function f_GEONW_PON_FPB_BV_10() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_FPB_BV_10_nodeB()); - v_nodeD.start(f_GEONW_PON_FPB_BV_10_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_FPB_BV_10 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_10) - */ - function f_GEONW_PON_FPB_BV_10_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GeoNetworkingInd v_geoNetInd; - - // Preamble - f_prDefault(); - if(not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(1.0); - f_startBeingNeighbour(); - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - ?)))) -> value v_geoNetInd { - tc_ac.stop; - - //we only check that the lifetime is less than the default lifetime due to - //we do not know exactly the time passed at IUT - if (f_getLifetimeValue(v_geoNetInd.msgIn.basicHeader.lifeTime) < f_getMaxPacketLifeTime()) { - log("*** " & testcasename() & ": PASS: Lifetime was handled properly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: Lifetime was not handled properly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_FPB_BV_10_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_10) - */ - function f_GEONW_PON_FPB_BV_10_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - ?)))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_10_nodeD - - } // end GEONW_PON_FPB_BV_10 - - group GEONW_PON_FPB_BV_11 { - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_11_01 - */ - function f_GEONW_PON_FPB_BV_11_01() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GUC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_11_01_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_11_01_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_FPB_BV_11_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_01) - */ - function f_GEONW_PON_FPB_BV_11_01_nodeB() runs on ItsGeoNetworking { - - // Local variablesa - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_11_01_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_01) - */ - function f_GEONW_PON_FPB_BV_11_01_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - // Make sure IUT has LocE for NodeA by sending unsolicited LS_REPLY - f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu( - m_geoNwLsReplyPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - )))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if(not f_utTriggerEvent(m_generateGeoUnicastMessageWithTrafficClass( - v_longPosVectorNodeA.gnAddr, - valueof(m_trafficClass(e_scfDisabled))))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_11_01_nodeC - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_11_02 - */ - function f_GEONW_PON_FPB_BV_11_02() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GAC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_11_02_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_11_02_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_FPB_BV_11_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_02) - */ - function f_GEONW_PON_FPB_BV_11_02_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwAnycastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_11_02_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_02) - */ - function f_GEONW_PON_FPB_BV_11_02_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if(not f_utTriggerEvent(m_generateGeoAnycastMessageWithTrafficClass( - f_getArea(c_area2), - valueof(m_trafficClass(e_scfDisabled))))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwAnycastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_11_02_nodeC - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_11_03 - */ - function f_GEONW_PON_FPB_BV_11_03() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GBC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_11_03_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_11_03_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_FPB_BV_11_03 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_03) - */ - function f_GEONW_PON_FPB_BV_11_03_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_11_03_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_03) - */ - function f_GEONW_PON_FPB_BV_11_03_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if(not f_utTriggerEvent(m_generateGeoBroadcastMessageWithTrafficClass( - f_getArea(c_area2), - valueof(m_trafficClass(e_scfDisabled))))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorIut), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_11_03_nodeC - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_11_04 - */ - function f_GEONW_PON_FPB_BV_11_04() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_TSB_SRC) { - log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_11_04_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_11_04_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_FPB_BV_11_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_04) - */ - function f_GEONW_PON_FPB_BV_11_04_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorIut) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_11_04_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_04) - */ - function f_GEONW_PON_FPB_BV_11_04_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if(not f_utTriggerEvent(valueof(m_generateTsbMessageWithTrafficClass(valueof(m_trafficClass(e_scfDisabled)))))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorIut) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_11_04_nodeC - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_11_05 - */ - function f_GEONW_PON_FPB_BV_11_05() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_TSB_SRC) { - log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_11_05_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_11_05_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_FPB_BV_11_05 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_05) - */ - function f_GEONW_PON_FPB_BV_11_05_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacket( - mw_longPosVectorPosition(v_longPosVectorIut) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_11_05_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_05) - */ - function f_GEONW_PON_FPB_BV_11_05_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if(not f_utTriggerEvent(valueof(m_generateShbMessageWithTrafficClass(valueof(m_trafficClass(e_scfDisabled)))))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacket( - mw_longPosVectorPosition(v_longPosVectorIut) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_11_05_nodeC - - } // end GEONW_PON_FPB_BV_11 - - group GEONW_PON_FPB_BV_12 { - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_12_01 - */ - function f_GEONW_PON_FPB_BV_12_01() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GUC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_12_01_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_12_01_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_FPB_BV_12_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_01) - */ - function f_GEONW_PON_FPB_BV_12_01_nodeB() runs on ItsGeoNetworking { - - // Local variablesa - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_12_01_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_01) - */ - function f_GEONW_PON_FPB_BV_12_01_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - valueof(m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(f_getPosition(c_compNodeA)), - vc_localSeqNumber, - -, - m_trafficClass(e_scfDisabled) - ), - -, - c_defaultHopLimit - ), - -, - f_getIutMacAddress() - ) - )); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_12_01_nodeC - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_12_02 - */ - function f_GEONW_PON_FPB_BV_12_02() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GAC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_12_02_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_12_02_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_FPB_BV_12_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_02) - */ - function f_GEONW_PON_FPB_BV_12_02_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwAnycastPacket( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_11_02_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_02) - */ - function f_GEONW_PON_FPB_BV_12_02_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area2), - -, - m_trafficClass(e_scfDisabled) - ) - ) - ) - )); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwAnycastPacket( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_12_02_nodeC - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_12_02 - */ - function f_GEONW_PON_FPB_BV_12_03() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GBC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_12_03_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_12_03_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_FPB_BV_12_03 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_03) - */ - function f_GEONW_PON_FPB_BV_12_03_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_12_03_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_03) - */ - function f_GEONW_PON_FPB_BV_12_03_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2), - -, - m_trafficClass(e_scfDisabled) - ) - ) - ) - )); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_11_03_nodeC - - /** - * @desc TP Function for TC_GEONW_PON_FPB_BV_12_04 - */ - function f_GEONW_PON_FPB_BV_12_04() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_TSB_SRC) { - log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_12_04_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_12_04_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_FPB_BV_11_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_04) - */ - function f_GEONW_PON_FPB_BV_12_04_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeC) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_12_04_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_04) - */ - function f_GEONW_PON_FPB_BV_12_04_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var template (value) GeoNetworkingPdu v_gnPacket; - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu( - m_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeC, - c_defaultHopLimit, - m_trafficClass(e_scfDisabled) - ), - -, - c_defaultHopLimit - ); - v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); - f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_gnPacket))); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeC) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_FPB_BV_12_04_nodeC - - } // end GEONW_PON_FPB_BV_12 - - } // end geoForwardingPacketBuffer - - // 6.2.2.6 - group geoGeoNetworkingAddress { - - /** - * @desc TP Function for TC_GEONW_PON_GNA_BV_01 - */ - function f_GEONW_PON_GNA_BV_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - if (not PICS_GN_ADDR_AUTO) { - log("*** " & testcasename() & ": PICS_GN_ADDR_AUTO required for executing the TC ***"); - setverdict(inconc); - stop; - } - - if(f_getIutGnLocalAddressConfigurationMethod() != e_auto) { - log("*** " & testcasename() & ": PICS_GN_LOCAL_ADDR_CONF_METHOD == e_auto required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prDefault(); - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( - mw_geoNwBeaconPacket( - mw_longPosVectorAny(f_getIutGnLocalAddress()) // IUT's SOPV - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": GN address is correct ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( - mw_geoNwBeaconPacket( - ? // any SOPV - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": GN address is not correct ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of function f_GEONW_PON_GNA_BV_01 - - /** - * @desc TP Function for TC_GEONW_PON_GNA_BV_02 - */ - function f_GEONW_PON_GNA_BV_02() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut; - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var GeoNetworkingInd v_geoNetInd; - var GN_Address v_iutGnAddress := valueof(m_dummyGnAddr); - - // Test control - if (not PICS_GN_DAD) { - log("*** " & testcasename() & ": PICS_GN_DAD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prDefault(); - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateShbMessage) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( - mw_geoNwShbPacket( - ? // SO PV - )))) -> value v_geoNetInd { - v_iutGnAddress := valueof(v_geoNetInd.msgIn.gnPacket.packet.extendedHeader.shbHeader.srcPosVector.gnAddr); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_longPosVectorNodeB.gnAddr := v_iutGnAddress; - v_gnPacket := m_geoNwPdu(m_geoNwShbPacket(v_longPosVectorNodeB), -, c_hopLimit1); - v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); - f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_gnPacket))); - - f_sleep(0.5); - - if ( not f_utTriggerEvent(m_generateShbMessage) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( - mw_geoNwShbPacket( - mw_longPosVectorAny(v_iutGnAddress) // SO PV - )))) { - log("*** " & testcasename() & ": IUT is still using old GN address. Waiting... ***"); - repeat; - } - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( - mw_geoNwShbPacket( - ? // SO PV - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": IUT used new GN address ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of function f_GEONW_PON_GNA_BV_02 - - } // end geoGeoNetworkingAddress - - // 6.2.2.7 - group geoBeaconing { - - /** - * @desc TP Function for TC_GEONW_PON_BEA_TI_01 - */ - function f_GEONW_PON_BEA_TI_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut; - var boolean v_beaconReceived := false; - timer t_minRetransTimer := f_getBsRetransmitTimer(); - timer t_maxRetransTimer := f_getBsRetransmitTimer() + f_getBsMaxJitter(); - - // Test control - if (not PICS_GN_BEACON_SRC) { - log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - - t_maxRetransTimer.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(?)))) { - if (v_beaconReceived == false) { - v_beaconReceived := true; - t_minRetransTimer.start; - t_maxRetransTimer.start; - //after the first beacon received, check the retransmission - repeat; - } - if(t_minRetransTimer.running) { - log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too early) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": Beacon transmitted at prescribed periodicity ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_minRetransTimer.timeout { - log("*** " & testcasename() & ": Ready for retransmission ***"); - repeat; - } - [] t_maxRetransTimer.timeout { - log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too late) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - f_acTriggerEvent(m_stopPassBeaconing); - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of function f_GEONW_PON_BEA_TI_01 - - /** - * @desc TP Function for TC_GEONW_PON_BEA_TI_02 - */ - function f_GEONW_PON_BEA_TI_02() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - var boolean v_geoUnicastReceived := false; - var boolean v_readyForRetransmission := false; - timer t_minRetransTimer := f_getBsRetransmitTimer() - f_getDeltaTimer(); - timer t_maxRetransTimer := f_getBsRetransmitTimer() + f_getBsMaxJitter() + f_getDeltaTimer(); - - // Test control - if (not PICS_GN_BEACON_SRC) { - log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateShbMessage) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwShbPacket))) { - tc_ac.stop; - t_minRetransTimer.start; - t_maxRetransTimer.start; - v_geoUnicastReceived := true; - repeat; - } - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket))) { - if(not(v_geoUnicastReceived)) { - repeat; - } - if(not(v_readyForRetransmission)) { - log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too early) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": Beacon transmitted at prescribed periodicity ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_minRetransTimer.timeout { - log("*** " & testcasename() & ": Ready for retransmission ***"); - v_readyForRetransmission := true; - repeat; - } - [] t_maxRetransTimer.timeout { - log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too late) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": GUC not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - f_acTriggerEvent(m_stopPassBeaconing); - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_BEA_TI_02 - - } // end geoBeaconing - - // 6.2.2.8 - group geoGeoUnicast { - - group gucAllForwardingAlgorithm { - - - group GEONW_PON_GUC_ALL_BV_03 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_ALL_BV_03 - */ - function f_GEONW_PON_GUC_ALL_BV_03() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GUC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_GUC_ALL_BV_03_nodeB()); - v_nodeC.start(f_GEONW_PON_GUC_ALL_BV_03_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_GUC_BV_03 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_ALL_BV_03) - */ - function f_GEONW_PON_GUC_ALL_BV_03_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(f_getPosition(c_compIut)), - vc_localSeqNumber - ) - ), - -, - f_getIutMacAddress() - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacketWithHl( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ?, - c_defaultHopLimit - ), - -, - c_defaultHopLimit - 1 - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - ?, - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Fields not correctly updated ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_ALL_BV_03_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_ALL_BV_03) - */ - function f_GEONW_PON_GUC_ALL_BV_03_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_obsoleteLongPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - v_obsoleteLongPosVectorNodeA.timestamp_ := v_obsoleteLongPosVectorNodeA.timestamp_ - 1000; - v_obsoleteLongPosVectorNodeA.latitude := v_obsoleteLongPosVectorNodeA.latitude - 1; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(v_obsoleteLongPosVectorNodeA), - vc_localSeqNumber, - c_defaultHopLimit - ), - -, - c_defaultHopLimit - ), - -, - f_getIutMacAddress() - ) - ); - - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_ALL_BV_03_nodeC - - } // end GEONW_PON_GUC_ALL_BV_03 - - group GEONW_PON_GUC_ALL_BO_04 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_ALL_BO_04 - */ - function f_GEONW_PON_GUC_ALL_BO_04() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GUC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_GUC_ALL_BO_04_nodeB()); - v_nodeC.start(f_GEONW_PON_GUC_ALL_BO_04_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_GUC_BO_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_ALL_BO_04) - */ - function f_GEONW_PON_GUC_ALL_BO_04_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ), - -, - ? - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Retransmitted GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GUC was not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_ALL_BO_04_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_ALL_BO_04) - */ - function f_GEONW_PON_GUC_ALL_BO_04_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - vc_localSeqNumber - ), - -, - 1 - ), - -, - f_getIutMacAddress() - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ), - -, - ? - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Retransmitted GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GUC was not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_ALL_BO_04_nodeC - - } // end GEONW_PON_GUC_ALL_BO_04 - - /** - * @desc TP Function for TC_GEONW_PON_GUC_ALL_BV_05 - */ - function f_GEONW_PON_GUC_ALL_BV_05() runs on ItsGeoNetworking { - - // Local variables - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - if (not PICS_GN_GUC_DST) { - log("*** " & testcasename() & ": PICS_GN_GUC_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeB), - f_getIutShortPosVector(), - vc_localSeqNumber - ) - ); - f_sendGeoNetMessage(m_geoNwReq_withLinkLayerDestination(v_gnPacket, -, f_getIutMacAddress())); - - f_sleep(PX_TAC); - - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of function f_GEONW_PON_GUC_ALL_BV_05 - - /** - * @desc TP Function for TC_GEONW_PON_GUC_ALL_BV_06 - */ - function f_GEONW_PON_GUC_ALL_BV_06() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - if (not PICS_GN_GUC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeB), - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - vc_localSeqNumber - ) - ); - f_sendGeoNetMessage(m_geoNwReq_withLinkLayerDestination(v_gnPacket, -, f_getIutMacAddress())); - - f_sleep(PX_TAC); - - if(0 != lengthof(vc_utInds)) { - log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GN was not transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of function f_GEONW_PON_GUC_ALL_BV_06 - - group GEONW_PON_GUC_ALL_BO_08 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_ALL_BO_08 - */ - function f_GEONW_PON_GUC_ALL_BO_08() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GUC_DST) { - log("*** " & testcasename() & ": PICS_GN_GUC_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(c_compNodeB); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_GUC_ALL_BO_08_nodeB()); - v_nodeC.start(f_GEONW_PON_GUC_ALL_BO_08_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_GUC_ALL_BO_08 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_ALL_BO_08) - */ - function f_GEONW_PON_GUC_ALL_BO_08_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var integer i; - var template (present) GeoNetworkingPdu v_gnPacket := m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - 1 - ); - - // Preamble - f_prNeighbour(); - f_sleep(PX_TAC); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); - //flush received upper indications - vc_utInds := {}; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - else { - log("*** " & testcasename() & ": INCONC: GN was not transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - - // Test Body - f_sendGeoNetMessage(m_geoNwReq_withLinkLayerDestination(valueof(v_gnPacket), -, f_getIutMacAddress())); - - f_sleep(PX_TAC); - - if(0 != lengthof(vc_utInds)) { - log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GN was not transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_ALL_BO_08_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_ALL_BO_08) - */ - function f_GEONW_PON_GUC_ALL_BO_08_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - ), - -, - f_getIutMacAddress() - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_ALL_BO_08_nodeC - - } // end GEONW_PON_GUC_ALL_BO_08 - - } // end gucAllForwardingAlgorithm - - group gucGreedyForwarding { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_GRD_BV_01 - */ - function f_GEONW_PON_GUC_GRD_BV_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - - // Test control - if (not PICS_GN_GUC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == (e_greedy or e_unspecified) required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": DEPV of the received GUC message correctly set ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - ?, - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": DEPV of the received GUC message incorrectly set ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_GUC_GRD_BV_01 - - group GEONW_PON_GUC_GRD_BV_02 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_GRD_BV_02 - */ - function f_GEONW_PON_GUC_GRD_BV_02() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GUC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == (e_greedy or e_unspecified) required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GUC_GRD_BV_02_nodeB()); - v_nodeC.start(f_GEONW_PON_GUC_GRD_BV_02_nodeC()); - v_nodeD.start(f_GEONW_PON_GUC_GRD_BV_02_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GUC_GRD_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_GRD_BV_02) - */ - function f_GEONW_PON_GUC_GRD_BV_02_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_GRD_BV_02_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_GRD_BV_02) - */ - function f_GEONW_PON_GUC_GRD_BV_02_nodeC() runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(f_getPosition(c_compNodeA)), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - ), - -, - f_getIutMacAddress() - ) - ); - - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_GRD_BV_02_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GUC_GRD_BV_02) - */ - function f_GEONW_PON_GUC_GRD_BV_02_nodeD() runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_GRD_BV_02_nodeD - - } // end GEONW_PON_GUC_GRD_BV_02 - - group GEONW_PON_GUC_GRD_BO_07 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_GRD_BO_07 - */ - function f_GEONW_PON_GUC_GRD_BO_07() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GUC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == (e_greedy or e_unspecified) required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_GUC_GRD_BO_07_nodeB()); - v_nodeC.start(f_GEONW_PON_GUC_GRD_BO_07_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_GUC_GRD_BO_07 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_GRD_BO_07) - */ - function f_GEONW_PON_GUC_GRD_BO_07_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": INFO: First GUC forwarded ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: First GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - 1 - ), - -, - f_getIutMacAddress() - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Duplicate GUC was forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: Duplicate GUC not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_GRD_BO_07_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_GRD_BO_07) - */ - function f_GEONW_PON_GUC_GRD_BO_07_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - ), - -, - f_getIutMacAddress() - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Duplicate GUC was forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: Duplicate GUC not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_GRD_BO_07_nodeC - - } // end GEONW_PON_GUC_GRD_BO_07 - - } // end gucGreedyForwarding - - group gucContentionBasedForwarding { - - group GEONW_PON_GUC_CBF_BV_01 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_CBF_BV_01 - */ - function f_GEONW_PON_GUC_CBF_BV_01() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GUC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_GUC_CBF_BV_01_nodeB()); - v_nodeC.start(f_GEONW_PON_GUC_CBF_BV_01_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_CBF_BV_01) - */ - function f_GEONW_PON_GUC_CBF_BV_01_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if(not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_01_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_CBF_BV_01) - */ - function f_GEONW_PON_GUC_CBF_BV_01_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: broadcasted GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_01_nodeC - - } // end GEONW_PON_GUC_CBF_BV_01 - - group GEONW_PON_GUC_CBF_BV_02 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_CBF_BV_02 - */ - function f_GEONW_PON_GUC_CBF_BV_02() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var float v_distance := int2float(f_getCbfMaxCommunicationRange() - 10); - var LongPosVector v_longPosVectorIut, v_longPosVectorNodeA; - - // Test control - if (not PICS_GN_GUC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - // re-compute NodeA's position. - v_longPosVectorIut := f_getIutLongPosVector(); - v_longPosVectorNodeA := f_computePositionUsingDistance(v_longPosVectorIut, v_distance, 0); - v_longPosVectorNodeA.gnAddr := f_getTsGnLocalAddress(c_compNodeA); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_GUC_CBF_BV_02_nodeB(v_distance, v_longPosVectorNodeA)); - v_nodeC.start(f_GEONW_PON_GUC_CBF_BV_02_nodeC(v_longPosVectorNodeA)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_msgSent, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_CBF_BV_02) - * @param p_distanceToNodeA Distance between IUT and NodeA - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_CBF_BV_02_nodeB(in float p_distanceToNodeA, in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables - timer t_toCbf := (int2float(f_getCbfMaxTime()) - + ( - int2float(f_getCbfMinTime() - f_getCbfMaxTime()) - / int2float(f_getCbfMaxCommunicationRange()) - ) * p_distanceToNodeA) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - log("*** " & testcasename() & ": INFO: Message sent ***"); - f_selfOrClientSyncAndVerdict(c_msgSent, e_success); - - tc_ac.start; - t_toCbf.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: IUT re-broadcasted the packet too early ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: Ready for receiving re-broadcasting ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_02_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_CBF_BV_02) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_CBF_BV_02_nodeC(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(p_longPosVectorNodeA), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - ), - -, - f_getIutMacAddress() - ) - ); - log("*** " & testcasename() & ": INFO: Message sent ***"); - f_selfOrClientSyncAndVerdict(c_msgSent, e_success); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Re-broadcasted GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_02_nodeC - - } // end GEONW_PON_GUC_CBF_BV_02 - - group GEONW_PON_GUC_CBF_BV_07 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_CBF_BV_07 - */ - function f_GEONW_PON_GUC_CBF_BV_07() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var float v_distance := int2float(f_getCbfMaxCommunicationRange() - 10); - var LongPosVector v_longPosVectorIut, v_longPosVectorNodeA; - - // Test control - if (not PICS_GN_GUC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - // re-compute NodeA's position. - v_longPosVectorIut := f_getIutLongPosVector(); - v_longPosVectorNodeA := f_computePositionUsingDistance(v_longPosVectorIut, v_distance, 0); - v_longPosVectorNodeA.gnAddr := f_getTsGnLocalAddress(c_compNodeA); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_GUC_CBF_BV_07_nodeB(v_longPosVectorNodeA)); - v_nodeC.start(f_GEONW_PON_GUC_CBF_BV_07_nodeC(v_longPosVectorNodeA)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_07 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_CBF_BV_07) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_CBF_BV_07_nodeB(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleepIgnoreDef(int2float(f_getCbfMaxTime())/2000.0); - - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(p_longPosVectorNodeA), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - 1 - ), - -, - f_getIutMacAddress() - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Forwarded GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_07_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_CBF_BV_07) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_CBF_BV_07_nodeC(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - //Note: Sending of the GUC packet move to test body in contrast to the test purpose due to time critical behaviour - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(p_longPosVectorNodeA), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - ), - -, - f_getIutMacAddress() - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Forwarded GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_07_nodeC - - } // end GEONW_PON_GUC_CBF_BV_07 - - group GEONW_PON_GUC_CBF_BV_20 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_CBF_BV_20 - */ - function f_GEONW_PON_GUC_CBF_BV_20() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var float v_distance := int2float(f_getCbfMaxCommunicationRange() * 2); - var LongPosVector v_longPosVectorIut, v_longPosVectorNodeC; - - // Test control - if (not PICS_GN_GUC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - // re-compute NodeC's position. - v_longPosVectorIut := f_getIutLongPosVector(); - v_longPosVectorNodeC := f_computePositionUsingDistance(v_longPosVectorIut, v_distance, 180); - v_longPosVectorNodeC.gnAddr := f_getTsGnLocalAddress(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_GUC_CBF_BV_20_nodeB(v_longPosVectorNodeC)); - v_nodeC.start(f_GEONW_PON_GUC_CBF_BV_20_nodeC(v_longPosVectorNodeC)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_msgSent, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_20 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_CBF_BV_20) - * @param p_longPosVectorNodeC Position vector of NodeC - */ - function f_GEONW_PON_GUC_CBF_BV_20_nodeB(in LongPosVector p_longPosVectorNodeC) runs on ItsGeoNetworking { - - // Local variables - timer t_toCbf := int2float(f_getCbfMinTime()) / 1000.0; - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - log("*** " & testcasename() & ": INFO: Message sent ***"); - f_selfOrClientSyncAndVerdict(c_msgSent, e_success); - - tc_ac.start; - t_toCbf.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: IUT re-broadcasted the packet too early ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: Ready for receiving re-broadcasting ***"); - repeat; - } - - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_20_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_CBF_BV_20) - * @param p_longPosVectorNodeC Position vector of NodeC - */ - function f_GEONW_PON_GUC_CBF_BV_20_nodeC(LongPosVector p_longPosVectorNodeC) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - p_longPosVectorNodeC, - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - ), - -, - f_getIutMacAddress() - ) - ); - log("*** " & testcasename() & ": INFO: Message sent ***"); - f_selfOrClientSyncAndVerdict(c_msgSent, e_success); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_20_nodeC - - } // end GEONW_PON_GUC_CBF_BV_20 - - group GEONW_PON_GUC_CBF_BV_21 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_CBF_BV_21 - */ - function f_GEONW_PON_GUC_CBF_BV_21() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - var float v_distance := int2float(f_getCbfMaxCommunicationRange() - 10); - var LongPosVector v_longPosVectorIut, v_longPosVectorNodeA; - - // Test control - if (not PICS_GN_GUC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf04Up(); - // re-compute NodeA's position. - v_longPosVectorIut := f_getIutLongPosVector(); - v_longPosVectorNodeA := f_computePositionUsingDistance(v_longPosVectorIut, v_distance, 0); - v_longPosVectorNodeA.gnAddr := f_getTsGnLocalAddress(c_compNodeA); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GUC_CBF_BV_21_nodeB(v_longPosVectorNodeA)); - v_nodeC.start(f_GEONW_PON_GUC_CBF_BV_21_nodeC(v_longPosVectorNodeA)); - v_nodeD.start(f_GEONW_PON_GUC_CBF_BV_21_nodeD(v_longPosVectorNodeA)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_21 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_CBF_BV_21) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_CBF_BV_21_nodeB(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Re-broadcasted GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_21_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_CBF_BV_21) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_CBF_BV_21_nodeC(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Re-broadcasted GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_21_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GUC_CBF_BV_21) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_CBF_BV_21_nodeD(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(p_longPosVectorNodeA), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - ), - -, - f_getIutMacAddress() - ) - ); - - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GUC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GUC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: GUC timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_21_nodeD - - } // end GEONW_PON_GUC_CBF_BV_21 - - group GEONW_PON_GUC_CBF_BV_22 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_CBF_BV_22 - */ - function f_GEONW_PON_GUC_CBF_BV_22() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - var float v_distance := int2float(f_getCbfMaxCommunicationRange() - 10); - var LongPosVector v_longPosVectorIut, v_longPosVectorNodeA; - - // Test control - if (not PICS_GN_GUC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf04Up(); - // re-compute NodeA's position. - v_longPosVectorIut := f_getIutLongPosVector(); - v_longPosVectorNodeA := f_computePositionUsingDistance(v_longPosVectorIut, v_distance, 0); - v_longPosVectorNodeA.gnAddr := f_getTsGnLocalAddress(c_compNodeA); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GUC_CBF_BV_22_nodeB(v_longPosVectorNodeA)); - v_nodeC.start(f_GEONW_PON_GUC_CBF_BV_22_nodeC(v_longPosVectorNodeA)); - v_nodeD.start(f_GEONW_PON_GUC_CBF_BV_22_nodeD(v_longPosVectorNodeA)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_22 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_CBF_BV_22) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_CBF_BV_22_nodeB(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Re-broadcasted GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_22_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_CBF_BV_22) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_CBF_BV_22_nodeC(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Re-broadcasted GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_22_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GUC_CBF_BV_22) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_CBF_BV_22_nodeD(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); - timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - v_longPosVectorNodeD.pai := int2bit(0,1); - f_changePositon(c_compNodeD, v_longPosVectorNodeD); - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(p_longPosVectorNodeA), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - ), - -, - f_getIutMacAddress() - ) - ); - - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GUC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GUC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: GUC timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_GUC_CBF_BV_22_nodeD - - } // end GEONW_PON_GUC_CBF_BV_22 - - } // end gucContentionBasedForwarding - - } // end geoGeoUnicast - - // 6.2.2.9 - group geoGeoBroadcast { - - group gbcNonAreaForwarding { - - group gbcNonAreaAllForwardingAlgorithm { - - group GEONW_PON_GBC_NONAREA_ALL_BV_03 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_ALL_BV_03 - */ - function f_GEONW_PON_GBC_NONAREA_ALL_BV_03() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BV_03 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_ALL_BV_03) - */ - function f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] a_receiveGeoBroadcastWithAreaWithHopLimit( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2), - c_defaultHopLimit - 1, - c_defaultHopLimit) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message correctly retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] a_receiveGeoBroadcastWithAreaWithHopLimit( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2), - ?, - ?) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: GBC message fields not updated ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: GBC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_ALL_BV_03) - */ - function f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var GeoNetworkingInd v_msgInd; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2), - c_defaultHopLimit - ), - -, - c_defaultHopLimit - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeC - - } // end GEONW_PON_GBC_NONAREA_ALL_BV_03 - - group GEONW_PON_GBC_NONAREA_ALL_BV_04 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_ALL_BV_04 - */ - function f_GEONW_PON_GBC_NONAREA_ALL_BV_04() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BV_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_ALL_BV_04) - */ - function f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] a_receiveGeoBroadcastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_ALL_BV_04) - */ - function f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2) - ), - -, - c_hopLimit1 - ) - ) - ); - - tc_noac.start; - alt { - [] a_receiveGeoBroadcastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeC - - } // end GEONW_PON_GBC_NONAREA_ALL_BV_04 - - /** - * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_ALL_BV_06 - */ - function f_GEONW_PON_GBC_NONAREA_ALL_BV_06() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2) - ) - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - f_sleep(PX_TAC); - - if(0 != lengthof(vc_utInds)) { - log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GN was NOT transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BV_06 - - group GEONW_PON_GBC_NONAREA_ALL_BO_09 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_ALL_BO_09 - */ - function f_GEONW_PON_GBC_NONAREA_ALL_BO_09() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - var UInt16 v_distanceTooBig; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf04Up(); - v_distanceTooBig := float2int(1.1 * f_radiusFromCircularArea(f_getGnMaxAreaSize()*c_squareKm)); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeB(v_distanceTooBig)); - v_nodeC.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeC(v_distanceTooBig)); - v_nodeD.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeD(v_distanceTooBig)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_09 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BO_19) - */ - function f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeB(in UInt16 p_distanceTooBig) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var GeoArea v_areaTooBig; - - // Preamble - f_prNeighbour(); - v_areaTooBig := f_computeCircularArea( - f_getPosition(c_compNodeB), - p_distanceTooBig - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_geoArea2GeoBroadcastArea(v_areaTooBig) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_ALL_BO_09) - */ - function f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeC(in UInt16 p_distanceTooBig) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var GeoArea v_areaTooBig; - - // Preamble - f_prNeighbour(); - v_areaTooBig := f_computeCircularArea( - f_getPosition(c_compNodeB), - p_distanceTooBig - ); - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_geoArea2GeoBroadcastArea(v_areaTooBig) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_ALL_BO_09) - */ - function f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeD(in UInt16 p_distanceTooBig) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var GeoArea v_areaTooBig; - - // Preamble - f_prNeighbour(); - v_areaTooBig := f_computeCircularArea( - f_getPosition(c_compNodeB), - p_distanceTooBig - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_geoArea2GeoBroadcastArea(v_areaTooBig) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeD - - } // end GEONW_PON_GBC_NONAREA_ALL_BO_09 - - group GEONW_PON_GBC_NONAREA_ALL_BO_10 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_ALL_BO_10 - */ - function f_GEONW_PON_GBC_NONAREA_ALL_BO_10() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeC()); - v_nodeD.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_10 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_ALL_BO_10) - */ - function f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeB() runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC received and not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_ALL_BO_10) - */ - function f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeC() runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC received and not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_ALL_BO_10) - */ - function f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeD, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2) - ) - ) - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC received and not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeD - - } // end GEONW_PON_GBC_NONAREA_ALL_BO_10 - - } // end gbcNonAreaAllForwardingAlgorithm - - group gbcNonAreaGreedyForwarding { - - group GEONW_PON_GBC_NONAREA_GRD_BV_01 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_GRD_BV_01 - */ - function f_GEONW_PON_GBC_NONAREA_GRD_BV_01() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_greedy or e_unspecified ) required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_GRD_BV_01) - */ - function f_GEONW_PON_GBC_NONAREA_GRD_BV_01_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area2))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveGeoBroadcastWithArea( - mw_longPosVectorPosition(v_longPosVectorIut), - ?, - f_getGeoBroadcastArea(c_area2)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BV_01_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_GRD_BV_01) - */ - function f_GEONW_PON_GBC_NONAREA_GRD_BV_01_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] a_receiveGeoBroadcastWithArea( - mw_longPosVectorPosition(v_longPosVectorIut), - ?, - f_getGeoBroadcastArea(c_area2)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: received GBC message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BV_01_nodeD - - } // end GEONW_PON_GBC_NONAREA_GRD_BV_01 - - group GEONW_PON_GBC_NONAREA_GRD_BV_02 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_GRD_BV_02 - */ - function f_GEONW_PON_GBC_NONAREA_GRD_BV_02() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_greedy or e_unspecified ) required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeC()); - v_nodeD.start(f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_GRD_BV_02) - */ - function f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] a_receiveGeoBroadcastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message correctly forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_GRD_BV_02) - */ - function f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var GeoNetworkingInd v_msgInd; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_GRD_BV_02) - */ - function f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] a_receiveGeoBroadcastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message not forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeD - - } // end GEONW_PON_GBC_NONAREA_GRD_BV_02 - - group GEONW_PON_GBC_NONAREA_GRD_BO_07 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_GRD_BO_07 - */ - function f_GEONW_PON_GBC_NONAREA_GRD_BO_07() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - var UInt16 v_sequenceNumber := f_getInitialSequenceNumber(); - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_greedy or e_unspecified ) required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeC(v_sequenceNumber)); - v_nodeD.start(f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeD(v_sequenceNumber)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BO_07 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_GRD_BO_07) - */ - function f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var GeoNetworkingInd v_msgInd; - var template GeoNetworkingInd v_msgInd_t; - - // Preamble - f_prNeighbour(); - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2) - )))) -> value v_msgInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: GBC message correctly forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - v_msgInd_t := v_msgInd; - v_msgInd_t.msgIn.basicHeader.routerHopLimit := ?; - tc_noac.start; - alt { - [] geoNetworkingPort.receive(v_msgInd_t) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message re-forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not re-forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_GRD_BO_07) - */ - function f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeC(in UInt16 p_sequenceNumber) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - p_sequenceNumber, - f_getGeoBroadcastArea(c_area2) - ), - -, - c_defaultHopLimit - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_GRD_BO_07) - */ - function f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeD(in UInt16 p_sequenceNumber) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": INCONC: Pre-conditions: GBC message not forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: Pre-conditions: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - } - - // Test Body - // send geoBroadcast for second time (same source + same seq Nr + lower RHL) - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - p_sequenceNumber, - f_getGeoBroadcastArea(c_area2) - ), - -, - c_defaultHopLimit - 1 - ) - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC re-forwarded! (not to area center!) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeD - - } // end GEONW_PON_GBC_NONAREA_GRD_BO_07 - - } // end gbcNonAreaGreedyForwarding - - group gbcNonAreaContentionBasedForwarding { - - group GEONW_PON_GBC_NONAREA_CBF_BV_01 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_CBF_BV_01 - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_01() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - if ((f_getNonAreaForwardingAlgorithm() != e_cbf)) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_cbf ) required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_01_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_01_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_CBF_BV_01) - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_01_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area2))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveGeoBroadcastWithArea( - mw_longPosVectorPosition(v_longPosVectorIut), - ?, - f_getGeoBroadcastArea(c_area2)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_01_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_CBF_BV_01) - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_01_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] a_receiveGeoBroadcastWithArea( - mw_longPosVectorPosition(v_longPosVectorIut), - ?, - f_getGeoBroadcastArea(c_area2)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_01_nodeD - - } // end GEONW_PON_GBC_NONAREA_CBF_BV_01 - - group GEONW_PON_GBC_NONAREA_CBF_BV_02 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_CBF_BV_02 - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_02() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeC()); - v_nodeD.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_CBF_BV_02) - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_CBF_BV_02) - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - timer t_toCbf := (int2float(f_getCbfMaxTime()) - + ( - int2float(f_getCbfMinTime() - f_getCbfMaxTime()) - / int2float(f_getCbfMaxCommunicationRange()) - ) * f_distance(v_longPosVectorNodeC, v_longPosVectorIut)) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2) - ) - ) - ) - ); - - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_CBF_BV_02) - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeD - - } // end GEONW_PON_GBC_NONAREA_CBF_BV_02 - - group GEONW_PON_GBC_NONAREA_CBF_BV_07 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_CBF_BV_07 - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_07() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - var UInt16 v_sequenceNumberC := f_getInitialSequenceNumber(); - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeC(v_sequenceNumberC)); - v_nodeD.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeD(v_sequenceNumberC)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_07 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_CBF_BV_07) - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_CBF_BV_07) - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeC(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - p_sequenceNumberC, - f_getGeoBroadcastArea(c_area2) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_CBF_BV_07) - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeD(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - p_sequenceNumberC, - f_getGeoBroadcastArea(c_area2) - ) - ) - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_071_nodeD - - } // end GEONW_PON_GBC_NONAREA_CBF_BV_07 - - group GEONW_PON_GBC_NONAREA_CBF_BV_20 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_CBF_BV_20 - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_20() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var float v_distance := int2float(f_getCbfMaxCommunicationRange() * 2); - var LongPosVector v_longPosVectorIut, v_longPosVectorNodeC; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - // re-compute NodeC's position. - v_longPosVectorIut := f_getIutLongPosVector(); - v_longPosVectorNodeC := f_computePositionUsingDistance(v_longPosVectorIut, v_distance, 180); - v_longPosVectorNodeC.gnAddr := f_getTsGnLocalAddress(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_20_nodeB(v_longPosVectorNodeC)); - v_nodeC.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_20_nodeC(v_longPosVectorNodeC)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_msgSent, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_20 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_CBF_BV_20) - * @param p_longPosVectorNodeC Position vector of NodeC - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_20_nodeB(in LongPosVector p_longPosVectorNodeC) runs on ItsGeoNetworking { - - // Local variables - timer t_toCbf := int2float(f_getCbfMinTime()) / 1000.0; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - log("*** " & testcasename() & ": INFO: Message sent ***"); - f_selfOrClientSyncAndVerdict(c_msgSent, e_success); - - tc_ac.start; - t_toCbf.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(p_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { - tc_ac.stop; - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: IUT re-broadcasted the packet too early ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: Ready for receiving re-broadcasting ***"); - repeat; - } - - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_20_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_CBF_BV_20) - * @param p_longPosVectorNodeC Position vector of NodeC - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_20_nodeC(LongPosVector p_longPosVectorNodeC) runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - p_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2) - ) - ) - ) - ); - - log("*** " & testcasename() & ": INFO: Message sent ***"); - f_selfOrClientSyncAndVerdict(c_msgSent, e_success); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(p_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_20_nodeC - - } // end GEONW_PON_GBC_NONAREA_CBF_BV_20 - - group GEONW_PON_GBC_NONAREA_CBF_BV_21 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_CBF_BV_21 - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_21() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeC()); - v_nodeD.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_21 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_CBF_BV_21) - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_CBF_BV_21) - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeC() runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_CBF_BV_21) - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2) - ) - ) - ) - ); - - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeD - - } // end GEONW_PON_GBC_NONAREA_CBF_BV_21 - - group GEONW_PON_GBC_NONAREA_CBF_BV_22 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_CBF_BV_22 - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_22() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeC()); - v_nodeD.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_22 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_CBF_BV_22) - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeA), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_CBF_BV_22) - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - v_longPosVectorNodeC.pai := int2bit(0,1); - f_changePositon(c_compNodeC, v_longPosVectorNodeC); - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeA, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2) - ) - ) - ) - ); - - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeA), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_CBF_BV_22) - */ - function f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeA), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeD - - } // end GEONW_PON_GBC_NONAREA_CBF_BV_22 - - } // end gbcNonAreaContentionBasedForwarding - - } // end gbcNonAreaForwarding - - group gbcAreaForwarding { - - group gbcAreaAllForwardingAlgorithm { - - group GEONW_PON_GBC_AREA_ALL_BV_01 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_ALL_BV_01 - */ - function f_GEONW_PON_GBC_AREA_ALL_BV_01() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_AREA_ALL_BV_01_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_AREA_ALL_BV_01_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ALL_BV_01) - */ - function f_GEONW_PON_GBC_AREA_ALL_BV_01_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveGeoBroadcastWithArea( - mw_longPosVectorPosition(v_longPosVectorIut), - ?, - f_getGeoBroadcastArea(c_area1)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_01_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_ALL_BV_01) - */ - function f_GEONW_PON_GBC_AREA_ALL_BV_01_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] a_receiveGeoBroadcastWithArea( - mw_longPosVectorPosition(v_longPosVectorIut), - ?, - f_getGeoBroadcastArea(c_area1)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_01_nodeD - - } // end GEONW_PON_GBC_AREA_ALL_BV_01 - - group GEONW_PON_GBC_AREA_ALL_BV_03 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_ALL_BV_03 - */ - function f_GEONW_PON_GBC_AREA_ALL_BV_03() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_AREA_ALL_BV_03_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_AREA_ALL_BV_03_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_03 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ALL_BV_03) - */ - function f_GEONW_PON_GBC_AREA_ALL_BV_03_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1), - c_defaultHopLimit - ), - -, - c_defaultHopLimit - ) - ) - ); - - tc_ac.start; - alt { - [] a_receiveGeoBroadcastWithAreaWithHopLimit( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1), - c_defaultHopLimit - 1, - c_defaultHopLimit) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message correctly retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] a_receiveGeoBroadcastWithAreaWithHopLimit( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1), - ?, - ?) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: GBC message fields not updated ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: GBC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_03_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_ALL_BV_03) - */ - function f_GEONW_PON_GBC_AREA_ALL_BV_03_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var GeoNetworkingInd v_msgInd; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] a_receiveGeoBroadcastWithAreaWithHopLimit( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1), - c_defaultHopLimit - 1, - c_defaultHopLimit) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message correctly retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: GBC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_03_nodeD - - } // end GEONW_PON_GBC_AREA_ALL_BV_03 - - group GEONW_PON_GBC_AREA_ALL_BV_04 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_ALL_BV_04 - */ - function f_GEONW_PON_GBC_AREA_ALL_BV_04() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_AREA_ALL_BV_04_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_AREA_ALL_BV_04_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ALL_BV_04) - */ - function f_GEONW_PON_GBC_AREA_ALL_BV_04_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1) - ), - -, - c_hopLimit1 - ) - ) - ); - - tc_noac.start; - alt { - [] a_receiveGeoBroadcast( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_04_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_ALL_BV_04) - */ - function f_GEONW_PON_GBC_AREA_ALL_BV_04_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] a_receiveGeoBroadcast( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_04_nodeD - - } // end GEONW_PON_GBC_AREA_ALL_BV_04 - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_ALL_BV_05 - */ - function f_GEONW_PON_GBC_AREA_ALL_BV_05() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - if (not PICS_GN_GBC_DST) { - log("*** " & testcasename() & ": PICS_GN_GBC_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1) - ) - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - f_sleep(PX_TAC); - - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_05 - - group GEONW_PON_GBC_AREA_ALL_BO_08 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_ALL_BO_08 - */ - function f_GEONW_PON_GBC_AREA_ALL_BO_08() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_DST) { - log("*** " & testcasename() & ": PICS_GN_GBC_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(c_compNodeB); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_AREA_ALL_BO_08_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_AREA_ALL_BO_08_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_GBC_AREA_ALL_BO_08 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ALL_BO_08) - */ - function f_GEONW_PON_GBC_AREA_ALL_BO_08_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var template (present) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Preamble - f_prNeighbour(); - v_gnPacket := m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1) - ), - -, - c_defaultHopLimit - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_gnPacket))); - - // IUT should also rebroadcast the packet. Get ready - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": INFO: GBC message rebroadcasted ***"); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INFO: GBC message not rebroadcasted ***"); - } - } - - f_sleep(PX_TAC); - - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); - //flush received upper indications - vc_utInds := {}; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - else { - log("*** " & testcasename() & ": INCONC: GN was not transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - - // Test Body - f_sleep(PX_TAC); - - if(0 != lengthof(vc_utInds)) { - log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GN was NOT transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ALL_BO_08_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_ALL_BO_08) - */ - function f_GEONW_PON_GBC_AREA_ALL_BO_08_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var GeoNetworkingInd v_msgInd; - var integer i; - - // Preamble - f_prNeighbour(); - - // IUT should also rebroadcast the packet. Get ready - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1) - )))) -> value v_msgInd { - tc_ac.stop; - log("*** " & testcasename() & ": INFO: Pre-conditions: GBC message rebroadcasted ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INFO: Pre-conditions: GBC message not rebroadcasted ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - v_msgInd.msgIn.basicHeader.routerHopLimit := valueof(v_msgInd.msgIn.basicHeader.routerHopLimit) / 2; - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_msgInd.msgIn)); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ALL_BO_08_nodeD - - } // end GEONW_PON_GBC_AREA_ALL_BO_08 - - } // end gbcAreaAllForwardingAlgorithm - - group gbcAreaSimpleForwarding { - - group GEONW_PON_GBC_AREA_SMP_BV_02 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_SMP_BV_02 - */ - function f_GEONW_PON_GBC_AREA_SMP_BV_02() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - if ((f_getAreaForwardingAlgorithm() != e_simple) and (f_getAreaForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == ( e_simple or e_unspecified ) required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_AREA_SMP_BV_02_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_AREA_SMP_BV_02_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_GBC_AREA_SMP_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_SMP_BV_02) - */ - function f_GEONW_PON_GBC_AREA_SMP_BV_02_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1) - ) - ) - ) - ); - - tc_ac.start; - alt { - [] a_receiveGeoBroadcastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_SMP_BV_02_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_SMP_BV_02) - */ - function f_GEONW_PON_GBC_AREA_SMP_BV_02_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] a_receiveGeoBroadcastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_SMP_BV_02_nodeD - - } // end GEONW_PON_GBC_AREA_SMP_BV_02 - - group GEONW_PON_GBC_AREA_SMP_BO_07 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_SMP_BO_07 - */ - function f_GEONW_PON_GBC_AREA_SMP_BO_07() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if ((f_getAreaForwardingAlgorithm() != e_simple) and (f_getAreaForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == ( e_simple or e_unspecified ) required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_AREA_SMP_BO_07_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_AREA_SMP_BO_07_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_GBC_BO_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_SMP_BO_07) - */ - function f_GEONW_PON_GBC_AREA_SMP_BO_07_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var template (present) GeoNetworkingPdu v_gnPacket; - - // Preamble - f_prNeighbour(); - v_gnPacket := m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1) - ), - -, - c_defaultHopLimit - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_gnPacket))); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: GBC message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - tc_noac.start; - alt { - [] a_receiveGeoBroadcast( - ?, - ?) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_SMP_BO_07_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_SMP_BO_07) - */ - function f_GEONW_PON_GBC_AREA_SMP_BO_07_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var GeoNetworkingInd v_msgInd; - - // Preamble - f_prNeighbour(); - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1) - )))) -> value v_msgInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: GBC message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - } - - // Test Body - // send geoBroadcast for second time (same source + same seq Nr + lower RHL) - v_msgInd.msgIn.basicHeader.routerHopLimit := valueof(v_msgInd.msgIn.basicHeader.routerHopLimit) - 1; - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_msgInd.msgIn))); - - tc_noac.start; - alt { - [] a_receiveGeoBroadcast( - ?, - ?) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_SMP_BO_07_nodeD - - } // end GEONW_PON_GBC_AREA_SMP_BO_07 - - } // end gbcAreaSimpleForwarding - - group gbcAreaContentionBasedForwarding { - - group GEONW_PON_GBC_AREA_CBF_BV_02 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_CBF_BV_02 - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_02() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeC()); - v_nodeD.start(f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_CBF_BV_02) - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_AREA_CBF_BV_02) - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - timer t_toCbf := (int2float(f_getCbfMaxTime()) - + ( - int2float(f_getCbfMinTime() - f_getCbfMaxTime()) - / int2float(f_getCbfMaxCommunicationRange()) - ) * f_distance(v_longPosVectorNodeC, v_longPosVectorIut)) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1) - ) - ) - ) - ); - - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_CBF_BV_02) - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeD - - } // end GEONW_PON_GBC_AREA_CBF_BV_02 - - group GEONW_PON_GBC_AREA_CBF_BV_07 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_CBF_BV_07 - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_07() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - var UInt16 v_sequenceNumberC := f_getInitialSequenceNumber(); - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeC(v_sequenceNumberC)); - v_nodeD.start(f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeD(v_sequenceNumberC)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_BCA_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_CBF_BV_07) - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_AREA_CBF_BV_07) - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeC(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - p_sequenceNumberC, - f_getGeoBroadcastArea(c_area1) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_CBF_BV_07) - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeD(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - p_sequenceNumberC, - f_getGeoBroadcastArea(c_area1) - ) - ) - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_071_nodeD - - } // end GEONW_PON_GBC_AREA_CBF_BV_07 - - group GEONW_PON_GBC_AREA_CBF_BV_21 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_CBF_BV_21 - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_21() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeC()); - v_nodeD.start(f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_21 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_CBF_BV_21) - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_AREA_CBF_BV_21) - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_CBF_BV_21) - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1) - ) - ) - ) - ); - - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeD - - } // end GEONW_PON_GBC_AREA_CBF_BV_21 - - group GEONW_PON_GBC_AREA_CBF_BV_22 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_CBF_BV_22 - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_22() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeC()); - v_nodeD.start(f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_22 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_CBF_BV_22) - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_AREA_CBF_BV_22) - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_CBF_BV_22) - */ - function f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); - timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - v_longPosVectorNodeD.pai := int2bit(0,1); - f_changePositon(c_compNodeD, v_longPosVectorNodeD); - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1) - ) - ) - ) - ); - - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeD - - } // end GEONW_PON_GBC_AREA_CBF_BV_22 - - } // end gbcAreaContentionBasedForwarding - - group gbcAreaAdvancedForwarding { - - group GEONW_PON_GBC_AREA_ADV_BV_21 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_21 - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_21() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeE; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getAreaForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf05Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeE := f_getComponent(c_compNodeE); - v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_21_nodeB()); - v_nodeE.start(f_GEONW_PON_GBC_AREA_ADV_BV_21_nodeE()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf05Down(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_21 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_21) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_21_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_21_nodeB - - /** - * @desc Behavior function for NodeE (TC_GEONW_PON_GBC_AREA_ADV_BV_21) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_21_nodeE() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - 0, - f_getGeoBroadcastArea(c_area1) - ) - ) - ) - ); - - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_21_nodeE - - } // end GEONW_PON_GBC_AREA_ADV_BV_21 - - group GEONW_PON_GBC_AREA_ADV_BV_23 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_23 - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_23() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeF; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getAreaForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf06Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeF := f_getComponent(c_compNodeF); - v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_23_nodeB()); - v_nodeF.start(f_GEONW_PON_GBC_AREA_ADV_BV_23_nodeF()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf06Down(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_23 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_23) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_23_nodeB() runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Message not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_23_nodeB - - /** - * @desc Behavior function for NodeF (TC_GEONW_PON_GBC_AREA_ADV_BV_23) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_23_nodeF() runs on ItsGeoNetworking { - - // Local variables - var integer i; - var template (value) GeoNetworkingPdu v_gnPacket; - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - v_gnPacket := m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1) - ) - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - for(i:=1; i < f_getAdvancedGbcForwardingMaxCounter(); i:=i+1) { - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - f_sleepIgnoreDef(0.5); - } - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Message not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_23_nodeF - - } // end GEONW_PON_GBC_AREA_ADV_BV_23 - - group GEONW_PON_GBC_AREA_ADV_BV_24 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_24 - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_24() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeE; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getAreaForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf05Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeE := f_getComponent(c_compNodeE); - v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_24_nodeB()); - v_nodeE.start(f_GEONW_PON_GBC_AREA_ADV_BV_24_nodeE()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf05Down(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_24 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_24) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_24_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - 0, - f_getGeoBroadcastArea(c_area1) - ) - ) - )); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Message not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_24_nodeB - - /** - * @desc Behavior function for NodeE (TC_GEONW_PON_GBC_AREA_ADV_BV_24) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_24_nodeE() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - 0, - f_getGeoBroadcastArea(c_area1) - ) - ) - )); - tc_noac.start; - alt { - [] geoNetworkingPort.receive (mw_geoNwInd(mw_geoNwPdu(?))){ - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Message not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_24_nodeE - - } // end GEONW_PON_GBC_AREA_ADV_BV_24 - - group GEONW_PON_GBC_AREA_ADV_BV_25 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_25 - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_25() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeF; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getAreaForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf06Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeF := f_getComponent(c_compNodeF); - v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_25_nodeB()); - v_nodeF.start(f_GEONW_PON_GBC_AREA_ADV_BV_25_nodeF()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf06Down(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_25 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_25) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_25_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - 0, - f_getGeoBroadcastArea(c_area1) - ) - ) - )); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_25_nodeB - - /** - * @desc Behavior function for NodeF (TC_GEONW_PON_GBC_AREA_ADV_BV_25) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_25_nodeF() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var LongPosVector v_longPosVectorNodeF := f_getPosition(c_compNodeF); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - timer t_toCbf := (int2float(f_getCbfMaxTime()) - + ( - int2float(f_getCbfMinTime() - f_getCbfMaxTime()) - / int2float(f_getCbfMaxCommunicationRange()) - ) * f_distance(v_longPosVectorNodeF, v_longPosVectorIut)) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - 0, - f_getGeoBroadcastArea(c_area1) - ) - ) - )); - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_25_nodeF - - } // end GEONW_PON_GBC_AREA_ADV_BV_25 - - group GEONW_PON_GBC_AREA_ADV_BV_26 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_26 - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_26() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getAreaForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf07Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_26_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_AREA_ADV_BV_26_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf06Down(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_26 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_26) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_26_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - 0, - f_getGeoBroadcastArea(c_area1) - ) - ) - )); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_26_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_ADV_BV_26) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_26_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - timer t_toCbf := (int2float(f_getCbfMaxTime()) - + ( - int2float(f_getCbfMinTime() - f_getCbfMaxTime()) - / int2float(f_getCbfMaxCommunicationRange()) - ) * f_distance(v_longPosVectorNodeB, v_longPosVectorIut)) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - 0, - f_getGeoBroadcastArea(c_area1) - ) - ) - )); - - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_26_nodeD - - } // end GEONW_PON_GBC_AREA_ADV_BV_26 - - - group GEONW_PON_GBC_AREA_ADV_BV_27 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_27 - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_27() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeE; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getAreaForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf05Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeE := f_getComponent(c_compNodeE); - v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_27_nodeB()); - v_nodeE.start(f_GEONW_PON_GBC_AREA_ADV_BV_27_nodeE()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf05Down(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_27 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_27) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_27_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeA), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: packet correctly forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_27_nodeB - - /** - * @desc Behavior function for NodeE (TC_GEONW_PON_GBC_AREA_ADV_BV_27) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_27_nodeE() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeA, - 0, - f_getGeoBroadcastArea(c_area1) - ) - ), - -, - f_getIutMacAddress() - ) - ); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_27_nodeE - - } // end GEONW_PON_GBC_AREA_ADV_BV_27 - - group GEONW_PON_GBC_AREA_ADV_BV_28 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_28 - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_28() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeE; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getAreaForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf05Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeE := f_getComponent(c_compNodeE); - v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_28_nodeB()); - v_nodeE.start(f_GEONW_PON_GBC_AREA_ADV_BV_28_nodeE()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf05Down(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_28 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_28) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_28_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeA), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: packet correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_28_nodeB - - /** - * @desc Behavior function for NodeE (TC_GEONW_PON_GBC_AREA_ADV_BV_28) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_28_nodeE() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeA, - 0, - f_getGeoBroadcastArea(c_area1) - ) - ), - -, - f_getIutMacAddress() - ) - ); - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeA), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: packet correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_28_nodeE - - } // end GEONW_PON_GBC_AREA_ADV_BV_28 - - group GEONW_PON_GBC_AREA_ADV_BV_29 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_29 - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_29() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeE; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getAreaForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { - // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); - // setverdict(inconc); - // stop; - // } - - // Test component configuration - f_cf05Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeE := f_getComponent(c_compNodeE); - v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_29_nodeB()); - v_nodeE.start(f_GEONW_PON_GBC_AREA_ADV_BV_29_nodeE()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf05Down(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_29 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_29) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_29_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeE := f_getPosition(c_compNodeE); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - timer t_toCbf := (int2float(f_getCbfMaxTime()) - + ( - int2float(f_getCbfMinTime() - f_getCbfMaxTime()) - / int2float(f_getCbfMaxCommunicationRange()) - ) * f_distance(v_longPosVectorNodeE, v_longPosVectorIut)) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeE), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_29_nodeB - - /** - * @desc Behavior function for NodeE (TC_GEONW_PON_GBC_AREA_ADV_BV_29) - */ - function f_GEONW_PON_GBC_AREA_ADV_BV_29_nodeE() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeE := f_getPosition(c_compNodeE); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - timer t_toCbf := (int2float(f_getCbfMaxTime()) - + ( - int2float(f_getCbfMinTime() - f_getCbfMaxTime()) - / int2float(f_getCbfMaxCommunicationRange()) - ) * f_distance(v_longPosVectorNodeE, v_longPosVectorIut)) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeE, - 0, - f_getGeoBroadcastArea(c_area1) - ) - ) - ) - ); - - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeE), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_29_nodeE - - } // end GEONW_PON_GBC_AREA_ADV_BV_29 - - } // end gbcAreaAdvancedForwarding - - } // end gbcAreaForwarding - - } // end geoGeoBroadcast - - // 6.2.2.10 - group geoTopologicallyScopedBroadcast { - - group GEONW_PON_TSB_BV_01 { - - /** - * @desc TP Function for TC_GEONW_PON_TSB_BV_01 - */ - function f_GEONW_PON_TSB_BV_01() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_TSB_SRC) { - log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_TSB_BV_01_nodeB()); - v_nodeD.start(f_GEONW_PON_TSB_BV_01_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_TSB_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BV_01) - */ - function f_GEONW_PON_TSB_BV_01_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateTsbMessage) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket(?, mw_longPosVectorPosition(v_longPosVectorIut)) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: TSB packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected TSB message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_TSB_BV_01_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BV_01) - */ - function f_GEONW_PON_TSB_BV_01_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket(?, mw_longPosVectorPosition(v_longPosVectorIut)) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: TSB packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected TSB message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_TSB_BV_01_nodeD - - } // end GEONW_PON_TSB_BV_01 - - group GEONW_PON_TSB_BV_02 { - - /** - * @desc TP Function for TC_GEONW_PON_TSB_BV_02 - */ - function f_GEONW_PON_TSB_BV_02() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_TSB_FWD) { - log("*** " & testcasename() & ": PICS_GN_TSB_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_TSB_BV_02_nodeB()); - v_nodeD.start(f_GEONW_PON_TSB_BV_02_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_TSB_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BV_02) - */ - function f_GEONW_PON_TSB_BV_02_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var template (value) GeoNetworkingPdu v_gnPacket; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu( - m_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeB - ), - -, - c_defaultHopLimit - ); - v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: TSB packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected TSB message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_TSB_BV_02_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BV_02) - */ - function f_GEONW_PON_TSB_BV_02_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: TSB packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected TSB message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_TSB_BV_02_nodeD - - } // end GEONW_PON_TSB_BV_02 - - group GEONW_PON_TSB_BV_03 { - - /** - * @desc TP Function for TC_GEONW_PON_TSB_BV_03 - */ - function f_GEONW_PON_TSB_BV_03() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_TSB_FWD) { - log("*** " & testcasename() & ": PICS_GN_TSB_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_TSB_BV_03_nodeB()); - v_nodeD.start(f_GEONW_PON_TSB_BV_03_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_TSB_BV_03 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BV_03) - */ - function f_GEONW_PON_TSB_BV_03_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var template (value) GeoNetworkingPdu v_gnPacket; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu( - m_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeB, - c_defaultHopLimit - ), - -, - c_defaultHopLimit - ); - v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ), - -, - c_defaultHopLimit - 1 - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: TSB packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ), - -, - ? - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: TSB packet received with incorrect HopLimit ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected TSB message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_TSB_BV_03_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BV_03) - */ - function f_GEONW_PON_TSB_BV_03_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacketWithHl( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB), - c_defaultHopLimit - ), - -, - c_defaultHopLimit - 1 - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: TSB packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ), - -, - ? - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: TSB packet received with incorrect HopLimit ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected TSB message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_TSB_BV_03_nodeD - - } // end GEONW_PON_TSB_BV_03 - - group GEONW_PON_TSB_BO_04 { - - /** - * @desc TP Function for TC_GEONW_PON_TSB_BO_04 - */ - function f_GEONW_PON_TSB_BO_04() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_TSB_FWD) { - log("*** " & testcasename() & ": PICS_GN_TSB_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_TSB_BO_04_nodeB()); - v_nodeD.start(f_GEONW_PON_TSB_BO_04_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_TSB_BO_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BO_04) - */ - function f_GEONW_PON_TSB_BO_04_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var template (value) GeoNetworkingPdu v_gnPacket; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu( - m_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeB - ), - -, - 1 - ); - v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_TSB_BO_04_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BO_04) - */ - function f_GEONW_PON_TSB_BO_04_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: TSB message was re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: TSB message was not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_TSB_BO_04_nodeD - - } // end GEONW_PON_TSB_BO_04 - - /** - * @desc TP Function for TC_GEONW_PON_TSB_BV_05 - */ - function f_GEONW_PON_TSB_BV_05() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - if (not PICS_GN_TSB_DST) { - log("*** " & testcasename() & ": PICS_GN_TSB_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu(m_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeB - ) - ); - v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - f_sleep(PX_TAC); - - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - log("*** " & testcasename() & ": TSB packet passed to Upper Layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // End of function f_GEONW_PON_TSB_BV_05 - - group GEONW_PON_TSB_BO_07 { - - /** - * @desc TP Function for TC_GEONW_PON_TSB_BO_07 - */ - function f_GEONW_PON_TSB_BO_07() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_TSB_FWD) { - log("*** " & testcasename() & ": PICS_GN_TSB_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_TSB_BO_07_nodeB()); - v_nodeD.start(f_GEONW_PON_TSB_BO_07_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_TSB_BO_07 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BO_07) - */ - function f_GEONW_PON_TSB_BO_07_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var template GeoNetworkingPdu v_gnPacket; - - // Preamble - f_prNeighbour(); - v_gnPacket := m_geoNwPdu( - m_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeB - ), - -, - c_defaultHopLimit - ); - v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_gnPacket))); - v_gnPacket.basicHeader.routerHopLimit := ?; - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: Expected TSB message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: The same TSB packet was re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: The same TSB packet was not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_TSB_BO_07_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BO_07) - */ - function f_GEONW_PON_TSB_BO_07_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var GeoNetworkingInd v_msgInd; - - // Preamble - f_prNeighbour(); - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ) - ) - ) - ) -> value v_msgInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: Expected TSB message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - v_msgInd.msgIn.basicHeader.routerHopLimit := valueof(v_msgInd.msgIn.basicHeader.routerHopLimit) -1; - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_msgInd.msgIn)); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive(v_msgInd) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: The same TSB packet was re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: The same TSB packet was not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_TSB_BO_07_nodeD - - } // end GEONW_PON_TSB_BO_07 - - group GEONW_PON_TSB_BO_08 { - - /** - * @desc TP Function for TC_GEONW_PON_TSB_BV_08 - */ - function f_GEONW_PON_TSB_BO_08() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_TSB_DST) { - log("*** " & testcasename() & ": PICS_GN_TSB_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(c_compNodeB); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_TSB_BO_08_nodeB()); - v_nodeD.start(f_GEONW_PON_TSB_BO_08_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_TSB_BO_08 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BO_08) - */ - function f_GEONW_PON_TSB_BO_08_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Preamble - f_prNeighbour(); - v_gnPacket := m_geoNwPdu(m_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeB - ), - -, - c_defaultHopLimit - ); - v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_gnPacket))); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ) - ) - ) - ) { - tc_ac.stop; - - f_sleep(PX_TAC); - - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly rebroadcasted and passed to Upper Layer ***"); - vc_utInds := {}; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - else { - log("*** " & testcasename() & ": INCONC: TSB was not transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: TSB not rebroadcasted ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - f_sleep(PX_TAC); - - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": FAIL: Same TSB packet was transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: Same TSB packet was not passed to Upper Layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_TSB_BO_08_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BO_08) - */ - function f_GEONW_PON_TSB_BO_08_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var GeoNetworkingInd v_msgInd; - var integer i; - var template (value) GeoNetworkingPdu v_gnPacket; - - // Preamble - f_prNeighbour(); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ) - ) - ) - ) -> value v_msgInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly rebroadcasted ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: TSB not rebroadcasted ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - v_msgInd.msgIn.basicHeader.routerHopLimit := valueof(v_msgInd.msgIn.basicHeader.routerHopLimit) - 1; - v_gnPacket := v_msgInd.msgIn; - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_msgInd.msgIn)); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_TSB_BO_08_nodeD - - } // end GEONW_PON_TSB_BO_08 - - } // end geoTopologicallyScopedBroadcast - - // 6.2.2.11 - group geoSingleHopBroadcast { - - group GEONW_PON_SHB_BV_01 { - - /** - * @desc TP Function for TC_GEONW_PON_SHB_BV_01 - */ - function f_GEONW_PON_SHB_BV_01() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_SHB_SRC) { - log("*** " & testcasename() & ": PICS_GN_SHB_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_SHB_BV_01_nodeB()); - v_nodeD.start(f_GEONW_PON_SHB_BV_01_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_SHB_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_SHB_BV_01) - */ - function f_GEONW_PON_SHB_BV_01_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateShbMessage) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacket(mw_longPosVectorPosition(v_longPosVectorIut)) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: SHB packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected SHB message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_SHB_BV_01_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_SHB_BV_01) - */ - function f_GEONW_PON_SHB_BV_01_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacket(mw_longPosVectorPosition(v_longPosVectorIut)) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: SHB packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected SHB message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_SHB_BV_01_nodeD - - } // end GEONW_PON_SHB_BV_01 - - /** - * @desc TP Function for TC_GEONW_PON_SHB_BV_05 - */ - function f_GEONW_PON_SHB_BV_05() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - if (not PICS_GN_SHB_DST) { - log("*** " & testcasename() & ": PICS_GN_SHB_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB:= f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu(m_geoNwShbPacket(v_longPosVectorNodeB)); - v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - f_sleep(PX_TAC); - - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_SHB_BV_05 - - } // end geoSingleHopBroadcast - - // 6.2.2.12 - group geoGeoAnycast { - - group gacNonAreaForwarding { - - group gacNonAreaAllForwardingAlgorithm { - - group GEONW_PON_GAC_NONAREA_ALL_BV_03 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_ALL_BV_03 - */ - function f_GEONW_PON_GAC_NONAREA_ALL_BV_03() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GAC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_GAC_NONAREA_ALL_BV_03_nodeB()); - v_nodeC.start(f_GEONW_PON_GAC_NONAREA_ALL_BV_03_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_03 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_ALL_BV_03) - */ - function f_GEONW_PON_GAC_NONAREA_ALL_BV_03_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] a_receiveGeoAnycastWithAreaWithHopLimit( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2), - c_defaultHopLimit - 1, - c_defaultHopLimit) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GAC message correctly retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] a_receiveGeoAnycastWithAreaWithHopLimit( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2), - ?, - ?) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: GAC message fields not updated ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: GAC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_03_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_ALL_BV_03) - */ - function f_GEONW_PON_GAC_NONAREA_ALL_BV_03_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var GeoNetworkingInd v_msgInd; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area2), - c_defaultHopLimit - ), - -, - c_defaultHopLimit - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_03_nodeC - - } // end GEONW_PON_GAC_NONAREA_ALL_BV_03 - - group GEONW_PON_GAC_NONAREA_ALL_BO_04 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_ALL_BO_04 - */ - function f_GEONW_PON_GAC_NONAREA_ALL_BO_04() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - if (not PICS_GN_GAC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_GAC_NONAREA_ALL_BO_04_nodeB()); - v_nodeC.start(f_GEONW_PON_GAC_NONAREA_ALL_BO_04_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BO_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_ALL_BO_04) - */ - function f_GEONW_PON_GAC_NONAREA_ALL_BO_04_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC message retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BO_04_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_ALL_BO_04) - */ - function f_GEONW_PON_GAC_NONAREA_ALL_BO_04_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area2) - ), - -, - c_hopLimit1 - ) - ) - ); - - tc_noac.start; - alt { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC message retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BO_04_nodeC - - } // end GEONW_PON_GAC_NONAREA_ALL_BO_04 - - /** - * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_ALL_BV_06 - */ - function f_GEONW_PON_GAC_NONAREA_ALL_BV_06() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - if (not PICS_GN_GAC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu(m_geoNwAnycastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area2) - ) - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - f_sleep(PX_TAC); - - if(0 != lengthof(vc_utInds)) { - log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GN was NOT transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_06 - - group GEONW_PON_GAC_NONAREA_ALL_BO_09 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_ALL_BO_09 - */ - function f_GEONW_PON_GAC_NONAREA_ALL_BO_09() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - var UInt16 v_distanceTooBig; - - // Test control - if (not PICS_GN_GAC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf04Up(); - v_distanceTooBig := float2int(1.1 * f_radiusFromCircularArea(f_getGnMaxAreaSize()*c_squareKm)); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeB(v_distanceTooBig)); - v_nodeC.start(f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeC(v_distanceTooBig)); - v_nodeD.start(f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeD(v_distanceTooBig)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BO_09 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_ALL_BO_09) - */ - function f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeB(in UInt16 p_distanceTooBig) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var GeoArea v_areaTooBig; - - // Preamble - f_prNeighbour(); - v_areaTooBig := f_computeCircularArea( - f_computePosition(f_getPosition(c_compNodeB), 1000, 0), - p_distanceTooBig - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_geoArea2GeoAnycastArea(v_areaTooBig) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC message retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_ALL_BO_09) - */ - function f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeC(in UInt16 p_distanceTooBig) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var GeoArea v_areaTooBig; - - // Preamble - f_prNeighbour(); - v_areaTooBig := f_computeCircularArea( - f_computePosition(f_getPosition(c_compNodeB), 1000, 0), - p_distanceTooBig - ); - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_geoArea2GeoAnycastArea(v_areaTooBig) - ) - ) - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_geoArea2GeoAnycastArea(v_areaTooBig) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC message retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_ALL_BO_09) - */ - function f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeD(in UInt16 p_distanceTooBig) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var GeoArea v_areaTooBig; - - // Preamble - f_prNeighbour(); - v_areaTooBig := f_computeCircularArea( - f_computePosition(f_getPosition(c_compNodeB), 1000, 0), - p_distanceTooBig - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_geoArea2GeoAnycastArea(v_areaTooBig) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC message retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeD - - } // end GEONW_PON_GAC_NONAREA_ALL_BO_09 - - group GEONW_PON_GAC_NONAREA_ALL_BV_10 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_ALL_BV_10 - */ - function f_GEONW_PON_GAC_NONAREA_ALL_BV_10() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GAC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { -// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); -// setverdict(inconc); -// stop; -// } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeB()); - v_nodeC.start(f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeC()); - v_nodeD.start(f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_10 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_ALL_BV_10) - */ - function f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeB() runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC received and not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_ALL_BV_10) - */ - function f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeC() runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC received and not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_ALL_BV_10) - */ - function f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - v_longPosVectorNodeD, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area2) - ) - ) - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC received and not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeD - - } // end GEONW_PON_GAC_NONAREA_ALL_BV_10 - - } // end gacNonAreaAllForwardingAlgorithm - - group gacNonAreaGreedyForwarding { - - group GEONW_PON_GAC_NONAREA_GRD_BV_01 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_GRD_BV_01 - */ - function f_GEONW_PON_GAC_NONAREA_GRD_BV_01() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GAC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_greedy or e_unspecified ) required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GAC_NONAREA_GRD_BV_01_nodeB()); - v_nodeD.start(f_GEONW_PON_GAC_NONAREA_GRD_BV_01_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_GRD_BV_01) - */ - function f_GEONW_PON_GAC_NONAREA_GRD_BV_01_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoAnycastMessage(f_getArea(c_area2))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorIut), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GAC message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BV_01_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_GRD_BV_01) - */ - function f_GEONW_PON_GAC_NONAREA_GRD_BV_01_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorIut), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: received GAC message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BV_01_nodeD - - } // end GEONW_PON_GAC_NONAREA_GRD_BV_01 - - group GEONW_PON_GAC_NONAREA_GRD_BV_02 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_GRD_BV_02 - */ - function f_GEONW_PON_GAC_NONAREA_GRD_BV_02() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GAC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_greedy or e_unspecified ) required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeB()); - v_nodeC.start(f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeC()); - v_nodeD.start(f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_GRD_BV_02) - */ - function f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GAC message correctly forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_GRD_BV_02) - */ - function f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area2) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_GRD_BV_02) - */ - function f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC message not forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeD - - } // end GEONW_PON_GAC_NONAREA_GRD_BV_02 - - group GEONW_PON_GAC_NONAREA_GRD_BO_07 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_GRD_BO_07 - */ - function f_GEONW_PON_GAC_NONAREA_GRD_BO_07() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - var UInt16 v_sequenceNumber := f_getInitialSequenceNumber(); - - // Test control - if (not PICS_GN_GAC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_greedy or e_unspecified ) required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeB()); - v_nodeC.start(f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeC(v_sequenceNumber)); - v_nodeD.start(f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeD(v_sequenceNumber)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BO_07 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_GRD_BO_07) - */ - function f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var GeoNetworkingInd v_msgInd; - var template GeoNetworkingInd v_msgInd_t; - - // Preamble - f_prNeighbour(); - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2) - ) - ) - ) - ) -> value v_msgInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: GAC message correctly forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: GAC message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - v_msgInd_t := v_msgInd; - v_msgInd_t.msgIn.basicHeader.routerHopLimit := ?; - tc_noac.start; - alt { - [] geoNetworkingPort.receive(v_msgInd_t) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC message re-forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not re-forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_GRD_BO_07) - */ - function f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeC(in UInt16 p_sequenceNumber) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - v_longPosVectorNodeC, - p_sequenceNumber, - f_getGeoAnycastArea(c_area2) - ), - -, - c_defaultHopLimit - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC re-forwarded! (not to area center!) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_GRD_BO_07) - */ - function f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeD(in UInt16 p_sequenceNumber) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": INCONC: Pre-conditions: GAC message not forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: Pre-conditions: GAC message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - } - - // Test Body - // send geoAnycast for second time (same source + same seq Nr + lower RHL) - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - v_longPosVectorNodeC, - p_sequenceNumber, - f_getGeoAnycastArea(c_area2) - ), - -, - c_defaultHopLimit - 1 - ) - ) - ); - - tc_noac.start; - alt { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC re-forwarded! (not to area center!) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeD - - } // end GEONW_PON_GAC_NONAREA_GRD_BO_07 - - - } // end gacNonAreaGreedyForwarding - - group gacNonAreaContentionBasedForwarding { - - group GEONW_PON_GAC_NONAREA_CBF_BV_01 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_CBF_BV_01 - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_01() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GAC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - if(f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_cbf ) required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_01_nodeB()); - v_nodeD.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_01_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_CBF_BV_01) - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_01_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if(not f_utTriggerEvent(m_generateGeoAnycastMessage(f_getArea(c_area2)))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorIut), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GAC message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_01_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_CBF_BV_01) - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_01_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorIut), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: received GAC message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC message not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_01_nodeD - - } // end GEONW_PON_GAC_NONAREA_CBF_BV_01 - - group GEONW_PON_GAC_NONAREA_CBF_BV_02 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_CBF_BV_02 - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_02() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GAC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { -// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); -// setverdict(inconc); -// stop; -// } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeB()); - v_nodeC.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeC()); - v_nodeD.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_CBF_BV_02) - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GAC message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC message not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_CBF_BV_02) - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - timer t_toCbf := (int2float(f_getCbfMaxTime()) - + ( - int2float(f_getCbfMinTime() - f_getCbfMaxTime()) - / int2float(f_getCbfMaxCommunicationRange()) - ) * f_distance(v_longPosVectorNodeC, v_longPosVectorIut)) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area2) - ) - ) - ) - ); - - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2) - )))) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GAC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GAC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_CBF_BV_02) - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GAC message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC message not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeD - - } // end GEONW_PON_GAC_NONAREA_CBF_BV_02 - - group GEONW_PON_GAC_NONAREA_CBF_BV_07 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_CBF_BV_07 - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_07() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - var UInt16 v_sequenceNumberC := f_getInitialSequenceNumber(); - - // Test control - if (not PICS_GN_GAC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { -// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); -// setverdict(inconc); -// stop; -// } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeB()); - v_nodeC.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeC(v_sequenceNumberC)); - v_nodeD.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeD(v_sequenceNumberC)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_07 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_CBF_BV_07) - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_CBF_BV_07) - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeC(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - v_longPosVectorNodeC, - p_sequenceNumberC, - f_getGeoAnycastArea(c_area2) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_CBF_BV_07) - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeD(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - v_longPosVectorNodeC, - p_sequenceNumberC, - f_getGeoAnycastArea(c_area2) - ) - ) - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2) - )))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_071_nodeD - - } // end GEONW_PON_GAC_NONAREA_CBF_BV_07 - - group GEONW_PON_GAC_NONAREA_CBF_BV_20 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_CBF_BV_20 - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_20() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var float v_distance := int2float(f_getCbfMaxCommunicationRange() * 2); - var LongPosVector v_longPosVectorIut, v_longPosVectorNodeC; - - // Test control - if (not PICS_GN_GAC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - // re-compute NodeC's position. - v_longPosVectorIut := f_getIutLongPosVector(); - v_longPosVectorNodeC := f_computePositionUsingDistance(v_longPosVectorIut, v_distance, 180); - v_longPosVectorNodeC.gnAddr := f_getTsGnLocalAddress(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_20_nodeB(v_longPosVectorNodeC)); - v_nodeC.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_20_nodeC(v_longPosVectorNodeC)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_msgSent, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_20 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_CBF_BV_20) - * @param p_longPosVectorNodeC Position vector of NodeC - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_20_nodeB(in LongPosVector p_longPosVectorNodeC) runs on ItsGeoNetworking { - - // Local variables - timer t_toCbf := int2float(f_getCbfMinTime()) / 1000.0; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - log("*** " & testcasename() & ": INFO: Message sent ***"); - f_selfOrClientSyncAndVerdict(c_msgSent, e_success); - - tc_ac.start; - t_toCbf.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(p_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2) - )))) { - tc_ac.stop; - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: IUT re-broadcasted the packet too early ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: Ready for receiving re-broadcasting ***"); - repeat; - } - - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_20_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_CBF_BV_20) - * @param p_longPosVectorNodeC Position vector of NodeC - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_20_nodeC(LongPosVector p_longPosVectorNodeC) runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - p_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area2) - ) - ) - ) - ); - - log("*** " & testcasename() & ": INFO: Message sent ***"); - f_selfOrClientSyncAndVerdict(c_msgSent, e_success); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(p_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_20_nodeC - - } // end GEONW_PON_GAC_NONAREA_CBF_BV_20 - - group GEONW_PON_GAC_NONAREA_CBF_BV_21 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_CBF_BV_21 - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_21() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GAC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { -// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); -// setverdict(inconc); -// stop; -// } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeB()); - v_nodeC.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeC()); - v_nodeD.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_21 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_CBF_BV_21) - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GAC broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_CBF_BV_21) - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeC() runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GAC message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC message not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_CBF_BV_21) - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area2) - ) - ) - ) - ); - - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2) - )))) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GAC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GAC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeD - - } // end GEONW_PON_GAC_NONAREA_CBF_BV_21 - - group GEONW_PON_GAC_NONAREA_CBF_BV_22 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_CBF_BV_22 - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_22() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GAC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getNonAreaForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // if (f_getCbfMinTime() < 300) { -// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); -// setverdict(inconc); -// stop; -// } - - // Test component configuration - f_cf04Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeB()); - v_nodeC.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeC()); - v_nodeD.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_22 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_CBF_BV_22) - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeA), - ?, - f_getGeoAnycastArea(c_area2) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GAC broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_CBF_BV_22) - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; - - // Preamble - v_longPosVectorNodeC.pai := int2bit(0,1); - f_changePositon(c_compNodeC, v_longPosVectorNodeC); - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - v_longPosVectorNodeA, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area2) - ) - ) - ) - ); - - t_toCbf.start; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeA), - ?, - f_getGeoAnycastArea(c_area2) - )))) { - tc_ac.stop; - - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GAC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GAC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_CBF_BV_22) - */ - function f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeA), - ?, - f_getGeoAnycastArea(c_area2) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GAC broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeD - - } // end GEONW_PON_GAC_NONAREA_CBF_BV_22 - - } // end gacNonAreaContentionBasedForwarding - - } // end gacNonAreaForwarding - - group gacAreaForwarding { - - group GEONW_PON_GAC_AREA_ALL_BV_01 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_AREA_ALL_BV_01 - */ - function f_GEONW_PON_GAC_AREA_ALL_BV_01() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GAC_SRC) { - log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GAC_AREA_ALL_BV_01_nodeB()); - v_nodeD.start(f_GEONW_PON_GAC_AREA_ALL_BV_01_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_GAC_AREA_ALL_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_AREA_ALL_BV_01) - */ - function f_GEONW_PON_GAC_AREA_ALL_BV_01_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoAnycastMessage(f_getArea(c_area1))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorIut), - ?, - f_getGeoAnycastArea(c_area1)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GAC message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_AREA_ALL_BV_01_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_AREA_ALL_BV_01) - */ - function f_GEONW_PON_GAC_AREA_ALL_BV_01_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorIut), - ?, - f_getGeoAnycastArea(c_area1)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GAC message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_AREA_ALL_BV_01_nodeD - - } // end GEONW_PON_GAC_AREA_ALL_BV_01 - - group GEONW_PON_GAC_AREA_ALL_BV_02 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_AREA_ALL_BV_02 - */ - function f_GEONW_PON_GAC_AREA_ALL_BV_02() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - if (not PICS_GN_GAC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GAC_AREA_ALL_BV_02_nodeB()); - v_nodeD.start(f_GEONW_PON_GAC_AREA_ALL_BV_02_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_GAC_AREA_ALL_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_AREA_ALL_BV_02) - */ - function f_GEONW_PON_GAC_AREA_ALL_BV_02_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area1) - ) - ) - ) - ); - - tc_noac.start; - alt { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoAnycastArea(c_area1)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC message retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_AREA_ALL_BV_02_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_AREA_ALL_BV_02) - */ - function f_GEONW_PON_GAC_AREA_ALL_BV_02_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_noac.start; - alt { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoAnycastArea(c_area1)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC message retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_AREA_ALL_BV_02_nodeD - - } // end GEONW_PON_GAC_AREA_ALL_BV_02 - - /** - * @desc TP Function for TC_GEONW_PON_GAC_AREA_ALL_BV_05 - */ - function f_GEONW_PON_GAC_AREA_ALL_BV_05() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - if (not PICS_GN_GAC_DST) { - log("*** " & testcasename() & ": PICS_GN_GAC_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu(m_geoNwAnycastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area1) - ) - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - f_sleep(PX_TAC); - - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - log("*** " & testcasename() & ": GAC packet passed to Upper Layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_PON_GAC_AREA_ALL_BV_05 - - group GEONW_PON_GAC_AREA_ALL_BO_08 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_AREA_ALL_BO_08 - */ - function f_GEONW_PON_GAC_AREA_ALL_BO_08() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - var template (value) GeoNetworkingPdu v_gnPacket; - - // Test control - if (not PICS_GN_GAC_DST) { - log("*** " & testcasename() & ": PICS_GN_GAC_DST required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf02Up(c_compNodeB); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_GAC_AREA_ALL_BO_08_nodeB()); - v_nodeD.start(f_GEONW_PON_GAC_AREA_ALL_BO_08_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // End of function f_GEONW_PON_GAC_AREA_ALL_BO_08 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_AREA_ALL_BO_08) - */ - function f_GEONW_PON_GAC_AREA_ALL_BO_08_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Preamble - f_prNeighbour(); - - f_sleep(PX_TAC); - - v_gnPacket := m_geoNwPdu(m_geoNwAnycastPacket( - v_longPosVectorNodeD, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area1) - ), - -, - c_defaultHopLimit - ); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); - vc_utInds := {}; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - else { - log("*** " & testcasename() & ": INCONC: GN was not transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - - // Test Body - v_gnPacket.basicHeader.routerHopLimit := valueof(v_gnPacket.basicHeader.routerHopLimit) / 2; - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - f_sleep(PX_TAC); - - if(0 != lengthof(vc_utInds)) { - log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GN was NOT transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_AREA_ALL_BO_08_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_AREA_ALL_BO_08) - */ - function f_GEONW_PON_GAC_AREA_ALL_BO_08_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Preamble - f_prNeighbour(); - v_gnPacket := m_geoNwPdu(m_geoNwAnycastPacket( - v_longPosVectorNodeD, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area1) - ), - -, - c_defaultHopLimit - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_PON_GAC_AREA_ALL_BO_08_nodeD - - } // end GEONW_PON_GAC_AREA_ALL_BO_08 - - } // end gacAreaForwarding - - } // end geoGeoAnycast - - } // end geoProtocolOperation - - // 6.2.3 Capacities - group geoCapacities { - - // 6.2.3.1 - group geoCapLocationService { - - /** - * @desc TP Function for TC_GEONW_CAP_LOS_BV_01 - */ - function f_GEONW_CAP_LOS_BV_01() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - var GeoNetworkingInd v_msg; - var integer v_packetSize := 0; - var integer v_index := 0; - var integer v_nbrOfPackets := 0; - - // Test control - if (not PICS_GN_LS_REQ_SRC) { - log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - v_longPosVectorIut := f_getPosition(c_compIut); - f_prNeighbour(); - - // Trigger message to NodeB in order to get an estimation of packet size - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithPayload(v_longPosVectorNodeB.gnAddr, char2oct("PAYLOAD_" & oct2str(int2oct(0, 2))))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), - ? - ) - ) - ) - ) -> value v_msg { - var GeoNetworkingReq v_req; - tc_ac.stop; - //if we use directly v_msg(GeoNetworkingInd) for encvalue the encoder must also be able to provide - //encoding of "incoming messages"... - v_req.msgOut := v_msg.msgIn; - v_packetSize := lengthof(bit2oct(encvalue(v_req.msgOut))); - } - } - - // implicitely trigger LS_REQUEST - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest( - ?, - v_longPosVectorNodeA.gnAddr.mid, - v_longPosVectorIut - ) { - } - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - // Fill the LS buffer + one more message to remove an older message - v_nbrOfPackets := f_getLsPacketBufferSize() / v_packetSize + 1; - log("*** " & testcasename() & ": " & int2str(v_nbrOfPackets) & " ***"); - for (v_index:=1; v_index <= v_nbrOfPackets; v_index:=v_index+1) { - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithPayload(v_longPosVectorNodeA.gnAddr, char2oct("PAYLOAD_" & oct2str(int2oct(v_index, 2))))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - f_sleepIgnoreDef(0.5); - f_sendGeoNetMessage( - valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwLsReplyPacket( - v_longPosVectorNodeB, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ) - ) - )); - - // packet 1 shall be dropped - v_index := 2; - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - f_receiveGeoNetMessageWithPayload( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ), - char2oct("PAYLOAD_" & oct2str(int2oct(v_index, 2))) - ) - ) { - if (v_index < v_nbrOfPackets) { - v_index := v_index + 1; - repeat; - } - tc_ac.stop; - log("*** " & testcasename() & ": Older message was removed, new message was inserted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Expected amount of messages were not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // End of function f_GEONW_CAP_LOS_BV_01 - - } // end geoCapLocationService - - // 6.2.3.2 - group geoCapForwardingPacketBuffer { - - group GEONW_CAP_FPB_BV_01 { - - /** - * @desc TP Function for TC_GEONW_CAP_LOS_BV_01 - */ - function f_GEONW_CAP_FPB_BV_01() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var template (value) GeoNetworkingPdu v_geoNetworkingMsg; - var integer v_packetSize := 0; - var integer v_nbrOfPackets := 0; - var integer v_payloadSize := f_min(1400, f_getUcForwardingPacketBufferSize() / 10 ); - var octetstring v_payload; - const integer c_nbrOfDiscardedMessages := 1; - var UInt16 v_sequenceNumberC := f_getInitialSequenceNumber(); - - // Test control - if (not PICS_GN_GUC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Prepare GUC message - v_payload := int2oct(0, v_payloadSize); - v_geoNetworkingMsg := m_geoNwPdu( - m_geoNwUnicastPacket( - m_dummyLongPosVector, - f_longPosVector2ShortPosVector(valueof(m_dummyLongPosVector)), - 0) - ); - v_geoNetworkingMsg.gnPacket.packet.payload := valueof(v_payload); - v_packetSize := lengthof(bit2oct(encvalue(v_geoNetworkingMsg))); - - // Fill the UC forwarding buffer + c_nbrOfDiscardedMessages more message to remove older messages - v_nbrOfPackets := f_getUcForwardingPacketBufferSize() / v_packetSize + c_nbrOfDiscardedMessages + 1; - log("*** " & testcasename() & ": " & int2str(v_nbrOfPackets) & " ***"); - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_CAP_FPB_BV_01_nodeB(v_sequenceNumberC, v_nbrOfPackets, c_nbrOfDiscardedMessages)); - v_nodeC.start(f_GEONW_CAP_FPB_BV_01_nodeC(v_sequenceNumberC, v_nbrOfPackets, v_geoNetworkingMsg)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_CAP_FPB_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_CAP_FPB_BV_01) - * @param p_sequenceNumberC Initial sequence number of NodeC - * @param p_nbrOfPackets Number of packets sent by other component - * @param p_nbrOfDiscardedMessages Number of packets that should be discarded - */ - function f_GEONW_CAP_FPB_BV_01_nodeB( - in UInt16 p_sequenceNumberC, - in integer p_nbrOfPackets, - in integer p_nbrOfDiscardedMessages - ) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var UInt16 v_expectedSeqNumber := p_sequenceNumberC + p_nbrOfDiscardedMessages + 1; - var integer v_nbReceivedMessages := 0; - - // Preamble - f_prDefault(); // NodeB is not yet a neighbour - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_startBeingNeighbour(); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - v_expectedSeqNumber - ) - ) - ) - ) { - v_nbReceivedMessages := v_nbReceivedMessages + 1; - v_expectedSeqNumber := v_expectedSeqNumber + 1; - repeat; // repeat in any case => IUT may send more messages ! - } - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Unexpected message received (Bad sequence number) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - if(v_nbReceivedMessages == (p_nbrOfPackets - p_nbrOfDiscardedMessages)) { - log("*** " & testcasename() & ": PASS: Older messages wer removed, new messages were inserted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: Expected amount of messages were not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_CAP_FPB_BV_01_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_CAP_FPB_BV_01) - * @param p_sequenceNumberC Initial sequence number of NodeC - * @param p_nbrOfPackets Number of packets to be send - * @param p_geoNetworkingMsg Pdu to be sent (template) - */ - function f_GEONW_CAP_FPB_BV_01_nodeC( - in UInt16 p_sequenceNumberC, - in integer p_nbrOfPackets, - in template (value) GeoNetworkingPdu p_geoNetworkingMsg - ) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var integer i := 0; - - // Preamble - f_prNeighbour(); - vc_localSeqNumber := p_sequenceNumberC; - - p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoUnicastHeader.srcPosVector := v_longPosVectorNodeC; - p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoUnicastHeader.dstPosVector := f_longPosVector2ShortPosVector(v_longPosVectorNodeA); - for (i:=0; i < p_nbrOfPackets; i:=i+1) { - p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoUnicastHeader.seqNumber := vc_localSeqNumber; - f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(p_geoNetworkingMsg))); - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_CAP_FPB_BV_01_nodeC - - } // end GEONW_CAP_FPB_BV_01 - - group GEONW_CAP_FPB_BV_02 { - - /** - * @desc TP Function for TC_GEONW_CAP_FPB_BV_02 - */ - function f_GEONW_CAP_FPB_BV_02() runs on ItsMtc { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var template (value) GeoNetworkingPdu v_geoNetworkingMsg; - var integer v_packetSize := 0; - var integer v_nbrOfPackets := 0; - const integer c_nbrOfDiscardedMessages := 1; - var UInt16 v_sequenceNumberC := f_getInitialSequenceNumber(); - const octetstring c_defaultPayload := char2oct("DEFAULT_PAYLOAD"); - const integer c_itsGnMaxSduSize := 1398; - var octetstring v_payload := c_defaultPayload; - - // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Prepare GBC message - v_geoNetworkingMsg := m_geoNwPdu(m_geoNwBroadcastPacket( - m_dummyLongPosVector, - 0, - m_dummyGeoBroadcastArea)); - - while (lengthof(v_payload) < (c_itsGnMaxSduSize- lengthof(c_defaultPayload))) { - v_payload := v_payload & c_defaultPayload; - } - - v_geoNetworkingMsg.gnPacket.packet.payload := valueof(v_payload); - - v_packetSize := lengthof(bit2oct(encvalue(v_geoNetworkingMsg))); - - // Fill the BC forwarding buffer + c_nbrOfDiscardedMessages more message to remove older messages - v_nbrOfPackets := f_getBcForwardingPacketBufferSize() / v_packetSize + c_nbrOfDiscardedMessages; - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_CAP_FPB_BV_02_nodeB(v_sequenceNumberC, v_nbrOfPackets, c_nbrOfDiscardedMessages)); - v_nodeC.start(f_GEONW_CAP_FPB_BV_02_nodeC(v_sequenceNumberC, v_nbrOfPackets, v_geoNetworkingMsg)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // End of function f_GEONW_CAP_FPB_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_CAP_FPB_BV_02) - * @param p_sequenceNumberC Initial sequence number of NodeC - * @param p_nbrOfPackets Number of packets sent by other component - * @param p_nbrOfDiscardedMessages Number of packets that should be discarded - */ - function f_GEONW_CAP_FPB_BV_02_nodeB( - in UInt16 p_sequenceNumberC, - in integer p_nbrOfPackets, - in integer p_nbrOfDiscardedMessages - ) runs on ItsGeoNetworking { - - // Local variables -// FIXME: remove var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var UInt16 v_expectedSeqNumber := p_sequenceNumberC + p_nbrOfDiscardedMessages; - var integer v_nbReceivedMessages := 0; - - // Preamble - f_prDefault(); // NodeB is not yet a neighbour - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_startBeingNeighbour(); - - tc_ac.start; - alt { - [] a_receiveGeoBroadcast( - mw_longPosVectorPosition(v_longPosVectorNodeC), - v_expectedSeqNumber - ) { - v_nbReceivedMessages := v_nbReceivedMessages + 1; - v_expectedSeqNumber := v_expectedSeqNumber + 1; - repeat; // repeat in any case => IUT may send more messages ! - } - [] a_receiveGeoBroadcast( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ? - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Unexpected message received (Bad sequence number) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - if(v_nbReceivedMessages == (p_nbrOfPackets - p_nbrOfDiscardedMessages)) { - log("*** " & testcasename() & ": PASS: Older messages wer removed, new messages were inserted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: Expected amount of messages were not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - } - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_CAP_FPB_BV_02_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_CAP_FPB_BV_02) - * @param p_sequenceNumberC Initial sequence number of NodeC - * @param p_nbrOfPackets Number of packets to be send - * @param p_geoNetworkingMsg Pdu to be sent (template) - */ - function f_GEONW_CAP_FPB_BV_02_nodeC( - in UInt16 p_sequenceNumberC, - in integer p_nbrOfPackets, - in template (value) GeoNetworkingPdu p_geoNetworkingMsg - ) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var integer i := 0; - var GnRawPayload v_payload := valueof(p_geoNetworkingMsg.gnPacket.packet.payload); //save the given payload - - // Preamble - f_prNeighbour(); - vc_localSeqNumber := p_sequenceNumberC; - - p_geoNetworkingMsg.gnPacket.packet := m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - 0, - f_getGeoBroadcastArea(c_area2) - ); - p_geoNetworkingMsg.gnPacket.packet.payload := v_payload; //set back the original given payload - - for (i:=0; i < p_nbrOfPackets; i:=i+1) { - p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoBroadcastHeader.seqNumber := vc_localSeqNumber; - f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(p_geoNetworkingMsg))); - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // End of function f_GEONW_CAP_FPB_BV_02_nodeC - - } // end GEONW_CAP_FPB_BV_02 - - } // end geoCapForwardingPacketBuffer - - } // end geoCapacities - -} // end ItsGeoNetworking_TpFunctions +/** + * @author ETSI / STF405 / STF449 / STF484 / STF525 / TTF T042 + * @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsGeoNetworking/ItsGeoNetworking_TpFunctions.ttcn $ + * $Id: ItsGeoNetworking_TpFunctions.ttcn,v 1.5 2019/08/05 15:18:56 dte Exp $ + * @desc GeoNetworking TP Functions + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * + */ +module ItsGeoNetworking_TpFunctions { + + // Libcommon + import from LibCommon_BasicTypesAndValues all; + import from LibCommon_DataStrings all; + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHelpers + import from LibHelpers_Functions all; + + // LibItsCommon + import from LibItsCommon_Functions all; + + // LibItsGeoNetworking + import from LibItsGeoNetworking_TestSystem all; + import from LibItsGeoNetworking_Functions all; + import from LibItsGeoNetworking_Templates all; + import from LibItsGeoNetworking_TypesAndValues all; + import from LibItsGeoNetworking_Pics all; + import from LibItsGeoNetworking_Pixits all; + + // 6.2.1 + group geoFormatingAndDataValidity { + + // 6.2.1.1 + group geoFdvBasicHeader { + + /** + * @desc TP Function for TC_GEONW_FDV_BAH_BV_01 + */ + function f_GEONW_FDV_BAH_BV_01() runs on ItsGeoNetworking { + + // Local variables + + // Test control + if (not PICS_GN_BASIC_HEADER) { + log("*** " & testcasename() & ": PICS_GN_BASIC_HEADER required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if(not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1)))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket(?, ?), -, f_getDefaultHopLimit()))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Basic Header correctly formatted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_BAH_BV_01 + + /** + * @desc TP Function for TC_GEONW_FDV_BAH_BI_02 + */ + function f_GEONW_FDV_BAH_BI_02() runs on ItsGeoNetworking { + // Local variables + var LongPosVector v_longPosVectorNodeB; + var template (value) GeoNetworkingPdu v_gnPacket; + + // Test control + if (not PICS_GN_BASIC_HEADER) { + log("*** " & testcasename() & ": PICS_GN_BASIC_HEADER required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + v_gnPacket := m_geoNwPdu(m_geoNwShbPacket(v_longPosVectorNodeB, m_mccMco)); + v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); + f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_gnPacket))); + + f_sleep(PX_TAC); + + if(0 < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); + //flush received upper indications + vc_utInds := {}; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + else { + log("*** " & testcasename() & ": INCONC: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + + // Test Body + v_gnPacket.basicHeader.version := valueof(v_gnPacket.basicHeader.version) + 1; + + f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_gnPacket))); + + f_sleep(PX_TAC); + + if(0 != lengthof(vc_utInds)) { + log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GN was discarded and not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_BAH_BI_02 + + } // end geoFdvBasicHeader + + // 6.2.1.2 + group geoFdvCommonHeader { + + /** + * @desc TP Function for TC_GEONW_FDV_COH_BV_01 + */ + function f_GEONW_FDV_COH_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_COMMON_HEADER) { + log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(?)))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Common Header correclty formatted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + f_acTriggerEvent(m_stopPassBeaconing); + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_COH_BV_01 + + /** + * @desc TP Function for TC_GEONW_FDV_COH_BV_02 + */ + function f_GEONW_FDV_COH_BV_02() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingInd v_geoNwInd; + var octetstring v_payload := char2oct("PAYLOAD"); + + // Test control + if (not PICS_GN_COMMON_HEADER) { + log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + if ( not f_utTriggerEvent(m_generateShbMessageWithPayload(v_payload)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwShbPacket))) -> value v_geoNwInd { + tc_ac.stop; + if(ispresent(v_geoNwInd.msgIn.gnPacket.packet.payload)) { + if(v_geoNwInd.msgIn.gnPacket.packet.commonHeader.plLength == lengthof(v_payload)) { + log("*** " & testcasename() & ": PASS: PL field correctly indicates payload size ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: PL does correctly not indicate payload size (" + & int2str(v_geoNwInd.msgIn.gnPacket.packet.commonHeader.plLength) + & " != " + & int2str(lengthof(v_payload)) + & ")***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + else { + if(v_geoNwInd.msgIn.gnPacket.packet.commonHeader.plLength == 0) { + log("*** " & testcasename() & ": PASS: PL field correctly indicates empty payload ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: PL does not indicate empty payload ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_COH_BV_02 + + /** + * @desc TP Function for TC_GEONW_FDV_COH_BV_03 + */ + function f_GEONW_FDV_COH_BV_03( + in template (present) UInt8 p_hopLimit := f_getDefaultHopLimit(), + in template (present) Bit8 p_flags := f_isMobile() + ) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_COMMON_HEADER) { + log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if(not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1)))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithHlAndFlags(mw_longPosVectorPosition(v_longPosVectorIut), ?, p_hopLimit, p_flags)))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Correct GeoNetworking Common Header received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] a_receiveGeoBroadcast(mw_longPosVectorPosition(v_longPosVectorIut), ?) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Incorrect GeoNetworking Common Header received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_COH_BV_03 + + group GEONW_FDV_COH_BO_04 { + + /** + * @desc TP Function for TC_GEONW_FDV_COH_BO_04 + */ + function f_GEONW_FDV_COH_BO_04() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_COMMON_HEADER) { + log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_FDV_COH_BO_04_nodeB()); + v_nodeD.start(f_GEONW_FDV_COH_BO_04_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_FDV_COH_BV_04 + + /** + * @desc Behavior function for NodeB (TC_GEONW_FDV_COH_BV_04) + */ + function f_GEONW_FDV_COH_BO_04_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var UInt8 v_hopLimit := f_getDefaultHopLimit(); + var template (value) GeoNetworkingPdu v_gnPacket; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeB, + v_hopLimit-1 + ), + -, + v_hopLimit + ); + v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); + f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_gnPacket))); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: TSB packet was not discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: TSB was correctly discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_FDV_COH_BO_04_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_FDV_COH_BV_04) + */ + function f_GEONW_FDV_COH_BO_04_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: TSB packet was not discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: TSB was correctly discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_FDV_COH_BO_04_nodeD + + } // end GEONW_FDV_COH_BO_04 + + } // end geoFdvCommonHeader + + // 6.2.1.3 + group geoFdvBeacon { + + /** + * @desc TP Function for TC_GEONW_FDV_BEA_BV_01 + */ + function f_GEONW_FDV_BEA_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_BEACON_SRC) { + log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(mw_longPosVectorPosition(v_longPosVectorIut), e_any)))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Common Header correclty formatted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_BEA_BV_01 + + /** + * @desc TP Function for TC_GEONW_FDV_BEA_BV_02 + */ + function f_GEONW_FDV_BEA_BV_02() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_BEACON_SRC) { + log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket( + mw_longPosVectorAny(f_getIutGnLocalAddress()))))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GN address correctly received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_BEA_BV_02 + + /** + * @desc TP Function for TC_GEONW_FDV_BEA_BV_03 + */ + function f_GEONW_FDV_BEA_BV_03() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_BEACON_SRC) { + log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(mw_longPosVectorPosition(v_longPosVectorIut))))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Position equaling GN-MNGT primitive value received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_BEA_BV_03 + + /** + * @desc TP Function for TC_GEONW_FDV_BEA_BV_04 + */ + function f_GEONW_FDV_BEA_BV_04() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_BEACON_SRC) { + log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(mw_longPosVectorPosition(v_longPosVectorIut))))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Timestamp equaling GN-MNGT primitive value received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_BEA_BV_04 + + } // end geoFdvBeacon + + // 6.2.1.4 + group geoFdvGeoUnicast { + + /** + * @desc TP Function for TC_GEONW_FDV_GUC_BV_01 + */ + function f_GEONW_FDV_GUC_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + v_longPosVectorIut := f_getPosition(c_compIut); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacketWithSourcePv( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), // DEPV + ?, // sequence number + mw_longPosVectorPosition(v_longPosVectorIut) //SOPV + ) + ) + ) + ) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: Fields of the received GUC message correctly set ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: GUC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_GUC_BV_01 + + } // end geoFdvGeoUnicast + + // 6.2.1.5 + group geoFdvGeoBroadcast { + + /** + * @desc TP Function for TC_GEONW_FDV_GBC_BV_01 + */ + function f_GEONW_FDV_GBC_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + var octetstring v_payload := char2oct("PAYLOAD"); + + // Test control + if (not PICS_GN_GBC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_longPosVectorIut := f_getPosition(c_compIut); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoBroadcastMessageWithPayload(f_getArea(c_area1), v_payload)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + f_receiveGeoNetMessageWithPayload( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), // SOPV + ? // sequence number + ) + ) + ), + ? + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Fields of the received GBC message correctly set ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_GBC_BV_01 + + } // end geoFdvGeoBroadcast + + // 6.2.1.6 + group geoFdvGeoAnycast { + + /** + * @desc TP Function for TC_GEONW_FDV_GAC_BV_01 + */ + function f_GEONW_FDV_GAC_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + var octetstring v_payload := char2oct("PAYLOAD"); + + // Test control + if (not PICS_GN_GAC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_longPosVectorIut := f_getPosition(c_compIut); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoAnycastMessageWithPayload(f_getArea(c_area1), v_payload)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + f_receiveGeoNetMessageWithPayload( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwAnycastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), // SOPV + ? // sequence number + ) + ) + ), + ? + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Fields of the received GAC message correctly set ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_GAC_BV_01 + + } // end geoFdvGeoAnycast + + // 6.2.1.7 + group geoFdvSingleHopBroadcast { + + /** + * @desc TP Function for TC_GEONW_FDV_SHB_BV_01 + */ + function f_GEONW_FDV_SHB_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_SHB_SRC) { + log("*** " & testcasename() & ": PICS_GN_SHB_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_longPosVectorIut := f_getPosition(c_compIut); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateShbMessage) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwShbPacket( + mw_longPosVectorPosition(v_longPosVectorIut), // SOPV + 1 //MHL + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Fields of the received SHB message correctly set ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: SHB message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_SHB_BV_01 + + /** + * @desc TP Function for TC_GEONW_FDV_SHB_BV_02 + */ + function f_GEONW_FDV_SHB_BV_02() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_SHB_SRC or PICS_RADIO_COMM != e_its_g5) { + log("*** " & testcasename() & ": PICS_GN_SHB_SRC and PICS_RADIO_COMM != e_its_g5 required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_longPosVectorIut := f_getPosition(c_compIut); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateShbMessage) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwShbPacket( + mw_longPosVectorPosition(v_longPosVectorIut), // SOPV + 1 //MHL + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Fields of the received SHB message correctly set ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: SHB message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_SHB_BV_02 + + /** + * @desc TP Function for TC_GEONW_FDV_SHB_BV_03 + */ + function f_GEONW_FDV_SHB_BV_03() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_SHB_SRC or PICS_RADIO_COMM != e_lte_cv2x) { + log("*** " & testcasename() & ": PICS_GN_SHB_SRC and PICS_RADIO_COMM != e_lte_cv2x required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_longPosVectorIut := f_getPosition(c_compIut); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateShbMessage) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwShbPacket_c_v2x( + mw_longPosVectorPosition(v_longPosVectorIut), // SOPV + 1 //MHL + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Fields of the received SHB message correctly set ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: SHB message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_SHB_BV_03 + + } // end geoFdvSingleHopBroadcast + + // 6.2.1.8 + group geoFdvTopologicallyScopedBroadcast { + + /** + * @desc TP Function for TC_GEONW_FDV_TSB_BV_01 + */ + function f_GEONW_FDV_TSB_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_TSB_SRC or PICS_RADIO_COMM != e_its_g5) { + log("*** " & testcasename() & ": PICS_GN_TSB_SRC and PICS_RADIO_COMM == e_its_g5 required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_longPosVectorIut := f_getPosition(c_compIut); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateTsbMessage) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, // sequence number + mw_longPosVectorPosition(v_longPosVectorIut) // SOPV + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: message received with correct common and extended headers ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: TSB message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_FDV_TSB_BV_01 + + } // end geoFdvTopologicallyScopedBroadcast + + } // end geoFormatingAndDataValidity + + // 6.2.2 + group geoProtocolOperation { + + // 6.2.2.1 + group geoLocationTable { + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_01 + */ + function f_GEONW_PON_LOT_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + + // Test control + if (not PICS_GN_GUC_SRC or not PICS_GN_BEACON_DST) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC and PICS_GN_BEACON_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GUC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] a_receiveGeoUnicastWithDestination(?) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: GUC packet has some inconsistence ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] a_receiveAnyLsRequest() { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": TIMEOUT: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_LOT_BV_01 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_02 + */ + function f_GEONW_PON_LOT_BV_02() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + var GN_Address v_gnAddressNodeA; + var boolean v_lsRequestReceived := false; + + // Test control + if (not PICS_GN_LS_REQ_SRC or not PICS_GN_LS_REP_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC AND PICS_GN_LS_REP_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + v_gnAddressNodeA := v_longPosVectorNodeA.gnAddr; + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequestAndReply( + ?, v_gnAddressNodeA.mid, + v_longPosVectorNodeA + ) { + v_lsRequestReceived := true; + log("*** " & testcasename() & ": Pre-conditions: Received and answered Location Service Request ***"); + repeat; + } + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { + tc_ac.stop; + if(v_lsRequestReceived == true) { + log("*** " & testcasename() & ": Pre-conditions: First GUC message received correctly ***"); + } + else { + log("*** " & testcasename() & ": Pre-conditions: GUC packet received without LS Request ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Pre-conditions: Initial conditions not satisfied. ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_gnAddressNodeA.mid, v_longPosVectorIut) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Received second GUC packet without LS Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_LOT_BV_02 + + group GEONW_PON_LOT_BV_03 { + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_01 + */ + function f_GEONW_PON_LOT_BV_03_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeB); + + // Test control + if (not PICS_GN_BEACON_DST) { + log("*** " & testcasename() & ": PICS_GN_BEACON_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwBeaconPacket( + v_longPosVectorNode + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); + + } // End of function f_GEONW_PON_LOT_BV_03_01 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_02 + */ + function f_GEONW_PON_LOT_BV_03_02() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeA); + + // Test control + if (not PICS_GN_GUC_DST) { + log("*** " & testcasename() & ": PICS_GN_GUC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwUnicastPacket( + v_longPosVectorNode, + f_getIutShortPosVector(), + vc_localSeqNumber + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); + + } // End of function f_GEONW_PON_LOT_BV_03_02 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_03 + */ + function f_GEONW_PON_LOT_BV_03_03() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeA); + + // Test control + if (not PICS_GN_GAC_DST) { + log("*** " & testcasename() & ": PICS_GN_GAC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwAnycastPacket( + v_longPosVectorNode, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area1) + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); + + } // End of function f_GEONW_PON_LOT_BV_03_03 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_04 + */ + function f_GEONW_PON_LOT_BV_03_04() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeA); + + // Test control + if (not PICS_GN_GBC_DST) { + log("*** " & testcasename() & ": PICS_GN_GBC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwBroadcastPacket( + v_longPosVectorNode, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1) + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); + + } // End of function f_GEONW_PON_LOT_BV_03_04 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_05 + */ + function f_GEONW_PON_LOT_BV_03_05() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeA); + + // Test control + if (not PICS_GN_TSB_DST) { + log("*** " & testcasename() & ": PICS_GN_TSB_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNode + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); + + } // End of function f_GEONW_PON_LOT_BV_03_05 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_06 + */ + function f_GEONW_PON_LOT_BV_03_06() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeB); + + // Test control + if (not PICS_GN_SHB_DST) { + log("*** " & testcasename() & ": PICS_GN_SHB_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwShbPacket( + v_longPosVectorNode, + m_mccMco + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); + + } // End of function f_GEONW_PON_LOT_BV_03_06 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_07 + */ + function f_GEONW_PON_LOT_BV_03_07() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeA); + + // Test control + if (not PICS_GN_LS_REQ_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + activate(a_receiveAnyLsReply()); + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwLsRequestPacket( + v_longPosVectorNode, + vc_localSeqNumber, + f_getIutGnLocalAddress() + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); + + } // End of function f_GEONW_PON_LOT_BV_03_07 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_08 + */ + function f_GEONW_PON_LOT_BV_03_08() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNode := f_TP_GEONW_PON_LOT_BV_03_pre_1(c_compNodeA); + + // Test control + if (not PICS_GN_LS_REP_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REP_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwLsReplyPacket( + v_longPosVectorNode, + f_getIutShortPosVector(), + vc_localSeqNumber + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNode); + + } // End of function f_GEONW_PON_LOT_BV_03_08 + + /** + * @desc Function including first preamble part (TC_GEONW_PON_LOT_BV_03) + */ + function f_TP_GEONW_PON_LOT_BV_03_pre_1(in charstring p_nodeName) runs on ItsGeoNetworking return LongPosVector { + + // Local variables + var LongPosVector v_longPosVectorNode; + + // Test control + + // Test component configuration + f_cf01Up(); + v_longPosVectorNode := f_getPosition(p_nodeName); + + // Test adapter configuration + + // Preamble part I + if(p_nodeName == c_compNodeA) { + f_prNeighbour(); + } + else { + f_prNonNeighbour(); + } + + return v_longPosVectorNode; + } // End of function f_TP_GEONW_PON_LOT_BV_03_pre_1 + + /** + * @desc Function including second preamble part (TC_GEONW_PON_LOT_BV_03) + */ + function f_TP_GEONW_PON_LOT_BV_03_pre_2(in template (value) GnNonSecuredPacket p_packet) runs on ItsGeoNetworking { + var template (value) GeoNetworkingPdu v_gnPacket; + + //preamble part II + v_gnPacket := m_geoNwPdu(p_packet, -, c_hopLimit1); + v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast(v_gnPacket)) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } // End of function f_TP_GEONW_PON_LOT_BV_03_pre_2 + + /** + * @desc Function including test body and postamble part (TC_GEONW_PON_LOT_BV_03) + */ + function f_TP_GEONW_PON_LOT_BV_03_main(in template (value) LongPosVector p_longPosVectorNode) runs on ItsGeoNetworking { + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(valueof(p_longPosVectorNode.gnAddr))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveAnyLsRequest() { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_longPosVectorNode)))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GUC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_TP_GEONW_PON_LOT_BV_03_main + + } //end GEONW_PON_LOT_BV_03 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_04 + */ + function f_GEONW_PON_LOT_BV_04() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prDefault(); // NodeB will send Beacon only once + f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(m_geoNwBeaconPacket(v_longPosVectorNodeB), -, c_hopLimit1)))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(f_getLifetimeLocTableEntry() + PX_T_DELTA); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeB.gnAddr.mid, v_longPosVectorIut ) { + log("*** " & testcasename() & ": PASS: LS Request received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: LS Request not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // End of function f_GEONW_PON_LOT_BV_04 + + group GEONW_PON_LOT_BV_05 { + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_05_01 + */ + function f_GEONW_PON_LOT_BV_05_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_obsoleteLongPosVectorNodeB; + + // Test control + if (not PICS_GN_GUC_DST) { + log("*** " & testcasename() & ": PICS_GN_GUC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + f_TP_GEONW_PON_LOT_BV_05_pre_2( + m_geoNwUnicastPacket( + v_obsoleteLongPosVectorNodeB, + f_getIutShortPosVector(), + vc_localSeqNumber + ) + ); + + f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + } // End of function f_GEONW_PON_LOT_BV_05_01 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_05_02 + */ + function f_GEONW_PON_LOT_BV_05_02() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_obsoleteLongPosVectorNodeB; + + // Test control + if (not PICS_GN_GAC_DST) { + log("*** " & testcasename() & ": PICS_GN_GAC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + f_TP_GEONW_PON_LOT_BV_05_pre_2( + m_geoNwAnycastPacket( + v_obsoleteLongPosVectorNodeB, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area1) + ) + ); + + f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + } // End of function f_GEONW_PON_LOT_BV_05_02 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_05_03 + */ + function f_GEONW_PON_LOT_BV_05_03() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_obsoleteLongPosVectorNodeB; + + // Test control + if (not PICS_GN_GBC_DST) { + log("*** " & testcasename() & ": PICS_GN_GBC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + f_TP_GEONW_PON_LOT_BV_05_pre_2( + m_geoNwBroadcastPacket( + v_obsoleteLongPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1) + ) + ); + + f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + } // End of function f_GEONW_PON_LOT_BV_05_03 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_05_04 + */ + function f_GEONW_PON_LOT_BV_05_04() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_obsoleteLongPosVectorNodeB; + var template (value) GeoNetworkingPdu v_gnPacket; + + // Test control + if (not PICS_GN_TSB_DST) { + log("*** " & testcasename() & ": PICS_GN_TSB_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + f_TP_GEONW_PON_LOT_BV_05_pre_2( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_obsoleteLongPosVectorNodeB + ) + ); + + f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + } // End of function f_GEONW_PON_LOT_BV_05_04 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_05_05 + */ + function f_GEONW_PON_LOT_BV_05_05() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_obsoleteLongPosVectorNodeB; + + // Test control + if (not PICS_GN_SHB_DST) { + log("*** " & testcasename() & ": PICS_GN_SHB_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + f_TP_GEONW_PON_LOT_BV_05_pre_2( + m_geoNwShbPacket( + v_obsoleteLongPosVectorNodeB, + m_mccMco + ) + ); + + f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + } // End of function f_GEONW_PON_LOT_BV_05_05 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_05_06 + */ + function f_GEONW_PON_LOT_BV_05_06() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_obsoleteLongPosVectorNodeB; + + // Test control + if (not PICS_GN_LS_REQ_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + activate(a_receiveAnyLsReply()); + + f_TP_GEONW_PON_LOT_BV_05_pre_2( + m_geoNwLsRequestPacket( + v_obsoleteLongPosVectorNodeB, + vc_localSeqNumber, + f_getIutGnLocalAddress() + ) + ); + + f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + } // End of function f_GEONW_PON_LOT_BV_05_06 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_05_07 + */ + function f_GEONW_PON_LOT_BV_05_07() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_obsoleteLongPosVectorNodeB; + + // Test control + if (not PICS_GN_LS_REQ_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + f_TP_GEONW_PON_LOT_BV_05_pre_2( + m_geoNwLsReplyPacket( + v_obsoleteLongPosVectorNodeB, + f_getIutShortPosVector(), + vc_localSeqNumber + ) + ); + + f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + } // End of function f_GEONW_PON_LOT_BV_05_07 + + /** + * @desc Function including first preamble part (TC_GEONW_PON_LOT_BV_05) + */ + function f_TP_GEONW_PON_LOT_BV_05_pre_1(out LongPosVector p_longPosVectorNodeB, out LongPosVector p_obsoleteLongPosVectorNodeB) runs on ItsGeoNetworking { + + // Local variables + + // Test control + + // Test component configuration + f_cf01Up(); + p_longPosVectorNodeB := f_getPosition(c_compNodeB); + p_obsoleteLongPosVectorNodeB := p_longPosVectorNodeB; + p_obsoleteLongPosVectorNodeB.timestamp_ := p_obsoleteLongPosVectorNodeB.timestamp_ - 1000; + p_obsoleteLongPosVectorNodeB.latitude := p_obsoleteLongPosVectorNodeB.latitude - (PX_POS_DELTA * 3); + + // Test adapter configuration + + // Preamble + f_prDefault(); + + // Act as a neighbor and send one beacon + f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(m_geoNwBeaconPacket(p_longPosVectorNodeB), -, c_hopLimit1)))); + } // End of function f_TP_GEONW_PON_LOT_BV_05_pre_1 + + /** + * @desc Function including second preamble part (TC_GEONW_PON_LOT_BV_05) + */ + function f_TP_GEONW_PON_LOT_BV_05_pre_2(in template (value) GnNonSecuredPacket p_packet) runs on ItsGeoNetworking { + var template (value) GeoNetworkingPdu v_gnPacket; + + //preamble part II + v_gnPacket := m_geoNwPdu(p_packet); + v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(p_packet))) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } // End of function f_TP_GEONW_PON_LOT_BV_05_pre_2 + + /** + * @desc Function including test body and postamble part (TC_GEONW_PON_LOT_BV_05) + */ + function f_TP_GEONW_PON_LOT_BV_05_main(in template (value) LongPosVector p_longPosVectorNodeB, in template (value) LongPosVector p_obsoleteLongPosVectorNodeB) runs on ItsGeoNetworking { + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(valueof(p_longPosVectorNodeB.gnAddr)))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveAnyLsRequest() { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_obsoleteLongPosVectorNodeB)))) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: GN packet received with obsolete Destination Position Vector ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_longPosVectorNodeB)))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GN packet packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // End of function f_TP_GEONW_PON_LOT_BV_05_main + + } // end group GEONW_PON_LOT_BV_05 + + } // end geoLocationTable + + // 6.2.2.2 + group geoLocalPositionVector { + + /** + * @desc TP Function for TC_GEONW_PON_LPV_BV_01 + */ + function f_GEONW_PON_LPV_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + var template LongPosVector v_previouslongPosVectorIut; + var GeoNetworkingInd v_geoNwInd; + + // Test control + if (not PICS_GN_BEACON_SRC) { + log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up();//FIXME ac change position, not used by C2C + v_longPosVectorIut := f_getPosition(c_compIut); + v_previouslongPosVectorIut := v_longPosVectorIut; + v_previouslongPosVectorIut.timestamp_ := ?; + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( + mw_geoNwBeaconPacket( + mw_longPosVectorAny(v_longPosVectorIut.gnAddr) + ) + ))) -> value v_geoNwInd { + tc_ac.stop; + log("*** " & testcasename() & ": Pre-conditions: Beacon received ***"); + v_longPosVectorIut := v_geoNwInd.msgIn.gnPacket.packet.extendedHeader.beaconHeader.srcPosVector; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + f_utChangePosition(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + geoNetworkingPort.clear; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( + mw_geoNwBeaconPacket( + mw_longPosVectorAny(v_longPosVectorIut.gnAddr) + ) + ))) -> value v_geoNwInd { + tc_ac.stop; + //check if the position vector has changed + if (match(v_geoNwInd.msgIn.gnPacket.packet.extendedHeader.beaconHeader.srcPosVector, v_previouslongPosVectorIut)) { + log("*** " & testcasename() & ": FAIL: Sender Postion Vector not correctly updated ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: Sender Postion Vector correctly updated ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + f_acTriggerEvent(m_stopPassBeaconing); + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_LPV_BV_01 + + } // end geoLocalPositionVector + + // 6.2.2.3 + group geoSequenceNumber { + + /** + * @desc TP Function for TC_GEONW_PON_SQN_BV_01 + */ + function f_GEONW_PON_SQN_BV_01() runs on ItsGeoNetworking { + + // Local variables + var UInt16 v_expectedSequenceNumber := 0; + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_GBC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if (not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveGeoBroadcast( + mw_longPosVectorPosition(v_longPosVectorIut), + v_expectedSequenceNumber) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] a_receiveGeoBroadcast( + mw_longPosVectorPosition(v_longPosVectorIut), + ?) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: GBC packet received with incorrect sequence number ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_SQN_BV_01 + + /** + * @desc TP Function for TC_GEONW_PON_SQN_BV_02 + */ + function f_GEONW_PON_SQN_BV_02() runs on ItsGeoNetworking { + + // Local variables + var UInt16 v_expectedSequenceNumber := 0; + var integer v_nbReceivedPackets := 0; + var GeoNetworkingInd v_geoNwInd; + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_GBC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_sleep(10.0); + // receive first packet + if (not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1)))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + ? + )))) -> value v_geoNwInd { + tc_ac.stop; + log("*** " & testcasename() & ": Pre-conditions: First GUC packet received ***"); + v_expectedSequenceNumber := v_geoNwInd.msgIn.gnPacket.packet.extendedHeader.geoBroadcastHeader.seqNumber + 1; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if (not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1)))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveGeoBroadcast( + mw_longPosVectorPosition(v_longPosVectorIut), + v_expectedSequenceNumber) { + tc_ac.stop; + v_nbReceivedPackets := v_nbReceivedPackets + 1; + if(v_nbReceivedPackets >= vc_multipleMessagesCount) { + log("*** " & testcasename() & ": PASS: GBC packets received with correct sequence numbers ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + v_expectedSequenceNumber := v_expectedSequenceNumber + 1; + if (not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1)))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + repeat; + } + } + [] a_receiveGeoBroadcast( + mw_longPosVectorPosition(v_longPosVectorIut), + ?) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: GBC packet received with incorrect sequence number ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_SQN_BV_02 + + } // end geoSequenceNumber + + // 6.2.2.4 + group geoLocationService { + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_01 + */ + function f_GEONW_PON_LOS_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + var GN_Address v_gnAddressNodeA; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_gnAddressNodeA := f_getPosition(c_compNodeA).gnAddr; + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_gnAddressNodeA)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveLsRequest( + ?, + v_gnAddressNodeA.mid, + v_longPosVectorIut + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: LS Request received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] a_receiveAnyLsRequest() { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: LS Request does not contain GN Address of nodeA ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_LOS_BV_01 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_02 + */ + function f_GEONW_PON_LOS_BV_02() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + var GN_Address v_gnAddressNodeA; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_gnAddressNodeA := f_getPosition(c_compNodeA).gnAddr; + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_gnAddressNodeA)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_gnAddressNodeA.mid, v_longPosVectorIut) { + tc_ac.stop; + //start retransmission timer + tc_ac.start(f_getLsRetransmitTimer() - f_getDeltaTimer()); + } + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_gnAddressNodeA)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + alt { + [] a_receiveLsRequest(?, v_gnAddressNodeA.mid, v_longPosVectorIut) { + tc_ac.stop; + log("*** " & testcasename() & ": Second LS_REQUEST received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": No second LS_REQUEST received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_LOS_BV_02 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_03 + */ + function f_GEONW_PON_LOS_BV_03() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorIut; + var GeoNetworkingInd v_geoNetInd; + + // Test control + if (not PICS_GN_LS_REQ_SRC or not PICS_GN_LS_REP_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC AND PICS_GN_LS_REP_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + } + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwLsReplyPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + ) + ) + )); + + tc_ac.start; + alt { + + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ) + ) -> value v_geoNetInd { + tc_ac.stop; + //we only check that the lifetime is less than the default lifetime due to + //we do not know exactly the time passed at IUT + if (f_getLifetimeValue(v_geoNetInd.msgIn.basicHeader.lifeTime) v_maxNbrRetrans) { + //first LS request is not counted as a retransmission + log("*** " & testcasename() & ": LS_REQUEST retransmitted more than itsGnLocationServiceMaxRetrans times ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + tc_ac.start; + repeat; + } + } + [] tc_ac.timeout { + if(v_nbLsReceived == (v_maxNbrRetrans)) { + //first LS request is not counted as a retransmission + log("*** " & testcasename() & ": LS_REQUEST retransmitted itsGnLocationServiceMaxRetrans times ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": LS_REQUEST retransmitted less than itsGnLocationServiceMaxRetrans times ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_LOS_BV_07 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_08 + */ + function f_GEONW_PON_LOS_BV_08() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorIut; + var GN_Address v_iutGnAddress; + var UInt16 v_seqNbr := vc_localSeqNumber; + var FncRetCode v_ret := e_error; + + // Test control + if (not PICS_GN_LS_REQ_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + v_iutGnAddress := f_getPosition(c_compIut).gnAddr; + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_ret := f_processLocationService(v_longPosVectorNodeA, v_seqNbr, v_iutGnAddress, v_longPosVectorIut); + if (v_ret == e_success) { + log("*** " & testcasename() & ": LS_REPLY packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": LS_REPLY packet not received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_LOS_BV_08 + + group GEONW_PON_LOS_BO_09 { + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BO_09 + */ + function f_GEONW_PON_LOS_BO_09() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_LS_REQ_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_LOS_BO_09_nodeB()); + v_nodeD.start(f_GEONW_PON_LOS_BO_09_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_LOS_BO_09 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_LOS_BO_09) + */ + function f_GEONW_PON_LOS_BO_09_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var FncRetCode v_ret := e_error; + + // Preamble + f_prNeighbour(); + v_ret := f_processLocationService( + v_longPosVectorNodeB, + vc_localSeqNumber, + v_longPosVectorIut.gnAddr, + v_longPosVectorIut); + if (v_ret == e_error) { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + else { + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwLsReplyPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)) + ) + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: LS_REQUEST has not been discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: LS_REQUEST discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_LOS_BO_09_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_LOS_BO_09) + */ + function f_GEONW_PON_LOS_BO_09_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GN_Address v_iutGnAddress := f_getPosition(c_compIut).gnAddr; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwLsRequestPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + v_iutGnAddress + ) + ) + ) + )); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwLsReplyPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)) + ) + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: LS_REQUEST has not been discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: LS_REQUEST discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_LOS_BO_09_nodeD + + } // end GEONW_PON_LOS_BO_09 + + group GEONW_PON_LOS_BV_10 { + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_10 + */ + function f_GEONW_PON_LOS_BV_10() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_LS_FWD) { + log("*** " & testcasename() & ": PICS_GN_LS_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_LOS_BV_10_nodeB()); + v_nodeC.start(f_GEONW_PON_LOS_BV_10_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_LOS_BV_10 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_LOS_BV_10) + */ + function f_GEONW_PON_LOS_BV_10_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwLsRequestPacket( + ?, + v_longPosVectorNodeB.gnAddr.mid + ), + -, + c_defaultHopLimit - 1 + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Re-broadcasted LS Request received with HL field decreased by 1 ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: LS Request was not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_LOS_BV_10_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_LOS_BV_10) + */ + function f_GEONW_PON_LOS_BV_10_nodeC() runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwLsRequestPacket( + f_getPosition(c_compNodeA), + vc_localSeqNumber, + f_getPosition(c_compNodeB).gnAddr + ), + -, + c_defaultHopLimit + ) + ) + )); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_LOS_BV_10_nodeC + + } // end GEONW_PON_LOS_BV_10 + + group GEONW_PON_LOS_BV_11 { + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_11 + */ + function f_GEONW_PON_LOS_BV_11() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_LS_FWD) { + log("*** " & testcasename() & ": PICS_GN_LS_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_LOS_BV_11_nodeB()); + v_nodeC.start(f_GEONW_PON_LOS_BV_11_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_LOS_BV_11 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_LOS_BV_11) + */ + function f_GEONW_PON_LOS_BV_11_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwLsReplyPacket( + mw_longPosVectorPosition(v_longPosVectorNodeA), + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)) + ), + -, + c_defaultHopLimit - 1 + ) + ) + ) { + log("*** " & testcasename() & ": PASS: Forwarded LS Reply received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: LS Reply was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_LOS_BV_11_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_LOS_BV_11) + */ + function f_GEONW_PON_LOS_BV_11_nodeC() runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwLsReplyPacket( + f_getPosition(c_compNodeA), + f_longPosVector2ShortPosVector(f_getPosition(c_compNodeB)), + vc_localSeqNumber + ), + -, + c_defaultHopLimit + ) + ) + )); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_LOS_BV_11_nodeC + + } // end GEONW_PON_LOS_BV_11 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_12 + */ + function f_GEONW_PON_LOS_BV_12() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorIut; + var UInt16 v_seqNbr := vc_localSeqNumber; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + ) + ) + )); + + tc_ac.start; + alt { + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GUC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_LOS_BV_12 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_13 + */ + function f_GEONW_PON_LOS_BV_13() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorIut; + var integer v_lt1 := f_getLsMaxRetrans()*float2int(f_getLsRetransmitTimer()); + var integer v_lt2 := float2int(int2float(v_lt1)/2.0); + var octetstring v_payload1 := char2oct("PAYLOAD_1"); + var octetstring v_payload2 := char2oct("PAYLOAD_2"); + var boolean v_msg1Received := false; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + + if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithLifetimeWithPayload(v_longPosVectorNodeA.gnAddr, v_lt2*1000, v_payload2)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithLifetimeWithPayload(v_longPosVectorNodeA.gnAddr, v_lt1*1000, v_payload1)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + //Send LS-REPLY after LT2 expiry + f_sleepIgnoreDef(int2float(v_lt2)); + + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwLsReplyPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + ) + ) + )); + + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + log("*** " & testcasename() & ": INFO: LS Request retransmission ignored ***"); + repeat; + } + [] geoNetworkingPort.receive( + f_receiveGeoNetMessageWithPayload( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ), + v_payload1 + ) + ) { + v_msg1Received := true; + repeat; + } + [] geoNetworkingPort.receive( + f_receiveGeoNetMessageWithPayload( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ), + v_payload2 + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: message with elapsed lifetime received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + if(v_msg1Received == true) { + log("*** " & testcasename() & ": PASS: message with running lifetime received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: message with running lifetime not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_LOS_BV_13 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_13 + */ + function f_GEONW_PON_LOS_BV_14() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorIut; + var integer v_maxNbrRetrans := f_getLsMaxRetrans(); + var integer v_nbLsReceived := 0; + var UInt16 v_LT1; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + v_LT1 := float2int(int2float(v_maxNbrRetrans + 2) * f_getLsRetransmitTimer() * 1000.0); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithLifetime(v_longPosVectorNodeA.gnAddr,v_LT1)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + + tc_wait.start(int2float(v_LT1)); + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + v_nbLsReceived := v_nbLsReceived + 1; + if(v_nbLsReceived > v_maxNbrRetrans) { + //first LS request is not counted as a retransmission + log("*** " & testcasename() & ": Pre-conditions: LS_REQUEST retransmitted more than itsGnLocationServiceMaxRetrans times ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + else { + tc_ac.start; + repeat; + } + } + [] tc_ac.timeout { + if(v_nbLsReceived == (v_maxNbrRetrans)) { + //first LS request is not counted as a retransmission + log("*** " & testcasename() & ": Pre-conditions: LS_REQUEST retransmitted itsGnLocationServiceMaxRetrans times ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + else { + log("*** " & testcasename() & ": Pre-conditions: LS_REQUEST retransmitted less than itsGnLocationServiceMaxRetrans times ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + } + } + + // Test Body + if (tc_wait.running) { + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + ) + ) + )); + tc_wait.stop; + + tc_noac.start; + alt { + // no check for ItsNodeA address as no other trigger for messages exists + [] geoNetworkingPort.receive { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: Unexpected message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: No message was sent ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + } + else { + log("*** " & testcasename() & ": FAIL: LT1 expired ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_LOS_BV_14 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_15 + */ + function f_GEONW_PON_LOS_BV_15() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorNodeB), + vc_localSeqNumber + ) + ) + ) + )); + + tc_ac.start; + alt { + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GUC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_LOS_BV_15 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_16 + */ + function f_GEONW_PON_LOS_BV_16() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + ) + ) + )); + + tc_noac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: LS Request retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { + log("*** " & testcasename() & ": INFO: GUC packet received ***"); + repeat; + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: LS Request not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_LOS_BV_16 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_17 + */ + function f_GEONW_PON_LOS_BV_17() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorNodeB), + vc_localSeqNumber + ) + ) + ) + )); + + tc_noac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: LS Request retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { + log("*** " & testcasename() & ": INFO: GUC packet received ***"); + repeat; + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: LS Request not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_LOS_BV_17 + + } // end geoLocationService + + // 6.2.2.5 + group geoForwardingPacketBuffer { + + group GEONW_PON_FPB_BV_01 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_01 + */ + function f_GEONW_PON_FPB_BV_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_01_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_01_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_FPB_BV_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_01) + */ + function f_GEONW_PON_FPB_BV_01_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prDefault(); // NodeB is not yet a neighbour + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleepIgnoreDef(1.0); + f_startBeingNeighbour(); + + tc_ac.start; + alt { + [] a_receiveAnyLsRequest() { + tc_ac.stop; + log("*** " & testcasename() & ": INCONC: Received Location Service Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ?)))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: packet correctly forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_FPB_BV_01_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_01) + */ + function f_GEONW_PON_FPB_BV_01_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + + // Make sure IUT has LocE for NodeA by sending unsolicited LS_REPLY + f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu( + m_geoNwLsReplyPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + )))); + + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + // /!\ This pre-condition has impact on test body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GUC packet received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: No message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_FPB_BV_01_nodeC + + } // end GEONW_PON_FPB_BV_01 + + group GEONW_PON_FPB_BV_02 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_02 + */ + function f_GEONW_PON_FPB_BV_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var UInt16 c_sequenceNumberC := f_getInitialSequenceNumber(); + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_02_nodeB(c_sequenceNumberC)); + v_nodeC.start(f_GEONW_PON_FPB_BV_02_nodeC(c_sequenceNumberC)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_FPB_BV_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_02) + */ + function f_GEONW_PON_FPB_BV_02_nodeB(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prDefault(); // NodeB is not yet a neighbour + vc_localSeqNumber := p_sequenceNumberC; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(1.0); + f_startBeingNeighbour(); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + vc_localSeqNumber + ), + -, + c_defaultHopLimit - 1 + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Packet correctly forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_FPB_BV_02_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_02) + */ + function f_GEONW_PON_FPB_BV_02_nodeC(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + vc_localSeqNumber := p_sequenceNumberC; + + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeC, + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + vc_localSeqNumber + ), + -, + c_defaultHopLimit + ) + ) + )); + + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_FPB_BV_02_nodeC + + } // end GEONW_PON_FPB_BV_02 + + group GEONW_PON_FPB_BV_03 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_03 + */ + function f_GEONW_PON_FPB_BV_03() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var UInt16 c_sequenceNumberC := f_getInitialSequenceNumber(); + const integer c_messageCount := 2; + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_03_nodeB(c_sequenceNumberC, c_messageCount)); + v_nodeC.start(f_GEONW_PON_FPB_BV_03_nodeC(c_sequenceNumberC, c_messageCount)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_FPB_BV_03 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_03) + */ + function f_GEONW_PON_FPB_BV_03_nodeB(in UInt16 p_sequenceNumberC, in integer p_messageCount) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var UInt16 v_expectedSequenceNumber := p_sequenceNumberC; + var integer v_nbReceivedPackets := 0; + + // Preamble + f_prDefault(); // NodeB is not yet a neighbour + vc_multipleMessagesCount := p_messageCount; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(1.0); + f_startBeingNeighbour(); + + tc_ac.start; + alt { + [] a_receiveGeoUnicast( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + v_expectedSequenceNumber) { + tc_ac.stop; + v_nbReceivedPackets := v_nbReceivedPackets + 1; + if(v_nbReceivedPackets >= vc_multipleMessagesCount) { + log("*** " & testcasename() & ": PASS: GUC packets received in correct order ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + v_expectedSequenceNumber := v_expectedSequenceNumber + 1; + tc_ac.start; + repeat; + } + } + [] a_receiveGeoUnicast( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ?) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: GUC packet received in incorrect order ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_FPB_BV_03_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_03) + */ + function f_GEONW_PON_FPB_BV_03_nodeC(in UInt16 p_sequenceNumberC, in integer p_messageCount) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var integer i := 0; + + // Preamble + f_prNeighbour(); + vc_localSeqNumber := p_sequenceNumberC; + vc_multipleMessagesCount := p_messageCount; + + for(i:=0; i < vc_multipleMessagesCount; i:=i+1) { + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeC, + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + vc_localSeqNumber + ) + ) + ) + )); + } + + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_FPB_BV_03_nodeC + + } // end GEONW_PON_FPB_BV_03 + + group GEONW_PON_FPB_BV_04 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_04 + */ + function f_GEONW_PON_FPB_BV_04() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + const UInt6 c_packetLifetime := 10; // 10s + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_04_nodeB(c_packetLifetime)); + v_nodeC.start(f_GEONW_PON_FPB_BV_04_nodeC(c_packetLifetime)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_FPB_BV_04 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_04) + */ + function f_GEONW_PON_FPB_BV_04_nodeB(in UInt6 p_packetLifetime) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prDefault(); // NodeB is not yet a neighbour + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(int2float(p_packetLifetime + 1)); + f_startBeingNeighbour(); + + tc_noac.start; + alt { + [] a_receiveGeoUnicast( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ?) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GUC packet received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: No message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_FPB_BV_04_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_04) + */ + function f_GEONW_PON_FPB_BV_04_nodeC(in UInt6 p_packetLifetime) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeC, + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + vc_localSeqNumber + ), + m_lifetimeBase1s(p_packetLifetime), + c_defaultHopLimit + ) + ) + )); + + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_FPB_BV_04_nodeC + + } // end GEONW_PON_FPB_BV_04 + + group GEONW_PON_FPB_BV_06 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_06 + */ + function f_GEONW_PON_FPB_BV_06() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_FPB_BV_06_nodeB()); + v_nodeD.start(f_GEONW_PON_FPB_BV_06_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_FPB_BV_06 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_06) + */ + function f_GEONW_PON_FPB_BV_06_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GeoNetworkingInd v_geoNetInd; + + // Preamble + f_prDefault(); + if (not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(1.0); + f_startBeingNeighbour(); + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + ?)))) -> value v_geoNetInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_FPB_BV_06_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_06) + */ + function f_GEONW_PON_FPB_BV_06_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GeoNetworkingInd v_geoNetInd; + + // Preamble + f_prDefault(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + ?)))) -> value v_geoNetInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_06_nodeD + + } // end GEONW_PON_FPB_BV_06 + + group GEONW_PON_FPB_BV_07 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_07 + */ + function f_GEONW_PON_FPB_BV_07() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + const integer v_messageCount := 2; + + // Test control + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_FPB_BV_07_nodeB(v_messageCount)); + v_nodeD.start(f_GEONW_PON_FPB_BV_07_nodeD(v_messageCount)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_FPB_BV_07 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_07) + */ + function f_GEONW_PON_FPB_BV_07_nodeB(in integer p_messageCount) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GeoNetworkingInd v_geoNetInd; + var template (present) UInt16 v_expectedSequenceNumber := ?; + var integer v_nbReceivedPackets := 0; + var integer i := 0; + + // Preamble + f_prDefault(); + vc_multipleMessagesCount := p_messageCount; + for(i:=0; i < vc_multipleMessagesCount; i:=i+1) { + if(not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + tc_ac.start(1.0); + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + ?)))) { + tc_ac.stop; + log("*** " & testcasename() & ": INCONC: GBC packet not buffered ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": PASS: GBC packet buffered ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + } + + // Test Body + f_startBeingNeighbour(); + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + v_expectedSequenceNumber)))) -> value v_geoNetInd { + tc_ac.stop; + v_nbReceivedPackets := v_nbReceivedPackets + 1; + if(v_nbReceivedPackets >= vc_multipleMessagesCount) { + log("*** " & testcasename() & ": PASS: GBC packets received in correct order ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + v_expectedSequenceNumber := v_geoNetInd.msgIn.gnPacket.packet.extendedHeader.geoBroadcastHeader.seqNumber + 1; + tc_ac.start; + repeat; + } + } + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + ?)))) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: GBC packet received in incorrect order ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_FPB_BV_07_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_07) + */ + function f_GEONW_PON_FPB_BV_07_nodeD(in integer p_messageCount) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GeoNetworkingInd v_geoNetInd; + var template (present) UInt16 v_expectedSequenceNumber := ?; + var integer v_nbReceivedPackets := 0; + + // Preamble + f_prDefault(); + vc_multipleMessagesCount := p_messageCount; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + v_expectedSequenceNumber)))) -> value v_geoNetInd { + tc_ac.stop; + v_nbReceivedPackets := v_nbReceivedPackets + 1; + if(v_nbReceivedPackets >= vc_multipleMessagesCount) { + log("*** " & testcasename() & ": PASS: GBC packets received in correct order ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + v_expectedSequenceNumber := v_geoNetInd.msgIn.gnPacket.packet.extendedHeader.geoBroadcastHeader.seqNumber + 1; + tc_ac.start; + repeat; + } + } + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + ?)))) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: GBC packet received in incorrect order ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_07_nodeD + + } // end GEONW_PON_FPB_BV_07 + + group GEONW_PON_FPB_BV_08 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_08 + */ + function f_GEONW_PON_FPB_BV_08() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_FPB_BV_08_nodeB()); + v_nodeD.start(f_GEONW_PON_FPB_BV_08_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_FPB_BV_08 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_08) + */ + function f_GEONW_PON_FPB_BV_08_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prDefault(); + if(not f_utTriggerEvent(m_generateGeoBroadcastMessageWithLifetime(f_getArea(c_area1), c_lifetime )) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + if(not f_utTriggerEvent(m_generateGeoBroadcastMessageWithLifetime(f_getArea(c_area1), c_lifetime)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(int2float(c_defaultLifetime + 1)); + f_startBeingNeighbour(); + + tc_noac.start; + alt { + + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + ?)))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC packet received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: No message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_FPB_BV_08_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_08) + */ + function f_GEONW_PON_FPB_BV_08_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prDefault(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(int2float(c_defaultLifetime + 1)); + f_startBeingNeighbour(); + + tc_noac.start; + alt { + + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + ?)))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC packet received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: No message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_FPB_BV_08_nodeD + + } // end GEONW_PON_FPB_BV_08 + + group GEONW_PON_FPB_BV_09 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_09 + */ + function f_GEONW_PON_FPB_BV_09() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_09_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_09_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_FPB_BV_09 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_09) + */ + function f_GEONW_PON_FPB_BV_09_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var GeoNetworkingInd v_geoNetInd; + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(1.0); + f_startBeingNeighbour(); + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ?)))) -> value v_geoNetInd { + tc_ac.stop; + + //we only check that the lifetime is less than the default lifetime due to + //we do not know exactly the time passed at IUT + if (f_getLifetimeValue(v_geoNetInd.msgIn.basicHeader.lifeTime) < f_getMaxPacketLifeTime()) { + log("*** " & testcasename() & ": PASS: Lifetime was handled properly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: Lifetime was not handled properly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_FPB_BV_09_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_09) + */ + function f_GEONW_PON_FPB_BV_09_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + + // Make sure IUT has LocE for NodeA by sending unsolicited LS_REPLY + f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu( + m_geoNwLsReplyPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + )))); + + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_FPB_BV_09_nodeC + + } // end GEONW_PON_FPB_BV_09 + + group GEONW_PON_FPB_BV_10 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_10 + */ + function f_GEONW_PON_FPB_BV_10() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_FPB_BV_10_nodeB()); + v_nodeD.start(f_GEONW_PON_FPB_BV_10_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_FPB_BV_10 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_10) + */ + function f_GEONW_PON_FPB_BV_10_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GeoNetworkingInd v_geoNetInd; + + // Preamble + f_prDefault(); + if(not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(1.0); + f_startBeingNeighbour(); + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + ?)))) -> value v_geoNetInd { + tc_ac.stop; + + //we only check that the lifetime is less than the default lifetime due to + //we do not know exactly the time passed at IUT + if (f_getLifetimeValue(v_geoNetInd.msgIn.basicHeader.lifeTime) < f_getMaxPacketLifeTime()) { + log("*** " & testcasename() & ": PASS: Lifetime was handled properly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: Lifetime was not handled properly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_FPB_BV_10_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_10) + */ + function f_GEONW_PON_FPB_BV_10_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prDefault(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + ?)))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_10_nodeD + + } // end GEONW_PON_FPB_BV_10 + + group GEONW_PON_FPB_BV_11 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_11_01 + */ + function f_GEONW_PON_FPB_BV_11_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_11_01_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_11_01_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_FPB_BV_11_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_01) + */ + function f_GEONW_PON_FPB_BV_11_01_nodeB() runs on ItsGeoNetworking { + + // Local variablesa + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_11_01_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_01) + */ + function f_GEONW_PON_FPB_BV_11_01_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + // Make sure IUT has LocE for NodeA by sending unsolicited LS_REPLY + f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu( + m_geoNwLsReplyPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + )))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if(not f_utTriggerEvent(m_generateGeoUnicastMessageWithTrafficClass( + v_longPosVectorNodeA.gnAddr, + valueof(m_trafficClass(e_scfDisabled))))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_11_01_nodeC + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_11_02 + */ + function f_GEONW_PON_FPB_BV_11_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GAC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_11_02_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_11_02_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_FPB_BV_11_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_02) + */ + function f_GEONW_PON_FPB_BV_11_02_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwAnycastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_11_02_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_02) + */ + function f_GEONW_PON_FPB_BV_11_02_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if(not f_utTriggerEvent(m_generateGeoAnycastMessageWithTrafficClass( + f_getArea(c_area2), + valueof(m_trafficClass(e_scfDisabled))))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwAnycastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_11_02_nodeC + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_11_03 + */ + function f_GEONW_PON_FPB_BV_11_03() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GBC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_11_03_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_11_03_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_FPB_BV_11_03 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_03) + */ + function f_GEONW_PON_FPB_BV_11_03_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_11_03_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_03) + */ + function f_GEONW_PON_FPB_BV_11_03_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if(not f_utTriggerEvent(m_generateGeoBroadcastMessageWithTrafficClass( + f_getArea(c_area2), + valueof(m_trafficClass(e_scfDisabled))))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorIut), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_11_03_nodeC + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_11_04 + */ + function f_GEONW_PON_FPB_BV_11_04() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_TSB_SRC) { + log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_11_04_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_11_04_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_FPB_BV_11_04 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_04) + */ + function f_GEONW_PON_FPB_BV_11_04_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorIut) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_11_04_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_04) + */ + function f_GEONW_PON_FPB_BV_11_04_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if(not f_utTriggerEvent(valueof(m_generateTsbMessageWithTrafficClass(valueof(m_trafficClass(e_scfDisabled)))))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorIut) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_11_04_nodeC + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_11_05 + */ + function f_GEONW_PON_FPB_BV_11_05() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_TSB_SRC) { + log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_11_05_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_11_05_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_FPB_BV_11_05 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_05) + */ + function f_GEONW_PON_FPB_BV_11_05_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwShbPacket( + mw_longPosVectorPosition(v_longPosVectorIut) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_11_05_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_05) + */ + function f_GEONW_PON_FPB_BV_11_05_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if(not f_utTriggerEvent(valueof(m_generateShbMessageWithTrafficClass(valueof(m_trafficClass(e_scfDisabled)))))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwShbPacket( + mw_longPosVectorPosition(v_longPosVectorIut) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_11_05_nodeC + + } // end GEONW_PON_FPB_BV_11 + + group GEONW_PON_FPB_BV_12 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_12_01 + */ + function f_GEONW_PON_FPB_BV_12_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_12_01_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_12_01_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_FPB_BV_12_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_01) + */ + function f_GEONW_PON_FPB_BV_12_01_nodeB() runs on ItsGeoNetworking { + + // Local variablesa + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_12_01_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_01) + */ + function f_GEONW_PON_FPB_BV_12_01_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + valueof(m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(f_getPosition(c_compNodeA)), + vc_localSeqNumber, + -, + m_trafficClass(e_scfDisabled) + ), + -, + c_defaultHopLimit + ), + -, + f_getIutMacAddress() + ) + )); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_12_01_nodeC + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_12_02 + */ + function f_GEONW_PON_FPB_BV_12_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GAC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_12_02_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_12_02_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_FPB_BV_12_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_02) + */ + function f_GEONW_PON_FPB_BV_12_02_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwAnycastPacket( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_11_02_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_02) + */ + function f_GEONW_PON_FPB_BV_12_02_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area2), + -, + m_trafficClass(e_scfDisabled) + ) + ) + ) + )); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwAnycastPacket( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_12_02_nodeC + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_12_02 + */ + function f_GEONW_PON_FPB_BV_12_03() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GBC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_12_03_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_12_03_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_FPB_BV_12_03 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_03) + */ + function f_GEONW_PON_FPB_BV_12_03_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_12_03_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_03) + */ + function f_GEONW_PON_FPB_BV_12_03_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area2), + -, + m_trafficClass(e_scfDisabled) + ) + ) + ) + )); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_11_03_nodeC + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_12_04 + */ + function f_GEONW_PON_FPB_BV_12_04() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_TSB_SRC) { + log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_12_04_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_12_04_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_FPB_BV_11_04 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_04) + */ + function f_GEONW_PON_FPB_BV_12_04_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeC) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_12_04_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_04) + */ + function f_GEONW_PON_FPB_BV_12_04_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var template (value) GeoNetworkingPdu v_gnPacket; + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeC, + c_defaultHopLimit, + m_trafficClass(e_scfDisabled) + ), + -, + c_defaultHopLimit + ); + v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); + f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_gnPacket))); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeC) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_FPB_BV_12_04_nodeC + + } // end GEONW_PON_FPB_BV_12 + + } // end geoForwardingPacketBuffer + + // 6.2.2.6 + group geoGeoNetworkingAddress { + + /** + * @desc TP Function for TC_GEONW_PON_GNA_BV_01 + */ + function f_GEONW_PON_GNA_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_ADDR_AUTO) { + log("*** " & testcasename() & ": PICS_GN_ADDR_AUTO required for executing the TC ***"); + setverdict(inconc); + stop; + } + + if(f_getIutGnLocalAddressConfigurationMethod() != e_auto) { + log("*** " & testcasename() & ": PICS_GN_LOCAL_ADDR_CONF_METHOD == e_auto required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prDefault(); + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( + mw_geoNwBeaconPacket( + mw_longPosVectorAny(f_getIutGnLocalAddress()) // IUT's SOPV + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": GN address is correct ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( + mw_geoNwBeaconPacket( + ? // any SOPV + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": GN address is not correct ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // End of function f_GEONW_PON_GNA_BV_01 + + /** + * @desc TP Function for TC_GEONW_PON_GNA_BV_02 + */ + function f_GEONW_PON_GNA_BV_02() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + var LongPosVector v_longPosVectorNodeB; + var template (value) GeoNetworkingPdu v_gnPacket; + var GeoNetworkingInd v_geoNetInd; + var GN_Address v_iutGnAddress := valueof(m_dummyGnAddr); + + // Test control + if (not PICS_GN_DAD) { + log("*** " & testcasename() & ": PICS_GN_DAD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prDefault(); + f_prNeighbour(); + if ( not f_utTriggerEvent(m_generateShbMessage) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( + mw_geoNwShbPacket( + ? // SO PV + )))) -> value v_geoNetInd { + v_iutGnAddress := valueof(v_geoNetInd.msgIn.gnPacket.packet.extendedHeader.shbHeader.srcPosVector.gnAddr); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_longPosVectorNodeB.gnAddr := v_iutGnAddress; + v_gnPacket := m_geoNwPdu(m_geoNwShbPacket(v_longPosVectorNodeB, m_mccMco), -, c_hopLimit1); + v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); + f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_gnPacket))); + + f_sleep(0.5); + + if ( not f_utTriggerEvent(m_generateShbMessage) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( + mw_geoNwShbPacket( + mw_longPosVectorAny(v_iutGnAddress) // SO PV + )))) { + log("*** " & testcasename() & ": IUT is still using old GN address. Waiting... ***"); + repeat; + } + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( + mw_geoNwShbPacket( + ? // SO PV + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": IUT used new GN address ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // End of function f_GEONW_PON_GNA_BV_02 + + } // end geoGeoNetworkingAddress + + // 6.2.2.7 + group geoBeaconing { + + /** + * @desc TP Function for TC_GEONW_PON_BEA_TI_01 + */ + function f_GEONW_PON_BEA_TI_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + var boolean v_beaconReceived := false; + timer t_minRetransTimer := f_getBsRetransmitTimer(); + timer t_maxRetransTimer := f_getBsRetransmitTimer() + f_getBsMaxJitter(); + + // Test control + if (not PICS_GN_BEACON_SRC) { + log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prDefault(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + + t_maxRetransTimer.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(?)))) { + if (v_beaconReceived == false) { + v_beaconReceived := true; + t_minRetransTimer.start; + t_maxRetransTimer.start; + //after the first beacon received, check the retransmission + repeat; + } + if(t_minRetransTimer.running) { + log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too early) ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": Beacon transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_minRetransTimer.timeout { + log("*** " & testcasename() & ": Ready for retransmission ***"); + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too late) ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + f_acTriggerEvent(m_stopPassBeaconing); + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // End of function f_GEONW_PON_BEA_TI_01 + + /** + * @desc TP Function for TC_GEONW_PON_BEA_TI_02 + */ + function f_GEONW_PON_BEA_TI_02() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + var boolean v_geoUnicastReceived := false; + var boolean v_readyForRetransmission := false; + timer t_minRetransTimer := f_getBsRetransmitTimer() - f_getDeltaTimer(); + timer t_maxRetransTimer := f_getBsRetransmitTimer() + f_getBsMaxJitter() + f_getDeltaTimer(); + + // Test control + if (not PICS_GN_BEACON_SRC) { + log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateShbMessage) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwShbPacket))) { + tc_ac.stop; + t_minRetransTimer.start; + t_maxRetransTimer.start; + v_geoUnicastReceived := true; + repeat; + } + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket))) { + if(not(v_geoUnicastReceived)) { + repeat; + } + if(not(v_readyForRetransmission)) { + log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too early) ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": Beacon transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_minRetransTimer.timeout { + log("*** " & testcasename() & ": Ready for retransmission ***"); + v_readyForRetransmission := true; + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too late) ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": GUC not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + f_acTriggerEvent(m_stopPassBeaconing); + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_BEA_TI_02 + + } // end geoBeaconing + + // 6.2.2.8 + group geoGeoUnicast { + + group gucAllForwardingAlgorithm { + + + group GEONW_PON_GUC_ALL_BV_03 { + + /** + * @desc TP Function for TC_GEONW_PON_GUC_ALL_BV_03 + */ + function f_GEONW_PON_GUC_ALL_BV_03() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GUC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_GUC_ALL_BV_03_nodeB()); + v_nodeC.start(f_GEONW_PON_GUC_ALL_BV_03_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_GUC_BV_03 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_ALL_BV_03) + */ + function f_GEONW_PON_GUC_ALL_BV_03_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(f_getPosition(c_compIut)), + vc_localSeqNumber + ) + ), + -, + f_getIutMacAddress() + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacketWithHl( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ?, + c_defaultHopLimit + ), + -, + c_defaultHopLimit - 1 + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + ?, + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Fields not correctly updated ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_ALL_BV_03_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_ALL_BV_03) + */ + function f_GEONW_PON_GUC_ALL_BV_03_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_obsoleteLongPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + v_obsoleteLongPosVectorNodeA.timestamp_ := v_obsoleteLongPosVectorNodeA.timestamp_ - 1000; + v_obsoleteLongPosVectorNodeA.latitude := v_obsoleteLongPosVectorNodeA.latitude - 1; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(v_obsoleteLongPosVectorNodeA), + vc_localSeqNumber, + c_defaultHopLimit + ), + -, + c_defaultHopLimit + ), + -, + f_getIutMacAddress() + ) + ); + + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_ALL_BV_03_nodeC + + } // end GEONW_PON_GUC_ALL_BV_03 + + group GEONW_PON_GUC_ALL_BO_04 { + + /** + * @desc TP Function for TC_GEONW_PON_GUC_ALL_BO_04 + */ + function f_GEONW_PON_GUC_ALL_BO_04() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GUC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_GUC_ALL_BO_04_nodeB()); + v_nodeC.start(f_GEONW_PON_GUC_ALL_BO_04_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_GUC_BO_04 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_ALL_BO_04) + */ + function f_GEONW_PON_GUC_ALL_BO_04_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ), + -, + ? + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: Retransmitted GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GUC was not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_ALL_BO_04_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_ALL_BO_04) + */ + function f_GEONW_PON_GUC_ALL_BO_04_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + vc_localSeqNumber + ), + -, + 1 + ), + -, + f_getIutMacAddress() + ) + ); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ), + -, + ? + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: Retransmitted GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GUC was not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_ALL_BO_04_nodeC + + } // end GEONW_PON_GUC_ALL_BO_04 + + /** + * @desc TP Function for TC_GEONW_PON_GUC_ALL_BV_05 + */ + function f_GEONW_PON_GUC_ALL_BV_05() runs on ItsGeoNetworking { + + // Local variables + var template (value) GeoNetworkingPdu v_gnPacket; + var integer i; + + // Test control + if (not PICS_GN_GUC_DST) { + log("*** " & testcasename() & ": PICS_GN_GUC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prDefault(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeB), + f_getIutShortPosVector(), + vc_localSeqNumber + ) + ); + f_sendGeoNetMessage(m_geoNwReq_withLinkLayerDestination(v_gnPacket, -, f_getIutMacAddress())); + + f_sleep(PX_TAC); + + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // End of function f_GEONW_PON_GUC_ALL_BV_05 + + /** + * @desc TP Function for TC_GEONW_PON_GUC_ALL_BV_06 + */ + function f_GEONW_PON_GUC_ALL_BV_06() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var template (value) GeoNetworkingPdu v_gnPacket; + var integer i; + + // Test control + if (not PICS_GN_GUC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prDefault(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeB), + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + vc_localSeqNumber + ) + ); + f_sendGeoNetMessage(m_geoNwReq_withLinkLayerDestination(v_gnPacket, -, f_getIutMacAddress())); + + f_sleep(PX_TAC); + + if(0 != lengthof(vc_utInds)) { + log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // End of function f_GEONW_PON_GUC_ALL_BV_06 + + group GEONW_PON_GUC_ALL_BO_08 { + + /** + * @desc TP Function for TC_GEONW_PON_GUC_ALL_BO_08 + */ + function f_GEONW_PON_GUC_ALL_BO_08() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GUC_DST) { + log("*** " & testcasename() & ": PICS_GN_GUC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeB); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_GUC_ALL_BO_08_nodeB()); + v_nodeC.start(f_GEONW_PON_GUC_ALL_BO_08_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_GUC_ALL_BO_08 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_ALL_BO_08) + */ + function f_GEONW_PON_GUC_ALL_BO_08_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var integer i; + var template (present) GeoNetworkingPdu v_gnPacket := m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ), + -, + c_defaultHopLimit - 1 + ); + + // Preamble + f_prNeighbour(); + f_sleep(PX_TAC); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); + //flush received upper indications + vc_utInds := {}; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + else { + log("*** " & testcasename() & ": INCONC: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + + // Test Body + f_sendGeoNetMessage(m_geoNwReq_withLinkLayerDestination(valueof(v_gnPacket), -, f_getIutMacAddress())); + + f_sleep(PX_TAC); + + if(0 != lengthof(vc_utInds)) { + log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_ALL_BO_08_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_ALL_BO_08) + */ + function f_GEONW_PON_GUC_ALL_BO_08_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ), + -, + c_defaultHopLimit + ), + -, + f_getIutMacAddress() + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_ALL_BO_08_nodeC + + } // end GEONW_PON_GUC_ALL_BO_08 + + } // end gucAllForwardingAlgorithm + + group gucGreedyForwarding { + + /** + * @desc TP Function for TC_GEONW_PON_GUC_GRD_BV_01 + */ + function f_GEONW_PON_GUC_GRD_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == (e_greedy or e_unspecified) required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": DEPV of the received GUC message correctly set ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + ?, + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": DEPV of the received GUC message incorrectly set ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_GUC_GRD_BV_01 + + group GEONW_PON_GUC_GRD_BV_02 { + + /** + * @desc TP Function for TC_GEONW_PON_GUC_GRD_BV_02 + */ + function f_GEONW_PON_GUC_GRD_BV_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GUC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == (e_greedy or e_unspecified) required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GUC_GRD_BV_02_nodeB()); + v_nodeC.start(f_GEONW_PON_GUC_GRD_BV_02_nodeC()); + v_nodeD.start(f_GEONW_PON_GUC_GRD_BV_02_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GUC_GRD_BV_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_GRD_BV_02) + */ + function f_GEONW_PON_GUC_GRD_BV_02_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_GRD_BV_02_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_GRD_BV_02) + */ + function f_GEONW_PON_GUC_GRD_BV_02_nodeC() runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(f_getPosition(c_compNodeA)), + vc_localSeqNumber + ), + -, + c_defaultHopLimit + ), + -, + f_getIutMacAddress() + ) + ); + + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_GRD_BV_02_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GUC_GRD_BV_02) + */ + function f_GEONW_PON_GUC_GRD_BV_02_nodeD() runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_GRD_BV_02_nodeD + + } // end GEONW_PON_GUC_GRD_BV_02 + + group GEONW_PON_GUC_GRD_BO_07 { + + /** + * @desc TP Function for TC_GEONW_PON_GUC_GRD_BO_07 + */ + function f_GEONW_PON_GUC_GRD_BO_07() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GUC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == (e_greedy or e_unspecified) required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_GUC_GRD_BO_07_nodeB()); + v_nodeC.start(f_GEONW_PON_GUC_GRD_BO_07_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_GUC_GRD_BO_07 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_GRD_BO_07) + */ + function f_GEONW_PON_GUC_GRD_BO_07_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": INFO: First GUC forwarded ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: First GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + vc_localSeqNumber + ), + -, + c_defaultHopLimit - 1 + ), + -, + f_getIutMacAddress() + ) + ); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: Duplicate GUC was forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: Duplicate GUC not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_GRD_BO_07_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_GRD_BO_07) + */ + function f_GEONW_PON_GUC_GRD_BO_07_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + vc_localSeqNumber + ), + -, + c_defaultHopLimit + ), + -, + f_getIutMacAddress() + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: Duplicate GUC was forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: Duplicate GUC not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_GRD_BO_07_nodeC + + } // end GEONW_PON_GUC_GRD_BO_07 + + } // end gucGreedyForwarding + + group gucContentionBasedForwarding { + + group GEONW_PON_GUC_CBF_BV_01 { + + /** + * @desc TP Function for TC_GEONW_PON_GUC_CBF_BV_01 + */ + function f_GEONW_PON_GUC_CBF_BV_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_GUC_CBF_BV_01_nodeB()); + v_nodeC.start(f_GEONW_PON_GUC_CBF_BV_01_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_CBF_BV_01) + */ + function f_GEONW_PON_GUC_CBF_BV_01_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if(not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_01_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_CBF_BV_01) + */ + function f_GEONW_PON_GUC_CBF_BV_01_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: broadcasted GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_01_nodeC + + } // end GEONW_PON_GUC_CBF_BV_01 + + group GEONW_PON_GUC_CBF_BV_02 { + + /** + * @desc TP Function for TC_GEONW_PON_GUC_CBF_BV_02 + */ + function f_GEONW_PON_GUC_CBF_BV_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var float v_distance := int2float(f_getCbfMaxCommunicationRange() - 10); + var LongPosVector v_longPosVectorIut, v_longPosVectorNodeA; + + // Test control + if (not PICS_GN_GUC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + // re-compute NodeA's position. + v_longPosVectorIut := f_getIutLongPosVector(); + v_longPosVectorNodeA := f_computePositionUsingDistance(v_longPosVectorIut, v_distance, 0); + v_longPosVectorNodeA.gnAddr := f_getTsGnLocalAddress(c_compNodeA); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_GUC_CBF_BV_02_nodeB(v_distance, v_longPosVectorNodeA)); + v_nodeC.start(f_GEONW_PON_GUC_CBF_BV_02_nodeC(v_longPosVectorNodeA)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_msgSent, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_CBF_BV_02) + * @param p_distanceToNodeA Distance between IUT and NodeA + * @param p_longPosVectorNodeA Position vector of NodeA + */ + function f_GEONW_PON_GUC_CBF_BV_02_nodeB(in float p_distanceToNodeA, in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { + + // Local variables + timer t_toCbf := (int2float(f_getCbfMaxTime()) + + ( + int2float(f_getCbfMinTime() - f_getCbfMaxTime()) + / int2float(f_getCbfMaxCommunicationRange()) + ) * p_distanceToNodeA) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + log("*** " & testcasename() & ": INFO: Message sent ***"); + f_selfOrClientSyncAndVerdict(c_msgSent, e_success); + + tc_ac.start; + t_toCbf.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: IUT re-broadcasted the packet too early ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: Ready for receiving re-broadcasting ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_02_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_CBF_BV_02) + * @param p_longPosVectorNodeA Position vector of NodeA + */ + function f_GEONW_PON_GUC_CBF_BV_02_nodeC(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(p_longPosVectorNodeA), + vc_localSeqNumber + ), + -, + c_defaultHopLimit + ), + -, + f_getIutMacAddress() + ) + ); + log("*** " & testcasename() & ": INFO: Message sent ***"); + f_selfOrClientSyncAndVerdict(c_msgSent, e_success); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Re-broadcasted GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_02_nodeC + + } // end GEONW_PON_GUC_CBF_BV_02 + + group GEONW_PON_GUC_CBF_BV_07 { + + /** + * @desc TP Function for TC_GEONW_PON_GUC_CBF_BV_07 + */ + function f_GEONW_PON_GUC_CBF_BV_07() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var float v_distance := int2float(f_getCbfMaxCommunicationRange() - 10); + var LongPosVector v_longPosVectorIut, v_longPosVectorNodeA; + + // Test control + if (not PICS_GN_GUC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + // re-compute NodeA's position. + v_longPosVectorIut := f_getIutLongPosVector(); + v_longPosVectorNodeA := f_computePositionUsingDistance(v_longPosVectorIut, v_distance, 0); + v_longPosVectorNodeA.gnAddr := f_getTsGnLocalAddress(c_compNodeA); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_GUC_CBF_BV_07_nodeB(v_longPosVectorNodeA)); + v_nodeC.start(f_GEONW_PON_GUC_CBF_BV_07_nodeC(v_longPosVectorNodeA)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_07 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_CBF_BV_07) + * @param p_longPosVectorNodeA Position vector of NodeA + */ + function f_GEONW_PON_GUC_CBF_BV_07_nodeB(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleepIgnoreDef(int2float(f_getCbfMaxTime())/2000.0); + + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(p_longPosVectorNodeA), + vc_localSeqNumber + ), + -, + c_defaultHopLimit - 1 + ), + -, + f_getIutMacAddress() + ) + ); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: Forwarded GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_07_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_CBF_BV_07) + * @param p_longPosVectorNodeA Position vector of NodeA + */ + function f_GEONW_PON_GUC_CBF_BV_07_nodeC(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + //Note: Sending of the GUC packet move to test body in contrast to the test purpose due to time critical behaviour + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(p_longPosVectorNodeA), + vc_localSeqNumber + ), + -, + c_defaultHopLimit + ), + -, + f_getIutMacAddress() + ) + ); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Forwarded GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_07_nodeC + + } // end GEONW_PON_GUC_CBF_BV_07 + + group GEONW_PON_GUC_CBF_BV_20 { + + /** + * @desc TP Function for TC_GEONW_PON_GUC_CBF_BV_20 + */ + function f_GEONW_PON_GUC_CBF_BV_20() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var float v_distance := int2float(f_getCbfMaxCommunicationRange() * 2); + var LongPosVector v_longPosVectorIut, v_longPosVectorNodeC; + + // Test control + if (not PICS_GN_GUC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + // re-compute NodeC's position. + v_longPosVectorIut := f_getIutLongPosVector(); + v_longPosVectorNodeC := f_computePositionUsingDistance(v_longPosVectorIut, v_distance, 180); + v_longPosVectorNodeC.gnAddr := f_getTsGnLocalAddress(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_GUC_CBF_BV_20_nodeB(v_longPosVectorNodeC)); + v_nodeC.start(f_GEONW_PON_GUC_CBF_BV_20_nodeC(v_longPosVectorNodeC)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_msgSent, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_20 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_CBF_BV_20) + * @param p_longPosVectorNodeC Position vector of NodeC + */ + function f_GEONW_PON_GUC_CBF_BV_20_nodeB(in LongPosVector p_longPosVectorNodeC) runs on ItsGeoNetworking { + + // Local variables + timer t_toCbf := int2float(f_getCbfMinTime()) / 1000.0; + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + log("*** " & testcasename() & ": INFO: Message sent ***"); + f_selfOrClientSyncAndVerdict(c_msgSent, e_success); + + tc_ac.start; + t_toCbf.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: IUT re-broadcasted the packet too early ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: Ready for receiving re-broadcasting ***"); + repeat; + } + + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_20_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_CBF_BV_20) + * @param p_longPosVectorNodeC Position vector of NodeC + */ + function f_GEONW_PON_GUC_CBF_BV_20_nodeC(LongPosVector p_longPosVectorNodeC) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + p_longPosVectorNodeC, + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + vc_localSeqNumber + ), + -, + c_defaultHopLimit + ), + -, + f_getIutMacAddress() + ) + ); + log("*** " & testcasename() & ": INFO: Message sent ***"); + f_selfOrClientSyncAndVerdict(c_msgSent, e_success); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_20_nodeC + + } // end GEONW_PON_GUC_CBF_BV_20 + + group GEONW_PON_GUC_CBF_BV_21 { + + /** + * @desc TP Function for TC_GEONW_PON_GUC_CBF_BV_21 + */ + function f_GEONW_PON_GUC_CBF_BV_21() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + var float v_distance := int2float(f_getCbfMaxCommunicationRange() - 10); + var LongPosVector v_longPosVectorIut, v_longPosVectorNodeA; + + // Test control + if (not PICS_GN_GUC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf04Up(); + // re-compute NodeA's position. + v_longPosVectorIut := f_getIutLongPosVector(); + v_longPosVectorNodeA := f_computePositionUsingDistance(v_longPosVectorIut, v_distance, 0); + v_longPosVectorNodeA.gnAddr := f_getTsGnLocalAddress(c_compNodeA); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GUC_CBF_BV_21_nodeB(v_longPosVectorNodeA)); + v_nodeC.start(f_GEONW_PON_GUC_CBF_BV_21_nodeC(v_longPosVectorNodeA)); + v_nodeD.start(f_GEONW_PON_GUC_CBF_BV_21_nodeD(v_longPosVectorNodeA)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_21 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_CBF_BV_21) + * @param p_longPosVectorNodeA Position vector of NodeA + */ + function f_GEONW_PON_GUC_CBF_BV_21_nodeB(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Re-broadcasted GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_21_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_CBF_BV_21) + * @param p_longPosVectorNodeA Position vector of NodeA + */ + function f_GEONW_PON_GUC_CBF_BV_21_nodeC(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Re-broadcasted GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_21_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GUC_CBF_BV_21) + * @param p_longPosVectorNodeA Position vector of NodeA + */ + function f_GEONW_PON_GUC_CBF_BV_21_nodeD(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(p_longPosVectorNodeA), + vc_localSeqNumber + ), + -, + c_defaultHopLimit + ), + -, + f_getIutMacAddress() + ) + ); + + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GUC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GUC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: GUC timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_21_nodeD + + } // end GEONW_PON_GUC_CBF_BV_21 + + group GEONW_PON_GUC_CBF_BV_22 { + + /** + * @desc TP Function for TC_GEONW_PON_GUC_CBF_BV_22 + */ + function f_GEONW_PON_GUC_CBF_BV_22() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + var float v_distance := int2float(f_getCbfMaxCommunicationRange() - 10); + var LongPosVector v_longPosVectorIut, v_longPosVectorNodeA; + + // Test control + if (not PICS_GN_GUC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf04Up(); + // re-compute NodeA's position. + v_longPosVectorIut := f_getIutLongPosVector(); + v_longPosVectorNodeA := f_computePositionUsingDistance(v_longPosVectorIut, v_distance, 0); + v_longPosVectorNodeA.gnAddr := f_getTsGnLocalAddress(c_compNodeA); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GUC_CBF_BV_22_nodeB(v_longPosVectorNodeA)); + v_nodeC.start(f_GEONW_PON_GUC_CBF_BV_22_nodeC(v_longPosVectorNodeA)); + v_nodeD.start(f_GEONW_PON_GUC_CBF_BV_22_nodeD(v_longPosVectorNodeA)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_22 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_CBF_BV_22) + * @param p_longPosVectorNodeA Position vector of NodeA + */ + function f_GEONW_PON_GUC_CBF_BV_22_nodeB(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Re-broadcasted GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_22_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_CBF_BV_22) + * @param p_longPosVectorNodeA Position vector of NodeA + */ + function f_GEONW_PON_GUC_CBF_BV_22_nodeC(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Re-broadcasted GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_22_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GUC_CBF_BV_22) + * @param p_longPosVectorNodeA Position vector of NodeA + */ + function f_GEONW_PON_GUC_CBF_BV_22_nodeD(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); + timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + v_longPosVectorNodeD.pai := int2bit(0,1); + f_changePositon(c_compNodeD, v_longPosVectorNodeD); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(p_longPosVectorNodeA), + vc_localSeqNumber + ), + -, + c_defaultHopLimit + ), + -, + f_getIutMacAddress() + ) + ); + + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GUC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GUC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: GUC timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_GUC_CBF_BV_22_nodeD + + } // end GEONW_PON_GUC_CBF_BV_22 + + } // end gucContentionBasedForwarding + + } // end geoGeoUnicast + + // 6.2.2.9 + group geoGeoBroadcast { + + group gbcNonAreaForwarding { + + group gbcNonAreaAllForwardingAlgorithm { + + group GEONW_PON_GBC_NONAREA_ALL_BV_03 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_ALL_BV_03 + */ + function f_GEONW_PON_GBC_NONAREA_ALL_BV_03() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeB()); + v_nodeC.start(f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BV_03 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_ALL_BV_03) + */ + function f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] a_receiveGeoBroadcastWithAreaWithHopLimit( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2), + c_defaultHopLimit - 1, + c_defaultHopLimit) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message correctly retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] a_receiveGeoBroadcastWithAreaWithHopLimit( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2), + ?, + ?) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: GBC message fields not updated ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: GBC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_ALL_BV_03) + */ + function f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var GeoNetworkingInd v_msgInd; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area2), + c_defaultHopLimit + ), + -, + c_defaultHopLimit + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BV_03_nodeC + + } // end GEONW_PON_GBC_NONAREA_ALL_BV_03 + + group GEONW_PON_GBC_NONAREA_ALL_BV_04 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_ALL_BV_04 + */ + function f_GEONW_PON_GBC_NONAREA_ALL_BV_04() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeB()); + v_nodeC.start(f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BV_04 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_ALL_BV_04) + */ + function f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] a_receiveGeoBroadcastWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2)) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_ALL_BV_04) + */ + function f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area2) + ), + -, + c_hopLimit1 + ) + ) + ); + + tc_noac.start; + alt { + [] a_receiveGeoBroadcastWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2)) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BV_04_nodeC + + } // end GEONW_PON_GBC_NONAREA_ALL_BV_04 + + /** + * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_ALL_BV_06 + */ + function f_GEONW_PON_GBC_NONAREA_ALL_BV_06() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var template (value) GeoNetworkingPdu v_gnPacket; + var integer i; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area2) + ) + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + f_sleep(PX_TAC); + + if(0 != lengthof(vc_utInds)) { + log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GN was NOT transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BV_06 + + group GEONW_PON_GBC_NONAREA_ALL_BO_09 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_ALL_BO_09 + */ + function f_GEONW_PON_GBC_NONAREA_ALL_BO_09() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + var UInt16 v_distanceTooBig; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf04Up(); + v_distanceTooBig := float2int(1.1 * f_radiusFromCircularArea(f_getGnMaxAreaSize()*c_squareKm)); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeB(v_distanceTooBig)); + v_nodeC.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeC(v_distanceTooBig)); + v_nodeD.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeD(v_distanceTooBig)); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_09 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BO_19) + */ + function f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeB(in UInt16 p_distanceTooBig) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var GeoArea v_areaTooBig; + + // Preamble + f_prNeighbour(); + v_areaTooBig := f_computeCircularArea( + f_getPosition(c_compNodeB), + p_distanceTooBig + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_geoArea2GeoBroadcastArea(v_areaTooBig) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_ALL_BO_09) + */ + function f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeC(in UInt16 p_distanceTooBig) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var GeoArea v_areaTooBig; + + // Preamble + f_prNeighbour(); + v_areaTooBig := f_computeCircularArea( + f_getPosition(c_compNodeB), + p_distanceTooBig + ); + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_geoArea2GeoBroadcastArea(v_areaTooBig) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_ALL_BO_09) + */ + function f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeD(in UInt16 p_distanceTooBig) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var GeoArea v_areaTooBig; + + // Preamble + f_prNeighbour(); + v_areaTooBig := f_computeCircularArea( + f_getPosition(c_compNodeB), + p_distanceTooBig + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_geoArea2GeoBroadcastArea(v_areaTooBig) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_09_nodeD + + } // end GEONW_PON_GBC_NONAREA_ALL_BO_09 + + group GEONW_PON_GBC_NONAREA_ALL_BO_10 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_ALL_BO_10 + */ + function f_GEONW_PON_GBC_NONAREA_ALL_BO_10() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeB()); + v_nodeC.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeC()); + v_nodeD.start(f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_10 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_ALL_BO_10) + */ + function f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeB() runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC received and not discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_ALL_BO_10) + */ + function f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeC() runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC received and not discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_ALL_BO_10) + */ + function f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeD, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area2) + ) + ) + ) + ); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC received and not discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_ALL_BO_10_nodeD + + } // end GEONW_PON_GBC_NONAREA_ALL_BO_10 + + } // end gbcNonAreaAllForwardingAlgorithm + + group gbcNonAreaGreedyForwarding { + + group GEONW_PON_GBC_NONAREA_GRD_BV_01 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_GRD_BV_01 + */ + function f_GEONW_PON_GBC_NONAREA_GRD_BV_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_greedy or e_unspecified ) required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeB()); + v_nodeD.start(f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BV_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_GRD_BV_01) + */ + function f_GEONW_PON_GBC_NONAREA_GRD_BV_01_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area2))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveGeoBroadcastWithArea( + mw_longPosVectorPosition(v_longPosVectorIut), + ?, + f_getGeoBroadcastArea(c_area2)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BV_01_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_GRD_BV_01) + */ + function f_GEONW_PON_GBC_NONAREA_GRD_BV_01_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] a_receiveGeoBroadcastWithArea( + mw_longPosVectorPosition(v_longPosVectorIut), + ?, + f_getGeoBroadcastArea(c_area2)) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: received GBC message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BV_01_nodeD + + } // end GEONW_PON_GBC_NONAREA_GRD_BV_01 + + group GEONW_PON_GBC_NONAREA_GRD_BV_02 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_GRD_BV_02 + */ + function f_GEONW_PON_GBC_NONAREA_GRD_BV_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_greedy or e_unspecified ) required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeB()); + v_nodeC.start(f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeC()); + v_nodeD.start(f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BV_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_GRD_BV_02) + */ + function f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] a_receiveGeoBroadcastWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message correctly forwarded to area center ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_GRD_BV_02) + */ + function f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var GeoNetworkingInd v_msgInd; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area2) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_GRD_BV_02) + */ + function f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] a_receiveGeoBroadcastWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2)) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message not forwarded to area center ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BV_02_nodeD + + } // end GEONW_PON_GBC_NONAREA_GRD_BV_02 + + group GEONW_PON_GBC_NONAREA_GRD_BO_07 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_GRD_BO_07 + */ + function f_GEONW_PON_GBC_NONAREA_GRD_BO_07() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + var UInt16 v_sequenceNumber := f_getInitialSequenceNumber(); + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_greedy or e_unspecified ) required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeB()); + v_nodeC.start(f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeC(v_sequenceNumber)); + v_nodeD.start(f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeD(v_sequenceNumber)); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BO_07 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_GRD_BO_07) + */ + function f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var GeoNetworkingInd v_msgInd; + var template GeoNetworkingInd v_msgInd_t; + + // Preamble + f_prNeighbour(); + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2) + )))) -> value v_msgInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: GBC message correctly forwarded to area center ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + v_msgInd_t := v_msgInd; + v_msgInd_t.msgIn.basicHeader.routerHopLimit := ?; + tc_noac.start; + alt { + [] geoNetworkingPort.receive(v_msgInd_t) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message re-forwarded to area center ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not re-forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_GRD_BO_07) + */ + function f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeC(in UInt16 p_sequenceNumber) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + p_sequenceNumber, + f_getGeoBroadcastArea(c_area2) + ), + -, + c_defaultHopLimit + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_GRD_BO_07) + */ + function f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeD(in UInt16 p_sequenceNumber) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": INCONC: Pre-conditions: GBC message not forwarded to area center ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: Pre-conditions: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + } + + // Test Body + // send geoBroadcast for second time (same source + same seq Nr + lower RHL) + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + p_sequenceNumber, + f_getGeoBroadcastArea(c_area2) + ), + -, + c_defaultHopLimit - 1 + ) + ) + ); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC re-forwarded! (not to area center!) ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeD + + } // end GEONW_PON_GBC_NONAREA_GRD_BO_07 + + } // end gbcNonAreaGreedyForwarding + + group gbcNonAreaContentionBasedForwarding { + + group GEONW_PON_GBC_NONAREA_CBF_BV_01 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_CBF_BV_01 + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + if ((f_getNonAreaForwardingAlgorithm() != e_cbf)) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_cbf ) required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_01_nodeB()); + v_nodeD.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_01_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_CBF_BV_01) + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_01_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area2))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveGeoBroadcastWithArea( + mw_longPosVectorPosition(v_longPosVectorIut), + ?, + f_getGeoBroadcastArea(c_area2)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_01_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_CBF_BV_01) + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_01_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] a_receiveGeoBroadcastWithArea( + mw_longPosVectorPosition(v_longPosVectorIut), + ?, + f_getGeoBroadcastArea(c_area2)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_01_nodeD + + } // end GEONW_PON_GBC_NONAREA_CBF_BV_01 + + group GEONW_PON_GBC_NONAREA_CBF_BV_02 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_CBF_BV_02 + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeB()); + v_nodeC.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeC()); + v_nodeD.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_CBF_BV_02) + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_CBF_BV_02) + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + timer t_toCbf := (int2float(f_getCbfMaxTime()) + + ( + int2float(f_getCbfMinTime() - f_getCbfMaxTime()) + / int2float(f_getCbfMaxCommunicationRange()) + ) * f_distance(v_longPosVectorNodeC, v_longPosVectorIut)) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area2) + ) + ) + ) + ); + + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2) + )))) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GBC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_CBF_BV_02) + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_02_nodeD + + } // end GEONW_PON_GBC_NONAREA_CBF_BV_02 + + group GEONW_PON_GBC_NONAREA_CBF_BV_07 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_CBF_BV_07 + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_07() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + var UInt16 v_sequenceNumberC := f_getInitialSequenceNumber(); + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeB()); + v_nodeC.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeC(v_sequenceNumberC)); + v_nodeD.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeD(v_sequenceNumberC)); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_07 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_CBF_BV_07) + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_CBF_BV_07) + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeC(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + p_sequenceNumberC, + f_getGeoBroadcastArea(c_area2) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_CBF_BV_07) + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_07_nodeD(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + p_sequenceNumberC, + f_getGeoBroadcastArea(c_area2) + ) + ) + ) + ); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_071_nodeD + + } // end GEONW_PON_GBC_NONAREA_CBF_BV_07 + + group GEONW_PON_GBC_NONAREA_CBF_BV_20 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_CBF_BV_20 + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_20() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var float v_distance := int2float(f_getCbfMaxCommunicationRange() * 2); + var LongPosVector v_longPosVectorIut, v_longPosVectorNodeC; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + // re-compute NodeC's position. + v_longPosVectorIut := f_getIutLongPosVector(); + v_longPosVectorNodeC := f_computePositionUsingDistance(v_longPosVectorIut, v_distance, 180); + v_longPosVectorNodeC.gnAddr := f_getTsGnLocalAddress(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_20_nodeB(v_longPosVectorNodeC)); + v_nodeC.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_20_nodeC(v_longPosVectorNodeC)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_msgSent, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_20 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_CBF_BV_20) + * @param p_longPosVectorNodeC Position vector of NodeC + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_20_nodeB(in LongPosVector p_longPosVectorNodeC) runs on ItsGeoNetworking { + + // Local variables + timer t_toCbf := int2float(f_getCbfMinTime()) / 1000.0; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + log("*** " & testcasename() & ": INFO: Message sent ***"); + f_selfOrClientSyncAndVerdict(c_msgSent, e_success); + + tc_ac.start; + t_toCbf.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(p_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2) + )))) { + tc_ac.stop; + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: IUT re-broadcasted the packet too early ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: Ready for receiving re-broadcasting ***"); + repeat; + } + + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_20_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_CBF_BV_20) + * @param p_longPosVectorNodeC Position vector of NodeC + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_20_nodeC(LongPosVector p_longPosVectorNodeC) runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + p_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area2) + ) + ) + ) + ); + + log("*** " & testcasename() & ": INFO: Message sent ***"); + f_selfOrClientSyncAndVerdict(c_msgSent, e_success); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(p_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_20_nodeC + + } // end GEONW_PON_GBC_NONAREA_CBF_BV_20 + + group GEONW_PON_GBC_NONAREA_CBF_BV_21 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_CBF_BV_21 + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_21() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeB()); + v_nodeC.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeC()); + v_nodeD.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_21 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_CBF_BV_21) + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_CBF_BV_21) + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeC() runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_CBF_BV_21) + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area2) + ) + ) + ) + ); + + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area2) + )))) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GBC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeD + + } // end GEONW_PON_GBC_NONAREA_CBF_BV_21 + + group GEONW_PON_GBC_NONAREA_CBF_BV_22 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_NONAREA_CBF_BV_22 + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_22() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeB()); + v_nodeC.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeC()); + v_nodeD.start(f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_22 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_NONAREA_CBF_BV_22) + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeA), + ?, + f_getGeoBroadcastArea(c_area2) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_NONAREA_CBF_BV_22) + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + v_longPosVectorNodeC.pai := int2bit(0,1); + f_changePositon(c_compNodeC, v_longPosVectorNodeC); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeA, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area2) + ) + ) + ) + ); + + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeA), + ?, + f_getGeoBroadcastArea(c_area2) + )))) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GBC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_NONAREA_CBF_BV_22) + */ + function f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeA), + ?, + f_getGeoBroadcastArea(c_area2) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_NONAREA_CBF_BV_22_nodeD + + } // end GEONW_PON_GBC_NONAREA_CBF_BV_22 + + } // end gbcNonAreaContentionBasedForwarding + + } // end gbcNonAreaForwarding + + group gbcAreaForwarding { + + group gbcAreaAllForwardingAlgorithm { + + group GEONW_PON_GBC_AREA_ALL_BV_01 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_ALL_BV_01 + */ + function f_GEONW_PON_GBC_AREA_ALL_BV_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_AREA_ALL_BV_01_nodeB()); + v_nodeD.start(f_GEONW_PON_GBC_AREA_ALL_BV_01_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ALL_BV_01) + */ + function f_GEONW_PON_GBC_AREA_ALL_BV_01_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveGeoBroadcastWithArea( + mw_longPosVectorPosition(v_longPosVectorIut), + ?, + f_getGeoBroadcastArea(c_area1)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_01_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_ALL_BV_01) + */ + function f_GEONW_PON_GBC_AREA_ALL_BV_01_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] a_receiveGeoBroadcastWithArea( + mw_longPosVectorPosition(v_longPosVectorIut), + ?, + f_getGeoBroadcastArea(c_area1)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_01_nodeD + + } // end GEONW_PON_GBC_AREA_ALL_BV_01 + + group GEONW_PON_GBC_AREA_ALL_BV_03 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_ALL_BV_03 + */ + function f_GEONW_PON_GBC_AREA_ALL_BV_03() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_AREA_ALL_BV_03_nodeB()); + v_nodeD.start(f_GEONW_PON_GBC_AREA_ALL_BV_03_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_03 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ALL_BV_03) + */ + function f_GEONW_PON_GBC_AREA_ALL_BV_03_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1), + c_defaultHopLimit + ), + -, + c_defaultHopLimit + ) + ) + ); + + tc_ac.start; + alt { + [] a_receiveGeoBroadcastWithAreaWithHopLimit( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1), + c_defaultHopLimit - 1, + c_defaultHopLimit) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message correctly retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] a_receiveGeoBroadcastWithAreaWithHopLimit( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1), + ?, + ?) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: GBC message fields not updated ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: GBC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_03_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_ALL_BV_03) + */ + function f_GEONW_PON_GBC_AREA_ALL_BV_03_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var GeoNetworkingInd v_msgInd; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] a_receiveGeoBroadcastWithAreaWithHopLimit( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1), + c_defaultHopLimit - 1, + c_defaultHopLimit) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message correctly retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: GBC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_03_nodeD + + } // end GEONW_PON_GBC_AREA_ALL_BV_03 + + group GEONW_PON_GBC_AREA_ALL_BV_04 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_ALL_BV_04 + */ + function f_GEONW_PON_GBC_AREA_ALL_BV_04() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_AREA_ALL_BV_04_nodeB()); + v_nodeD.start(f_GEONW_PON_GBC_AREA_ALL_BV_04_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_04 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ALL_BV_04) + */ + function f_GEONW_PON_GBC_AREA_ALL_BV_04_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1) + ), + -, + c_hopLimit1 + ) + ) + ); + + tc_noac.start; + alt { + [] a_receiveGeoBroadcast( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_04_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_ALL_BV_04) + */ + function f_GEONW_PON_GBC_AREA_ALL_BV_04_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] a_receiveGeoBroadcast( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_04_nodeD + + } // end GEONW_PON_GBC_AREA_ALL_BV_04 + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_ALL_BV_05 + */ + function f_GEONW_PON_GBC_AREA_ALL_BV_05() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var template (value) GeoNetworkingPdu v_gnPacket; + var integer i; + + // Test control + if (not PICS_GN_GBC_DST) { + log("*** " & testcasename() & ": PICS_GN_GBC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1) + ) + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + f_sleep(PX_TAC); + + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_GBC_AREA_ALL_BV_05 + + group GEONW_PON_GBC_AREA_ALL_BO_08 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_ALL_BO_08 + */ + function f_GEONW_PON_GBC_AREA_ALL_BO_08() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_DST) { + log("*** " & testcasename() & ": PICS_GN_GBC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(c_compNodeB); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_AREA_ALL_BO_08_nodeB()); + v_nodeD.start(f_GEONW_PON_GBC_AREA_ALL_BO_08_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_GBC_AREA_ALL_BO_08 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ALL_BO_08) + */ + function f_GEONW_PON_GBC_AREA_ALL_BO_08_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var template (present) GeoNetworkingPdu v_gnPacket; + var integer i; + + // Preamble + f_prNeighbour(); + v_gnPacket := m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1) + ), + -, + c_defaultHopLimit + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_gnPacket))); + + // IUT should also rebroadcast the packet. Get ready + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": INFO: GBC message rebroadcasted ***"); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INFO: GBC message not rebroadcasted ***"); + } + } + + f_sleep(PX_TAC); + + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); + //flush received upper indications + vc_utInds := {}; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + else { + log("*** " & testcasename() & ": INCONC: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + + // Test Body + f_sleep(PX_TAC); + + if(0 != lengthof(vc_utInds)) { + log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GN was NOT transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ALL_BO_08_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_ALL_BO_08) + */ + function f_GEONW_PON_GBC_AREA_ALL_BO_08_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var GeoNetworkingInd v_msgInd; + var integer i; + + // Preamble + f_prNeighbour(); + + // IUT should also rebroadcast the packet. Get ready + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1) + )))) -> value v_msgInd { + tc_ac.stop; + log("*** " & testcasename() & ": INFO: Pre-conditions: GBC message rebroadcasted ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INFO: Pre-conditions: GBC message not rebroadcasted ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + v_msgInd.msgIn.basicHeader.routerHopLimit := valueof(v_msgInd.msgIn.basicHeader.routerHopLimit) / 2; + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_msgInd.msgIn)); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ALL_BO_08_nodeD + + } // end GEONW_PON_GBC_AREA_ALL_BO_08 + + } // end gbcAreaAllForwardingAlgorithm + + group gbcAreaSimpleForwarding { + + group GEONW_PON_GBC_AREA_SMP_BV_02 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_SMP_BV_02 + */ + function f_GEONW_PON_GBC_AREA_SMP_BV_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + if ((f_getAreaForwardingAlgorithm() != e_simple) and (f_getAreaForwardingAlgorithm() != e_unspecified)) { + log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == ( e_simple or e_unspecified ) required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_AREA_SMP_BV_02_nodeB()); + v_nodeD.start(f_GEONW_PON_GBC_AREA_SMP_BV_02_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_GBC_AREA_SMP_BV_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_SMP_BV_02) + */ + function f_GEONW_PON_GBC_AREA_SMP_BV_02_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1) + ) + ) + ) + ); + + tc_ac.start; + alt { + [] a_receiveGeoBroadcastWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_SMP_BV_02_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_SMP_BV_02) + */ + function f_GEONW_PON_GBC_AREA_SMP_BV_02_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] a_receiveGeoBroadcastWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_SMP_BV_02_nodeD + + } // end GEONW_PON_GBC_AREA_SMP_BV_02 + + group GEONW_PON_GBC_AREA_SMP_BO_07 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_SMP_BO_07 + */ + function f_GEONW_PON_GBC_AREA_SMP_BO_07() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if ((f_getAreaForwardingAlgorithm() != e_simple) and (f_getAreaForwardingAlgorithm() != e_unspecified)) { + log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == ( e_simple or e_unspecified ) required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_AREA_SMP_BO_07_nodeB()); + v_nodeD.start(f_GEONW_PON_GBC_AREA_SMP_BO_07_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_GBC_BO_04 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_SMP_BO_07) + */ + function f_GEONW_PON_GBC_AREA_SMP_BO_07_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var template (present) GeoNetworkingPdu v_gnPacket; + + // Preamble + f_prNeighbour(); + v_gnPacket := m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1) + ), + -, + c_defaultHopLimit + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_gnPacket))); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: GBC message received correctly ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + tc_noac.start; + alt { + [] a_receiveGeoBroadcast( + ?, + ?) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_SMP_BO_07_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_SMP_BO_07) + */ + function f_GEONW_PON_GBC_AREA_SMP_BO_07_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var GeoNetworkingInd v_msgInd; + + // Preamble + f_prNeighbour(); + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1) + )))) -> value v_msgInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: GBC message received correctly ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + } + + // Test Body + // send geoBroadcast for second time (same source + same seq Nr + lower RHL) + v_msgInd.msgIn.basicHeader.routerHopLimit := valueof(v_msgInd.msgIn.basicHeader.routerHopLimit) - 1; + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_msgInd.msgIn))); + + tc_noac.start; + alt { + [] a_receiveGeoBroadcast( + ?, + ?) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_SMP_BO_07_nodeD + + } // end GEONW_PON_GBC_AREA_SMP_BO_07 + + } // end gbcAreaSimpleForwarding + + group gbcAreaContentionBasedForwarding { + + group GEONW_PON_GBC_AREA_CBF_BV_02 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_CBF_BV_02 + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeB()); + v_nodeC.start(f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeC()); + v_nodeD.start(f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_CBF_BV_02) + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_AREA_CBF_BV_02) + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + timer t_toCbf := (int2float(f_getCbfMaxTime()) + + ( + int2float(f_getCbfMinTime() - f_getCbfMaxTime()) + / int2float(f_getCbfMaxCommunicationRange()) + ) * f_distance(v_longPosVectorNodeC, v_longPosVectorIut)) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1) + ) + ) + ) + ); + + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GBC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_CBF_BV_02) + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_02_nodeD + + } // end GEONW_PON_GBC_AREA_CBF_BV_02 + + group GEONW_PON_GBC_AREA_CBF_BV_07 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_CBF_BV_07 + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_07() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + var UInt16 v_sequenceNumberC := f_getInitialSequenceNumber(); + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeB()); + v_nodeC.start(f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeC(v_sequenceNumberC)); + v_nodeD.start(f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeD(v_sequenceNumberC)); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_BCA_BV_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_CBF_BV_07) + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_AREA_CBF_BV_07) + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeC(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + p_sequenceNumberC, + f_getGeoBroadcastArea(c_area1) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_CBF_BV_07) + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_07_nodeD(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + p_sequenceNumberC, + f_getGeoBroadcastArea(c_area1) + ) + ) + ) + ); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC message re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_071_nodeD + + } // end GEONW_PON_GBC_AREA_CBF_BV_07 + + group GEONW_PON_GBC_AREA_CBF_BV_21 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_CBF_BV_21 + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_21() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeB()); + v_nodeC.start(f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeC()); + v_nodeD.start(f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_21 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_CBF_BV_21) + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_AREA_CBF_BV_21) + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_CBF_BV_21) + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1) + ) + ) + ) + ); + + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GBC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_21_nodeD + + } // end GEONW_PON_GBC_AREA_CBF_BV_21 + + group GEONW_PON_GBC_AREA_CBF_BV_22 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_CBF_BV_22 + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_22() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeB()); + v_nodeC.start(f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeC()); + v_nodeD.start(f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_22 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_CBF_BV_22) + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_AREA_CBF_BV_22) + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_CBF_BV_22) + */ + function f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); + timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + v_longPosVectorNodeD.pai := int2bit(0,1); + f_changePositon(c_compNodeD, v_longPosVectorNodeD); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1) + ) + ) + ) + ); + + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GBC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeD + + } // end GEONW_PON_GBC_AREA_CBF_BV_22 + + } // end gbcAreaContentionBasedForwarding + + group gbcAreaAdvancedForwarding { + + group GEONW_PON_GBC_AREA_ADV_BV_21 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_21 + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_21() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeE; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getAreaForwardingAlgorithm() != e_advanced) { + log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf05Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeE := f_getComponent(c_compNodeE); + v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_21_nodeB()); + v_nodeE.start(f_GEONW_PON_GBC_AREA_ADV_BV_21_nodeE()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf05Down(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_21 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_21) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_21_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GBC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_21_nodeB + + /** + * @desc Behavior function for NodeE (TC_GEONW_PON_GBC_AREA_ADV_BV_21) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_21_nodeE() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + 0, + f_getGeoBroadcastArea(c_area1) + ) + ) + ) + ); + + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GBC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_21_nodeE + + } // end GEONW_PON_GBC_AREA_ADV_BV_21 + + group GEONW_PON_GBC_AREA_ADV_BV_23 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_23 + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_23() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeF; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getAreaForwardingAlgorithm() != e_advanced) { + log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf06Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeF := f_getComponent(c_compNodeF); + v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_23_nodeB()); + v_nodeF.start(f_GEONW_PON_GBC_AREA_ADV_BV_23_nodeF()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf06Down(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_23 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_23) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_23_nodeB() runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: Message not discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: No message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_23_nodeB + + /** + * @desc Behavior function for NodeF (TC_GEONW_PON_GBC_AREA_ADV_BV_23) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_23_nodeF() runs on ItsGeoNetworking { + + // Local variables + var integer i; + var template (value) GeoNetworkingPdu v_gnPacket; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + v_gnPacket := m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1) + ) + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + for(i:=1; i < f_getAdvancedGbcForwardingMaxCounter(); i:=i+1) { + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + f_sleepIgnoreDef(0.5); + } + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: Message not discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: No message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_23_nodeF + + } // end GEONW_PON_GBC_AREA_ADV_BV_23 + + group GEONW_PON_GBC_AREA_ADV_BV_24 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_24 + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_24() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeE; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getAreaForwardingAlgorithm() != e_advanced) { + log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf05Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeE := f_getComponent(c_compNodeE); + v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_24_nodeB()); + v_nodeE.start(f_GEONW_PON_GBC_AREA_ADV_BV_24_nodeE()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf05Down(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_24 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_24) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_24_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + 0, + f_getGeoBroadcastArea(c_area1) + ) + ) + )); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: Message not discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: No message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_24_nodeB + + /** + * @desc Behavior function for NodeE (TC_GEONW_PON_GBC_AREA_ADV_BV_24) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_24_nodeE() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + 0, + f_getGeoBroadcastArea(c_area1) + ) + ) + )); + tc_noac.start; + alt { + [] geoNetworkingPort.receive (mw_geoNwInd(mw_geoNwPdu(?))){ + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: Message not discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: No message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_24_nodeE + + } // end GEONW_PON_GBC_AREA_ADV_BV_24 + + group GEONW_PON_GBC_AREA_ADV_BV_25 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_25 + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_25() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeF; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getAreaForwardingAlgorithm() != e_advanced) { + log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf06Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeF := f_getComponent(c_compNodeF); + v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_25_nodeB()); + v_nodeF.start(f_GEONW_PON_GBC_AREA_ADV_BV_25_nodeF()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf06Down(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_25 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_25) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_25_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + 0, + f_getGeoBroadcastArea(c_area1) + ) + ) + )); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_25_nodeB + + /** + * @desc Behavior function for NodeF (TC_GEONW_PON_GBC_AREA_ADV_BV_25) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_25_nodeF() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var LongPosVector v_longPosVectorNodeF := f_getPosition(c_compNodeF); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + timer t_toCbf := (int2float(f_getCbfMaxTime()) + + ( + int2float(f_getCbfMinTime() - f_getCbfMaxTime()) + / int2float(f_getCbfMaxCommunicationRange()) + ) * f_distance(v_longPosVectorNodeF, v_longPosVectorIut)) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + 0, + f_getGeoBroadcastArea(c_area1) + ) + ) + )); + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GBC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_25_nodeF + + } // end GEONW_PON_GBC_AREA_ADV_BV_25 + + group GEONW_PON_GBC_AREA_ADV_BV_26 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_26 + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_26() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getAreaForwardingAlgorithm() != e_advanced) { + log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf07Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_26_nodeB()); + v_nodeD.start(f_GEONW_PON_GBC_AREA_ADV_BV_26_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf06Down(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_26 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_26) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_26_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + 0, + f_getGeoBroadcastArea(c_area1) + ) + ) + )); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_26_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_AREA_ADV_BV_26) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_26_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + timer t_toCbf := (int2float(f_getCbfMaxTime()) + + ( + int2float(f_getCbfMinTime() - f_getCbfMaxTime()) + / int2float(f_getCbfMaxCommunicationRange()) + ) * f_distance(v_longPosVectorNodeB, v_longPosVectorIut)) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + 0, + f_getGeoBroadcastArea(c_area1) + ) + ) + )); + + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GBC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_26_nodeD + + } // end GEONW_PON_GBC_AREA_ADV_BV_26 + + + group GEONW_PON_GBC_AREA_ADV_BV_27 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_27 + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_27() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeE; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getAreaForwardingAlgorithm() != e_advanced) { + log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf05Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeE := f_getComponent(c_compNodeE); + v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_27_nodeB()); + v_nodeE.start(f_GEONW_PON_GBC_AREA_ADV_BV_27_nodeE()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf05Down(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_27 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_27) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_27_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeA), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: packet correctly forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_27_nodeB + + /** + * @desc Behavior function for NodeE (TC_GEONW_PON_GBC_AREA_ADV_BV_27) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_27_nodeE() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeA, + 0, + f_getGeoBroadcastArea(c_area1) + ) + ), + -, + f_getIutMacAddress() + ) + ); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_27_nodeE + + } // end GEONW_PON_GBC_AREA_ADV_BV_27 + + group GEONW_PON_GBC_AREA_ADV_BV_28 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_28 + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_28() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeE; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getAreaForwardingAlgorithm() != e_advanced) { + log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf05Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeE := f_getComponent(c_compNodeE); + v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_28_nodeB()); + v_nodeE.start(f_GEONW_PON_GBC_AREA_ADV_BV_28_nodeE()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf05Down(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_28 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_28) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_28_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeA), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: packet correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_28_nodeB + + /** + * @desc Behavior function for NodeE (TC_GEONW_PON_GBC_AREA_ADV_BV_28) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_28_nodeE() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeA, + 0, + f_getGeoBroadcastArea(c_area1) + ) + ), + -, + f_getIutMacAddress() + ) + ); + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeA), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: packet correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_28_nodeE + + } // end GEONW_PON_GBC_AREA_ADV_BV_28 + + group GEONW_PON_GBC_AREA_ADV_BV_29 { + + /** + * @desc TP Function for TC_GEONW_PON_GBC_AREA_ADV_BV_29 + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_29() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeE; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getAreaForwardingAlgorithm() != e_advanced) { + log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { + // log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); + // setverdict(inconc); + // stop; + // } + + // Test component configuration + f_cf05Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeE := f_getComponent(c_compNodeE); + v_nodeB.start(f_GEONW_PON_GBC_AREA_ADV_BV_29_nodeB()); + v_nodeE.start(f_GEONW_PON_GBC_AREA_ADV_BV_29_nodeE()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf05Down(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_29 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_AREA_ADV_BV_29) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_29_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeE := f_getPosition(c_compNodeE); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + timer t_toCbf := (int2float(f_getCbfMaxTime()) + + ( + int2float(f_getCbfMinTime() - f_getCbfMaxTime()) + / int2float(f_getCbfMaxCommunicationRange()) + ) * f_distance(v_longPosVectorNodeE, v_longPosVectorIut)) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeE), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GBC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_29_nodeB + + /** + * @desc Behavior function for NodeE (TC_GEONW_PON_GBC_AREA_ADV_BV_29) + */ + function f_GEONW_PON_GBC_AREA_ADV_BV_29_nodeE() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeE := f_getPosition(c_compNodeE); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + timer t_toCbf := (int2float(f_getCbfMaxTime()) + + ( + int2float(f_getCbfMinTime() - f_getCbfMaxTime()) + / int2float(f_getCbfMaxCommunicationRange()) + ) * f_distance(v_longPosVectorNodeE, v_longPosVectorIut)) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeE, + 0, + f_getGeoBroadcastArea(c_area1) + ) + ) + ) + ); + + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeE), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GBC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GBC_AREA_ADV_BV_29_nodeE + + } // end GEONW_PON_GBC_AREA_ADV_BV_29 + + } // end gbcAreaAdvancedForwarding + + } // end gbcAreaForwarding + + } // end geoGeoBroadcast + + // 6.2.2.10 + group geoTopologicallyScopedBroadcast { + + group GEONW_PON_TSB_BV_01 { + + /** + * @desc TP Function for TC_GEONW_PON_TSB_BV_01 + */ + function f_GEONW_PON_TSB_BV_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_TSB_SRC) { + log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_TSB_BV_01_nodeB()); + v_nodeD.start(f_GEONW_PON_TSB_BV_01_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_TSB_BV_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BV_01) + */ + function f_GEONW_PON_TSB_BV_01_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateTsbMessage) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket(?, mw_longPosVectorPosition(v_longPosVectorIut)) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: TSB packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected TSB message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_TSB_BV_01_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BV_01) + */ + function f_GEONW_PON_TSB_BV_01_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket(?, mw_longPosVectorPosition(v_longPosVectorIut)) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: TSB packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected TSB message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_TSB_BV_01_nodeD + + } // end GEONW_PON_TSB_BV_01 + + group GEONW_PON_TSB_BV_02 { + + /** + * @desc TP Function for TC_GEONW_PON_TSB_BV_02 + */ + function f_GEONW_PON_TSB_BV_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_TSB_FWD) { + log("*** " & testcasename() & ": PICS_GN_TSB_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_TSB_BV_02_nodeB()); + v_nodeD.start(f_GEONW_PON_TSB_BV_02_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_TSB_BV_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BV_02) + */ + function f_GEONW_PON_TSB_BV_02_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var template (value) GeoNetworkingPdu v_gnPacket; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeB + ), + -, + c_defaultHopLimit + ); + v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: TSB packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected TSB message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_TSB_BV_02_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BV_02) + */ + function f_GEONW_PON_TSB_BV_02_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: TSB packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected TSB message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_TSB_BV_02_nodeD + + } // end GEONW_PON_TSB_BV_02 + + group GEONW_PON_TSB_BV_03 { + + /** + * @desc TP Function for TC_GEONW_PON_TSB_BV_03 + */ + function f_GEONW_PON_TSB_BV_03() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_TSB_FWD) { + log("*** " & testcasename() & ": PICS_GN_TSB_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_TSB_BV_03_nodeB()); + v_nodeD.start(f_GEONW_PON_TSB_BV_03_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_TSB_BV_03 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BV_03) + */ + function f_GEONW_PON_TSB_BV_03_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var template (value) GeoNetworkingPdu v_gnPacket; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeB, + c_defaultHopLimit + ), + -, + c_defaultHopLimit + ); + v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ), + -, + c_defaultHopLimit - 1 + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: TSB packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ), + -, + ? + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: TSB packet received with incorrect HopLimit ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected TSB message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_TSB_BV_03_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BV_03) + */ + function f_GEONW_PON_TSB_BV_03_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacketWithHl( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB), + c_defaultHopLimit + ), + -, + c_defaultHopLimit - 1 + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: TSB packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ), + -, + ? + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: TSB packet received with incorrect HopLimit ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected TSB message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_TSB_BV_03_nodeD + + } // end GEONW_PON_TSB_BV_03 + + group GEONW_PON_TSB_BO_04 { + + /** + * @desc TP Function for TC_GEONW_PON_TSB_BO_04 + */ + function f_GEONW_PON_TSB_BO_04() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_TSB_FWD) { + log("*** " & testcasename() & ": PICS_GN_TSB_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_TSB_BO_04_nodeB()); + v_nodeD.start(f_GEONW_PON_TSB_BO_04_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_TSB_BO_04 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BO_04) + */ + function f_GEONW_PON_TSB_BO_04_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var template (value) GeoNetworkingPdu v_gnPacket; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeB + ), + -, + 1 + ); + v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_TSB_BO_04_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BO_04) + */ + function f_GEONW_PON_TSB_BO_04_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: TSB message was re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: TSB message was not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_TSB_BO_04_nodeD + + } // end GEONW_PON_TSB_BO_04 + + /** + * @desc TP Function for TC_GEONW_PON_TSB_BV_05 + */ + function f_GEONW_PON_TSB_BV_05() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var template (value) GeoNetworkingPdu v_gnPacket; + var integer i; + + // Test control + if (not PICS_GN_TSB_DST) { + log("*** " & testcasename() & ": PICS_GN_TSB_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prDefault(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu(m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeB + ) + ); + v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + f_sleep(PX_TAC); + + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + log("*** " & testcasename() & ": TSB packet passed to Upper Layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // End of function f_GEONW_PON_TSB_BV_05 + + group GEONW_PON_TSB_BO_07 { + + /** + * @desc TP Function for TC_GEONW_PON_TSB_BO_07 + */ + function f_GEONW_PON_TSB_BO_07() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_TSB_FWD) { + log("*** " & testcasename() & ": PICS_GN_TSB_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_TSB_BO_07_nodeB()); + v_nodeD.start(f_GEONW_PON_TSB_BO_07_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_TSB_BO_07 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BO_07) + */ + function f_GEONW_PON_TSB_BO_07_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var template GeoNetworkingPdu v_gnPacket; + + // Preamble + f_prNeighbour(); + v_gnPacket := m_geoNwPdu( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeB + ), + -, + c_defaultHopLimit + ); + v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_gnPacket))); + v_gnPacket.basicHeader.routerHopLimit := ?; + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: Expected TSB message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: The same TSB packet was re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: The same TSB packet was not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_TSB_BO_07_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BO_07) + */ + function f_GEONW_PON_TSB_BO_07_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var GeoNetworkingInd v_msgInd; + + // Preamble + f_prNeighbour(); + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) + ) + ) -> value v_msgInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: Expected TSB message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + v_msgInd.msgIn.basicHeader.routerHopLimit := valueof(v_msgInd.msgIn.basicHeader.routerHopLimit) -1; + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_msgInd.msgIn)); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive(v_msgInd) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: The same TSB packet was re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: The same TSB packet was not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_TSB_BO_07_nodeD + + } // end GEONW_PON_TSB_BO_07 + + group GEONW_PON_TSB_BO_08 { + + /** + * @desc TP Function for TC_GEONW_PON_TSB_BV_08 + */ + function f_GEONW_PON_TSB_BO_08() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_TSB_DST) { + log("*** " & testcasename() & ": PICS_GN_TSB_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(c_compNodeB); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_TSB_BO_08_nodeB()); + v_nodeD.start(f_GEONW_PON_TSB_BO_08_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_TSB_BO_08 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BO_08) + */ + function f_GEONW_PON_TSB_BO_08_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var template (value) GeoNetworkingPdu v_gnPacket; + var integer i; + + // Preamble + f_prNeighbour(); + v_gnPacket := m_geoNwPdu(m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeB + ), + -, + c_defaultHopLimit + ); + v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_gnPacket))); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) + ) + ) { + tc_ac.stop; + + f_sleep(PX_TAC); + + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly rebroadcasted and passed to Upper Layer ***"); + vc_utInds := {}; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + else { + log("*** " & testcasename() & ": INCONC: TSB was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: TSB not rebroadcasted ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + f_sleep(PX_TAC); + + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": FAIL: Same TSB packet was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: Same TSB packet was not passed to Upper Layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_TSB_BO_08_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BO_08) + */ + function f_GEONW_PON_TSB_BO_08_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var GeoNetworkingInd v_msgInd; + var integer i; + var template (value) GeoNetworkingPdu v_gnPacket; + + // Preamble + f_prNeighbour(); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) + ) + ) -> value v_msgInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly rebroadcasted ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: TSB not rebroadcasted ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + v_msgInd.msgIn.basicHeader.routerHopLimit := valueof(v_msgInd.msgIn.basicHeader.routerHopLimit) - 1; + v_gnPacket := v_msgInd.msgIn; + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_msgInd.msgIn)); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_TSB_BO_08_nodeD + + } // end GEONW_PON_TSB_BO_08 + + } // end geoTopologicallyScopedBroadcast + + // 6.2.2.11 + group geoSingleHopBroadcast { + + group GEONW_PON_SHB_BV_01 { + + /** + * @desc TP Function for TC_GEONW_PON_SHB_BV_01 + */ + function f_GEONW_PON_SHB_BV_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_SHB_SRC) { + log("*** " & testcasename() & ": PICS_GN_SHB_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_SHB_BV_01_nodeB()); + v_nodeD.start(f_GEONW_PON_SHB_BV_01_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_SHB_BV_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_SHB_BV_01) + */ + function f_GEONW_PON_SHB_BV_01_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateShbMessage) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwShbPacket(mw_longPosVectorPosition(v_longPosVectorIut)) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: SHB packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected SHB message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_SHB_BV_01_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_SHB_BV_01) + */ + function f_GEONW_PON_SHB_BV_01_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwShbPacket(mw_longPosVectorPosition(v_longPosVectorIut)) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: SHB packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected SHB message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_SHB_BV_01_nodeD + + } // end GEONW_PON_SHB_BV_01 + + /** + * @desc TP Function for TC_GEONW_PON_SHB_BV_05 + */ + function f_GEONW_PON_SHB_BV_05() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var template (value) GeoNetworkingPdu v_gnPacket; + var integer i; + + // Test control + if (not PICS_GN_SHB_DST) { + log("*** " & testcasename() & ": PICS_GN_SHB_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB:= f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu(m_geoNwShbPacket(v_longPosVectorNodeB, m_mccMco)); + v_gnPacket.gnPacket.packet.payload := f_adapPayload(valueof(v_gnPacket.gnPacket.packet.payload)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + f_sleep(PX_TAC); + + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_SHB_BV_05 + + } // end geoSingleHopBroadcast + + // 6.2.2.12 + group geoGeoAnycast { + + group gacNonAreaForwarding { + + group gacNonAreaAllForwardingAlgorithm { + + group GEONW_PON_GAC_NONAREA_ALL_BV_03 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_ALL_BV_03 + */ + function f_GEONW_PON_GAC_NONAREA_ALL_BV_03() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GAC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_GAC_NONAREA_ALL_BV_03_nodeB()); + v_nodeC.start(f_GEONW_PON_GAC_NONAREA_ALL_BV_03_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_03 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_ALL_BV_03) + */ + function f_GEONW_PON_GAC_NONAREA_ALL_BV_03_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] a_receiveGeoAnycastWithAreaWithHopLimit( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2), + c_defaultHopLimit - 1, + c_defaultHopLimit) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GAC message correctly retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] a_receiveGeoAnycastWithAreaWithHopLimit( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2), + ?, + ?) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: GAC message fields not updated ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: GAC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_03_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_ALL_BV_03) + */ + function f_GEONW_PON_GAC_NONAREA_ALL_BV_03_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var GeoNetworkingInd v_msgInd; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area2), + c_defaultHopLimit + ), + -, + c_defaultHopLimit + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_03_nodeC + + } // end GEONW_PON_GAC_NONAREA_ALL_BV_03 + + group GEONW_PON_GAC_NONAREA_ALL_BO_04 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_ALL_BO_04 + */ + function f_GEONW_PON_GAC_NONAREA_ALL_BO_04() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GAC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_GAC_NONAREA_ALL_BO_04_nodeB()); + v_nodeC.start(f_GEONW_PON_GAC_NONAREA_ALL_BO_04_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BO_04 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_ALL_BO_04) + */ + function f_GEONW_PON_GAC_NONAREA_ALL_BO_04_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] a_receiveGeoAnycastWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2)) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC message retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BO_04_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_ALL_BO_04) + */ + function f_GEONW_PON_GAC_NONAREA_ALL_BO_04_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area2) + ), + -, + c_hopLimit1 + ) + ) + ); + + tc_noac.start; + alt { + [] a_receiveGeoAnycastWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2)) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC message retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BO_04_nodeC + + } // end GEONW_PON_GAC_NONAREA_ALL_BO_04 + + /** + * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_ALL_BV_06 + */ + function f_GEONW_PON_GAC_NONAREA_ALL_BV_06() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var template (value) GeoNetworkingPdu v_gnPacket; + var integer i; + + // Test control + if (not PICS_GN_GAC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu(m_geoNwAnycastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area2) + ) + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + f_sleep(PX_TAC); + + if(0 != lengthof(vc_utInds)) { + log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GN was NOT transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_06 + + group GEONW_PON_GAC_NONAREA_ALL_BO_09 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_ALL_BO_09 + */ + function f_GEONW_PON_GAC_NONAREA_ALL_BO_09() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + var UInt16 v_distanceTooBig; + + // Test control + if (not PICS_GN_GAC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf04Up(); + v_distanceTooBig := float2int(1.1 * f_radiusFromCircularArea(f_getGnMaxAreaSize()*c_squareKm)); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeB(v_distanceTooBig)); + v_nodeC.start(f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeC(v_distanceTooBig)); + v_nodeD.start(f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeD(v_distanceTooBig)); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BO_09 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_ALL_BO_09) + */ + function f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeB(in UInt16 p_distanceTooBig) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var GeoArea v_areaTooBig; + + // Preamble + f_prNeighbour(); + v_areaTooBig := f_computeCircularArea( + f_computePosition(f_getPosition(c_compNodeB), 1000, 0), + p_distanceTooBig + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_geoArea2GeoAnycastArea(v_areaTooBig) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC message retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_ALL_BO_09) + */ + function f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeC(in UInt16 p_distanceTooBig) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var GeoArea v_areaTooBig; + + // Preamble + f_prNeighbour(); + v_areaTooBig := f_computeCircularArea( + f_computePosition(f_getPosition(c_compNodeB), 1000, 0), + p_distanceTooBig + ); + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_geoArea2GeoAnycastArea(v_areaTooBig) + ) + ) + ) + ); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_geoArea2GeoAnycastArea(v_areaTooBig) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC message retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_ALL_BO_09) + */ + function f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeD(in UInt16 p_distanceTooBig) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var GeoArea v_areaTooBig; + + // Preamble + f_prNeighbour(); + v_areaTooBig := f_computeCircularArea( + f_computePosition(f_getPosition(c_compNodeB), 1000, 0), + p_distanceTooBig + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_geoArea2GeoAnycastArea(v_areaTooBig) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC message retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BO_09_nodeD + + } // end GEONW_PON_GAC_NONAREA_ALL_BO_09 + + group GEONW_PON_GAC_NONAREA_ALL_BV_10 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_ALL_BV_10 + */ + function f_GEONW_PON_GAC_NONAREA_ALL_BV_10() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GAC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { +// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); +// setverdict(inconc); +// stop; +// } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeB()); + v_nodeC.start(f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeC()); + v_nodeD.start(f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_10 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_ALL_BV_10) + */ + function f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeB() runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC received and not discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_ALL_BV_10) + */ + function f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeC() runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC received and not discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_ALL_BV_10) + */ + function f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + v_longPosVectorNodeD, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area2) + ) + ) + ) + ); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC received and not discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeD + + } // end GEONW_PON_GAC_NONAREA_ALL_BV_10 + + } // end gacNonAreaAllForwardingAlgorithm + + group gacNonAreaGreedyForwarding { + + group GEONW_PON_GAC_NONAREA_GRD_BV_01 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_GRD_BV_01 + */ + function f_GEONW_PON_GAC_NONAREA_GRD_BV_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GAC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_greedy or e_unspecified ) required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GAC_NONAREA_GRD_BV_01_nodeB()); + v_nodeD.start(f_GEONW_PON_GAC_NONAREA_GRD_BV_01_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BV_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_GRD_BV_01) + */ + function f_GEONW_PON_GAC_NONAREA_GRD_BV_01_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoAnycastMessage(f_getArea(c_area2))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveGeoAnycastWithArea( + mw_longPosVectorPosition(v_longPosVectorIut), + ?, + f_getGeoAnycastArea(c_area2)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GAC message received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BV_01_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_GRD_BV_01) + */ + function f_GEONW_PON_GAC_NONAREA_GRD_BV_01_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] a_receiveGeoAnycastWithArea( + mw_longPosVectorPosition(v_longPosVectorIut), + ?, + f_getGeoAnycastArea(c_area2)) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: received GAC message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BV_01_nodeD + + } // end GEONW_PON_GAC_NONAREA_GRD_BV_01 + + group GEONW_PON_GAC_NONAREA_GRD_BV_02 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_GRD_BV_02 + */ + function f_GEONW_PON_GAC_NONAREA_GRD_BV_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GAC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_greedy or e_unspecified ) required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeB()); + v_nodeC.start(f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeC()); + v_nodeD.start(f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BV_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_GRD_BV_02) + */ + function f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] a_receiveGeoAnycastWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GAC message correctly forwarded to area center ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_GRD_BV_02) + */ + function f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area2) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_GRD_BV_02) + */ + function f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] a_receiveGeoAnycastWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2)) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC message not forwarded to area center ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeD + + } // end GEONW_PON_GAC_NONAREA_GRD_BV_02 + + group GEONW_PON_GAC_NONAREA_GRD_BO_07 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_GRD_BO_07 + */ + function f_GEONW_PON_GAC_NONAREA_GRD_BO_07() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + var UInt16 v_sequenceNumber := f_getInitialSequenceNumber(); + + // Test control + if (not PICS_GN_GAC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if ((f_getNonAreaForwardingAlgorithm() != e_greedy) and (f_getNonAreaForwardingAlgorithm() != e_unspecified)) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_greedy or e_unspecified ) required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeB()); + v_nodeC.start(f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeC(v_sequenceNumber)); + v_nodeD.start(f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeD(v_sequenceNumber)); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BO_07 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_GRD_BO_07) + */ + function f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var GeoNetworkingInd v_msgInd; + var template GeoNetworkingInd v_msgInd_t; + + // Preamble + f_prNeighbour(); + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2) + ) + ) + ) + ) -> value v_msgInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: GAC message correctly forwarded to area center ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + v_msgInd_t := v_msgInd; + v_msgInd_t.msgIn.basicHeader.routerHopLimit := ?; + tc_noac.start; + alt { + [] geoNetworkingPort.receive(v_msgInd_t) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC message re-forwarded to area center ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message not re-forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_GRD_BO_07) + */ + function f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeC(in UInt16 p_sequenceNumber) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + v_longPosVectorNodeC, + p_sequenceNumber, + f_getGeoAnycastArea(c_area2) + ), + -, + c_defaultHopLimit + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] a_receiveGeoAnycastWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2)) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC re-forwarded! (not to area center!) ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_GRD_BO_07) + */ + function f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeD(in UInt16 p_sequenceNumber) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": INCONC: Pre-conditions: GAC message not forwarded to area center ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: Pre-conditions: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + } + + // Test Body + // send geoAnycast for second time (same source + same seq Nr + lower RHL) + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + v_longPosVectorNodeC, + p_sequenceNumber, + f_getGeoAnycastArea(c_area2) + ), + -, + c_defaultHopLimit - 1 + ) + ) + ); + + tc_noac.start; + alt { + [] a_receiveGeoAnycastWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2)) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC re-forwarded! (not to area center!) ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_GRD_BO_07_nodeD + + } // end GEONW_PON_GAC_NONAREA_GRD_BO_07 + + + } // end gacNonAreaGreedyForwarding + + group gacNonAreaContentionBasedForwarding { + + group GEONW_PON_GAC_NONAREA_CBF_BV_01 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_CBF_BV_01 + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GAC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + if(f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_cbf ) required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_01_nodeB()); + v_nodeD.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_01_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_CBF_BV_01) + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_01_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if(not f_utTriggerEvent(m_generateGeoAnycastMessage(f_getArea(c_area2)))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveGeoAnycastWithArea( + mw_longPosVectorPosition(v_longPosVectorIut), + ?, + f_getGeoAnycastArea(c_area2)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GAC message received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_01_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_CBF_BV_01) + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_01_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] a_receiveGeoAnycastWithArea( + mw_longPosVectorPosition(v_longPosVectorIut), + ?, + f_getGeoAnycastArea(c_area2)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: received GAC message ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GAC message not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_01_nodeD + + } // end GEONW_PON_GAC_NONAREA_CBF_BV_01 + + group GEONW_PON_GAC_NONAREA_CBF_BV_02 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_CBF_BV_02 + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GAC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { +// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); +// setverdict(inconc); +// stop; +// } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeB()); + v_nodeC.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeC()); + v_nodeD.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_CBF_BV_02) + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GAC message broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GAC message not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_CBF_BV_02) + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + timer t_toCbf := (int2float(f_getCbfMaxTime()) + + ( + int2float(f_getCbfMinTime() - f_getCbfMaxTime()) + / int2float(f_getCbfMaxCommunicationRange()) + ) * f_distance(v_longPosVectorNodeC, v_longPosVectorIut)) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area2) + ) + ) + ) + ); + + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2) + )))) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GAC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GAC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_CBF_BV_02) + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GAC message broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GAC message not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_02_nodeD + + } // end GEONW_PON_GAC_NONAREA_CBF_BV_02 + + group GEONW_PON_GAC_NONAREA_CBF_BV_07 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_CBF_BV_07 + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_07() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + var UInt16 v_sequenceNumberC := f_getInitialSequenceNumber(); + + // Test control + if (not PICS_GN_GAC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { +// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); +// setverdict(inconc); +// stop; +// } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeB()); + v_nodeC.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeC(v_sequenceNumberC)); + v_nodeD.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeD(v_sequenceNumberC)); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_07 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_CBF_BV_07) + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC message re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_CBF_BV_07) + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeC(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + v_longPosVectorNodeC, + p_sequenceNumberC, + f_getGeoAnycastArea(c_area2) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC message re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_CBF_BV_07) + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_07_nodeD(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + v_longPosVectorNodeC, + p_sequenceNumberC, + f_getGeoAnycastArea(c_area2) + ) + ) + ) + ); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2) + )))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC message re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_071_nodeD + + } // end GEONW_PON_GAC_NONAREA_CBF_BV_07 + + group GEONW_PON_GAC_NONAREA_CBF_BV_20 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_CBF_BV_20 + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_20() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var float v_distance := int2float(f_getCbfMaxCommunicationRange() * 2); + var LongPosVector v_longPosVectorIut, v_longPosVectorNodeC; + + // Test control + if (not PICS_GN_GAC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + // re-compute NodeC's position. + v_longPosVectorIut := f_getIutLongPosVector(); + v_longPosVectorNodeC := f_computePositionUsingDistance(v_longPosVectorIut, v_distance, 180); + v_longPosVectorNodeC.gnAddr := f_getTsGnLocalAddress(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_20_nodeB(v_longPosVectorNodeC)); + v_nodeC.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_20_nodeC(v_longPosVectorNodeC)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_msgSent, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_20 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_CBF_BV_20) + * @param p_longPosVectorNodeC Position vector of NodeC + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_20_nodeB(in LongPosVector p_longPosVectorNodeC) runs on ItsGeoNetworking { + + // Local variables + timer t_toCbf := int2float(f_getCbfMinTime()) / 1000.0; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + log("*** " & testcasename() & ": INFO: Message sent ***"); + f_selfOrClientSyncAndVerdict(c_msgSent, e_success); + + tc_ac.start; + t_toCbf.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(p_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2) + )))) { + tc_ac.stop; + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: IUT re-broadcasted the packet too early ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: Ready for receiving re-broadcasting ***"); + repeat; + } + + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_20_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_CBF_BV_20) + * @param p_longPosVectorNodeC Position vector of NodeC + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_20_nodeC(LongPosVector p_longPosVectorNodeC) runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + p_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area2) + ) + ) + ) + ); + + log("*** " & testcasename() & ": INFO: Message sent ***"); + f_selfOrClientSyncAndVerdict(c_msgSent, e_success); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(p_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_20_nodeC + + } // end GEONW_PON_GAC_NONAREA_CBF_BV_20 + + group GEONW_PON_GAC_NONAREA_CBF_BV_21 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_CBF_BV_21 + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_21() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GAC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { +// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); +// setverdict(inconc); +// stop; +// } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeB()); + v_nodeC.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeC()); + v_nodeD.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_21 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_CBF_BV_21) + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GAC broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GAC not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_CBF_BV_21) + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeC() runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GAC message re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GAC message not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_CBF_BV_21) + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area2) + ) + ) + ) + ); + + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ?, + f_getGeoAnycastArea(c_area2) + )))) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GAC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GAC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeD + + } // end GEONW_PON_GAC_NONAREA_CBF_BV_21 + + group GEONW_PON_GAC_NONAREA_CBF_BV_22 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_NONAREA_CBF_BV_22 + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_22() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GAC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (f_getNonAreaForwardingAlgorithm() != e_cbf) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // if (f_getCbfMinTime() < 300) { +// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); +// setverdict(inconc); +// stop; +// } + + // Test component configuration + f_cf04Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeB()); + v_nodeC.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeC()); + v_nodeD.start(f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_22 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_NONAREA_CBF_BV_22) + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeA), + ?, + f_getGeoAnycastArea(c_area2) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GAC broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GAC not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_NONAREA_CBF_BV_22) + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + timer t_toCbf := int2float(f_getCbfMaxTime()) * PX_DEC_TIMER_CONTROL_FACTOR / 1000.0; + + // Preamble + v_longPosVectorNodeC.pai := int2bit(0,1); + f_changePositon(c_compNodeC, v_longPosVectorNodeC); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + v_longPosVectorNodeA, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area2) + ) + ) + ) + ); + + t_toCbf.start; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeA), + ?, + f_getGeoAnycastArea(c_area2) + )))) { + tc_ac.stop; + + if(t_toCbf.running) { + t_toCbf.stop; + log("*** " & testcasename() & ": FAIL: GAC retransmitted before CBF timer expiration ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GAC message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_toCbf.timeout { + log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_NONAREA_CBF_BV_22) + */ + function f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeA), + ?, + f_getGeoAnycastArea(c_area2) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GAC broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GAC not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeD + + } // end GEONW_PON_GAC_NONAREA_CBF_BV_22 + + } // end gacNonAreaContentionBasedForwarding + + } // end gacNonAreaForwarding + + group gacAreaForwarding { + + group GEONW_PON_GAC_AREA_ALL_BV_01 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_AREA_ALL_BV_01 + */ + function f_GEONW_PON_GAC_AREA_ALL_BV_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GAC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GAC_AREA_ALL_BV_01_nodeB()); + v_nodeD.start(f_GEONW_PON_GAC_AREA_ALL_BV_01_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_GAC_AREA_ALL_BV_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_AREA_ALL_BV_01) + */ + function f_GEONW_PON_GAC_AREA_ALL_BV_01_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoAnycastMessage(f_getArea(c_area1))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveGeoAnycastWithArea( + mw_longPosVectorPosition(v_longPosVectorIut), + ?, + f_getGeoAnycastArea(c_area1)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GAC message received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_AREA_ALL_BV_01_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_AREA_ALL_BV_01) + */ + function f_GEONW_PON_GAC_AREA_ALL_BV_01_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] a_receiveGeoAnycastWithArea( + mw_longPosVectorPosition(v_longPosVectorIut), + ?, + f_getGeoAnycastArea(c_area1)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GAC message received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_AREA_ALL_BV_01_nodeD + + } // end GEONW_PON_GAC_AREA_ALL_BV_01 + + group GEONW_PON_GAC_AREA_ALL_BV_02 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_AREA_ALL_BV_02 + */ + function f_GEONW_PON_GAC_AREA_ALL_BV_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_GAC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GAC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GAC_AREA_ALL_BV_02_nodeB()); + v_nodeD.start(f_GEONW_PON_GAC_AREA_ALL_BV_02_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_GAC_AREA_ALL_BV_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_AREA_ALL_BV_02) + */ + function f_GEONW_PON_GAC_AREA_ALL_BV_02_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area1) + ) + ) + ) + ); + + tc_noac.start; + alt { + [] a_receiveGeoAnycastWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoAnycastArea(c_area1)) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC message retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_AREA_ALL_BV_02_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_AREA_ALL_BV_02) + */ + function f_GEONW_PON_GAC_AREA_ALL_BV_02_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] a_receiveGeoAnycastWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoAnycastArea(c_area1)) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GAC message retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GAC message not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_AREA_ALL_BV_02_nodeD + + } // end GEONW_PON_GAC_AREA_ALL_BV_02 + + /** + * @desc TP Function for TC_GEONW_PON_GAC_AREA_ALL_BV_05 + */ + function f_GEONW_PON_GAC_AREA_ALL_BV_05() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var template (value) GeoNetworkingPdu v_gnPacket; + var integer i; + + // Test control + if (not PICS_GN_GAC_DST) { + log("*** " & testcasename() & ": PICS_GN_GAC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu(m_geoNwAnycastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area1) + ) + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + f_sleep(PX_TAC); + + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + log("*** " & testcasename() & ": GAC packet passed to Upper Layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_PON_GAC_AREA_ALL_BV_05 + + group GEONW_PON_GAC_AREA_ALL_BO_08 { + + /** + * @desc TP Function for TC_GEONW_PON_GAC_AREA_ALL_BO_08 + */ + function f_GEONW_PON_GAC_AREA_ALL_BO_08() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + var template (value) GeoNetworkingPdu v_gnPacket; + + // Test control + if (not PICS_GN_GAC_DST) { + log("*** " & testcasename() & ": PICS_GN_GAC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(c_compNodeB); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_GAC_AREA_ALL_BO_08_nodeB()); + v_nodeD.start(f_GEONW_PON_GAC_AREA_ALL_BO_08_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // End of function f_GEONW_PON_GAC_AREA_ALL_BO_08 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_AREA_ALL_BO_08) + */ + function f_GEONW_PON_GAC_AREA_ALL_BO_08_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); + var template (value) GeoNetworkingPdu v_gnPacket; + var integer i; + + // Preamble + f_prNeighbour(); + + f_sleep(PX_TAC); + + v_gnPacket := m_geoNwPdu(m_geoNwAnycastPacket( + v_longPosVectorNodeD, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area1) + ), + -, + c_defaultHopLimit + ); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, valueof(v_gnPacket.gnPacket.packet.payload)); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); + vc_utInds := {}; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + else { + log("*** " & testcasename() & ": INCONC: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + + // Test Body + v_gnPacket.basicHeader.routerHopLimit := valueof(v_gnPacket.basicHeader.routerHopLimit) / 2; + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + f_sleep(PX_TAC); + + if(0 != lengthof(vc_utInds)) { + log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GN was NOT transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_AREA_ALL_BO_08_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_AREA_ALL_BO_08) + */ + function f_GEONW_PON_GAC_AREA_ALL_BO_08_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); + var template (value) GeoNetworkingPdu v_gnPacket; + var integer i; + + // Preamble + f_prNeighbour(); + v_gnPacket := m_geoNwPdu(m_geoNwAnycastPacket( + v_longPosVectorNodeD, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area1) + ), + -, + c_defaultHopLimit + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_PON_GAC_AREA_ALL_BO_08_nodeD + + } // end GEONW_PON_GAC_AREA_ALL_BO_08 + + } // end gacAreaForwarding + + } // end geoGeoAnycast + + } // end geoProtocolOperation + + // 6.2.3 Capacities + group geoCapacities { + + // 6.2.3.1 + group geoCapLocationService { + + /** + * @desc TP Function for TC_GEONW_CAP_LOS_BV_01 + */ + function f_GEONW_CAP_LOS_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + var GeoNetworkingInd v_msg; + var integer v_packetSize := 0; + var integer v_index := 0; + var integer v_nbrOfPackets := 0; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + v_longPosVectorIut := f_getPosition(c_compIut); + f_prNeighbour(); + + // Trigger message to NodeB in order to get an estimation of packet size + if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithPayload(v_longPosVectorNodeB.gnAddr, char2oct("PAYLOAD_" & oct2str(int2oct(0, 2))))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), + ? + ) + ) + ) + ) -> value v_msg { + var GeoNetworkingReq v_req; + tc_ac.stop; + //if we use directly v_msg(GeoNetworkingInd) for encvalue the encoder must also be able to provide + //encoding of "incoming messages"... + v_req.msgOut := v_msg.msgIn; + v_packetSize := lengthof(bit2oct(encvalue(v_req.msgOut))); + } + } + + // implicitely trigger LS_REQUEST + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest( + ?, + v_longPosVectorNodeA.gnAddr.mid, + v_longPosVectorIut + ) { + } + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + // Fill the LS buffer + one more message to remove an older message + v_nbrOfPackets := f_getLsPacketBufferSize() / v_packetSize + 1; + log("*** " & testcasename() & ": " & int2str(v_nbrOfPackets) & " ***"); + for (v_index:=1; v_index <= v_nbrOfPackets; v_index:=v_index+1) { + if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithPayload(v_longPosVectorNodeA.gnAddr, char2oct("PAYLOAD_" & oct2str(int2oct(v_index, 2))))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + f_sleepIgnoreDef(0.5); + f_sendGeoNetMessage( + valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwLsReplyPacket( + v_longPosVectorNodeB, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + ) + ) + )); + + // packet 1 shall be dropped + v_index := 2; + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + f_receiveGeoNetMessageWithPayload( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ), + char2oct("PAYLOAD_" & oct2str(int2oct(v_index, 2))) + ) + ) { + if (v_index < v_nbrOfPackets) { + v_index := v_index + 1; + repeat; + } + tc_ac.stop; + log("*** " & testcasename() & ": Older message was removed, new message was inserted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Expected amount of messages were not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // End of function f_GEONW_CAP_LOS_BV_01 + + } // end geoCapLocationService + + // 6.2.3.2 + group geoCapForwardingPacketBuffer { + + group GEONW_CAP_FPB_BV_01 { + + /** + * @desc TP Function for TC_GEONW_CAP_LOS_BV_01 + */ + function f_GEONW_CAP_FPB_BV_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var template (value) GeoNetworkingPdu v_geoNetworkingMsg; + var integer v_packetSize := 0; + var integer v_nbrOfPackets := 0; + var integer v_payloadSize := f_min(1400, f_getUcForwardingPacketBufferSize() / 10 ); + var octetstring v_payload; + const integer c_nbrOfDiscardedMessages := 1; + var UInt16 v_sequenceNumberC := f_getInitialSequenceNumber(); + + // Test control + if (not PICS_GN_GUC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Prepare GUC message + v_payload := int2oct(0, v_payloadSize); + v_geoNetworkingMsg := m_geoNwPdu( + m_geoNwUnicastPacket( + m_dummyLongPosVector, + f_longPosVector2ShortPosVector(valueof(m_dummyLongPosVector)), + 0) + ); + v_geoNetworkingMsg.gnPacket.packet.payload := valueof(v_payload); + v_packetSize := lengthof(bit2oct(encvalue(v_geoNetworkingMsg))); + + // Fill the UC forwarding buffer + c_nbrOfDiscardedMessages more message to remove older messages + v_nbrOfPackets := f_getUcForwardingPacketBufferSize() / v_packetSize + c_nbrOfDiscardedMessages + 1; + log("*** " & testcasename() & ": " & int2str(v_nbrOfPackets) & " ***"); + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_CAP_FPB_BV_01_nodeB(v_sequenceNumberC, v_nbrOfPackets, c_nbrOfDiscardedMessages)); + v_nodeC.start(f_GEONW_CAP_FPB_BV_01_nodeC(v_sequenceNumberC, v_nbrOfPackets, v_geoNetworkingMsg)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_CAP_FPB_BV_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_CAP_FPB_BV_01) + * @param p_sequenceNumberC Initial sequence number of NodeC + * @param p_nbrOfPackets Number of packets sent by other component + * @param p_nbrOfDiscardedMessages Number of packets that should be discarded + */ + function f_GEONW_CAP_FPB_BV_01_nodeB( + in UInt16 p_sequenceNumberC, + in integer p_nbrOfPackets, + in integer p_nbrOfDiscardedMessages + ) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var UInt16 v_expectedSeqNumber := p_sequenceNumberC + p_nbrOfDiscardedMessages + 1; + var integer v_nbReceivedMessages := 0; + + // Preamble + f_prDefault(); // NodeB is not yet a neighbour + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_startBeingNeighbour(); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + v_expectedSeqNumber + ) + ) + ) + ) { + v_nbReceivedMessages := v_nbReceivedMessages + 1; + v_expectedSeqNumber := v_expectedSeqNumber + 1; + repeat; // repeat in any case => IUT may send more messages ! + } + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Unexpected message received (Bad sequence number) ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + if(v_nbReceivedMessages == (p_nbrOfPackets - p_nbrOfDiscardedMessages)) { + log("*** " & testcasename() & ": PASS: Older messages wer removed, new messages were inserted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: Expected amount of messages were not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_CAP_FPB_BV_01_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_CAP_FPB_BV_01) + * @param p_sequenceNumberC Initial sequence number of NodeC + * @param p_nbrOfPackets Number of packets to be send + * @param p_geoNetworkingMsg Pdu to be sent (template) + */ + function f_GEONW_CAP_FPB_BV_01_nodeC( + in UInt16 p_sequenceNumberC, + in integer p_nbrOfPackets, + in template (value) GeoNetworkingPdu p_geoNetworkingMsg + ) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var integer i := 0; + + // Preamble + f_prNeighbour(); + vc_localSeqNumber := p_sequenceNumberC; + + p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoUnicastHeader.srcPosVector := v_longPosVectorNodeC; + p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoUnicastHeader.dstPosVector := f_longPosVector2ShortPosVector(v_longPosVectorNodeA); + for (i:=0; i < p_nbrOfPackets; i:=i+1) { + p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoUnicastHeader.seqNumber := vc_localSeqNumber; + f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(p_geoNetworkingMsg))); + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_CAP_FPB_BV_01_nodeC + + } // end GEONW_CAP_FPB_BV_01 + + group GEONW_CAP_FPB_BV_02 { + + /** + * @desc TP Function for TC_GEONW_CAP_FPB_BV_02 + */ + function f_GEONW_CAP_FPB_BV_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var template (value) GeoNetworkingPdu v_geoNetworkingMsg; + var integer v_packetSize := 0; + var integer v_nbrOfPackets := 0; + const integer c_nbrOfDiscardedMessages := 1; + var UInt16 v_sequenceNumberC := f_getInitialSequenceNumber(); + const octetstring c_defaultPayload := char2oct("DEFAULT_PAYLOAD"); + const integer c_itsGnMaxSduSize := 1398; + var octetstring v_payload := c_defaultPayload; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Prepare GBC message + v_geoNetworkingMsg := m_geoNwPdu(m_geoNwBroadcastPacket( + m_dummyLongPosVector, + 0, + m_dummyGeoBroadcastArea)); + + while (lengthof(v_payload) < (c_itsGnMaxSduSize- lengthof(c_defaultPayload))) { + v_payload := v_payload & c_defaultPayload; + } + + v_geoNetworkingMsg.gnPacket.packet.payload := valueof(v_payload); + + v_packetSize := lengthof(bit2oct(encvalue(v_geoNetworkingMsg))); + + // Fill the BC forwarding buffer + c_nbrOfDiscardedMessages more message to remove older messages + v_nbrOfPackets := f_getBcForwardingPacketBufferSize() / v_packetSize + c_nbrOfDiscardedMessages; + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_CAP_FPB_BV_02_nodeB(v_sequenceNumberC, v_nbrOfPackets, c_nbrOfDiscardedMessages)); + v_nodeC.start(f_GEONW_CAP_FPB_BV_02_nodeC(v_sequenceNumberC, v_nbrOfPackets, v_geoNetworkingMsg)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // End of function f_GEONW_CAP_FPB_BV_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_CAP_FPB_BV_02) + * @param p_sequenceNumberC Initial sequence number of NodeC + * @param p_nbrOfPackets Number of packets sent by other component + * @param p_nbrOfDiscardedMessages Number of packets that should be discarded + */ + function f_GEONW_CAP_FPB_BV_02_nodeB( + in UInt16 p_sequenceNumberC, + in integer p_nbrOfPackets, + in integer p_nbrOfDiscardedMessages + ) runs on ItsGeoNetworking { + + // Local variables +// FIXME: remove var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var UInt16 v_expectedSeqNumber := p_sequenceNumberC + p_nbrOfDiscardedMessages; + var integer v_nbReceivedMessages := 0; + + // Preamble + f_prDefault(); // NodeB is not yet a neighbour + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_startBeingNeighbour(); + + tc_ac.start; + alt { + [] a_receiveGeoBroadcast( + mw_longPosVectorPosition(v_longPosVectorNodeC), + v_expectedSeqNumber + ) { + v_nbReceivedMessages := v_nbReceivedMessages + 1; + v_expectedSeqNumber := v_expectedSeqNumber + 1; + repeat; // repeat in any case => IUT may send more messages ! + } + [] a_receiveGeoBroadcast( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ? + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Unexpected message received (Bad sequence number) ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + if(v_nbReceivedMessages == (p_nbrOfPackets - p_nbrOfDiscardedMessages)) { + log("*** " & testcasename() & ": PASS: Older messages wer removed, new messages were inserted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: Expected amount of messages were not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + } + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_CAP_FPB_BV_02_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_CAP_FPB_BV_02) + * @param p_sequenceNumberC Initial sequence number of NodeC + * @param p_nbrOfPackets Number of packets to be send + * @param p_geoNetworkingMsg Pdu to be sent (template) + */ + function f_GEONW_CAP_FPB_BV_02_nodeC( + in UInt16 p_sequenceNumberC, + in integer p_nbrOfPackets, + in template (value) GeoNetworkingPdu p_geoNetworkingMsg + ) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var integer i := 0; + var GnRawPayload v_payload := valueof(p_geoNetworkingMsg.gnPacket.packet.payload); //save the given payload + + // Preamble + f_prNeighbour(); + vc_localSeqNumber := p_sequenceNumberC; + + p_geoNetworkingMsg.gnPacket.packet := m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + 0, + f_getGeoBroadcastArea(c_area2) + ); + p_geoNetworkingMsg.gnPacket.packet.payload := v_payload; //set back the original given payload + + for (i:=0; i < p_nbrOfPackets; i:=i+1) { + p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoBroadcastHeader.seqNumber := vc_localSeqNumber; + f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(p_geoNetworkingMsg))); + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // End of function f_GEONW_CAP_FPB_BV_02_nodeC + + } // end GEONW_CAP_FPB_BV_02 + + } // end geoCapForwardingPacketBuffer + + } // end geoCapacities + +} // end ItsGeoNetworking_TpFunctions diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..26b0acfee3a2d783178304a5ca8c2c1719942c62 --- /dev/null +++ b/LICENSE @@ -0,0 +1,23 @@ +Copyright 2023 ETSI + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED +OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index 943c30f776754f328895baeee6091a1619b292cf..f4666a90538791248d2e971684a4b3c13223938f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # GeoNetworking Abstract Test suite (TS 102 871-3) -GeoNetworking (GN) abstract test suite (ATS) as defined in [ETSI TS 102 871-3 v1.5.1](https://www.etsi.org/deliver/etsi_ts/102800_102899/10287103/01.05.01_60/ts_10287103v010501p.pdf) +GeoNetworking (GN) abstract test suite (ATS) as defined in [ETSI TS 102 871-3 v2.1.1](https://www.etsi.org/deliver/etsi_ts/102800_102899/10287103/02.01.01_60/ts_10287103v020101p.pdf) This code is a part of the ETSI ITS test suite, available on https://forge.etsi.org/rep/ITS/TS.ITS -This version of the test suite was developed by the _TTF-011_ and published as version **v1.5.1** +This version of the test suite was developed by the _TTF-042_ and published as version **v2.1.1** diff --git a/lib/LibItsGeoNetworking_Pics.ttcn b/lib/LibItsGeoNetworking_Pics.ttcn index eaf4f92d176721937ca73e756d6446be5509a80f..d5e9575b93c9d2863354632109b4bfd57c965885 100644 --- a/lib/LibItsGeoNetworking_Pics.ttcn +++ b/lib/LibItsGeoNetworking_Pics.ttcn @@ -365,6 +365,12 @@ module LibItsGeoNetworking_Pics { */ modulepar boolean PICS_GN_DAD := true; + /** + * @desc Support for DCC_NET + * @see ETSI TS 102 871-1 Table A.16 + */ + modulepar boolean PICS_DCC_NET := true; + /** * @desc MAX_COUNTER used in Advanced GBC forwarding * @see FIXME: not defined as protocol constant in base spec @@ -375,7 +381,21 @@ module LibItsGeoNetworking_Pics { * @desc IUT's Mac address */ modulepar MacAddress PICS_IUT_MAC_ADDRESS := 'FFFFFFFFFFFF'O; + + group radioComm { + + type enumerated RadioAccess { + e_its_g5, + e_lte_cv2x + } + + /** + * @desc Does radio communication use ITS-G5 or LTE-V2X? + * @see ETSI TS 102 871-1 Table A.17 + */ + modulepar RadioAccess PICS_RADIO_COMM := e_its_g5; + } // End of group radioComm } // end geoNwPics /** diff --git a/lib/LibItsGeoNetworking_Pixits.ttcn b/lib/LibItsGeoNetworking_Pixits.ttcn index 1c4fd961d70ff7339c4b6ad9da298ebb4ff1b729..ea6bf5e18ec0065ae496b571610e977ec0d7e019 100644 --- a/lib/LibItsGeoNetworking_Pixits.ttcn +++ b/lib/LibItsGeoNetworking_Pixits.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / STF405 / STF449 / STF484 / STF517 / TTF T036 + * @author ETSI / STF405 / STF449 / STF484 / STF517 / TTF T036 / TTF T042 * @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/GeoNetworking/LibItsGeoNetworking_Pixits.ttcn $ * $Id: LibItsGeoNetworking_Pixits.ttcn,v 1.4 2018/05/31 15:57:10 dte Exp $ * @desc GeoNetworking PICS diff --git a/lib/LibItsGeoNetworking_Templates.ttcn b/lib/LibItsGeoNetworking_Templates.ttcn index 81d5361d71ac8b8318efe6a72198a393e7b564d5..c9c8b059fff6cb3f66a019faaf20793256f89d4b 100644 --- a/lib/LibItsGeoNetworking_Templates.ttcn +++ b/lib/LibItsGeoNetworking_Templates.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / STF405 / STF449 / STF484 / STF517 / TTF T036 + * @author ETSI / STF405 / STF449 / STF484 / STF517 / TTF T036 / TTF T042 * @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/GeoNetworking/LibItsGeoNetworking_Templates.ttcn $ * $Id: LibItsGeoNetworking_Templates.ttcn,v 1.5 2018/05/31 15:57:10 dte Exp $ * @desc GeoNetworking Templates @@ -1230,11 +1230,13 @@ module LibItsGeoNetworking_Templates { group geoNwPacketShbTemplates { /** - * @desc Send template for GeoNetworking SHB Packet + * @desc Send template for GeoNetworking SHB Packet (Case ITS G5) * @param p_sourceLongPosVec Long position vector of source + * @param p_mccMco Media-dependent data */ template (value) GnNonSecuredPacket m_geoNwShbPacket( - in template (value) LongPosVector p_sourceLongPosVec + in template (value) LongPosVector p_sourceLongPosVec, + in template (value) MccMco p_mccMco ) := { commonHeader := valueof(m_commonHeader( PX_GN_UPPER_LAYER, @@ -1243,26 +1245,96 @@ module LibItsGeoNetworking_Templates { c_defaultHopLimit )), extendedHeader := valueof(m_shbHeader( - p_sourceLongPosVec + p_sourceLongPosVec, + p_mccMco )), payload := valueof(char2oct("DEFAULT_PAYLOAD")) } /** - * @desc Receive template for GeoNetworking SHB Packet + * @desc Receive template for GeoNetworking SHB Packet (Case ITS G5) + * @param p_sourceLongPosVec Long position vector of source (Default: ?) + * @param p_hopLimit Maximum number of hops (Default: ?) + * @param p_timeSynchronization Media-dependent data + * @see ETSI TS 103 836-4-3 V2.1.1 Table 4: Fields of the SHB packet header + */ + template (present) GnNonSecuredPacket mw_geoNwShbPacket( + template (present) LongPosVector p_sourceLongPosVec := ?, + template (present) UInt8 p_hopLimit := ?, + template (present) MccMco p_mccMco := ? + ) := { + commonHeader := mw_commonHeaderWithHopLimit( + PX_GN_UPPER_LAYER, + m_shbHeaderType, + p_hopLimit + ), + extendedHeader := mw_shbHeader(p_sourceLongPosVec, p_mccMco), + payload := * + } + + template (value) MccMco m_mccMco( + in Oct1 p_cbr_l_0_hop := 'FF'O, + in Oct1 p_cbr_l_1_hop := 'FF'O, + in Bit4 p_eirp := '1111'B + ) := { + cbr_l_0_hop := p_cbr_l_0_hop, + cbr_l_1_hop := p_cbr_l_1_hop, + eirp := p_eirp, + reserved := '0000'B, + reserved1 := '00'O + } + + template (present) MccMco mw_mccMco( + template (present) Oct1 p_cbr_l_0_hop := ?, + template (present) Oct1 p_cbr_l_1_hop := ?, + template (present) Bit4 p_eirp := ? + ) := { + cbr_l_0_hop := p_cbr_l_0_hop, + cbr_l_1_hop := p_cbr_l_1_hop, + eirp := p_eirp, + reserved := '0000'B, + reserved1 := '00'O + } + + /** + * @desc Send template for GeoNetworking SHB Packet (Case C-V2X) + * @param p_sourceLongPosVec Long position vector of source + * @param p_timeSynchronization Media-dependent data + */ + template (value) GnNonSecuredPacket m_geoNwShbPacket_c_v2x( + in template (value) LongPosVector p_sourceLongPosVec, + in template (value) TimeSynchronization p_timeSynchronization + ) := { + commonHeader := valueof(m_commonHeader( + PX_GN_UPPER_LAYER, + m_shbHeaderType, + m_trafficClass, + c_defaultHopLimit + )), + extendedHeader := valueof(m_shbHeader_c_v2x( + p_sourceLongPosVec, + p_timeSynchronization + )), + payload := valueof(char2oct("DEFAULT_PAYLOAD")) + } + + /** + * @desc Receive template for GeoNetworking SHB Packet (Case C-V2X) * @param p_sourceLongPosVec Long position vector of source (Default: ?) * @param p_hopLimit Maximum number of hops (Default: ?) + * @param p_timeSynchronization Media-dependent data (Default: ?) */ - template (present) GnNonSecuredPacket mw_geoNwShbPacket( + template (present) GnNonSecuredPacket mw_geoNwShbPacket_c_v2x( template (present) LongPosVector p_sourceLongPosVec := ?, - template (present) UInt8 p_hopLimit := ? + template (present) UInt8 p_hopLimit := ?, + template (present) TimeSynchronization p_timeSynchronization := ? ) := { commonHeader := mw_commonHeaderWithHopLimit( PX_GN_UPPER_LAYER, m_shbHeaderType, p_hopLimit ), - extendedHeader := mw_shbHeader(p_sourceLongPosVec), + extendedHeader := mw_shbHeader_c_v2x(p_sourceLongPosVec, p_timeSynchronization), payload := * } @@ -1561,19 +1633,19 @@ module LibItsGeoNetworking_Templates { /** * @desc Default send template for traffic class */ - template (value) TrafficClass m_trafficClass ( in SCF p_scf := e_scfEnabled, in ChannelOffload p_ChOff := e_choffDisabled ) := { - scf := p_scf, - channelOffload := p_ChOff, - tcId := 0 + template (value) TrafficClass m_trafficClass ( in SCF p_scf := e_scfEnabled) := { + scf := p_scf, + reserved := e_reserved, + tcId := 0 } /** * @desc Receive template for traffic class */ - template TrafficClass mw_trafficClass ( in template(present) SCF p_scf := ?, in template(present) ChannelOffload p_ChOff := ? ) := { - scf := p_scf, - channelOffload := p_ChOff, - tcId := ? + template TrafficClass mw_trafficClass ( in template(present) SCF p_scf := ?) := { + scf := p_scf, + reserved := e_reserved, + tcId := ? } /** @@ -2151,28 +2223,62 @@ module LibItsGeoNetworking_Templates { group shbHeaderTemplates { /** - * @desc Send template for SHB header + * @desc Send template for SHB header (Case of ITS G5) * @param p_sourceLongPosVec Long position vector of sender + * @param p_mccMco Media-dependent functionality */ template (value) ExtendedHeader m_shbHeader( - in template (value) LongPosVector p_sourceLongPosVec + in template (value) LongPosVector p_sourceLongPosVec, + in template (value) MccMco p_mccMco ) := { shbHeader := { srcPosVector := p_sourceLongPosVec, - reserved := 0 + mediaDependantData := { mccMco := p_mccMco } } } /** - * @desc Receive template for SHB header + * @desc Receive template for SHB header (Case of ITS G5) * @param p_sourceLongPosVec Long position vector of sender + * @param p_mccMco Media-dependent functionality */ template (present) ExtendedHeader mw_shbHeader( - template (present) LongPosVector p_sourceLongPosVec + template (present) LongPosVector p_sourceLongPosVec, + template (present) MccMco p_mccMco := ? + ) := { + shbHeader := { + srcPosVector:= p_sourceLongPosVec, + mediaDependantData := { mccMco := p_mccMco } + } + } + + /** + * @desc Send template for SHB header (Case of C-V2X) + * @param p_sourceLongPosVec Long position vector of sender + * @param p_timeSynchronization GNSS Time sinchronyzation + */ + template (value) ExtendedHeader m_shbHeader_c_v2x( + in template (value) LongPosVector p_sourceLongPosVec, + in template (value) TimeSynchronization p_timeSynchronization + ) := { + shbHeader := { + srcPosVector := p_sourceLongPosVec, + mediaDependantData := { timeSynchronization := p_timeSynchronization } + } + } + + /** + * @desc Receive template for SHB header (Case of C-V2X) + * @param p_sourceLongPosVec Long position vector of sender + * @param p_timeSynchronization GNSS Time sinchronyzation + */ + template (present) ExtendedHeader mw_shbHeader_c_v2x( + template (present) LongPosVector p_sourceLongPosVec, + template (present) TimeSynchronization p_timeSynchronization := ? ) := { shbHeader := { srcPosVector:= p_sourceLongPosVec, - reserved := ? + mediaDependantData := { timeSynchronization := p_timeSynchronization } } } diff --git a/lib/LibItsGeoNetworking_TypesAndValues.ttcn b/lib/LibItsGeoNetworking_TypesAndValues.ttcn index 12b095486a09d0ee3ffd017b7aae81ead55f25a8..4f23555d56087daea372deaba30a05adf56e4280 100644 --- a/lib/LibItsGeoNetworking_TypesAndValues.ttcn +++ b/lib/LibItsGeoNetworking_TypesAndValues.ttcn @@ -1,5 +1,5 @@ /** - * @author ETSI / STF405 / STF449 / STF484 / STF517 / TTF T036 + * @author ETSI / STF405 / STF449 / STF484 / STF517 / TTF T036 / TTF T042 * @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/GeoNetworking/LibItsGeoNetworking_TypesAndValues.ttcn $ * $Id: LibItsGeoNetworking_TypesAndValues.ttcn,v 1.5 2018/06/26 13:54:21 dte Exp $ * @desc Module containing types and values for GeoNetworking Protocol @@ -177,7 +177,8 @@ module LibItsGeoNetworking_TypesAndValues { /** * @desc GeoNetworking Packet * - * @see ETSI EN 302 636-4-1 chapter 8.2, 8.3, 8.4 + * @see ETSI EN 302 636-4-1 Clauses 8.2, 8.3, 8.4 + * @see ETSI TS 103-836-4-1 Clause 9 * * @member basicHeader * @member gnPacket @@ -218,7 +219,7 @@ module LibItsGeoNetworking_TypesAndValues { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * - * @see ETSI EN 302 636-4-1 chapter 8.6.1 + * @see ETSI EN 302 636-4-1 Clause 8.6.1 * * @member version * @member nextHeader @@ -286,7 +287,8 @@ module LibItsGeoNetworking_TypesAndValues { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * - * @see ETSI EN 302 636-4-1 chapter 8.7.2 + * @see ETSI EN 302 636-4-1 Clause 8.7.2 + * @see ETSI TS 103-836-4-1 Clause 9.7.1 * * @member nextHeader * @member reserved @@ -329,21 +331,21 @@ module LibItsGeoNetworking_TypesAndValues { *
        *  0   1   2   3   4   5   6   7
        * +---+---+---+---+---+---+---+---+
-       * |SCF|Ch.|         TC ID         |
-       * |   |Off|                       |
+       * |SCF|Res|         TC ID         |
        * +---+---+---+---+---+---+---+---+
        * 
* - * @see ETSI EN 302 636-4-1 chapter 8.7.5 + * @see ETSI EN 302 636-4-1 Clause 8.7.5 + * @see ETSI TS 103-836-4-1 Clause 9.7.5 * * @member scf * @member channelOffload * @member tcId */ type record TrafficClass { - SCF scf, - ChannelOffload channelOffload, - TcId tcId + SCF scf, + Reserved reserved, + TcId tcId } with { variant "FIELDORDER(msb)" } @@ -354,9 +356,8 @@ module LibItsGeoNetworking_TypesAndValues { } with { variant "FIELDLENGTH(1)" //variant "1 bit" } - type enumerated ChannelOffload { - e_choffDisabled(0), - e_choffEnable (1) + type enumerated Reserved { + e_reserved(0) } with { variant "FIELDLENGTH(1)" //variant "1 bit" } @@ -369,7 +370,8 @@ module LibItsGeoNetworking_TypesAndValues { /** * @desc GeoNetworking ExtendedHeader * - * @see ETSI EN 302 636-4-1 chapter 8.3 + * @see ETSI EN 302 636-4-1 Clause 8.3 + * @see ETSI TS 103-836-4-1 Clause 9.8 * * @member commonHeader * @member gnExtHeader @@ -404,7 +406,8 @@ module LibItsGeoNetworking_TypesAndValues { /** * @desc The BEACON packet header. * - * @see ETSI EN 302 636-4-1 chapter 8.8.6 + * @see ETSI EN 302 636-4-1 Clause 8.8.6 + * @see ETSI TS 103-836-4-1 Clause 9.8.6 * * @member commonHeader */ @@ -417,7 +420,8 @@ module LibItsGeoNetworking_TypesAndValues { /** * @desc The GEOANYCAST packet header. * - * @see ETSI EN 302 636-4-1 chapter 8.8.5 + * @see ETSI EN 302 636-4-1 Clause 8.8.5 + * @see ETSI TS 103-836-4-1 Clause 9.8.5 * * @member seqNumber * @member reserved @@ -446,7 +450,8 @@ module LibItsGeoNetworking_TypesAndValues { /** * @desc The GEOBROADCAST packet header. * - * @see ETSI EN 302 636-4-1 chapter 8.8.5 + * @see ETSI EN 302 636-4-1 Clause 8.8.5 + * @see ETSI TS 103-836-4-1 Clause 9.8.5 * * @member seqNumber * @member reserved @@ -463,7 +468,8 @@ module LibItsGeoNetworking_TypesAndValues { /** * @desc The GEOUNICAST packet header. * - * @see ETSI EN 302 636-4-1 chapter 8.8.2 + * @see ETSI EN 302 636-4-1 Clause 8.8.2 + * @see ETSI TS 103-836-4-1 Clause 9.8.2 * * @member seqNumber * @member reserved @@ -482,7 +488,8 @@ module LibItsGeoNetworking_TypesAndValues { /** * @desc The Location Service (LS) Reply packet header. * - * @see ETSI EN 302 636-4-1 chapter 8.8.8 + * @see ETSI EN 302 636-4-1 Clause 8.8.8 + * @see ETSI TS 103-836-4-1 Clause 9.8.8 * * @member seqNumber * @member reserved @@ -501,7 +508,8 @@ module LibItsGeoNetworking_TypesAndValues { /** * @desc The Location Service (LS) Request packet header. * - * @see ETSI EN 302 636-4-1 chapter 8.8.7 + * @see ETSI EN 302 636-4-1 Clause 8.8.7 + * @see ETSI TS 103-836-4-1 Clause 9.8.7 * * @member seqNumber * @member reserved @@ -520,22 +528,58 @@ module LibItsGeoNetworking_TypesAndValues { /** * The Single Hop Broadcast (SHB) packet header. * - * @see ETSI EN 302 636-4-1 chapter 8.8.4 + * @see ETSI EN 302 636-4-1 Clause 8.8.4 + * @see ETSI EN 302 636-4-2 Clause 6.3.3 Field settings in the Extended Header of the SHB packet * * @member srcPosVector * @member reserved */ type record SHBHeader { - LongPosVector srcPosVector, - UInt32 reserved + LongPosVector srcPosVector, + MediaDependantData mediaDependantData + } with { + variant "FIELDORDER(msb)" + } + + /** + * The Single Hop Broadcast (SHB) packet header. + * + * @see ETSI EN 302 636-4-2 Clause 6.3.3 Field settings in the Extended Header of the SHB packet + * + * @member cbr_l_0_hop Current CBR_L_0_Hop encoded as floor(CBR_L_0_Hop x 255) + * @member cbr_l_1_hop Current CBR_L_1_Hop encoded as floor(CBR_L_1_Hop x 255) + * @member eirp Transmit power of the current packet, E.I.R.P. [0 dBm to 31 dBm, unit 1 dBm, values higher than 31 dBm shall be set to 31 dBm] + * @member reserved Bit 5 to Bit 7: Reserved for future use + * @member reserved1 Reserved for MCO + */ + type record MccMco { + Oct1 cbr_l_0_hop, + Oct1 cbr_l_1_hop, + Bit4 eirp, + Bit4 reserved, + Oct1 reserved1 } with { variant "FIELDORDER(msb)" } + + type record TimeSynchronization { + Bit4 version, + Bit24 compacTimeSynchronization, + Bit4 mediaDependentData + } with { + variant "FIELDORDER(msb)" + } + + type union MediaDependantData { + MccMco mccMco, // ITS G5 + TimeSynchronization timeSynchronization // C-V2X-GNSS + } /** * @desc The Topologically-Scoped Broadcast (TSB) packet header. * - * @see ETSI EN 302 636-4-1 chapter 8.8.3 + * @see ETSI EN 302 636-4-1 Clause 8.8.3 + * @see ETSI TS 103-836-4-1 Clause 9.8.3 * * @member seqNumber * @member reserved @@ -752,7 +796,8 @@ module LibItsGeoNetworking_TypesAndValues { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * - * @see ETSI EN 302 636-4-1 chapter 8.5.2 + * @see ETSI EN 302 636-4-1 Clause 8.5.2 + * @see ETSI TS 103-836-4-1 Clause 9.5.2 * * @member gnAddr * @member timestamp_ @@ -791,7 +836,8 @@ module LibItsGeoNetworking_TypesAndValues { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * - * @see ETSI EN 302 636-4-1 chapter 8.5.3 + * @see ETSI EN 302 636-4-1 Clause 8.5.3 + * @see ETSI TS 103-836-4-1 Clause 9.5.3 * * @member gnAddr * @member timestamp @@ -821,7 +867,8 @@ module LibItsGeoNetworking_TypesAndValues { * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * - * @see ETSI EN 302 636-4-1 chapter 6.2 + * @see ETSI EN 302 636-4-1 Clause 6.2 + * @see ETSI TS 103-836-4-1 Clause 6.2 * * @member typeOfAddress * @member stationType diff --git a/lib_system/LibItsGeoNetworking_Functions.ttcn b/lib_system/LibItsGeoNetworking_Functions.ttcn index 33efe71562229562398503036870412abbcb04be..3d4a32da32eb754b1b2a81506471464e70a007dc 100644 --- a/lib_system/LibItsGeoNetworking_Functions.ttcn +++ b/lib_system/LibItsGeoNetworking_Functions.ttcn @@ -1,2862 +1,2863 @@ -/** - * @author ETSI / STF405 / STF449 / STF484 / STF517 / STF 538 - * @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn $ - * $Id: LibItsGeoNetworking_Functions.ttcn 1329 2017-02-21 14:48:18Z berge $ - * @desc Module containing functions for GeoNetworking - * @copyright ETSI Copyright Notification - * No part may be reproduced except as authorized by written permission. - * The copyright and the foregoing restriction extend to reproduction in all media. - * All rights reserved. - * - */ -module LibItsGeoNetworking_Functions { - - // Libcommon - import from LibCommon_BasicTypesAndValues all; - import from LibCommon_DataStrings all; - import from LibCommon_VerdictControl all; - import from LibCommon_Sync all; - import from LibCommon_Time all; - - // LibHelpers - import from LibHelpers_Functions all; - - // LibIts - import from Ieee1609Dot2BaseTypes language "ASN.1:1997" all; - import from Ieee1609Dot2 language "ASN.1:1997" all; - import from EtsiTs103097Module language "ASN.1:1997" all; - - // LibItsCommon - import from LibItsCommon_TypesAndValues all; - import from LibItsExternal_TypesAndValues all; - import from LibItsCommon_Templates all; - import from LibItsCommon_Functions all; - import from LibItsCommon_Pixits all; - // import from LibItsCommon_TestSystem all; - - // LibItsSecurity - import from LibItsSecurity_TypesAndValues all; - import from LibItsSecurity_Templates all; - import from LibItsSecurity_Functions all; - import from LibItsSecurity_Pixits all; - - // LibItsGeoNetworking - import from LibItsGeoNetworking_TestSystem all; - import from LibItsGeoNetworking_TypesAndValues all; - import from LibItsGeoNetworking_Templates all; - import from LibItsGeoNetworking_Pixits all; - import from LibItsGeoNetworking_Pics all; - - group utFuntions { - - /** - * @desc Requests to bring the IUT in an initial state - * @param p_init The initialisation to trigger. - */ - function f_utInitializeIut(template (value) UtGnInitialize p_init) runs on ItsBaseGeoNetworking { - - //deactivate gnPort default alts - vc_gnDefaultActive := false; - - utPort.send(p_init); - tc_wait.start; - alt { - [] utPort.receive(UtGnResults: { utGnInitializeResult := true }) { - tc_wait.stop; - log("*** f_utInitializeIut: INFO: IUT initialized ***"); - } - [] utPort.receive { - tc_wait.stop; - log("*** f_utInitializeIut: INFO: IUT could not be initialized ***"); - f_selfOrClientSyncAndVerdict("error", e_error); - } - [] tc_wait.timeout { - log("*** f_utInitializeIut: INFO: IUT could not be initialized in time ***"); - f_selfOrClientSyncAndVerdict("error", e_timeout); - } - } - - //activate gnPort default alts - vc_gnDefaultActive := true; - - } - - /** - * @desc Requests to change the position of the IUT - */ - function f_utChangePosition() runs on ItsBaseGeoNetworking { - - //deactivate gnPort default alts - vc_gnDefaultActive := false; - - utPort.send(m_changePosition); - tc_wait.start; - alt { - [] utPort.receive(UtGnResults: { utGnChangePositionResult := true} ) { - tc_wait.stop; - log("*** f_utChangePosition: INFO: IUT position changed ***"); - } - [] utPort.receive(UtGnResults: { utGnChangePositionResult := false }) { - tc_wait.stop; - log("*** f_utChangePosition: INFO: IUT position change was not successful ***"); - f_selfOrClientSyncAndVerdict("error", e_error); - } - [] a_utDefault() { - } - [] tc_wait.timeout { - log("*** f_utChangePosition: INFO: IUT position not changed in time ***"); - f_selfOrClientSyncAndVerdict("error", e_timeout); - } - } - - //activate gnPort default alts - vc_gnDefaultActive := true; - - } - - /** - * @desc Triggers event from the application layer - * @param p_event The event to trigger. - */ - function f_utTriggerEvent(template (value) UtGnTrigger p_event) runs on ItsBaseGeoNetworking return boolean { - - // Variables - var boolean v_return := true; - - //deactivate gnPort default alts - vc_gnDefaultActive := false; - - utPort.send(p_event); - tc_wait.start; - alt { - [] utPort.receive(UtGnResults: { utGnTriggerResult := true }) { - tc_wait.stop; - } - [] utPort.receive(UtGnResults: { utGnTriggerResult := false }) { - tc_wait.stop; - log("*** UtGnTriggerResult: INFO: UT trigger was not successful ***"); - f_selfOrClientSyncAndVerdict("error", e_error); - } - [] a_utDefault() { - } - [] tc_wait.timeout { - v_return := false; - } - } - - //activate gnPort default alts - vc_gnDefaultActive := true; - - return v_return; - } - - } // End of group utFunctions - - group geoConfigurationFunctions { - - /** - * @desc This configuration features: - * - one ITS node (IUT) - * - two ITS nodes (nodeA, nodeB) - * - Area1 which only includes NodeB and IUT - * - Area2 which only includes NodeB - * NodeB being close to the area center - */ - function f_cf01Up(Scenario p_scenario := e_staticPosition) runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Variables - var PositionTable v_positionTable := {}; - var GeoAreaTable v_areaTable := {}; - - // Map - map(self:acPort, system:acPort); - map(self:utPort, system:utPort); - map(self:geoNetworkingPort, system:geoNetworkingPort); - - // Connect - f_connect4SelfOrClientSync(); - activate(a_cf01Down()); - - // Initialise secured mode - f_initialiseSecuredMode(); - - //Initialze the IUT - f_initialState(p_scenario); - - // Positions & Areas - f_preparePositionsAndAreas(v_positionTable, v_areaTable); - - f_initialiseComponent(v_positionTable, v_areaTable, c_compNodeB); - - } // End of function f_cf01Up - - function f_cf01Down() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - f_uninitialiseSecuredMode(); - - // Unmap - unmap(self:acPort, system:acPort); - unmap(self:utPort, system:utPort); - unmap(self:geoNetworkingPort, system:geoNetworkingPort); - - // Disconnect - f_disconnect4SelfOrClientSync(); - - } // End of function f_cf01Down - - /** - * @desc This configuration features: - * - one ITS node (IUT) - * - one ITS node (NodeB) - * - one ITS node (NodeD) - * - Area1 which only includes NodeB, NodeD and IUT - * - Area2 which only includes NodeB and NodeD - * NodeB being close to the area center - * - * @param p_mainUtComponent Name of the component that will initialize IUT and handle default UT messages - */ - function f_cf02Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { - - // Variables - var PositionTable v_positionTable := {}; - var GeoAreaTable v_areaTable := {}; - var ItsGeoNetworking v_component; - var integer i; - - log(">>> f_cf02Up: p_mainUtComponent: ", p_mainUtComponent); - - // Select components - vc_componentTable := {{c_compNodeB, omit}, {c_compNodeD, omit}}; - - // Create components - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - vc_componentTable[i].gnComponent := ItsGeoNetworking.create(vc_componentTable[i].componentName) alive; - } - - // Map & Connect - map(self:acPort, system:acPort); - map(self:utPort, system:utPort); - map(self:geoNetworkingPort, system:geoNetworkingPort); - connect(self:syncPort, mtc:syncPort); - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - map(vc_componentTable[i].gnComponent:acPort, system:acPort); - map(vc_componentTable[i].gnComponent:utPort, system:utPort); - map(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); - connect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); - } - - activate(a_cf02Down()); - - //Initialze the IUT - log("f_cf02Up: start f_initialState for: ", p_mainUtComponent); - if(p_mainUtComponent == c_compMTC) { - // Initialise secured mode - f_initialiseSecuredMode(); - - // MTC intializes IUT - f_initialState(p_scenario); - } - else { - v_component := f_getComponent(p_mainUtComponent); - v_component.start(f_initialState(p_scenario)); - v_component.done; - } - - // Positions & Areas - f_preparePositionsAndAreas(v_positionTable, v_areaTable); - - // Initialize components - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - if (isvalue(vc_componentTable[i].gnComponent)) { - vc_componentTable[i].gnComponent.start(f_initialiseComponent(v_positionTable, v_areaTable, vc_componentTable[i].componentName)); - } - } - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - if (isvalue(vc_componentTable[i].gnComponent)) { - vc_componentTable[i].gnComponent.done; - } - } - - } // End of function f_cf02Up - - /** - * @desc Deletes configuration cf02 - */ - function f_cf02Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var integer i; - - f_uninitialiseSecuredMode(); - - // Unmap & Disconnect - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - unmap(vc_componentTable[i].gnComponent:utPort, system:utPort); - unmap(vc_componentTable[i].gnComponent:acPort, system:acPort); - unmap(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); - disconnect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); - } - unmap(self:acPort, system:acPort); - unmap(self:utPort, system:utPort); - unmap(self:geoNetworkingPort, system:geoNetworkingPort); - disconnect(self:syncPort, mtc:syncPort); - - } // End of function f_cf02Down - - /** - * @desc This configuration features: - * - one ITS node (IUT) - * - one ITS node (NodeA) - * - one ITS node in direction of NodeA (NodeB) - * - one ITS node not in direction of NodeA (NodeC) - * - Area1 which only includes NodeB and IUT - * - Area2 which only includes NodeB - * NodeB being close to the area center - * @param p_mainUtComponent Name of the component that will initialize IUT and handle default UT messages - */ - function f_cf03Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { - - // Variables - var PositionTable v_positionTable := {}; - var GeoAreaTable v_areaTable := {}; - var ItsGeoNetworking v_component; - var integer i; - - // Select components - vc_componentTable := {{c_compNodeB, omit}, {c_compNodeC, omit}}; - - // Create components - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - vc_componentTable[i].gnComponent := ItsGeoNetworking.create(vc_componentTable[i].componentName) alive; - } - - // Map & Connect - map(self:acPort, system:acPort); - map(self:utPort, system:utPort); - connect(self:syncPort, mtc:syncPort); - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - map(vc_componentTable[i].gnComponent:acPort, system:acPort); - map(vc_componentTable[i].gnComponent:utPort, system:utPort); - map(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); - connect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); - } - - activate(a_cf03Down()); - - //Initialze the IUT - if(p_mainUtComponent == c_compMTC) { - // Initialise secured mode - f_initialiseSecuredMode(); - - // MTC intializes IUT - f_initialState(p_scenario); - } - else { - v_component := f_getComponent(p_mainUtComponent); - v_component.start(f_initialState(p_scenario)); - v_component.done; - } - - // Positions & Areas - f_preparePositionsAndAreas(v_positionTable, v_areaTable); - - // Initialize components - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - if (isvalue(vc_componentTable[i].gnComponent)) { - vc_componentTable[i].gnComponent.start(f_initialiseComponent(v_positionTable, v_areaTable, vc_componentTable[i].componentName)); - } - } - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - if (isvalue(vc_componentTable[i].gnComponent)) { - vc_componentTable[i].gnComponent.done; - } - } - - } // End of function f_cf03Up - - /** - * @desc Deletes configuration cf03 - */ - function f_cf03Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var integer i; - - f_uninitialiseSecuredMode(); - - // Unmap & Disconnect - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - unmap(vc_componentTable[i].gnComponent:utPort, system:utPort); - unmap(vc_componentTable[i].gnComponent:acPort, system:acPort); - unmap(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); - disconnect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); - } - unmap(self:acPort, system:acPort); - unmap(self:utPort, system:utPort); - disconnect(self:syncPort, mtc:syncPort); - - } // End of function f_cf03Down - - /** - * @desc This configuration features: - * - one ITS node (IUT) - * - one ITS node (NodeA) - * - one ITS node in direction of NodeA and having - * shortest distance to NodeA (NodeB) - * - one ITS node in direction of NodeA (NodeD) - * - one ITS node not in direction of NodeA (NodeC) - * - Area1 which only includes NodeB, NodeD and IUT - * - Area2 which only includes NodeA, NodeB and NodeD - * NodeB being close to the area center - * @param p_mainUtComponent Name of the component that will initialize IUT and handle default UT messages - */ - function f_cf04Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { - - // Variables - var PositionTable v_positionTable := {}; - var GeoAreaTable v_areaTable := {}; - var ItsGeoNetworking v_component; - var integer i; - - // Select components - vc_componentTable := {{c_compNodeB, omit}, {c_compNodeC, omit}, {c_compNodeD, omit}}; - - // Create components - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - vc_componentTable[i].gnComponent := ItsGeoNetworking.create(vc_componentTable[i].componentName) alive; - } - - // Map & Connect - map(self:acPort, system:acPort); - map(self:utPort, system:utPort); - connect(self:syncPort, mtc:syncPort); - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - map(vc_componentTable[i].gnComponent:acPort, system:acPort); - map(vc_componentTable[i].gnComponent:utPort, system:utPort); - map(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); - connect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); - } - - activate(a_cf04Down()); - - //Initialze the IUT - if(p_mainUtComponent == c_compMTC) { - // Initialise secured mode - f_initialiseSecuredMode(); - - // MTC intializes IUT - f_initialState(p_scenario); - } - else { - v_component := f_getComponent(p_mainUtComponent); - v_component.start(f_initialState(p_scenario)); - v_component.done; - } - - // Positions & Areas - f_preparePositionsAndAreas(v_positionTable, v_areaTable); - - // Initialize components - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - if (isvalue(vc_componentTable[i].gnComponent)) { - vc_componentTable[i].gnComponent.start(f_initialiseComponent(v_positionTable, v_areaTable, vc_componentTable[i].componentName)); - } - } - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - if (isvalue(vc_componentTable[i].gnComponent)) { - vc_componentTable[i].gnComponent.done; - } - } - - } // End of function f_cf04Up - - /** - * @desc Deletes configuration cf04 - */ - function f_cf04Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var integer i; - - f_uninitialiseSecuredMode(); - - // Unmap & Disconnect - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - unmap(vc_componentTable[i].gnComponent:utPort, system:utPort); - unmap(vc_componentTable[i].gnComponent:acPort, system:acPort); - unmap(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); - disconnect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); - } - unmap(self:acPort, system:acPort); - unmap(self:utPort, system:utPort); - disconnect(self:syncPort, mtc:syncPort); - - } // End of function f_cf04Down - - /** - * @desc This configuration features: - * - one ITS node (IUT) - * - one ITS node (NodeB) - * - one ITS node not in direction of NodeB and having - * longest distance to NodeB (NodeE) - * - Area1 which only includes NodeB, NodeD and IUT - * @param p_mainUtComponent Name of the component that will initialize IUT and handle default UT messages - */ - function f_cf05Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { - - // Variables - var PositionTable v_positionTable := {}; - var GeoAreaTable v_areaTable := {}; - var ItsGeoNetworking v_component; - var integer i; - - // Select components - vc_componentTable := {{c_compNodeB, omit}, {c_compNodeE, omit}}; - - // Create components - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - vc_componentTable[i].gnComponent := ItsGeoNetworking.create(vc_componentTable[i].componentName) alive; - } - - // Map & Connect - map(self:acPort, system:acPort); - map(self:utPort, system:utPort); - connect(self:syncPort, mtc:syncPort); - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - map(vc_componentTable[i].gnComponent:acPort, system:acPort); - map(vc_componentTable[i].gnComponent:utPort, system:utPort); - map(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); - connect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); - } - - activate(a_cf05Down()); - - //Initialze the IUT - if(p_mainUtComponent == c_compMTC) { - // Initialise secured mode - f_initialiseSecuredMode(); - - // MTC intializes IUT - f_initialState(p_scenario); - } - else { - v_component := f_getComponent(p_mainUtComponent); - v_component.start(f_initialState(p_scenario)); - v_component.done; - } - - // Positions & Areas - f_preparePositionsAndAreas(v_positionTable, v_areaTable); - - // Initialize components - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - if (isvalue(vc_componentTable[i].gnComponent)) { - vc_componentTable[i].gnComponent.start(f_initialiseComponent(v_positionTable, v_areaTable, vc_componentTable[i].componentName)); - } - } - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - if (isvalue(vc_componentTable[i].gnComponent)) { - vc_componentTable[i].gnComponent.done; - } - } - } - - /** - * @desc Deletes configuration cf05 - */ - function f_cf05Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var integer i; - - f_uninitialiseSecuredMode(); - - // Unmap & Disconnect - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - unmap(vc_componentTable[i].gnComponent:utPort, system:utPort); - unmap(vc_componentTable[i].gnComponent:acPort, system:acPort); - unmap(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); - disconnect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); - } - unmap(self:acPort, system:acPort); - unmap(self:utPort, system:utPort); - disconnect(self:syncPort, mtc:syncPort); - - } // End of function f_cf05Down - - /** - * @desc This configuration features: - * - one ITS node (IUT) - * - one ITS node (NodeB) - * - one ITS node not in direction of NodeB and having - * shortest distance to NodeB (NodeF) - * - Area1 which only includes NodeB, NodeD and IUT - * - IUT not in sectorial area of NodeB-NodeF - * @param p_mainUtComponent Name of the component that will initialize IUT and handle default UT messages - */ - function f_cf06Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { - - // Variables - var PositionTable v_positionTable := {}; - var GeoAreaTable v_areaTable := {}; - var ItsGeoNetworking v_component; - var integer i; - - // Select components - vc_componentTable := {{c_compNodeB, omit}, {c_compNodeF, omit}}; - - // Create components - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - vc_componentTable[i].gnComponent := ItsGeoNetworking.create(vc_componentTable[i].componentName) alive; - } - - // Map & Connect - map(self:acPort, system:acPort); - map(self:utPort, system:utPort); - connect(self:syncPort, mtc:syncPort); - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - map(vc_componentTable[i].gnComponent:acPort, system:acPort); - map(vc_componentTable[i].gnComponent:utPort, system:utPort); - map(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); - connect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); - } - - activate(a_cf06Down()); - - //Initialze the IUT - if(p_mainUtComponent == c_compMTC) { - // Initialise secured mode - f_initialiseSecuredMode(); - - // MTC intializes IUT - f_initialState(p_scenario); - } - else { - v_component := f_getComponent(p_mainUtComponent); - v_component.start(f_initialState(p_scenario)); - v_component.done; - } - - // Positions & Areas - f_preparePositionsAndAreas(v_positionTable, v_areaTable); - - // Initialize components - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - if (isvalue(vc_componentTable[i].gnComponent)) { - vc_componentTable[i].gnComponent.start(f_initialiseComponent(v_positionTable, v_areaTable, vc_componentTable[i].componentName)); - } - } - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - if (isvalue(vc_componentTable[i].gnComponent)) { - vc_componentTable[i].gnComponent.done; - } - } - } - - /** - * @desc Deletes configuration cf06 - */ - function f_cf06Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var integer i; - - f_uninitialiseSecuredMode(); - - // Unmap & Disconnect - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - unmap(vc_componentTable[i].gnComponent:utPort, system:utPort); - unmap(vc_componentTable[i].gnComponent:acPort, system:acPort); - unmap(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); - disconnect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); - } - unmap(self:acPort, system:acPort); - unmap(self:utPort, system:utPort); - disconnect(self:syncPort, mtc:syncPort); - - } // End of function f_cf06Down - - /** - * @desc This configuration features: - * - one ITS node (IUT) - * - one ITS node (NodeB) - * - one ITS node in direction of NodeB and having - * shortest distance to NodeB (NodeD) - * - Area1 which only includes NodeB, NodeD and IUT - * @param p_mainUtComponent Name of the component that will initialize IUT and handle default UT messages - */ - function f_cf07Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { - - // Variables - var PositionTable v_positionTable := {}; - var GeoAreaTable v_areaTable := {}; - var ItsGeoNetworking v_component; - var integer i; - - // Select components - vc_componentTable := {{c_compNodeB, omit}, {c_compNodeD, omit}}; - - // Create components - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - vc_componentTable[i].gnComponent := ItsGeoNetworking.create(vc_componentTable[i].componentName) alive; - } - - // Map & Connect - map(self:acPort, system:acPort); - map(self:utPort, system:utPort); - connect(self:syncPort, mtc:syncPort); - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - map(vc_componentTable[i].gnComponent:acPort, system:acPort); - map(vc_componentTable[i].gnComponent:utPort, system:utPort); - map(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); - connect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); - } - - activate(a_cf07Down()); - - //Initialze the IUT - if(p_mainUtComponent == c_compMTC) { - // Initialise secured mode - f_initialiseSecuredMode(); - - // MTC intializes IUT - f_initialState(p_scenario); - } - else { - v_component := f_getComponent(p_mainUtComponent); - v_component.start(f_initialState(p_scenario)); - v_component.done; - } - - // Positions & Areas - f_preparePositionsAndAreas(v_positionTable, v_areaTable); - - // Initialize components - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - if (isvalue(vc_componentTable[i].gnComponent)) { - vc_componentTable[i].gnComponent.start(f_initialiseComponent(v_positionTable, v_areaTable, vc_componentTable[i].componentName)); - } - } - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - if (isvalue(vc_componentTable[i].gnComponent)) { - vc_componentTable[i].gnComponent.done; - } - } - } - - /** - * @desc Deletes configuration cf06 - */ - function f_cf07Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var integer i; - - f_uninitialiseSecuredMode(); - - // Unmap & Disconnect - for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { - unmap(vc_componentTable[i].gnComponent:utPort, system:utPort); - unmap(vc_componentTable[i].gnComponent:acPort, system:acPort); - unmap(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); - disconnect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); - } - unmap(self:acPort, system:acPort); - unmap(self:utPort, system:utPort); - disconnect(self:syncPort, mtc:syncPort); - - } // End of function f_cf07Down - - /** - * @desc Behavior function for initializing component's variables and tables - * @param p_positionTable Table containing position vectors of all nodes - * @param p_areaTable Table containing all defined geoAreas - * @param p_componentName Name of the component - */ - function f_initialiseComponent( - in PositionTable p_positionTable, - in GeoAreaTable p_areaTable, - in charstring p_componentName) - runs on ItsGeoNetworking { - - vc_positionTable := p_positionTable; - vc_areaTable := p_areaTable; - vc_componentName := p_componentName; - - vc_localSeqNumber := f_getInitialSequenceNumber(); - vc_multipleMessagesCount := f_getMessageCount(); - - } // End of function f_initialiseComponent - - /** - * @desc Makes the simulated ITS node behave as a neighbour of IUT - */ - function f_startBeingNeighbour() runs on ItsGeoNetworking { - - vc_neighbourDefault := activate(a_neighbourDefault()); - f_acTriggerEvent(m_startBeaconing(m_beaconHeader(f_getPosition(vc_componentName)).beaconHeader)); - f_sleepIgnoreDef(PX_NEIGHBOUR_DISCOVERY_DELAY); - } // End of function f_startBeingNeighbour - - /** - * @desc Makes the simulated ITS node behave as not being a neighbour of IUT - */ - function f_stopBeingNeighbour() runs on ItsGeoNetworking { - - f_acTriggerEvent(m_stopBeaconing); - if (PICS_GN_SECURITY == true) { - deactivate(vc_neighbourDefault); - } - } // End of function f_stopBeingNeighbour - - /** - * @desc Initialise secure mode if required - */ - function f_initialiseSecuredMode() runs on ItsBaseGeoNetworking { - - // Local variables - - // Load certificates - if (PICS_GN_SECURITY == true) { - if( not f_loadCertificates(PX_IUT_SEC_CONFIG_NAME) ) { - log("*** INFO: TEST CASE NOW STOPPING ITSELF! ***"); - stop; - } - - // Initialize vc_location - f_setGenerationLocation( - f_getTsLatitude(), - f_getTsLongitude() - ); - } else if (PICS_IS_IUT_SECURED == true) { - if(e_success != f_acEnableSecurity()){ - log("*** INFO: TEST CASE NOW STOPPING ITSELF! ***"); - stop; - } - } - } // End of function f_initialiseSecuredMode() - - function f_uninitialiseSecuredMode() runs on ItsBaseGeoNetworking { - if ((PICS_GN_SECURITY == true) or (PICS_IS_IUT_SECURED == true)) { - f_acDisableSecurity(); - } - } // End of function f_uninitialiseSecuredMode() - - } // End of group geoConfigurationFunctions - - group componentFunctions { - /** - * @desc Get the component corresponding to a key - * @param p_componentName Name searched component - * @return ItsGeoNetworking - The searched position vector - */ - function f_getComponent( - in charstring p_componentName - ) runs on ItsMtc - return ItsGeoNetworking { - - var ItsGeoNetworking v_return := null; - var integer i := 0; - - for (i:=0; i value v_ind { - //store every upper tester indication received - //log("################# v_ind: ", v_ind); - vc_utInds[lengthof(vc_utInds)] := v_ind; - //log("################# vc_utInds: ", vc_utInds); - //log("################# lengthof(vc_utInds): ", lengthof(vc_utInds)); - repeat; - } - [vc_utDefaultActive] utPort.receive { - log("*** " & testcasename() & ": INFO: Received unexpected UT message from IUT ***"); - repeat; - } - } - - /** - * @desc Default handling cf01 de-initialisation. - */ - altstep a_cf01Down() runs on ItsGeoNetworking { - [] a_shutdown() { - f_poDefault(); - f_cf01Down(); - log("*** a_cf01Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); - stop; - } - } - - /** - * @desc Default handling cf02 de-initialisation. - */ - altstep a_cf02Down() runs on ItsMtc { - [] a_shutdown() { - f_cf02Down(); - log("*** a_cf02Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); - stop; - } - } - - /** - * @desc Default handling cf03 de-initialisation. - */ - altstep a_cf03Down() runs on ItsMtc { - [] a_shutdown() { - f_cf03Down(); - log("*** a_cf03Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); - stop; - } - } - - /** - * @desc Default handling cf04 de-initialisation. - */ - altstep a_cf04Down() runs on ItsMtc { - [] a_shutdown() { - f_cf04Down(); - log("*** a_cf04Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); - stop; - } - } - - /** - * @desc Default handling cf05 de-initialisation. - */ - altstep a_cf05Down() runs on ItsMtc { - [] a_shutdown() { - f_cf05Down(); - log("*** a_cf05Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); - stop; - } - } - - /** - * @desc Default handling cf06 de-initialisation. - */ - altstep a_cf06Down() runs on ItsMtc { - [] a_shutdown() { - f_cf06Down(); - log("*** a_cf06Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); - stop; - } - } - - /** - * @desc Default handling cf07 de-initialisation. - */ - altstep a_cf07Down() runs on ItsMtc { - [] a_shutdown() { - f_cf07Down(); - log("*** a_cf07Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); - stop; - } - } - group geoGeoUnicastAltsteps { - - /** - * @desc Receive GeoUnicast packet - * @param p_sourceLongPosVec Expected source position vector - * @param p_destinationShortPosVec Expected destination position vector - * @param p_seqNumber Expected sequence number - */ - altstep a_receiveGeoUnicast( - in template (present) ShortPosVector p_destinationShortPosVec, - in template (present) UInt16 p_seqNumber - ) runs on ItsGeoNetworking { - - [vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwUnicastPacket( - p_destinationShortPosVec, - p_seqNumber)))) { - } - } - - /** - * @desc Receive GeoUnicast packet for specific destination - * @param p_destinationShortPosVec Expected destination position vector - */ - altstep a_receiveGeoUnicastWithDestination(in template (present) ShortPosVector p_destinationShortPosVec) runs on ItsGeoNetworking { - - [vc_gnDefaultActive] a_receiveGeoUnicast(p_destinationShortPosVec, ?) {} - } - - /** - * @desc Receive any GeoUnicast packet - */ - altstep a_receiveAnyGeoUnicast() runs on ItsGeoNetworking { - - [vc_gnDefaultActive] a_receiveGeoUnicast(?, ?) {} - } - - } // End of group geoGeoUnicastAltsteps - - group geoGeoBroadcastAltsteps { - - /** - * @desc Receive GeoBroadcast packet - * @param p_srcLongPosVec Expected source position vector - * @param p_seqNumber Expected sequence number - */ - altstep a_receiveGeoBroadcast( - in template (present) LongPosVector p_srcLongPosVec, - in template (present) UInt16 p_seqNumber - ) runs on ItsGeoNetworking { - - [vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( - p_srcLongPosVec, - p_seqNumber - )))) { - } - } - - /** - * @desc Receive GeoBroadcast packet with specific Area and HopLimit - * @param p_srcLongPosVec Expected source position vector - * @param p_seqNumber Expected sequence number - * @param p_broadcastArea Expected geoBroadcastArea - * @param p_routerHopLimit Expected router hop limit - * @param p_maxHopLimit Expected max hop limit (Default: ?) - */ - altstep a_receiveGeoBroadcastWithAreaWithHopLimit( - in template (present) LongPosVector p_srcLongPosVec, - in template (present) UInt16 p_seqNumber, - in template (present) GeoBroadcastArea p_broadcastArea, - in template (present) UInt8 p_routerHopLimit, - in template (present) UInt8 p_maxHopLimit := ? - ) runs on ItsGeoNetworking { - - [vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithAreaAndHl( - p_srcLongPosVec, - p_seqNumber, - p_broadcastArea, - p_maxHopLimit - ), - -, - p_routerHopLimit - ))) { - } - } - - /** - * @desc Receive GeoBroadcast packet for specific Geobroadcast Area - * @param p_srcLongPosVec Expected source position vector - * @param p_seqNumber Expected sequence number - * @param p_broadcastArea Expected geoBroadcastArea - */ - altstep a_receiveGeoBroadcastWithArea( - in template (present) LongPosVector p_srcLongPosVec, - in template (present) UInt16 p_seqNumber, - in template (present) GeoBroadcastArea p_broadcastArea - ) runs on ItsGeoNetworking { - - [vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - p_srcLongPosVec, - p_seqNumber, - p_broadcastArea - )))) { - } - } - - } // End of group geoGeoBroadcastAltsteps - - group geoGeoAnycastAltsteps { - - /** - * @desc Receive GeoAnycast packet - * @param p_srcLongPosVec Expected source position vector - * @param p_senderLongPosVec Expected sender position vector - * @param p_seqNumber Expected sequence number - */ - altstep a_receiveGeoAnycast( - in template (present) LongPosVector p_srcLongPosVec, - in template (present) LongPosVector p_senderLongPosVec, - in template (present) UInt16 p_seqNumber - ) runs on ItsGeoNetworking { - - [vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacket( - p_srcLongPosVec, - p_seqNumber - )))) { - } - } - - /** - * @desc Receive GeoAnycast packet with specific Area and HopLimit - * @param p_srcLongPosVec Expected source position vector - * @param p_senderLongPosVec Expected sender position vector - * @param p_seqNumber Expected sequence number - * @param p_anycastArea Expected geoAnycastArea - * @param p_hopLimit Expected hop limit - * @param p_maxHopLimit Expected max hop limit (Default: ?) - */ - altstep a_receiveGeoAnycastWithAreaWithHopLimit( - in template (present) LongPosVector p_srcLongPosVec, - in template (present) UInt16 p_seqNumber, - in template (present) GeoAnycastArea p_anycastArea, - in template (present) UInt8 p_hopLimit, - in template (present) UInt8 p_maxHopLimit := ? - ) runs on ItsGeoNetworking { - - [vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - p_srcLongPosVec, - p_seqNumber, - p_anycastArea - ), - -, - p_hopLimit - ))) { - } - } - - /** - * @desc Receive GeoAnycast packet for specific GeoAnycast Area - * @param p_srcLongPosVec Expected source position vector - * @param p_seqNumber Expected sequence number - * @param p_anycastArea Expected geoAnycastArea - */ - altstep a_receiveGeoAnycastWithArea( - in template (present) LongPosVector p_srcLongPosVec, - in template (present) UInt16 p_seqNumber, - in template (present) GeoAnycastArea p_anycastArea - ) runs on ItsGeoNetworking { - - [vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( - p_srcLongPosVec, - p_seqNumber, - p_anycastArea - )))) { - } - } - - } // End of group geoGeoAnycastAltsteps - - group geoLocationServiceAltsteps { - - /** - * @desc Receive Location Service Request - * @param p_seqNumber Expected sequence number of the received LS Request - * @param p_mid GN address expected in received LS Request - * @param p_reqSrcPosVector Expected source position vector of the received LS Request - */ - altstep a_receiveLsRequest( - in template (present) UInt16 p_seqNumber, - in template (present) GN_Address.mid p_mid, - out LongPosVector p_reqSrcPosVector - ) runs on ItsGeoNetworking { - var GeoNetworkingInd v_msg; - - [vc_gnDefaultActive] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwLsRequestPacket( - p_seqNumber, - p_mid - ) - ) - ) - ) -> value v_msg { - p_reqSrcPosVector := valueof(v_msg.msgIn.gnPacket.packet.extendedHeader.lsRequestHeader.srcPosVector); - } - } - - /** - * @desc Receive any Location Service Request - */ - altstep a_receiveAnyLsRequest() runs on ItsGeoNetworking { - var LongPosVector v_reqSrcPosVector; - - [vc_gnDefaultActive] a_receiveLsRequest(?, ?, v_reqSrcPosVector) {} - } - - /** - * @desc Receive any Location Service Reply - */ - altstep a_receiveAnyLsReply() runs on ItsGeoNetworking { - [vc_gnDefaultActive] geoNetworkingPort.receive( mw_geoNwInd( mw_geoNwPdu( mw_geoNwLsReplyPacket(?, ?) ))) { - //ignore and repeat - repeat; - } - } - - /** - * @desc Receive Location Service Request and send Location Service Reply - * @param p_reqSeqNumber Expected sequence number of the received LS Request - * @param p_gnAddress GN address expected in received LS Request - * @param p_repSrcPosVector Source position vector of the sent LS Response - */ - altstep a_receiveLsRequestAndReply( - in template (present) UInt16 p_reqSeqNumber, - in template (value) GN_Address.mid p_mid, - in template (value) LongPosVector p_repSrcPosVector - ) runs on ItsGeoNetworking { - var LongPosVector v_repDstPosVector; - - [vc_gnDefaultActive] a_receiveLsRequest(p_reqSeqNumber, p_mid, v_repDstPosVector) { - f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu( - m_geoNwLsReplyPacket( - p_repSrcPosVector, - f_longPosVector2ShortPosVector(v_repDstPosVector), - vc_localSeqNumber - ))))); - } - } - - } // End of group geoLocationServiceAltsteps - - - } // End of group geoAltsteps - - group preambles { - - /** - * @desc The default preamble. - */ - function f_prDefault() runs on ItsGeoNetworking { - activate(a_default()); - activate(a_utDefault()); - } - - /** - * @desc Preamble for non-neighbour nodes - */ - function f_prNonNeighbour() runs on ItsGeoNetworking { - f_prDefault(); - } - - /** - * @desc Preamble for neighbour nodes - */ - function f_prNeighbour() runs on ItsGeoNetworking { - f_prDefault(); - f_startBeingNeighbour(); - f_sleep(0.5); - } - - /** - * @desc Brings the IUT into an initial state. - * @remark Component variable vc_hashedId8ToBeUsed shall be set with the IUT certificate to be used - */ - function f_initialState(Scenario p_scenario := e_staticPosition) runs on ItsBaseGeoNetworking { - - if (PICS_GN_SECURITY) { - var Oct8 v_hashedId8ToBeUsed := f_setupIutCertificate(vc_hashedId8ToBeUsed); - if (oct2int(v_hashedId8ToBeUsed) == 0) { - v_hashedId8ToBeUsed := 'FFFFFFFFFFFFFFFF'O; // Reset to unknown value, the IUT will use its own certificates - } - f_utInitializeIut(m_secGnInitialize(v_hashedId8ToBeUsed)); - } // else, default behavior - else { - f_utInitializeIut(m_gnInitialize); - } - f_sleep(PX_NEIGHBOUR_DISCOVERY_DELAY); - - f_acLoadScenario(p_scenario); - f_acStartScenario(); - f_acAwaitTimeInRunningScenario(f_getTimeForGpsFix()); - } - - /** - * @desc Receive and reply to LS Requests - * @param p_reqSeqNumber Expected sequence number of the received LS Request - * @param p_gnAddress GN address expected in received LS Request - * @param p_repSrcPosVector Source position vector of the sent LS Response - * @param p_repSenderPosVector Sender position vector of the sent LS Response - */ - function f_handleLocationService( - in template (present) UInt16 p_reqSeqNumber, - in template (value) GN_Address.mid p_mid, - in template (value) LongPosVector p_repSrcPosVector, - in template (value) LongPosVector p_repSenderPosVector - ) runs on ItsGeoNetworking { - - tc_ac.start; - alt { - [] a_receiveLsRequestAndReply(p_reqSeqNumber, p_mid, p_repSrcPosVector) {//Spirent removed, p_repSenderPosVector) { - tc_ac.stop; - } - } - - } - - /** - * @desc Send LS request and receive LS Reply - * @param p_reqSrcPosVector Source position vector of the sent LS Request - * @param p_reqSeqNumber Sequence number of the sent LS Request - * @param p_gnAddress GN address for which the LS Request is sent - * @param p_repSrcPosVector Expected source position vector in received LS Response - * @return FncRetCode - */ - function f_processLocationService( - in template (value) LongPosVector p_reqSrcPosVector, - in template (value) UInt16 p_reqSeqNumber, - in template (value) GN_Address p_gnAddress, - out LongPosVector p_repSrcPosVector - ) runs on ItsGeoNetworking return FncRetCode { - var FncRetCode v_ret := e_error; - var GeoNetworkingInd v_msg; - - f_sendGeoNetMessage( - valueof( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwLsRequestPacket( - p_reqSrcPosVector, - p_reqSeqNumber, - p_gnAddress - ) - ) - ) - ) - ); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwLsReplyPacket( - ?, - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_reqSrcPosVector))) - ) - ) - ) - ) -> value v_msg { - tc_ac.stop; - p_repSrcPosVector := valueof(v_msg.msgIn.gnPacket.packet.extendedHeader.lsReplyHeader.srcPosVector); - v_ret := e_success; - } - } - - return v_ret; - } - - } // End of group preambles - - group postambles { - - /** - * @desc The default postamble. - */ - function f_poDefault() runs on ItsGeoNetworking { - f_acStopScenario(); - } - - /** - * @desc Postamble for neighbour nodes - */ - function f_poNeighbour() runs on ItsGeoNetworking { - f_stopBeingNeighbour(); - f_poDefault(); - } - - } // End of group postambles - - group adapterControl { - - /** - * @desc Triggers event in the test system adaptation. - * @param p_event The event to trigger - * @return FncRetCode - */ - function f_acTriggerEvent(template (value) AcGnPrimitive p_event) runs on ItsBaseGeoNetworking return FncRetCode { - var FncRetCode v_ret := e_success; - - acPort.send(p_event); - - return v_ret; - } - - /** - * @desc Get the position vector corresponding to a specific GN address - * @param p_gnAddress GN address for which the search is performed - * @return LongPosVector - IUT's position - */ - function f_acGetLongPosVector(GN_Address p_gnAddress) runs on ItsBaseGeoNetworking return LongPosVector { - var AcGnResponse v_result; - - f_acTriggerEvent(m_getLongPosVector(p_gnAddress)); - tc_ac.start; - alt { - [] acPort.receive(mw_getLongPosVectorAny(p_gnAddress)) -> value v_result { - tc_ac.stop; - } - [] acPort.receive { - tc_ac.stop; - log("*** f_acGetLongPosVector: ERROR: Received unexpected message ***"); - f_selfOrClientSyncAndVerdict("error", e_error); - } - [] tc_ac.timeout { - log("*** f_acGetLongPosVector: ERROR: Timeout while waiting for adapter control event result ***"); - f_selfOrClientSyncAndVerdict("error", e_timeout); - } - } - - return v_result.getLongPosVector; - } - - /** - * @desc Triggers test adapter to send beacons for multiple neighbours - * @param p_numberOfNeighbour Number of neighbours to simulate - * @return FncRetCode - */ - function f_acStartBeaconingMultipleNeighbour(in integer p_numberOfNeighbour) runs on ItsGeoNetworking return FncRetCode { - - return f_acTriggerEvent(m_startBeaconingMultipleNeighbour(m_beaconHeader(f_getPosition(vc_componentName)).beaconHeader, p_numberOfNeighbour)); - - } - - /** - * @desc Triggers test adapter to enable security support - * @return FncRetCode - */ - function f_acEnableSecurity() runs on ItsBaseGeoNetworking return FncRetCode { - - // Local variables - - // Load certificates - if (PICS_GN_SECURITY) { - if( not f_loadCertificates(PX_IUT_SEC_CONFIG_NAME) ) { - return e_error; - } - - // Initialize vc_location - f_setGenerationLocation( - f_getTsLatitude(), - f_getTsLongitude() - ); - return f_acTriggerSecEvent(m_acEnableSecurity(cc_taCert_A)); - } - return f_acTriggerSecEvent(m_acEnableSecurity(PX_CERT_FOR_TS)); - } - - /** - * @desc Triggers test adapter to disable security support - * @return FncRetCode - */ - function f_acDisableSecurity() runs on ItsBaseGeoNetworking return FncRetCode { - - f_unloadCertificates(); - - return f_acTriggerSecEvent(m_acDisableSecurity); - - } - - /** - * @desc Triggers event in the test system adaptation. - * @param p_event The event to trigger - * @return FncRetCode - */ - function f_acTriggerSecEvent( - in template (value) AcSecPrimitive p_event - ) runs on ItsBaseGeoNetworking return FncRetCode { - var FncRetCode v_ret := e_success; - - acPort.send(p_event); - tc_ac.start; - alt { - [] acPort.receive(m_acSecResponseSuccess) { - tc_ac.stop; - } - [] acPort.receive { - tc_ac.stop; - log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***"); - f_selfOrClientSyncAndVerdict("error", e_error); - } - [] tc_ac.timeout { - log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for adapter control event result ***"); - f_selfOrClientSyncAndVerdict("error", e_timeout); - } - } - - return v_ret; - } - - /** - * @desc Triggers event in the test system adaptation. - * @param p_event The event to trigger - * @return FncRetCode - */ - function f_acTriggerGnssEvent(template (value) AcGnssPrimitive p_event) runs on ItsBaseGeoNetworking return FncRetCode { - var FncRetCode v_ret := e_success; - - acPort.send(p_event); - tc_ac.start; - alt { - [] acPort.receive(m_acGnssResponseSuccess) { - tc_ac.stop; - } - [] acPort.receive { - tc_ac.stop; - log("*** f_acTriggerGnssEvent: ERROR: Received unexpected message ***"); - f_selfOrClientSyncAndVerdict("error", e_error); - } - [] tc_ac.timeout { - log("*** f_acTriggerGnssEvent: ERROR: Timeout while waiting for adapter control event result ***"); - f_selfOrClientSyncAndVerdict("error", e_timeout); - } - } - - return v_ret; - } - - /** - * @desc Loads the given scenario - * - * @param p_scenario The scenario to load. - */ - function f_acLoadScenario(Scenario p_scenario) runs on ItsBaseGeoNetworking { - - if (PX_GNSS_SCENARIO_SUPPORT==true) { - f_acTriggerGnssEvent(m_loadScenario(p_scenario)); - } - } // End of function f_acLoadScenario - - /** - * @desc Starts a loaded scenario - */ - function f_acStartScenario() runs on ItsBaseGeoNetworking { - - if (PX_GNSS_SCENARIO_SUPPORT==true) { - f_acTriggerGnssEvent(m_startScenario); - vc_scenarioStarted := true; - } - } // End of function f_acStartScenario - - /** - * @desc Stops a loaded scenario - */ - function f_acStopScenario() runs on ItsBaseGeoNetworking { - - if (PX_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) { - f_acTriggerGnssEvent(m_stopScenario); - vc_scenarioStarted := false; - } - } // End of function f_acStopScenario - - function f_acAwaitTimeInRunningScenario(integer p_time) runs on ItsBaseGeoNetworking return FncRetCode { - var FncRetCode v_ret := e_success; - - if (PX_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) { - f_acTriggerGnssEvent(m_timeInRunningScenario(p_time)); - - tc_ac.start(int2float(p_time)*1.1); - alt { - [] acPort.receive(m_acGnssTimeReachedSuccess) { - tc_ac.stop; - } - [] acPort.receive(m_acGnssTimeReachedError) { - tc_ac.stop; - log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***"); - f_selfOrClientSyncAndVerdict("error", e_error); - } - [] tc_ac.timeout { - log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for time reached indication ***"); - f_selfOrClientSyncAndVerdict("error", e_timeout); - } - } - - } - return v_ret; - } // End of function f_acAwaitTimeInRunningScenario - - } // End of group adapterControl - - group commonFunctions { - - /** - * @desc Gets the value of the lifetime in seconds. - * @param p_lifetime Lifetime to be converted - * @return Lifetime in seconds - */ - function f_getLifetimeValue(in Lifetime p_lifetime) runs on ItsGeoNetworking return float { - var float v_lifetime := 0.0; - - select (p_lifetime.ltBase) { - case (e_50ms) { - v_lifetime := int2float(p_lifetime.multiplier) * 0.5; - } - case (e_1s) { - v_lifetime := int2float(p_lifetime.multiplier) * 1.0; - } - case (e_10s) { - v_lifetime := int2float(p_lifetime.multiplier) * 10.0; - } - case (e_100s) { - v_lifetime := int2float(p_lifetime.multiplier) * 100.0; - } - } - - return v_lifetime; - } - - /** - * @desc Computes GN timestamp based on current time - * @return Unix-Epoch-Time mod 2^32 - */ - function f_computeGnTimestamp() return UInt32 { - - // Timestamp is 1s older than current time to avoid sending beacons coming from the future (time sync between nodes) - var UInt32 v_timestamp := fx_computeGnTimestamp() - 1000; - return v_timestamp; - } - - } // End of group commonFunctions - - group testerFunctions { - - /** - * @desc Gets the tester GN local address for a specific node - * @param p_node Simulated node - * @return GN address of simulated node - */ - function f_getTsGnLocalAddress(in charstring p_node) return GN_Address { - var GN_Address v_gnAddr := valueof(m_dummyGnAddr); - - select (p_node) { - case (c_compNodeA) { - v_gnAddr := PX_TS_NODE_A_LOCAL_GN_ADDR; - } - case (c_compNodeB) { - v_gnAddr := PX_TS_NODE_B_LOCAL_GN_ADDR; - } - case (c_compNodeC) { - v_gnAddr := PX_TS_NODE_C_LOCAL_GN_ADDR; - } - case (c_compNodeD) { - v_gnAddr := PX_TS_NODE_D_LOCAL_GN_ADDR; - } - case (c_compNodeE) { - v_gnAddr := PX_TS_NODE_E_LOCAL_GN_ADDR; - } - case (c_compNodeF) { - v_gnAddr := PX_TS_NODE_F_LOCAL_GN_ADDR; - } - case else { - log("*** f_getTsGnLocalAddress: INFO: Unknown component " & p_node & " ***"); - } - } - - return v_gnAddr; - } - - /** - * @desc Sends a GeoNetworking message and in case of an included sequence number in the message the - * local sequence number will be increased by one. - * @param p_geoNetReq The message to send. - */ - function f_sendGeoNetMessage(in template (value) GeoNetworkingReq p_geoNetReq) runs on ItsGeoNetworking { - geoNetworkingPort.send(p_geoNetReq); - if (not (ischosen(p_geoNetReq.msgOut.gnPacket.packet.extendedHeader.shbHeader) - or ischosen(p_geoNetReq.msgOut.gnPacket.packet.extendedHeader.beaconHeader))) { - f_setLocalSequenceNumber(); - } - } - - /** - * @desc Sends a GeoNetworking message with a payload and in case of an included sequence number in the message the - * local sequence number will be increased by one. - * @param p_geoNetReq The message to send. - * @param p_payload The payload to include. - */ - function f_sendGeoNetMessageWithPayload( - in template (value) GeoNetworkingReq p_geoNetReq, - in template (value) GnRawPayload p_payload - ) runs on ItsGeoNetworking { - p_geoNetReq.msgOut.gnPacket.packet.payload := p_payload; - geoNetworkingPort.send(p_geoNetReq); - if (not (ischosen(p_geoNetReq.msgOut.gnPacket.packet.extendedHeader.shbHeader) - or ischosen(p_geoNetReq.msgOut.gnPacket.packet.extendedHeader.beaconHeader))) { - f_setLocalSequenceNumber(); - } - } - - /** - * @desc Receive a GeoNetworking message with a payload and in case of an included sequence number in the message the - * local sequence number will be increased by one. - * @param p_geoNetInd The message to receive. - * @param p_payload The payload to include. - */ - function f_receiveGeoNetMessageWithPayload( - in template (present) GeoNetworkingInd p_geoNetInd, - in template (present) GnRawPayload p_payload - ) return template (present) GeoNetworkingInd { - var template (present) GeoNetworkingInd v_geoNetInd := p_geoNetInd; - - v_geoNetInd.msgIn.gnPacket.packet.payload := p_payload; - - return v_geoNetInd; - } - - /** - * @desc Sets the value of the sequence number for the next event. - */ - function f_setLocalSequenceNumber() runs on ItsGeoNetworking { - vc_localSeqNumber := (vc_localSeqNumber + 1) mod c_uInt16Max; - } - - /** - * @desc Creates an initial seqence number - * @return Time based initial sequence number (increasing with time) - */ - function f_getInitialSequenceNumber() return UInt16 { - - return (f_computeGnTimestamp() / 1000) mod c_uInt16Max; - } - - /** - * @desc Number of messages to be sent - * @return Number of messages to be sent - */ - function f_getMessageCount() return integer { - return PX_MESSAGE_COUNT; - } - - } // End of group testerFunctions - - group iutFunctions { - - /** - * @desc Gets the IUT GN local address - * @return IUT's GN_Address - * @see PICS_GN_LOCAL_GN_ADDR - */ - function f_getIutGnLocalAddress() return GN_Address { - - return PICS_GN_LOCAL_GN_ADDR; - } - - /** - * @desc Gets the IUT GN local address configuration method - * @return GnAddressConfigurationMethod - IUT's GN local address configuration method - * @see PICS_GN_LOCAL_ADDR_CONF_METHOD - */ - function f_getIutGnLocalAddressConfigurationMethod() return GnAddressConfigurationMethod { - return PICS_GN_LOCAL_ADDR_CONF_METHOD; - } - - /** - * @desc Gets the IUT MAc address - * @return MacAddress - IUT's MAc Address - * @see PICS_IUT_MAC_ADDRESS - */ - function f_getIutMacAddress() return MacAddress { - return PICS_IUT_MAC_ADDRESS; - } - - /** - * @desc Gets the GeoUnicast forwarding algorithm - * @return IUT's GeoUnicast forwarding algorithm - * @see PICS_GN_NON_AREA_FORWARDING_ALGORITHM - */ - function f_getNonAreaForwardingAlgorithm() return NonAreaForwardingAlgorithm { - return PICS_GN_NON_AREA_FORWARDING_ALGORITHM; - } - - /** - * @desc Gets the GeoBroadcast forwarding algorithm - * @return IUT's GeoBroadcast forwarding algorithm - * @see PICS_GN_AREA_FORWARDING_ALGORITHM - */ - function f_getAreaForwardingAlgorithm() return AreaForwardingAlgorithm { - return PICS_GN_AREA_FORWARDING_ALGORITHM; - } - - /** - * @desc Gets the IUT default hop limit - * @return IUT's default hop limit - * @see PICS_GN_DEFAULT_HOP_LIMIT - */ - function f_getDefaultHopLimit() return UInt8 { - return PICS_GN_DEFAULT_HOP_LIMIT; - } - - /** - * @desc Is the ITS-S mobile or stationary? - * @return Flags indicating whether the ITS-S is mobile or stationary. - * @see PICS_GN_IS_MOBILE - */ - function f_isMobile() return Bit8 { - if (PICS_GN_IS_MOBILE) { - return '10000000'B; - } - return '00000000'B; - } - - /** - * @desc Gets the LS retransmission timer.. Valid for NetRepInterval = default (cong. ctrl). - * @return LS retransmission timer in seconds - * @see PICS_GN_LOCATION_SERVICE_RETRANSMIT_TIMER - */ - function f_getLsRetransmitTimer() return float { - var float v_itsGnLocationServiceRetransmitTimer := int2float(PICS_GN_LOCATION_SERVICE_RETRANSMIT_TIMER/1000); - - return v_itsGnLocationServiceRetransmitTimer; - } - - /** - * @desc Gets the LS retransmission timer for NetRepInterval = medium (cong. ctrl). - * @return LS retransmission timer (medium) in seconds - * @see PX_GN_LOCATION_SERVICE_TIMER_MEDIUM - */ - function f_getLsRetransmitTimerMedium() return float { - var float v_itsGnLocationServiceRetransmitTimerMedium := int2float(PX_GN_LOCATION_SERVICE_TIMER_MEDIUM/1000); - - return v_itsGnLocationServiceRetransmitTimerMedium; - } - - /** - * @desc Gets the LS retransmission timer for NetRepInterval = maximum (cong. ctrl). - * @return LS retransmission timer (maximum) in seconds - * @see PX_GN_LOCATION_SERVICE_TIMER_MAXIMUM - */ - function f_getLsRetransmitTimerMaximum() return float { - var float v_itsGnLocationServiceRetransmitTimerMaximum := int2float(PX_GN_LOCATION_SERVICE_TIMER_MAXIMUM/1000); - - return v_itsGnLocationServiceRetransmitTimerMaximum; - } - - /** - * @desc Gets the App retransmission timer. Valid for AppRepInterval = default (cong. ctrl). - * @return App retransmission timer in seconds - * @see PX_GN_APPLICATION_RETRANSMIT_TIMER - */ - function f_getAppRetransmitTimer() return float { - var float v_itsGnLocationApplicationRetransmitTimer := int2float(PX_GN_APPLICATION_RETRANSMIT_TIMER/1000); - - return v_itsGnLocationApplicationRetransmitTimer; - } - - /** - * @desc Gets the App retransmission timer for AppRepInterval = medium (cong. ctrl). - * @return App retransmission timer (medium) in seconds - * @see PX_GN_APPLICATION_RETRANSMIT_TIMER_MEDIUM - */ - function f_getAppRetransmitTimerMedium() return float { - var float v_itsGnLocationApplicationRetransmitTimerMedium := int2float(PX_GN_APPLICATION_RETRANSMIT_TIMER_MEDIUM/1000); - - return v_itsGnLocationApplicationRetransmitTimerMedium; - } - - /** - * @desc Gets the App retransmission timer for AppRepInterval = maximum (cong. ctrl). - * @return App retransmission timer (maximum) in seconds - * @see PX_GN_APPLICATION_RETRANSMIT_TIMER_MAXIMUM - */ - function f_getAppRetransmitTimerMaximum() return float { - var float v_itsGnLocationApplicationRetransmitTimerMaximum := int2float(PX_GN_APPLICATION_RETRANSMIT_TIMER_MAXIMUM/1000); - - return v_itsGnLocationApplicationRetransmitTimerMaximum; - } - - /** - * @desc Gets the LS maximum retransmission number. - * @return LS maximum retransmission number - * @see PICS_GN_LOCATION_SERVICE_MAX_RETRANS - */ - function f_getLsMaxRetrans() return integer { - var integer v_itsGnLocationServiceMaxRetrans := PICS_GN_LOCATION_SERVICE_MAX_RETRANS; - - return v_itsGnLocationServiceMaxRetrans; - } - - /** - * @desc Gets the Application maximum retransmission number. - * @return Application maximum retransmission number - * @see PX_GN_APPLICATION_MAX_RETRANS - */ - function f_getAppMaxRetrans() return integer { - var integer v_itsGnApplicationMaxRetrans := PX_GN_APPLICATION_MAX_RETRANS; - - return v_itsGnApplicationMaxRetrans; - } - - /** - * @desc Gets the Location Service packet buffer size. - * @return Location Service packet buffer size in Kbytes - * @see PICS_GN_LOCATION_SERVICE_PACKET_BUFFER_SIZE - */ - function f_getLsPacketBufferSize() return integer { - var integer v_itsGnLocationServicePacketBufferSize := PICS_GN_LOCATION_SERVICE_PACKET_BUFFER_SIZE; - - return v_itsGnLocationServicePacketBufferSize; - } // End of function f_getLsPacketBufferSize - - /** - * @desc Gets the UC forwarding packet buffer size. - * @return UC forwarding packet buffer size in bytes - * @see PICS_GN_UC_FORWARDING_PACKET_BUFFER_SIZE - */ - function f_getUcForwardingPacketBufferSize() return integer { - var integer v_itsGnUcForwardingPacketBufferSize := PICS_GN_UC_FORWARDING_PACKET_BUFFER_SIZE; - - return v_itsGnUcForwardingPacketBufferSize * 1024; - } // End of function f_getUcForwardingPacketBufferSize - - /** - * @desc Gets the BC forwarding packet buffer size. - * @return BC forwarding packet buffer size in bytes - * @see PICS_GN_BC_FORWARDING_PACKET_BUFFER_SIZE - */ - function f_getBcForwardingPacketBufferSize() return integer { - var integer v_itsGnBcForwardingPacketBufferSize := PICS_GN_BC_FORWARDING_PACKET_BUFFER_SIZE; - - return v_itsGnBcForwardingPacketBufferSize * 1024; - } // End of function f_getBcForwardingPacketBufferSize - - /** - * @desc Gets the maximum lifetime of a packet. - * @return Maximum lifetime of a packet in seconds - * @see PICS_GN_MAX_PACKET_LIFETIME - */ - function f_getMaxPacketLifeTime() return float { - var float v_itsGnMaxPacketLifetime := int2float(PICS_GN_MAX_PACKET_LIFETIME); - - return v_itsGnMaxPacketLifetime; - } - - /** - * @desc Gets delta for timers. - * @return Delta for timers in seconds - * @see PX_T_DELTA - */ - function f_getDeltaTimer() return float { - var float v_deltaTimer := PX_T_DELTA; - - return v_deltaTimer; - } - - /** - * @desc Gets the beacon service retransmit timer. - * @return Beacon service retransmit timer - */ - function f_getBsRetransmitTimer() return float { - var float v_itsGnBeaconServiceRetransmitTimer; - - v_itsGnBeaconServiceRetransmitTimer := int2float( - (PICS_GN_BEACON_SERVICE_RETRANSMIT_TIMER/1000)); - - return v_itsGnBeaconServiceRetransmitTimer; - } - - /** - * @desc Gets the beacon service retransmit timer for NetBeaconInterval = medium (cong. ctrl). - * @return Beacon service retransmit timer (medium) - */ - function f_getBsRetransmitTimerMedium() return float { - var float v_itsGnBeaconServiceRetransmitTimerMedium; // timer value increased (medium) - - v_itsGnBeaconServiceRetransmitTimerMedium := int2float( - (PX_GN_BEACON_SERVICE_TIMER_MEDIUM+float2int((f_getBsMaxJitter() - 0.0 +1.0)*rnd()) + 0)/1000); - - return v_itsGnBeaconServiceRetransmitTimerMedium; - } - - /** - * @desc Gets the beacon service retransmit timer for NetBeaconInterval = maximum (cong. ctrl). - * @return Beacon service retransmit timer (maximum) - */ - function f_getBsRetransmitTimerMaximum() return float { - var float v_itsGnBeaconServiceRetransmitTimerMaximum; // timer value increased (maximum) - - v_itsGnBeaconServiceRetransmitTimerMaximum := int2float( - (PX_GN_BEACON_SERVICE_TIMER_MAXIMUM+float2int((f_getBsMaxJitter() - 0.0 +1.0)*rnd()) + 0)/1000); - - return v_itsGnBeaconServiceRetransmitTimerMaximum; - } - - /** - * @desc Gets the maximum beacon service jitter. - * @return Maximum beacon service jitter - */ - function f_getBsMaxJitter() return float { - var float v_itsGnBeaconServiceMaxJitter := int2float(PICS_GN_BEACON_SERVICE_MAX_JITTER)/1000.0; - - return v_itsGnBeaconServiceMaxJitter; - } - - /** - * @desc Gets the Lifetime of a Location Table Entry. - * @return Lifetime of a Location Table Entry in seconds - * @see PICS_GN_LIFETIME_LOC_TE - */ - function f_getLifetimeLocTableEntry() return float { - var float v_itsGnLifetimeLocTableEntry := int2float(PICS_GN_LIFETIME_LOC_TE); - - return v_itsGnLifetimeLocTableEntry; - } // End of function f_getLifetimeLocTableEntry - - /** - * @desc Gets the maximum communication range for CBF algorithm - * @return Maximum communication range for CBF algorithm in meters - * @see PICS_GN_DEFAULT_MAX_COMMUNICATION_RANGE - */ - function f_getCbfMaxCommunicationRange() return integer { - var integer v_maxCommunicationRange := PICS_GN_DEFAULT_MAX_COMMUNICATION_RANGE; - - return v_maxCommunicationRange; - } // End of function f_getCbfMaxCommunicationRange - - function f_getCbfMaxTime() return integer { - var integer v_cbfMaxTime := PICS_GN_CBF_MAX_TIME; - - return v_cbfMaxTime; - } // End of function f_getCbfMaxTime - - function f_getCbfMinTime() return integer { - var integer v_cbfMinTime := PICS_GN_CBF_MIN_TIME; - - return v_cbfMinTime; - } // End of function f_getCbfMinTime - - function f_getGnMaxAreaSize() return float { - var float v_maxAreaSize := PICS_GN_MAX_GEO_AREA_SIZE; - - return v_maxAreaSize; - } // End of function f_getGnMaxAreaSize - - function f_getAdvancedGbcForwardingMaxCounter() return integer { - var integer v_maxCounter := PICS_GN_ADVANCED_BC_FORWARDING_MAX_COUNTER; - - return v_maxCounter; - } - - /** - * @desc Set the number of neighbour in the Location Table. - * @see PX_MIN_NR_NEIGHBOUR - */ - function f_setNrNeighbourLocTableDefault() runs on ItsGeoNetworking { - var integer v_nrNeighbour := f_random (0, PX_MIN_NR_NEIGHBOUR); - - f_acStartBeaconingMultipleNeighbour(v_nrNeighbour); - - } // End of function f_setNrNeighbourLocTableDefault - - /** - * @desc Set the number of neighbour in the Location Table (medium). - * @see PX_MIN_NR_NEIGHBOUR - * @see PX_MAX_NR_NEIGHBOUR - */ - function f_setNrNeighbourLocTableMedium() runs on ItsGeoNetworking { - var integer v_nrNeighbour := f_random (PX_MIN_NR_NEIGHBOUR, PX_MAX_NR_NEIGHBOUR); - - f_acStartBeaconingMultipleNeighbour(v_nrNeighbour); - - } // End of function f_setNrNeighbourLocTableMedium - - /** - * @desc Set the number of neighbour in the Location Table (maximum). - * @see PX_MAX_NR_NEIGHBOUR - * @see PX_MIN_NR_NEIGHBOUR - */ - function f_setNrNeighbourLocTableMaximum() runs on ItsGeoNetworking { - var integer v_nrNeighbour := f_random (PX_MAX_NR_NEIGHBOUR, (2*PX_MIN_NR_NEIGHBOUR)); - - f_acStartBeaconingMultipleNeighbour(v_nrNeighbour); - - } // End of function f_setNrNeighbourLocTableMaximum - - } // End of group iutFunctions - - group posVectorFunctions { - - /** - * @desc Convert long position vector to short position vector - * @param p_longPosVector Long position vector to be converted - * @return Short position vector - */ - function f_longPosVector2ShortPosVector(in LongPosVector p_longPosVector) return ShortPosVector { - var ShortPosVector v_shortPosVector; - - v_shortPosVector := { - gnAddr := p_longPosVector.gnAddr, - timestamp_ := p_longPosVector.timestamp_, - latitude := p_longPosVector.latitude, - longitude := p_longPosVector.longitude - }; - - return v_shortPosVector; - } - - /** - * @desc Get IUT's long position vector - * @return IUT's long position vector - */ - function f_getIutLongPosVector() runs on ItsBaseGeoNetworking return LongPosVector { - return f_acGetLongPosVector(f_getIutGnLocalAddress()); - } - function f_getIutLongPosVector_1(inout LongPosVector p_longPosVectorIut) runs on ItsGeoNetworking { - p_longPosVectorIut := f_acGetLongPosVector(f_getIutGnLocalAddress()); - } - - /** - * @desc Get IUT's short position vector - * @return IUT's short position vector - */ - function f_getIutShortPosVector() runs on ItsGeoNetworking return ShortPosVector { - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - if (not isbound(v_longPosVectorIut)) { - v_longPosVectorIut := f_getIutLongPosVector(); - } - return f_longPosVector2ShortPosVector(v_longPosVectorIut); - } - - /** - * @desc Compute a position using a reference position, a distance and an orientation - * @param p_iutLongPosVector Reference position - * @param p_distance Distance to the reference position (in meter) - * @param p_orientation direction of the computed position (0 to 359; 0 means North) - * @return LongPosVector - */ - function f_computePositionUsingDistance(in LongPosVector p_iutLongPosVector, in float p_distance, in integer p_orientation) - return LongPosVector { - var LongPosVector v_result := p_iutLongPosVector; - - log("*** f_computePositionUsingDistance: INFO: calling fx_computePositionUsingDistance() ***"); - fx_computePositionUsingDistance(p_iutLongPosVector.latitude, p_iutLongPosVector.longitude, p_distance, p_orientation, v_result.latitude, v_result.longitude); - - return v_result; - } - - } // End of group posVectorFunctions - - group externalFunctions { - - /** - * @desc External function to compute timestamp based on current time - * @return Unix-Epoch-Time mod 2^32 - */ - external function fx_computeGnTimestamp() return UInt32; - - } // End of group externalFunctions - - group security { - - /** - * @desc Waiting for the GN message with Security - * @param p_InSecMsg SecurityMessage template - * @param p_received returns received SecurityMessage - */ - altstep a_securedMessage ( - in template (present) EtsiTs103097Data p_InSecMsg, - out EtsiTs103097Data p_received - ) runs on ItsGeoNetworking { - var GeoNetworkingInd v_geoNw; - [] geoNetworkingPort.receive(mw_geoNwInd( - mw_geoNwSecPdu( - p_InSecMsg, - mw_geoNwAnyPacket_withPayload(?) - ))) -> value v_geoNw { - p_received := f_getSecuredMessage(v_geoNw.msgIn); - } - } // End of 'altstep' statement - - /** - * @desc Receive GN message with security containing certificate as a signer info - * @param p_cert returns the certificate used for sign received message - */ - altstep a_securedMessageWithCertificate( - out EtsiTs103097Data p_received - ) runs on ItsGeoNetworking { - - [] a_securedMessage ( - mw_etsiTs103097Data_signed( - mw_signedData( - -, - mw_toBeSignedData( - mw_signedDataPayload - ), - mw_signerIdentifier_certificate // containing certificate - ) - ), - p_received - ) { - // Nothing to do - } - } // End of 'altstep' a_securedMessageWithCertificate - - /** - * @desc Receive GN message with security containing digest as a signer info - * @param p_cert returns the certificate used for sign received message - */ - altstep a_securedMessageWithDigest( - out EtsiTs103097Data p_received - ) runs on ItsGeoNetworking { - [] a_securedMessage ( - mw_etsiTs103097Data_signed( - mw_signedData( - -, - mw_toBeSignedData( - mw_signedDataPayload - ), - mw_signerIdentifier_digest // containing digest - ) - ), - p_received - ) { - // Nothing to do - } - } // End of altstep a_securedMessageWithDigest - - } // End of group altSteps - - group waitingHelpers { - - /** - * @desc Adapt the GN payload in case of BTP-A/B - * @return The adapated GN payload if PX_GN_UPPER_LAYER is set to BTP-A/B, the unchanged payload otherwise - */ - function f_adapPayload( - in GnRawPayload p_payload, - in integer p_dest_port := 0, - in integer p_info_port := 0 - ) return GnRawPayload { - - if ((PX_GN_UPPER_LAYER == e_btpA) or (PX_GN_UPPER_LAYER == e_btpB)) { - var GnRawPayload v_btp_payload := int2oct(p_dest_port, 2) & int2oct(p_info_port, 2); // Add BTP payload - return v_btp_payload & p_payload; - } - - return p_payload; - } - - /** - * @desc Wait for GN message with security containing certificate as a signer info - * @return the certificate used for sign received message - */ - function f_waitForCertificate( - out EtsiTs103097Certificate p_cert - ) runs on ItsGeoNetworking return boolean { - var EtsiTs103097Data v_recv; - var boolean v_ret := false; - - alt { - [] a_securedMessageWithCertificate(v_recv) { - var SignerIdentifier v_signerIdentifier; - if (f_getMsgSignerIdentifier(v_recv, v_signerIdentifier) == true) { - if (ischosen(v_signerIdentifier.certificate)) { - p_cert := v_signerIdentifier.certificate[0]; - v_ret := true; - } - } - } - } // End of 'alt' statement - - return v_ret; - } // End of function f_waitForCertificate - - /** - * @desc Ask for the certificate chain and wait for GN message with security containing certificate chain as a signer info - * @return the certificate chain used for sign received message - */ - function f_askForCertificateChain( - in template(value) octetstring p_CamPayload - ) runs on ItsGeoNetworking return boolean { - var EtsiTs103097Data v_recv; - var boolean v_ret := false; - - alt { - [] a_securedMessageWithCertificate(v_recv) { - var SignerIdentifier v_signerIdentifier; - if (f_getMsgSignerIdentifier(v_recv, v_signerIdentifier) == true) { // Get AT certificate - if(ischosen(v_signerIdentifier.digest)) { - f_sendCertificateRequest(v_signerIdentifier.digest, p_CamPayload); // Request issuer - if(tc_ac.running) { - tc_ac.stop; - tc_ac.start; - } - v_ret := true; - } - } - } - } - return v_ret; - } // End of function f_askForCertificateChain - - /** - * @desc Ask for the certificate chain and wait for GN message with security containing certificate chain as a signer info - * @return the certificate chain used for sign received message - */ - function f_askAndWaitForCertificateChain( - out SequenceOfCertificate p_chain, - in template(value) octetstring p_CamPayload - ) runs on ItsGeoNetworking return boolean { - // Local variables - var EtsiTs103097Data v_recv; - var SignerIdentifier v_signerIdentifier; - var boolean v_ret := false; - - f_askForCertificateChain(p_CamPayload); // Get AT certificate and request for the issuer - alt { - [] a_securedMessageWithCertificate(v_recv) { // Get AA certificate - tc_ac.stop; - - if (f_getMsgSignerIdentifier(v_recv, v_signerIdentifier) == true) { - p_chain := v_signerIdentifier.certificate; - } - } - } // End of 'alt' statement - - return v_ret; - } // End of function f_askAndWaitForCertificateChain - - /** - * @desc Send a CAM message with a certificate and wait the certificate chain request message - * @remark This function is used only for testing against another ATS - * @param p_certificate The certificate identifier - * @param p_CamPayload The CAM paylaod - * @return true on success, flase otherwise - */ - function f_sendCertificateAndWaitForCertificateChainRequest( - in charstring p_certificate, - in template(value) octetstring p_CamPayload - ) runs on ItsGeoNetworking return boolean { - // Local variables - var EtsiTs103097Data v_recv; - - f_sendCertificate(p_certificate, p_CamPayload); - /* FIXME To be reviewed alt { - [] a_securedMessage ( - mw_securedMessage( - superset( - mw_header_field_unrecognised_certificate - )), - v_recv - ) { - // Nothing to do - log("*** " & testcasename() & ": DEBUG: Receive certificate ***") - } - }*/ // End of 'alt' statement - - return true; - } // End of function f_sendCertificateAndWaitForCertificateChainRequest - - } // End of group waitingHelpers - - group CertRequests{ - - function f_sendCertificateRequest( - in template (value) HashedId8 p_digest, - in template (value) octetstring p_payload - ) runs on ItsGeoNetworking { - var GeoNetworkingReq v_gnReq; - var GnNonSecuredPacket v_gnNonSecuredPacket; - var template (value) ToBeSignedData v_toBeSignedData; - var template (value) EtsiTs103097Data v_securedMessage; - - // Build signed EtsiTs103097Data - v_gnNonSecuredPacket := valueof(m_geoNwShbPacket( - f_getPosition(c_compNodeC) // FIXME To be verified YANN - )); - // Add CAM payload - v_gnNonSecuredPacket.payload := valueof(p_payload); - - /* FIXME To be reviewed f_buildGnSecuredCam( - v_securedMessage, - m_payload_signed(bit2oct(encvalue(v_gnNonSecuredPacket))), - e_certificate, - { - m_header_field_unrecognised_certificate( - f_HashedId3FromHashedId8( - valueof(p_digest) - )) - }, - "" - ); - - // Build secured Gn packet - v_gnReq := valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwSecPdu( - v_gnNonSecuredPacket, - v_securedMessage - ) - )); // End of template m_geoNwReq_linkLayerBroadcast - - // Send Message - f_sendGeoNetMessage(v_gnReq);*/ - - } // End of function f_sendCertificateRequest - - /** - * @desc Send a CAM message with a certificate - * @remark This function is used only for testing against another ATS - * @param p_certificate The certificate identifier - * @param p_CamPayload The CAM paylaod - * @return true on success, flase otherwise - * @see f_sendCertificateAndWaitForCertificateChainRequest - */ - function f_sendCertificate( - in charstring p_certificate, - in template (value) octetstring p_payload - ) runs on ItsGeoNetworking { - var GeoNetworkingReq v_gnReq; - var GnNonSecuredPacket v_gnNonSecuredPacket; - var template (value) ToBeSignedData v_toBeSignedData; - var template (value) EtsiTs103097Data v_securedMessage; - - // Build signed EtsiTs103097Data - /* FIXME To be reviewed v_gnNonSecuredPacket := valueof(m_geoNwShbPacket( - f_getPosition(c_compNodeC) // FIXME To be verified YANN - )); - // Add CAM payload - v_gnNonSecuredPacket.payload := valueof(p_payload); - - f_buildGnSecuredCam( - v_securedMessage, - m_payload_signed(bit2oct(encvalue(v_gnNonSecuredPacket))), - e_certificate, - -, - p_certificate - ); - - // Build secured Gn packet - v_gnReq := valueof(m_geoNwReq_linkLayerBroadcast( - m_geoNwSecPdu( - v_gnNonSecuredPacket, - v_securedMessage - ) - )); // End of template m_geoNwReq_linkLayerBroadcast - - // Send Message - f_sendGeoNetMessage(v_gnReq);*/ - - } // End of function f_sendCertificate - - } // End of group CertRequests - - group messageGetters { - - /** - * @desc return EtsiTs103097Data field of GeoNetworking packet - * @param p_msg GeoNetworking packet - * @return the EtsiTs103097Data if any - */ - function f_getSecuredMessage( - in GeoNetworkingPdu p_msg - ) return EtsiTs103097Data { - return p_msg.gnPacket.securedMsg; - } - - } - -} // End of module LibItsGeoNetworking_Functions +/** + * @author ETSI / STF405 / STF449 / STF484 / STF517 / STF 538 + * @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/GeoNetworking/LibItsGeoNetworking_Functions.ttcn $ + * $Id: LibItsGeoNetworking_Functions.ttcn 1329 2017-02-21 14:48:18Z berge $ + * @desc Module containing functions for GeoNetworking + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * + */ +module LibItsGeoNetworking_Functions { + + // Libcommon + import from LibCommon_BasicTypesAndValues all; + import from LibCommon_DataStrings all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + import from LibCommon_Time all; + + // LibHelpers + import from LibHelpers_Functions all; + + // LibIts + import from Ieee1609Dot2BaseTypes language "ASN.1:1997" all; + import from Ieee1609Dot2 language "ASN.1:1997" all; + import from EtsiTs103097Module language "ASN.1:1997" all; + + // LibItsCommon + import from LibItsCommon_TypesAndValues all; + import from LibItsExternal_TypesAndValues all; + import from LibItsCommon_Templates all; + import from LibItsCommon_Functions all; + import from LibItsCommon_Pixits all; + // import from LibItsCommon_TestSystem all; + + // LibItsSecurity + import from LibItsSecurity_TypesAndValues all; + import from LibItsSecurity_Templates all; + import from LibItsSecurity_Functions all; + import from LibItsSecurity_Pixits all; + + // LibItsGeoNetworking + import from LibItsGeoNetworking_TestSystem all; + import from LibItsGeoNetworking_TypesAndValues all; + import from LibItsGeoNetworking_Templates all; + import from LibItsGeoNetworking_Pixits all; + import from LibItsGeoNetworking_Pics all; + + group utFuntions { + + /** + * @desc Requests to bring the IUT in an initial state + * @param p_init The initialisation to trigger. + */ + function f_utInitializeIut(template (value) UtGnInitialize p_init) runs on ItsBaseGeoNetworking { + + //deactivate gnPort default alts + vc_gnDefaultActive := false; + + utPort.send(p_init); + tc_wait.start; + alt { + [] utPort.receive(UtGnResults: { utGnInitializeResult := true }) { + tc_wait.stop; + log("*** f_utInitializeIut: INFO: IUT initialized ***"); + } + [] utPort.receive { + tc_wait.stop; + log("*** f_utInitializeIut: INFO: IUT could not be initialized ***"); + f_selfOrClientSyncAndVerdict("error", e_error); + } + [] tc_wait.timeout { + log("*** f_utInitializeIut: INFO: IUT could not be initialized in time ***"); + f_selfOrClientSyncAndVerdict("error", e_timeout); + } + } + + //activate gnPort default alts + vc_gnDefaultActive := true; + + } + + /** + * @desc Requests to change the position of the IUT + */ + function f_utChangePosition() runs on ItsBaseGeoNetworking { + + //deactivate gnPort default alts + vc_gnDefaultActive := false; + + utPort.send(m_changePosition); + tc_wait.start; + alt { + [] utPort.receive(UtGnResults: { utGnChangePositionResult := true} ) { + tc_wait.stop; + log("*** f_utChangePosition: INFO: IUT position changed ***"); + } + [] utPort.receive(UtGnResults: { utGnChangePositionResult := false }) { + tc_wait.stop; + log("*** f_utChangePosition: INFO: IUT position change was not successful ***"); + f_selfOrClientSyncAndVerdict("error", e_error); + } + [] a_utDefault() { + } + [] tc_wait.timeout { + log("*** f_utChangePosition: INFO: IUT position not changed in time ***"); + f_selfOrClientSyncAndVerdict("error", e_timeout); + } + } + + //activate gnPort default alts + vc_gnDefaultActive := true; + + } + + /** + * @desc Triggers event from the application layer + * @param p_event The event to trigger. + */ + function f_utTriggerEvent(template (value) UtGnTrigger p_event) runs on ItsBaseGeoNetworking return boolean { + + // Variables + var boolean v_return := true; + + //deactivate gnPort default alts + vc_gnDefaultActive := false; + + utPort.send(p_event); + tc_wait.start; + alt { + [] utPort.receive(UtGnResults: { utGnTriggerResult := true }) { + tc_wait.stop; + } + [] utPort.receive(UtGnResults: { utGnTriggerResult := false }) { + tc_wait.stop; + log("*** UtGnTriggerResult: INFO: UT trigger was not successful ***"); + f_selfOrClientSyncAndVerdict("error", e_error); + } + [] a_utDefault() { + } + [] tc_wait.timeout { + v_return := false; + } + } + + //activate gnPort default alts + vc_gnDefaultActive := true; + + return v_return; + } + + } // End of group utFunctions + + group geoConfigurationFunctions { + + /** + * @desc This configuration features: + * - one ITS node (IUT) + * - two ITS nodes (nodeA, nodeB) + * - Area1 which only includes NodeB and IUT + * - Area2 which only includes NodeB + * NodeB being close to the area center + */ + function f_cf01Up(Scenario p_scenario := e_staticPosition) runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + // Variables + var PositionTable v_positionTable := {}; + var GeoAreaTable v_areaTable := {}; + + // Map + map(self:acPort, system:acPort); + map(self:utPort, system:utPort); + map(self:geoNetworkingPort, system:geoNetworkingPort); + + // Connect + f_connect4SelfOrClientSync(); + activate(a_cf01Down()); + + // Initialise secured mode + f_initialiseSecuredMode(); + + //Initialze the IUT + f_initialState(p_scenario); + + // Positions & Areas + f_preparePositionsAndAreas(v_positionTable, v_areaTable); + + f_initialiseComponent(v_positionTable, v_areaTable, c_compNodeB); + + } // End of function f_cf01Up + + function f_cf01Down() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_uninitialiseSecuredMode(); + + // Unmap + unmap(self:acPort, system:acPort); + unmap(self:utPort, system:utPort); + unmap(self:geoNetworkingPort, system:geoNetworkingPort); + + // Disconnect + f_disconnect4SelfOrClientSync(); + + } // End of function f_cf01Down + + /** + * @desc This configuration features: + * - one ITS node (IUT) + * - one ITS node (NodeB) + * - one ITS node (NodeD) + * - Area1 which only includes NodeB, NodeD and IUT + * - Area2 which only includes NodeB and NodeD + * NodeB being close to the area center + * + * @param p_mainUtComponent Name of the component that will initialize IUT and handle default UT messages + */ + function f_cf02Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { + + // Variables + var PositionTable v_positionTable := {}; + var GeoAreaTable v_areaTable := {}; + var ItsGeoNetworking v_component; + var integer i; + + log(">>> f_cf02Up: p_mainUtComponent: ", p_mainUtComponent); + + // Select components + vc_componentTable := {{c_compNodeB, omit}, {c_compNodeD, omit}}; + + // Create components + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + vc_componentTable[i].gnComponent := ItsGeoNetworking.create(vc_componentTable[i].componentName) alive; + } + + // Map & Connect + map(self:acPort, system:acPort); + map(self:utPort, system:utPort); + map(self:geoNetworkingPort, system:geoNetworkingPort); + connect(self:syncPort, mtc:syncPort); + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + map(vc_componentTable[i].gnComponent:acPort, system:acPort); + map(vc_componentTable[i].gnComponent:utPort, system:utPort); + map(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); + connect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); + } + + activate(a_cf02Down()); + + //Initialze the IUT + log("f_cf02Up: start f_initialState for: ", p_mainUtComponent); + if(p_mainUtComponent == c_compMTC) { + // Initialise secured mode + f_initialiseSecuredMode(); + + // MTC intializes IUT + f_initialState(p_scenario); + } + else { + v_component := f_getComponent(p_mainUtComponent); + v_component.start(f_initialState(p_scenario)); + v_component.done; + } + + // Positions & Areas + f_preparePositionsAndAreas(v_positionTable, v_areaTable); + + // Initialize components + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + if (isvalue(vc_componentTable[i].gnComponent)) { + vc_componentTable[i].gnComponent.start(f_initialiseComponent(v_positionTable, v_areaTable, vc_componentTable[i].componentName)); + } + } + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + if (isvalue(vc_componentTable[i].gnComponent)) { + vc_componentTable[i].gnComponent.done; + } + } + + } // End of function f_cf02Up + + /** + * @desc Deletes configuration cf02 + */ + function f_cf02Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { + + // Local variables + var integer i; + + f_uninitialiseSecuredMode(); + + // Unmap & Disconnect + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + unmap(vc_componentTable[i].gnComponent:utPort, system:utPort); + unmap(vc_componentTable[i].gnComponent:acPort, system:acPort); + unmap(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); + disconnect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); + } + unmap(self:acPort, system:acPort); + unmap(self:utPort, system:utPort); + unmap(self:geoNetworkingPort, system:geoNetworkingPort); + disconnect(self:syncPort, mtc:syncPort); + + } // End of function f_cf02Down + + /** + * @desc This configuration features: + * - one ITS node (IUT) + * - one ITS node (NodeA) + * - one ITS node in direction of NodeA (NodeB) + * - one ITS node not in direction of NodeA (NodeC) + * - Area1 which only includes NodeB and IUT + * - Area2 which only includes NodeB + * NodeB being close to the area center + * @param p_mainUtComponent Name of the component that will initialize IUT and handle default UT messages + */ + function f_cf03Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { + + // Variables + var PositionTable v_positionTable := {}; + var GeoAreaTable v_areaTable := {}; + var ItsGeoNetworking v_component; + var integer i; + + // Select components + vc_componentTable := {{c_compNodeB, omit}, {c_compNodeC, omit}}; + + // Create components + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + vc_componentTable[i].gnComponent := ItsGeoNetworking.create(vc_componentTable[i].componentName) alive; + } + + // Map & Connect + map(self:acPort, system:acPort); + map(self:utPort, system:utPort); + connect(self:syncPort, mtc:syncPort); + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + map(vc_componentTable[i].gnComponent:acPort, system:acPort); + map(vc_componentTable[i].gnComponent:utPort, system:utPort); + map(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); + connect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); + } + + activate(a_cf03Down()); + + //Initialze the IUT + if(p_mainUtComponent == c_compMTC) { + // Initialise secured mode + f_initialiseSecuredMode(); + + // MTC intializes IUT + f_initialState(p_scenario); + } + else { + v_component := f_getComponent(p_mainUtComponent); + v_component.start(f_initialState(p_scenario)); + v_component.done; + } + + // Positions & Areas + f_preparePositionsAndAreas(v_positionTable, v_areaTable); + + // Initialize components + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + if (isvalue(vc_componentTable[i].gnComponent)) { + vc_componentTable[i].gnComponent.start(f_initialiseComponent(v_positionTable, v_areaTable, vc_componentTable[i].componentName)); + } + } + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + if (isvalue(vc_componentTable[i].gnComponent)) { + vc_componentTable[i].gnComponent.done; + } + } + + } // End of function f_cf03Up + + /** + * @desc Deletes configuration cf03 + */ + function f_cf03Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { + + // Local variables + var integer i; + + f_uninitialiseSecuredMode(); + + // Unmap & Disconnect + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + unmap(vc_componentTable[i].gnComponent:utPort, system:utPort); + unmap(vc_componentTable[i].gnComponent:acPort, system:acPort); + unmap(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); + disconnect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); + } + unmap(self:acPort, system:acPort); + unmap(self:utPort, system:utPort); + disconnect(self:syncPort, mtc:syncPort); + + } // End of function f_cf03Down + + /** + * @desc This configuration features: + * - one ITS node (IUT) + * - one ITS node (NodeA) + * - one ITS node in direction of NodeA and having + * shortest distance to NodeA (NodeB) + * - one ITS node in direction of NodeA (NodeD) + * - one ITS node not in direction of NodeA (NodeC) + * - Area1 which only includes NodeB, NodeD and IUT + * - Area2 which only includes NodeA, NodeB and NodeD + * NodeB being close to the area center + * @param p_mainUtComponent Name of the component that will initialize IUT and handle default UT messages + */ + function f_cf04Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { + + // Variables + var PositionTable v_positionTable := {}; + var GeoAreaTable v_areaTable := {}; + var ItsGeoNetworking v_component; + var integer i; + + // Select components + vc_componentTable := {{c_compNodeB, omit}, {c_compNodeC, omit}, {c_compNodeD, omit}}; + + // Create components + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + vc_componentTable[i].gnComponent := ItsGeoNetworking.create(vc_componentTable[i].componentName) alive; + } + + // Map & Connect + map(self:acPort, system:acPort); + map(self:utPort, system:utPort); + connect(self:syncPort, mtc:syncPort); + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + map(vc_componentTable[i].gnComponent:acPort, system:acPort); + map(vc_componentTable[i].gnComponent:utPort, system:utPort); + map(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); + connect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); + } + + activate(a_cf04Down()); + + //Initialze the IUT + if(p_mainUtComponent == c_compMTC) { + // Initialise secured mode + f_initialiseSecuredMode(); + + // MTC intializes IUT + f_initialState(p_scenario); + } + else { + v_component := f_getComponent(p_mainUtComponent); + v_component.start(f_initialState(p_scenario)); + v_component.done; + } + + // Positions & Areas + f_preparePositionsAndAreas(v_positionTable, v_areaTable); + + // Initialize components + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + if (isvalue(vc_componentTable[i].gnComponent)) { + vc_componentTable[i].gnComponent.start(f_initialiseComponent(v_positionTable, v_areaTable, vc_componentTable[i].componentName)); + } + } + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + if (isvalue(vc_componentTable[i].gnComponent)) { + vc_componentTable[i].gnComponent.done; + } + } + + } // End of function f_cf04Up + + /** + * @desc Deletes configuration cf04 + */ + function f_cf04Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { + + // Local variables + var integer i; + + f_uninitialiseSecuredMode(); + + // Unmap & Disconnect + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + unmap(vc_componentTable[i].gnComponent:utPort, system:utPort); + unmap(vc_componentTable[i].gnComponent:acPort, system:acPort); + unmap(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); + disconnect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); + } + unmap(self:acPort, system:acPort); + unmap(self:utPort, system:utPort); + disconnect(self:syncPort, mtc:syncPort); + + } // End of function f_cf04Down + + /** + * @desc This configuration features: + * - one ITS node (IUT) + * - one ITS node (NodeB) + * - one ITS node not in direction of NodeB and having + * longest distance to NodeB (NodeE) + * - Area1 which only includes NodeB, NodeD and IUT + * @param p_mainUtComponent Name of the component that will initialize IUT and handle default UT messages + */ + function f_cf05Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { + + // Variables + var PositionTable v_positionTable := {}; + var GeoAreaTable v_areaTable := {}; + var ItsGeoNetworking v_component; + var integer i; + + // Select components + vc_componentTable := {{c_compNodeB, omit}, {c_compNodeE, omit}}; + + // Create components + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + vc_componentTable[i].gnComponent := ItsGeoNetworking.create(vc_componentTable[i].componentName) alive; + } + + // Map & Connect + map(self:acPort, system:acPort); + map(self:utPort, system:utPort); + connect(self:syncPort, mtc:syncPort); + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + map(vc_componentTable[i].gnComponent:acPort, system:acPort); + map(vc_componentTable[i].gnComponent:utPort, system:utPort); + map(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); + connect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); + } + + activate(a_cf05Down()); + + //Initialze the IUT + if(p_mainUtComponent == c_compMTC) { + // Initialise secured mode + f_initialiseSecuredMode(); + + // MTC intializes IUT + f_initialState(p_scenario); + } + else { + v_component := f_getComponent(p_mainUtComponent); + v_component.start(f_initialState(p_scenario)); + v_component.done; + } + + // Positions & Areas + f_preparePositionsAndAreas(v_positionTable, v_areaTable); + + // Initialize components + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + if (isvalue(vc_componentTable[i].gnComponent)) { + vc_componentTable[i].gnComponent.start(f_initialiseComponent(v_positionTable, v_areaTable, vc_componentTable[i].componentName)); + } + } + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + if (isvalue(vc_componentTable[i].gnComponent)) { + vc_componentTable[i].gnComponent.done; + } + } + } + + /** + * @desc Deletes configuration cf05 + */ + function f_cf05Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { + + // Local variables + var integer i; + + f_uninitialiseSecuredMode(); + + // Unmap & Disconnect + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + unmap(vc_componentTable[i].gnComponent:utPort, system:utPort); + unmap(vc_componentTable[i].gnComponent:acPort, system:acPort); + unmap(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); + disconnect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); + } + unmap(self:acPort, system:acPort); + unmap(self:utPort, system:utPort); + disconnect(self:syncPort, mtc:syncPort); + + } // End of function f_cf05Down + + /** + * @desc This configuration features: + * - one ITS node (IUT) + * - one ITS node (NodeB) + * - one ITS node not in direction of NodeB and having + * shortest distance to NodeB (NodeF) + * - Area1 which only includes NodeB, NodeD and IUT + * - IUT not in sectorial area of NodeB-NodeF + * @param p_mainUtComponent Name of the component that will initialize IUT and handle default UT messages + */ + function f_cf06Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { + + // Variables + var PositionTable v_positionTable := {}; + var GeoAreaTable v_areaTable := {}; + var ItsGeoNetworking v_component; + var integer i; + + // Select components + vc_componentTable := {{c_compNodeB, omit}, {c_compNodeF, omit}}; + + // Create components + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + vc_componentTable[i].gnComponent := ItsGeoNetworking.create(vc_componentTable[i].componentName) alive; + } + + // Map & Connect + map(self:acPort, system:acPort); + map(self:utPort, system:utPort); + connect(self:syncPort, mtc:syncPort); + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + map(vc_componentTable[i].gnComponent:acPort, system:acPort); + map(vc_componentTable[i].gnComponent:utPort, system:utPort); + map(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); + connect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); + } + + activate(a_cf06Down()); + + //Initialze the IUT + if(p_mainUtComponent == c_compMTC) { + // Initialise secured mode + f_initialiseSecuredMode(); + + // MTC intializes IUT + f_initialState(p_scenario); + } + else { + v_component := f_getComponent(p_mainUtComponent); + v_component.start(f_initialState(p_scenario)); + v_component.done; + } + + // Positions & Areas + f_preparePositionsAndAreas(v_positionTable, v_areaTable); + + // Initialize components + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + if (isvalue(vc_componentTable[i].gnComponent)) { + vc_componentTable[i].gnComponent.start(f_initialiseComponent(v_positionTable, v_areaTable, vc_componentTable[i].componentName)); + } + } + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + if (isvalue(vc_componentTable[i].gnComponent)) { + vc_componentTable[i].gnComponent.done; + } + } + } + + /** + * @desc Deletes configuration cf06 + */ + function f_cf06Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { + + // Local variables + var integer i; + + f_uninitialiseSecuredMode(); + + // Unmap & Disconnect + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + unmap(vc_componentTable[i].gnComponent:utPort, system:utPort); + unmap(vc_componentTable[i].gnComponent:acPort, system:acPort); + unmap(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); + disconnect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); + } + unmap(self:acPort, system:acPort); + unmap(self:utPort, system:utPort); + disconnect(self:syncPort, mtc:syncPort); + + } // End of function f_cf06Down + + /** + * @desc This configuration features: + * - one ITS node (IUT) + * - one ITS node (NodeB) + * - one ITS node in direction of NodeB and having + * shortest distance to NodeB (NodeD) + * - Area1 which only includes NodeB, NodeD and IUT + * @param p_mainUtComponent Name of the component that will initialize IUT and handle default UT messages + */ + function f_cf07Up(in charstring p_mainUtComponent := c_compMTC, Scenario p_scenario := e_staticPosition) runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { + + // Variables + var PositionTable v_positionTable := {}; + var GeoAreaTable v_areaTable := {}; + var ItsGeoNetworking v_component; + var integer i; + + // Select components + vc_componentTable := {{c_compNodeB, omit}, {c_compNodeD, omit}}; + + // Create components + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + vc_componentTable[i].gnComponent := ItsGeoNetworking.create(vc_componentTable[i].componentName) alive; + } + + // Map & Connect + map(self:acPort, system:acPort); + map(self:utPort, system:utPort); + connect(self:syncPort, mtc:syncPort); + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + map(vc_componentTable[i].gnComponent:acPort, system:acPort); + map(vc_componentTable[i].gnComponent:utPort, system:utPort); + map(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); + connect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); + } + + activate(a_cf07Down()); + + //Initialze the IUT + if(p_mainUtComponent == c_compMTC) { + // Initialise secured mode + f_initialiseSecuredMode(); + + // MTC intializes IUT + f_initialState(p_scenario); + } + else { + v_component := f_getComponent(p_mainUtComponent); + v_component.start(f_initialState(p_scenario)); + v_component.done; + } + + // Positions & Areas + f_preparePositionsAndAreas(v_positionTable, v_areaTable); + + // Initialize components + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + if (isvalue(vc_componentTable[i].gnComponent)) { + vc_componentTable[i].gnComponent.start(f_initialiseComponent(v_positionTable, v_areaTable, vc_componentTable[i].componentName)); + } + } + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + if (isvalue(vc_componentTable[i].gnComponent)) { + vc_componentTable[i].gnComponent.done; + } + } + } + + /** + * @desc Deletes configuration cf06 + */ + function f_cf07Down() runs on ItsMtc mtc ItsMtc system ItsGeoNetworkingSystem { + + // Local variables + var integer i; + + f_uninitialiseSecuredMode(); + + // Unmap & Disconnect + for(i:=0; i < lengthof(vc_componentTable); i:=i+1) { + unmap(vc_componentTable[i].gnComponent:utPort, system:utPort); + unmap(vc_componentTable[i].gnComponent:acPort, system:acPort); + unmap(vc_componentTable[i].gnComponent:geoNetworkingPort, system:geoNetworkingPort); + disconnect(vc_componentTable[i].gnComponent:syncPort, self:syncPort); + } + unmap(self:acPort, system:acPort); + unmap(self:utPort, system:utPort); + disconnect(self:syncPort, mtc:syncPort); + + } // End of function f_cf07Down + + /** + * @desc Behavior function for initializing component's variables and tables + * @param p_positionTable Table containing position vectors of all nodes + * @param p_areaTable Table containing all defined geoAreas + * @param p_componentName Name of the component + */ + function f_initialiseComponent( + in PositionTable p_positionTable, + in GeoAreaTable p_areaTable, + in charstring p_componentName) + runs on ItsGeoNetworking { + + vc_positionTable := p_positionTable; + vc_areaTable := p_areaTable; + vc_componentName := p_componentName; + + vc_localSeqNumber := f_getInitialSequenceNumber(); + vc_multipleMessagesCount := f_getMessageCount(); + + } // End of function f_initialiseComponent + + /** + * @desc Makes the simulated ITS node behave as a neighbour of IUT + */ + function f_startBeingNeighbour() runs on ItsGeoNetworking { + + vc_neighbourDefault := activate(a_neighbourDefault()); + f_acTriggerEvent(m_startBeaconing(m_beaconHeader(f_getPosition(vc_componentName)).beaconHeader)); + f_sleepIgnoreDef(PX_NEIGHBOUR_DISCOVERY_DELAY); + } // End of function f_startBeingNeighbour + + /** + * @desc Makes the simulated ITS node behave as not being a neighbour of IUT + */ + function f_stopBeingNeighbour() runs on ItsGeoNetworking { + + f_acTriggerEvent(m_stopBeaconing); + if (PICS_GN_SECURITY == true) { + deactivate(vc_neighbourDefault); + } + } // End of function f_stopBeingNeighbour + + /** + * @desc Initialise secure mode if required + */ + function f_initialiseSecuredMode() runs on ItsBaseGeoNetworking { + + // Local variables + + // Load certificates + if (PICS_GN_SECURITY == true) { + if( not f_loadCertificates(PX_IUT_SEC_CONFIG_NAME) ) { + log("*** INFO: TEST CASE NOW STOPPING ITSELF! ***"); + stop; + } + + // Initialize vc_location + f_setGenerationLocation( + f_getTsLatitude(), + f_getTsLongitude() + ); + } else if (PICS_IS_IUT_SECURED == true) { + if(e_success != f_acEnableSecurity()){ + log("*** INFO: TEST CASE NOW STOPPING ITSELF! ***"); + stop; + } + } + } // End of function f_initialiseSecuredMode() + + function f_uninitialiseSecuredMode() runs on ItsBaseGeoNetworking { + if ((PICS_GN_SECURITY == true) or (PICS_IS_IUT_SECURED == true)) { + f_acDisableSecurity(); + } + } // End of function f_uninitialiseSecuredMode() + + } // End of group geoConfigurationFunctions + + group componentFunctions { + /** + * @desc Get the component corresponding to a key + * @param p_componentName Name searched component + * @return ItsGeoNetworking - The searched position vector + */ + function f_getComponent( + in charstring p_componentName + ) runs on ItsMtc + return ItsGeoNetworking { + + var ItsGeoNetworking v_return := null; + var integer i := 0; + + for (i:=0; i value v_ind { + //store every upper tester indication received + //log("################# v_ind: ", v_ind); + vc_utInds[lengthof(vc_utInds)] := v_ind; + //log("################# vc_utInds: ", vc_utInds); + //log("################# lengthof(vc_utInds): ", lengthof(vc_utInds)); + repeat; + } + [vc_utDefaultActive] utPort.receive { + log("*** " & testcasename() & ": INFO: Received unexpected UT message from IUT ***"); + repeat; + } + } + + /** + * @desc Default handling cf01 de-initialisation. + */ + altstep a_cf01Down() runs on ItsGeoNetworking { + [] a_shutdown() { + f_poDefault(); + f_cf01Down(); + log("*** a_cf01Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); + stop; + } + } + + /** + * @desc Default handling cf02 de-initialisation. + */ + altstep a_cf02Down() runs on ItsMtc { + [] a_shutdown() { + f_cf02Down(); + log("*** a_cf02Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); + stop; + } + } + + /** + * @desc Default handling cf03 de-initialisation. + */ + altstep a_cf03Down() runs on ItsMtc { + [] a_shutdown() { + f_cf03Down(); + log("*** a_cf03Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); + stop; + } + } + + /** + * @desc Default handling cf04 de-initialisation. + */ + altstep a_cf04Down() runs on ItsMtc { + [] a_shutdown() { + f_cf04Down(); + log("*** a_cf04Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); + stop; + } + } + + /** + * @desc Default handling cf05 de-initialisation. + */ + altstep a_cf05Down() runs on ItsMtc { + [] a_shutdown() { + f_cf05Down(); + log("*** a_cf05Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); + stop; + } + } + + /** + * @desc Default handling cf06 de-initialisation. + */ + altstep a_cf06Down() runs on ItsMtc { + [] a_shutdown() { + f_cf06Down(); + log("*** a_cf06Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); + stop; + } + } + + /** + * @desc Default handling cf07 de-initialisation. + */ + altstep a_cf07Down() runs on ItsMtc { + [] a_shutdown() { + f_cf07Down(); + log("*** a_cf07Down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); + stop; + } + } + group geoGeoUnicastAltsteps { + + /** + * @desc Receive GeoUnicast packet + * @param p_sourceLongPosVec Expected source position vector + * @param p_destinationShortPosVec Expected destination position vector + * @param p_seqNumber Expected sequence number + */ + altstep a_receiveGeoUnicast( + in template (present) ShortPosVector p_destinationShortPosVec, + in template (present) UInt16 p_seqNumber + ) runs on ItsGeoNetworking { + + [vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwUnicastPacket( + p_destinationShortPosVec, + p_seqNumber)))) { + } + } + + /** + * @desc Receive GeoUnicast packet for specific destination + * @param p_destinationShortPosVec Expected destination position vector + */ + altstep a_receiveGeoUnicastWithDestination(in template (present) ShortPosVector p_destinationShortPosVec) runs on ItsGeoNetworking { + + [vc_gnDefaultActive] a_receiveGeoUnicast(p_destinationShortPosVec, ?) {} + } + + /** + * @desc Receive any GeoUnicast packet + */ + altstep a_receiveAnyGeoUnicast() runs on ItsGeoNetworking { + + [vc_gnDefaultActive] a_receiveGeoUnicast(?, ?) {} + } + + } // End of group geoGeoUnicastAltsteps + + group geoGeoBroadcastAltsteps { + + /** + * @desc Receive GeoBroadcast packet + * @param p_srcLongPosVec Expected source position vector + * @param p_seqNumber Expected sequence number + */ + altstep a_receiveGeoBroadcast( + in template (present) LongPosVector p_srcLongPosVec, + in template (present) UInt16 p_seqNumber + ) runs on ItsGeoNetworking { + + [vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( + p_srcLongPosVec, + p_seqNumber + )))) { + } + } + + /** + * @desc Receive GeoBroadcast packet with specific Area and HopLimit + * @param p_srcLongPosVec Expected source position vector + * @param p_seqNumber Expected sequence number + * @param p_broadcastArea Expected geoBroadcastArea + * @param p_routerHopLimit Expected router hop limit + * @param p_maxHopLimit Expected max hop limit (Default: ?) + */ + altstep a_receiveGeoBroadcastWithAreaWithHopLimit( + in template (present) LongPosVector p_srcLongPosVec, + in template (present) UInt16 p_seqNumber, + in template (present) GeoBroadcastArea p_broadcastArea, + in template (present) UInt8 p_routerHopLimit, + in template (present) UInt8 p_maxHopLimit := ? + ) runs on ItsGeoNetworking { + + [vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithAreaAndHl( + p_srcLongPosVec, + p_seqNumber, + p_broadcastArea, + p_maxHopLimit + ), + -, + p_routerHopLimit + ))) { + } + } + + /** + * @desc Receive GeoBroadcast packet for specific Geobroadcast Area + * @param p_srcLongPosVec Expected source position vector + * @param p_seqNumber Expected sequence number + * @param p_broadcastArea Expected geoBroadcastArea + */ + altstep a_receiveGeoBroadcastWithArea( + in template (present) LongPosVector p_srcLongPosVec, + in template (present) UInt16 p_seqNumber, + in template (present) GeoBroadcastArea p_broadcastArea + ) runs on ItsGeoNetworking { + + [vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + p_srcLongPosVec, + p_seqNumber, + p_broadcastArea + )))) { + } + } + + } // End of group geoGeoBroadcastAltsteps + + group geoGeoAnycastAltsteps { + + /** + * @desc Receive GeoAnycast packet + * @param p_srcLongPosVec Expected source position vector + * @param p_senderLongPosVec Expected sender position vector + * @param p_seqNumber Expected sequence number + */ + altstep a_receiveGeoAnycast( + in template (present) LongPosVector p_srcLongPosVec, + in template (present) LongPosVector p_senderLongPosVec, + in template (present) UInt16 p_seqNumber + ) runs on ItsGeoNetworking { + + [vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacket( + p_srcLongPosVec, + p_seqNumber + )))) { + } + } + + /** + * @desc Receive GeoAnycast packet with specific Area and HopLimit + * @param p_srcLongPosVec Expected source position vector + * @param p_senderLongPosVec Expected sender position vector + * @param p_seqNumber Expected sequence number + * @param p_anycastArea Expected geoAnycastArea + * @param p_hopLimit Expected hop limit + * @param p_maxHopLimit Expected max hop limit (Default: ?) + */ + altstep a_receiveGeoAnycastWithAreaWithHopLimit( + in template (present) LongPosVector p_srcLongPosVec, + in template (present) UInt16 p_seqNumber, + in template (present) GeoAnycastArea p_anycastArea, + in template (present) UInt8 p_hopLimit, + in template (present) UInt8 p_maxHopLimit := ? + ) runs on ItsGeoNetworking { + + [vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + p_srcLongPosVec, + p_seqNumber, + p_anycastArea + ), + -, + p_hopLimit + ))) { + } + } + + /** + * @desc Receive GeoAnycast packet for specific GeoAnycast Area + * @param p_srcLongPosVec Expected source position vector + * @param p_seqNumber Expected sequence number + * @param p_anycastArea Expected geoAnycastArea + */ + altstep a_receiveGeoAnycastWithArea( + in template (present) LongPosVector p_srcLongPosVec, + in template (present) UInt16 p_seqNumber, + in template (present) GeoAnycastArea p_anycastArea + ) runs on ItsGeoNetworking { + + [vc_gnDefaultActive] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwAnycastPacketWithArea( + p_srcLongPosVec, + p_seqNumber, + p_anycastArea + )))) { + } + } + + } // End of group geoGeoAnycastAltsteps + + group geoLocationServiceAltsteps { + + /** + * @desc Receive Location Service Request + * @param p_seqNumber Expected sequence number of the received LS Request + * @param p_mid GN address expected in received LS Request + * @param p_reqSrcPosVector Expected source position vector of the received LS Request + */ + altstep a_receiveLsRequest( + in template (present) UInt16 p_seqNumber, + in template (present) GN_Address.mid p_mid, + out LongPosVector p_reqSrcPosVector + ) runs on ItsGeoNetworking { + var GeoNetworkingInd v_msg; + + [vc_gnDefaultActive] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwLsRequestPacket( + p_seqNumber, + p_mid + ) + ) + ) + ) -> value v_msg { + p_reqSrcPosVector := valueof(v_msg.msgIn.gnPacket.packet.extendedHeader.lsRequestHeader.srcPosVector); + } + } + + /** + * @desc Receive any Location Service Request + */ + altstep a_receiveAnyLsRequest() runs on ItsGeoNetworking { + var LongPosVector v_reqSrcPosVector; + + [vc_gnDefaultActive] a_receiveLsRequest(?, ?, v_reqSrcPosVector) {} + } + + /** + * @desc Receive any Location Service Reply + */ + altstep a_receiveAnyLsReply() runs on ItsGeoNetworking { + [vc_gnDefaultActive] geoNetworkingPort.receive( mw_geoNwInd( mw_geoNwPdu( mw_geoNwLsReplyPacket(?, ?) ))) { + //ignore and repeat + repeat; + } + } + + /** + * @desc Receive Location Service Request and send Location Service Reply + * @param p_reqSeqNumber Expected sequence number of the received LS Request + * @param p_gnAddress GN address expected in received LS Request + * @param p_repSrcPosVector Source position vector of the sent LS Response + */ + altstep a_receiveLsRequestAndReply( + in template (present) UInt16 p_reqSeqNumber, + in template (value) GN_Address.mid p_mid, + in template (value) LongPosVector p_repSrcPosVector + ) runs on ItsGeoNetworking { + var LongPosVector v_repDstPosVector; + + [vc_gnDefaultActive] a_receiveLsRequest(p_reqSeqNumber, p_mid, v_repDstPosVector) { + f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu( + m_geoNwLsReplyPacket( + p_repSrcPosVector, + f_longPosVector2ShortPosVector(v_repDstPosVector), + vc_localSeqNumber + ))))); + } + } + + } // End of group geoLocationServiceAltsteps + + + } // End of group geoAltsteps + + group preambles { + + /** + * @desc The default preamble. + */ + function f_prDefault() runs on ItsGeoNetworking { + activate(a_default()); + activate(a_utDefault()); + } + + /** + * @desc Preamble for non-neighbour nodes + */ + function f_prNonNeighbour() runs on ItsGeoNetworking { + f_prDefault(); + } + + /** + * @desc Preamble for neighbour nodes + */ + function f_prNeighbour() runs on ItsGeoNetworking { + f_prDefault(); + f_startBeingNeighbour(); + f_sleep(0.5); + } + + /** + * @desc Brings the IUT into an initial state. + * @remark Component variable vc_hashedId8ToBeUsed shall be set with the IUT certificate to be used + */ + function f_initialState(Scenario p_scenario := e_staticPosition) runs on ItsBaseGeoNetworking { + + if (PICS_GN_SECURITY) { + var Oct8 v_hashedId8ToBeUsed := f_setupIutCertificate(vc_hashedId8ToBeUsed); + if (oct2int(v_hashedId8ToBeUsed) == 0) { + v_hashedId8ToBeUsed := 'FFFFFFFFFFFFFFFF'O; // Reset to unknown value, the IUT will use its own certificates + } + f_utInitializeIut(m_secGnInitialize(v_hashedId8ToBeUsed)); + } // else, default behavior + else { + f_utInitializeIut(m_gnInitialize); + } + f_sleep(PX_NEIGHBOUR_DISCOVERY_DELAY); + + f_acLoadScenario(p_scenario); + f_acStartScenario(); + f_acAwaitTimeInRunningScenario(f_getTimeForGpsFix()); + } + + /** + * @desc Receive and reply to LS Requests + * @param p_reqSeqNumber Expected sequence number of the received LS Request + * @param p_gnAddress GN address expected in received LS Request + * @param p_repSrcPosVector Source position vector of the sent LS Response + * @param p_repSenderPosVector Sender position vector of the sent LS Response + */ + function f_handleLocationService( + in template (present) UInt16 p_reqSeqNumber, + in template (value) GN_Address.mid p_mid, + in template (value) LongPosVector p_repSrcPosVector, + in template (value) LongPosVector p_repSenderPosVector + ) runs on ItsGeoNetworking { + + tc_ac.start; + alt { + [] a_receiveLsRequestAndReply(p_reqSeqNumber, p_mid, p_repSrcPosVector) {//Spirent removed, p_repSenderPosVector) { + tc_ac.stop; + } + } + + } + + /** + * @desc Send LS request and receive LS Reply + * @param p_reqSrcPosVector Source position vector of the sent LS Request + * @param p_reqSeqNumber Sequence number of the sent LS Request + * @param p_gnAddress GN address for which the LS Request is sent + * @param p_repSrcPosVector Expected source position vector in received LS Response + * @return FncRetCode + */ + function f_processLocationService( + in template (value) LongPosVector p_reqSrcPosVector, + in template (value) UInt16 p_reqSeqNumber, + in template (value) GN_Address p_gnAddress, + out LongPosVector p_repSrcPosVector + ) runs on ItsGeoNetworking return FncRetCode { + var FncRetCode v_ret := e_error; + var GeoNetworkingInd v_msg; + + f_sendGeoNetMessage( + valueof( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwLsRequestPacket( + p_reqSrcPosVector, + p_reqSeqNumber, + p_gnAddress + ) + ) + ) + ) + ); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwLsReplyPacket( + ?, + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_reqSrcPosVector))) + ) + ) + ) + ) -> value v_msg { + tc_ac.stop; + p_repSrcPosVector := valueof(v_msg.msgIn.gnPacket.packet.extendedHeader.lsReplyHeader.srcPosVector); + v_ret := e_success; + } + } + + return v_ret; + } + + } // End of group preambles + + group postambles { + + /** + * @desc The default postamble. + */ + function f_poDefault() runs on ItsGeoNetworking { + f_acStopScenario(); + } + + /** + * @desc Postamble for neighbour nodes + */ + function f_poNeighbour() runs on ItsGeoNetworking { + f_stopBeingNeighbour(); + f_poDefault(); + } + + } // End of group postambles + + group adapterControl { + + /** + * @desc Triggers event in the test system adaptation. + * @param p_event The event to trigger + * @return FncRetCode + */ + function f_acTriggerEvent(template (value) AcGnPrimitive p_event) runs on ItsBaseGeoNetworking return FncRetCode { + var FncRetCode v_ret := e_success; + + acPort.send(p_event); + + return v_ret; + } + + /** + * @desc Get the position vector corresponding to a specific GN address + * @param p_gnAddress GN address for which the search is performed + * @return LongPosVector - IUT's position + */ + function f_acGetLongPosVector(GN_Address p_gnAddress) runs on ItsBaseGeoNetworking return LongPosVector { + var AcGnResponse v_result; + + f_acTriggerEvent(m_getLongPosVector(p_gnAddress)); + tc_ac.start; + alt { + [] acPort.receive(mw_getLongPosVectorAny(p_gnAddress)) -> value v_result { + tc_ac.stop; + } + [] acPort.receive { + tc_ac.stop; + log("*** f_acGetLongPosVector: ERROR: Received unexpected message ***"); + f_selfOrClientSyncAndVerdict("error", e_error); + } + [] tc_ac.timeout { + log("*** f_acGetLongPosVector: ERROR: Timeout while waiting for adapter control event result ***"); + f_selfOrClientSyncAndVerdict("error", e_timeout); + } + } + + return v_result.getLongPosVector; + } + + /** + * @desc Triggers test adapter to send beacons for multiple neighbours + * @param p_numberOfNeighbour Number of neighbours to simulate + * @return FncRetCode + */ + function f_acStartBeaconingMultipleNeighbour(in integer p_numberOfNeighbour) runs on ItsGeoNetworking return FncRetCode { + + return f_acTriggerEvent(m_startBeaconingMultipleNeighbour(m_beaconHeader(f_getPosition(vc_componentName)).beaconHeader, p_numberOfNeighbour)); + + } + + /** + * @desc Triggers test adapter to enable security support + * @return FncRetCode + */ + function f_acEnableSecurity() runs on ItsBaseGeoNetworking return FncRetCode { + + // Local variables + + // Load certificates + if (PICS_GN_SECURITY) { + if( not f_loadCertificates(PX_IUT_SEC_CONFIG_NAME) ) { + return e_error; + } + + // Initialize vc_location + f_setGenerationLocation( + f_getTsLatitude(), + f_getTsLongitude() + ); + return f_acTriggerSecEvent(m_acEnableSecurity(cc_taCert_A)); + } + return f_acTriggerSecEvent(m_acEnableSecurity(PX_CERT_FOR_TS)); + } + + /** + * @desc Triggers test adapter to disable security support + * @return FncRetCode + */ + function f_acDisableSecurity() runs on ItsBaseGeoNetworking return FncRetCode { + + f_unloadCertificates(); + + return f_acTriggerSecEvent(m_acDisableSecurity); + + } + + /** + * @desc Triggers event in the test system adaptation. + * @param p_event The event to trigger + * @return FncRetCode + */ + function f_acTriggerSecEvent( + in template (value) AcSecPrimitive p_event + ) runs on ItsBaseGeoNetworking return FncRetCode { + var FncRetCode v_ret := e_success; + + acPort.send(p_event); + tc_ac.start; + alt { + [] acPort.receive(m_acSecResponseSuccess) { + tc_ac.stop; + } + [] acPort.receive { + tc_ac.stop; + log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***"); + f_selfOrClientSyncAndVerdict("error", e_error); + } + [] tc_ac.timeout { + log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for adapter control event result ***"); + f_selfOrClientSyncAndVerdict("error", e_timeout); + } + } + + return v_ret; + } + + /** + * @desc Triggers event in the test system adaptation. + * @param p_event The event to trigger + * @return FncRetCode + */ + function f_acTriggerGnssEvent(template (value) AcGnssPrimitive p_event) runs on ItsBaseGeoNetworking return FncRetCode { + var FncRetCode v_ret := e_success; + + acPort.send(p_event); + tc_ac.start; + alt { + [] acPort.receive(m_acGnssResponseSuccess) { + tc_ac.stop; + } + [] acPort.receive { + tc_ac.stop; + log("*** f_acTriggerGnssEvent: ERROR: Received unexpected message ***"); + f_selfOrClientSyncAndVerdict("error", e_error); + } + [] tc_ac.timeout { + log("*** f_acTriggerGnssEvent: ERROR: Timeout while waiting for adapter control event result ***"); + f_selfOrClientSyncAndVerdict("error", e_timeout); + } + } + + return v_ret; + } + + /** + * @desc Loads the given scenario + * + * @param p_scenario The scenario to load. + */ + function f_acLoadScenario(Scenario p_scenario) runs on ItsBaseGeoNetworking { + + if (PX_GNSS_SCENARIO_SUPPORT==true) { + f_acTriggerGnssEvent(m_loadScenario(p_scenario)); + } + } // End of function f_acLoadScenario + + /** + * @desc Starts a loaded scenario + */ + function f_acStartScenario() runs on ItsBaseGeoNetworking { + + if (PX_GNSS_SCENARIO_SUPPORT==true) { + f_acTriggerGnssEvent(m_startScenario); + vc_scenarioStarted := true; + } + } // End of function f_acStartScenario + + /** + * @desc Stops a loaded scenario + */ + function f_acStopScenario() runs on ItsBaseGeoNetworking { + + if (PX_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) { + f_acTriggerGnssEvent(m_stopScenario); + vc_scenarioStarted := false; + } + } // End of function f_acStopScenario + + function f_acAwaitTimeInRunningScenario(integer p_time) runs on ItsBaseGeoNetworking return FncRetCode { + var FncRetCode v_ret := e_success; + + if (PX_GNSS_SCENARIO_SUPPORT==true and vc_scenarioStarted==true) { + f_acTriggerGnssEvent(m_timeInRunningScenario(p_time)); + + tc_ac.start(int2float(p_time)*1.1); + alt { + [] acPort.receive(m_acGnssTimeReachedSuccess) { + tc_ac.stop; + } + [] acPort.receive(m_acGnssTimeReachedError) { + tc_ac.stop; + log("*** " & __SCOPE__ & ": ERROR: Received unexpected message ***"); + f_selfOrClientSyncAndVerdict("error", e_error); + } + [] tc_ac.timeout { + log("*** " & __SCOPE__ & ": ERROR: Timeout while waiting for time reached indication ***"); + f_selfOrClientSyncAndVerdict("error", e_timeout); + } + } + + } + return v_ret; + } // End of function f_acAwaitTimeInRunningScenario + + } // End of group adapterControl + + group commonFunctions { + + /** + * @desc Gets the value of the lifetime in seconds. + * @param p_lifetime Lifetime to be converted + * @return Lifetime in seconds + */ + function f_getLifetimeValue(in Lifetime p_lifetime) runs on ItsGeoNetworking return float { + var float v_lifetime := 0.0; + + select (p_lifetime.ltBase) { + case (e_50ms) { + v_lifetime := int2float(p_lifetime.multiplier) * 0.5; + } + case (e_1s) { + v_lifetime := int2float(p_lifetime.multiplier) * 1.0; + } + case (e_10s) { + v_lifetime := int2float(p_lifetime.multiplier) * 10.0; + } + case (e_100s) { + v_lifetime := int2float(p_lifetime.multiplier) * 100.0; + } + } + + return v_lifetime; + } + + /** + * @desc Computes GN timestamp based on current time + * @return Unix-Epoch-Time mod 2^32 + */ + function f_computeGnTimestamp() return UInt32 { + + // Timestamp is 1s older than current time to avoid sending beacons coming from the future (time sync between nodes) + var UInt32 v_timestamp := fx_computeGnTimestamp() - 1000; + return v_timestamp; + } + + } // End of group commonFunctions + + group testerFunctions { + + /** + * @desc Gets the tester GN local address for a specific node + * @param p_node Simulated node + * @return GN address of simulated node + */ + function f_getTsGnLocalAddress(in charstring p_node) return GN_Address { + var GN_Address v_gnAddr := valueof(m_dummyGnAddr); + + select (p_node) { + case (c_compNodeA) { + v_gnAddr := PX_TS_NODE_A_LOCAL_GN_ADDR; + } + case (c_compNodeB) { + v_gnAddr := PX_TS_NODE_B_LOCAL_GN_ADDR; + } + case (c_compNodeC) { + v_gnAddr := PX_TS_NODE_C_LOCAL_GN_ADDR; + } + case (c_compNodeD) { + v_gnAddr := PX_TS_NODE_D_LOCAL_GN_ADDR; + } + case (c_compNodeE) { + v_gnAddr := PX_TS_NODE_E_LOCAL_GN_ADDR; + } + case (c_compNodeF) { + v_gnAddr := PX_TS_NODE_F_LOCAL_GN_ADDR; + } + case else { + log("*** f_getTsGnLocalAddress: INFO: Unknown component " & p_node & " ***"); + } + } + + return v_gnAddr; + } + + /** + * @desc Sends a GeoNetworking message and in case of an included sequence number in the message the + * local sequence number will be increased by one. + * @param p_geoNetReq The message to send. + */ + function f_sendGeoNetMessage(in template (value) GeoNetworkingReq p_geoNetReq) runs on ItsGeoNetworking { + geoNetworkingPort.send(p_geoNetReq); + if (not (ischosen(p_geoNetReq.msgOut.gnPacket.packet.extendedHeader.shbHeader) + or ischosen(p_geoNetReq.msgOut.gnPacket.packet.extendedHeader.beaconHeader))) { + f_setLocalSequenceNumber(); + } + } + + /** + * @desc Sends a GeoNetworking message with a payload and in case of an included sequence number in the message the + * local sequence number will be increased by one. + * @param p_geoNetReq The message to send. + * @param p_payload The payload to include. + */ + function f_sendGeoNetMessageWithPayload( + in template (value) GeoNetworkingReq p_geoNetReq, + in template (value) GnRawPayload p_payload + ) runs on ItsGeoNetworking { + p_geoNetReq.msgOut.gnPacket.packet.payload := p_payload; + geoNetworkingPort.send(p_geoNetReq); + if (not (ischosen(p_geoNetReq.msgOut.gnPacket.packet.extendedHeader.shbHeader) + or ischosen(p_geoNetReq.msgOut.gnPacket.packet.extendedHeader.beaconHeader))) { + f_setLocalSequenceNumber(); + } + } + + /** + * @desc Receive a GeoNetworking message with a payload and in case of an included sequence number in the message the + * local sequence number will be increased by one. + * @param p_geoNetInd The message to receive. + * @param p_payload The payload to include. + */ + function f_receiveGeoNetMessageWithPayload( + in template (present) GeoNetworkingInd p_geoNetInd, + in template (present) GnRawPayload p_payload + ) return template (present) GeoNetworkingInd { + var template (present) GeoNetworkingInd v_geoNetInd := p_geoNetInd; + + v_geoNetInd.msgIn.gnPacket.packet.payload := p_payload; + + return v_geoNetInd; + } + + /** + * @desc Sets the value of the sequence number for the next event. + */ + function f_setLocalSequenceNumber() runs on ItsGeoNetworking { + vc_localSeqNumber := (vc_localSeqNumber + 1) mod c_uInt16Max; + } + + /** + * @desc Creates an initial seqence number + * @return Time based initial sequence number (increasing with time) + */ + function f_getInitialSequenceNumber() return UInt16 { + + return (f_computeGnTimestamp() / 1000) mod c_uInt16Max; + } + + /** + * @desc Number of messages to be sent + * @return Number of messages to be sent + */ + function f_getMessageCount() return integer { + return PX_MESSAGE_COUNT; + } + + } // End of group testerFunctions + + group iutFunctions { + + /** + * @desc Gets the IUT GN local address + * @return IUT's GN_Address + * @see PICS_GN_LOCAL_GN_ADDR + */ + function f_getIutGnLocalAddress() return GN_Address { + + return PICS_GN_LOCAL_GN_ADDR; + } + + /** + * @desc Gets the IUT GN local address configuration method + * @return GnAddressConfigurationMethod - IUT's GN local address configuration method + * @see PICS_GN_LOCAL_ADDR_CONF_METHOD + */ + function f_getIutGnLocalAddressConfigurationMethod() return GnAddressConfigurationMethod { + return PICS_GN_LOCAL_ADDR_CONF_METHOD; + } + + /** + * @desc Gets the IUT MAc address + * @return MacAddress - IUT's MAc Address + * @see PICS_IUT_MAC_ADDRESS + */ + function f_getIutMacAddress() return MacAddress { + return PICS_IUT_MAC_ADDRESS; + } + + /** + * @desc Gets the GeoUnicast forwarding algorithm + * @return IUT's GeoUnicast forwarding algorithm + * @see PICS_GN_NON_AREA_FORWARDING_ALGORITHM + */ + function f_getNonAreaForwardingAlgorithm() return NonAreaForwardingAlgorithm { + return PICS_GN_NON_AREA_FORWARDING_ALGORITHM; + } + + /** + * @desc Gets the GeoBroadcast forwarding algorithm + * @return IUT's GeoBroadcast forwarding algorithm + * @see PICS_GN_AREA_FORWARDING_ALGORITHM + */ + function f_getAreaForwardingAlgorithm() return AreaForwardingAlgorithm { + return PICS_GN_AREA_FORWARDING_ALGORITHM; + } + + /** + * @desc Gets the IUT default hop limit + * @return IUT's default hop limit + * @see PICS_GN_DEFAULT_HOP_LIMIT + */ + function f_getDefaultHopLimit() return UInt8 { + return PICS_GN_DEFAULT_HOP_LIMIT; + } + + /** + * @desc Is the ITS-S mobile or stationary? + * @return Flags indicating whether the ITS-S is mobile or stationary. + * @see PICS_GN_IS_MOBILE + */ + function f_isMobile() return Bit8 { + if (PICS_GN_IS_MOBILE) { + return '10000000'B; + } + return '00000000'B; + } + + /** + * @desc Gets the LS retransmission timer.. Valid for NetRepInterval = default (cong. ctrl). + * @return LS retransmission timer in seconds + * @see PICS_GN_LOCATION_SERVICE_RETRANSMIT_TIMER + */ + function f_getLsRetransmitTimer() return float { + var float v_itsGnLocationServiceRetransmitTimer := int2float(PICS_GN_LOCATION_SERVICE_RETRANSMIT_TIMER/1000); + + return v_itsGnLocationServiceRetransmitTimer; + } + + /** + * @desc Gets the LS retransmission timer for NetRepInterval = medium (cong. ctrl). + * @return LS retransmission timer (medium) in seconds + * @see PX_GN_LOCATION_SERVICE_TIMER_MEDIUM + */ + function f_getLsRetransmitTimerMedium() return float { + var float v_itsGnLocationServiceRetransmitTimerMedium := int2float(PX_GN_LOCATION_SERVICE_TIMER_MEDIUM/1000); + + return v_itsGnLocationServiceRetransmitTimerMedium; + } + + /** + * @desc Gets the LS retransmission timer for NetRepInterval = maximum (cong. ctrl). + * @return LS retransmission timer (maximum) in seconds + * @see PX_GN_LOCATION_SERVICE_TIMER_MAXIMUM + */ + function f_getLsRetransmitTimerMaximum() return float { + var float v_itsGnLocationServiceRetransmitTimerMaximum := int2float(PX_GN_LOCATION_SERVICE_TIMER_MAXIMUM/1000); + + return v_itsGnLocationServiceRetransmitTimerMaximum; + } + + /** + * @desc Gets the App retransmission timer. Valid for AppRepInterval = default (cong. ctrl). + * @return App retransmission timer in seconds + * @see PX_GN_APPLICATION_RETRANSMIT_TIMER + */ + function f_getAppRetransmitTimer() return float { + var float v_itsGnLocationApplicationRetransmitTimer := int2float(PX_GN_APPLICATION_RETRANSMIT_TIMER/1000); + + return v_itsGnLocationApplicationRetransmitTimer; + } + + /** + * @desc Gets the App retransmission timer for AppRepInterval = medium (cong. ctrl). + * @return App retransmission timer (medium) in seconds + * @see PX_GN_APPLICATION_RETRANSMIT_TIMER_MEDIUM + */ + function f_getAppRetransmitTimerMedium() return float { + var float v_itsGnLocationApplicationRetransmitTimerMedium := int2float(PX_GN_APPLICATION_RETRANSMIT_TIMER_MEDIUM/1000); + + return v_itsGnLocationApplicationRetransmitTimerMedium; + } + + /** + * @desc Gets the App retransmission timer for AppRepInterval = maximum (cong. ctrl). + * @return App retransmission timer (maximum) in seconds + * @see PX_GN_APPLICATION_RETRANSMIT_TIMER_MAXIMUM + */ + function f_getAppRetransmitTimerMaximum() return float { + var float v_itsGnLocationApplicationRetransmitTimerMaximum := int2float(PX_GN_APPLICATION_RETRANSMIT_TIMER_MAXIMUM/1000); + + return v_itsGnLocationApplicationRetransmitTimerMaximum; + } + + /** + * @desc Gets the LS maximum retransmission number. + * @return LS maximum retransmission number + * @see PICS_GN_LOCATION_SERVICE_MAX_RETRANS + */ + function f_getLsMaxRetrans() return integer { + var integer v_itsGnLocationServiceMaxRetrans := PICS_GN_LOCATION_SERVICE_MAX_RETRANS; + + return v_itsGnLocationServiceMaxRetrans; + } + + /** + * @desc Gets the Application maximum retransmission number. + * @return Application maximum retransmission number + * @see PX_GN_APPLICATION_MAX_RETRANS + */ + function f_getAppMaxRetrans() return integer { + var integer v_itsGnApplicationMaxRetrans := PX_GN_APPLICATION_MAX_RETRANS; + + return v_itsGnApplicationMaxRetrans; + } + + /** + * @desc Gets the Location Service packet buffer size. + * @return Location Service packet buffer size in Kbytes + * @see PICS_GN_LOCATION_SERVICE_PACKET_BUFFER_SIZE + */ + function f_getLsPacketBufferSize() return integer { + var integer v_itsGnLocationServicePacketBufferSize := PICS_GN_LOCATION_SERVICE_PACKET_BUFFER_SIZE; + + return v_itsGnLocationServicePacketBufferSize; + } // End of function f_getLsPacketBufferSize + + /** + * @desc Gets the UC forwarding packet buffer size. + * @return UC forwarding packet buffer size in bytes + * @see PICS_GN_UC_FORWARDING_PACKET_BUFFER_SIZE + */ + function f_getUcForwardingPacketBufferSize() return integer { + var integer v_itsGnUcForwardingPacketBufferSize := PICS_GN_UC_FORWARDING_PACKET_BUFFER_SIZE; + + return v_itsGnUcForwardingPacketBufferSize * 1024; + } // End of function f_getUcForwardingPacketBufferSize + + /** + * @desc Gets the BC forwarding packet buffer size. + * @return BC forwarding packet buffer size in bytes + * @see PICS_GN_BC_FORWARDING_PACKET_BUFFER_SIZE + */ + function f_getBcForwardingPacketBufferSize() return integer { + var integer v_itsGnBcForwardingPacketBufferSize := PICS_GN_BC_FORWARDING_PACKET_BUFFER_SIZE; + + return v_itsGnBcForwardingPacketBufferSize * 1024; + } // End of function f_getBcForwardingPacketBufferSize + + /** + * @desc Gets the maximum lifetime of a packet. + * @return Maximum lifetime of a packet in seconds + * @see PICS_GN_MAX_PACKET_LIFETIME + */ + function f_getMaxPacketLifeTime() return float { + var float v_itsGnMaxPacketLifetime := int2float(PICS_GN_MAX_PACKET_LIFETIME); + + return v_itsGnMaxPacketLifetime; + } + + /** + * @desc Gets delta for timers. + * @return Delta for timers in seconds + * @see PX_T_DELTA + */ + function f_getDeltaTimer() return float { + var float v_deltaTimer := PX_T_DELTA; + + return v_deltaTimer; + } + + /** + * @desc Gets the beacon service retransmit timer. + * @return Beacon service retransmit timer + */ + function f_getBsRetransmitTimer() return float { + var float v_itsGnBeaconServiceRetransmitTimer; + + v_itsGnBeaconServiceRetransmitTimer := int2float( + (PICS_GN_BEACON_SERVICE_RETRANSMIT_TIMER/1000)); + + return v_itsGnBeaconServiceRetransmitTimer; + } + + /** + * @desc Gets the beacon service retransmit timer for NetBeaconInterval = medium (cong. ctrl). + * @return Beacon service retransmit timer (medium) + */ + function f_getBsRetransmitTimerMedium() return float { + var float v_itsGnBeaconServiceRetransmitTimerMedium; // timer value increased (medium) + + v_itsGnBeaconServiceRetransmitTimerMedium := int2float( + (PX_GN_BEACON_SERVICE_TIMER_MEDIUM+float2int((f_getBsMaxJitter() - 0.0 +1.0)*rnd()) + 0)/1000); + + return v_itsGnBeaconServiceRetransmitTimerMedium; + } + + /** + * @desc Gets the beacon service retransmit timer for NetBeaconInterval = maximum (cong. ctrl). + * @return Beacon service retransmit timer (maximum) + */ + function f_getBsRetransmitTimerMaximum() return float { + var float v_itsGnBeaconServiceRetransmitTimerMaximum; // timer value increased (maximum) + + v_itsGnBeaconServiceRetransmitTimerMaximum := int2float( + (PX_GN_BEACON_SERVICE_TIMER_MAXIMUM+float2int((f_getBsMaxJitter() - 0.0 +1.0)*rnd()) + 0)/1000); + + return v_itsGnBeaconServiceRetransmitTimerMaximum; + } + + /** + * @desc Gets the maximum beacon service jitter. + * @return Maximum beacon service jitter + */ + function f_getBsMaxJitter() return float { + var float v_itsGnBeaconServiceMaxJitter := int2float(PICS_GN_BEACON_SERVICE_MAX_JITTER)/1000.0; + + return v_itsGnBeaconServiceMaxJitter; + } + + /** + * @desc Gets the Lifetime of a Location Table Entry. + * @return Lifetime of a Location Table Entry in seconds + * @see PICS_GN_LIFETIME_LOC_TE + */ + function f_getLifetimeLocTableEntry() return float { + var float v_itsGnLifetimeLocTableEntry := int2float(PICS_GN_LIFETIME_LOC_TE); + + return v_itsGnLifetimeLocTableEntry; + } // End of function f_getLifetimeLocTableEntry + + /** + * @desc Gets the maximum communication range for CBF algorithm + * @return Maximum communication range for CBF algorithm in meters + * @see PICS_GN_DEFAULT_MAX_COMMUNICATION_RANGE + */ + function f_getCbfMaxCommunicationRange() return integer { + var integer v_maxCommunicationRange := PICS_GN_DEFAULT_MAX_COMMUNICATION_RANGE; + + return v_maxCommunicationRange; + } // End of function f_getCbfMaxCommunicationRange + + function f_getCbfMaxTime() return integer { + var integer v_cbfMaxTime := PICS_GN_CBF_MAX_TIME; + + return v_cbfMaxTime; + } // End of function f_getCbfMaxTime + + function f_getCbfMinTime() return integer { + var integer v_cbfMinTime := PICS_GN_CBF_MIN_TIME; + + return v_cbfMinTime; + } // End of function f_getCbfMinTime + + function f_getGnMaxAreaSize() return float { + var float v_maxAreaSize := PICS_GN_MAX_GEO_AREA_SIZE; + + return v_maxAreaSize; + } // End of function f_getGnMaxAreaSize + + function f_getAdvancedGbcForwardingMaxCounter() return integer { + var integer v_maxCounter := PICS_GN_ADVANCED_BC_FORWARDING_MAX_COUNTER; + + return v_maxCounter; + } + + /** + * @desc Set the number of neighbour in the Location Table. + * @see PX_MIN_NR_NEIGHBOUR + */ + function f_setNrNeighbourLocTableDefault() runs on ItsGeoNetworking { + var integer v_nrNeighbour := f_random (0, PX_MIN_NR_NEIGHBOUR); + + f_acStartBeaconingMultipleNeighbour(v_nrNeighbour); + + } // End of function f_setNrNeighbourLocTableDefault + + /** + * @desc Set the number of neighbour in the Location Table (medium). + * @see PX_MIN_NR_NEIGHBOUR + * @see PX_MAX_NR_NEIGHBOUR + */ + function f_setNrNeighbourLocTableMedium() runs on ItsGeoNetworking { + var integer v_nrNeighbour := f_random (PX_MIN_NR_NEIGHBOUR, PX_MAX_NR_NEIGHBOUR); + + f_acStartBeaconingMultipleNeighbour(v_nrNeighbour); + + } // End of function f_setNrNeighbourLocTableMedium + + /** + * @desc Set the number of neighbour in the Location Table (maximum). + * @see PX_MAX_NR_NEIGHBOUR + * @see PX_MIN_NR_NEIGHBOUR + */ + function f_setNrNeighbourLocTableMaximum() runs on ItsGeoNetworking { + var integer v_nrNeighbour := f_random (PX_MAX_NR_NEIGHBOUR, (2*PX_MIN_NR_NEIGHBOUR)); + + f_acStartBeaconingMultipleNeighbour(v_nrNeighbour); + + } // End of function f_setNrNeighbourLocTableMaximum + + } // End of group iutFunctions + + group posVectorFunctions { + + /** + * @desc Convert long position vector to short position vector + * @param p_longPosVector Long position vector to be converted + * @return Short position vector + */ + function f_longPosVector2ShortPosVector(in LongPosVector p_longPosVector) return ShortPosVector { + var ShortPosVector v_shortPosVector; + + v_shortPosVector := { + gnAddr := p_longPosVector.gnAddr, + timestamp_ := p_longPosVector.timestamp_, + latitude := p_longPosVector.latitude, + longitude := p_longPosVector.longitude + }; + + return v_shortPosVector; + } + + /** + * @desc Get IUT's long position vector + * @return IUT's long position vector + */ + function f_getIutLongPosVector() runs on ItsBaseGeoNetworking return LongPosVector { + return f_acGetLongPosVector(f_getIutGnLocalAddress()); + } + function f_getIutLongPosVector_1(inout LongPosVector p_longPosVectorIut) runs on ItsGeoNetworking { + p_longPosVectorIut := f_acGetLongPosVector(f_getIutGnLocalAddress()); + } + + /** + * @desc Get IUT's short position vector + * @return IUT's short position vector + */ + function f_getIutShortPosVector() runs on ItsGeoNetworking return ShortPosVector { + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + if (not isbound(v_longPosVectorIut)) { + v_longPosVectorIut := f_getIutLongPosVector(); + } + return f_longPosVector2ShortPosVector(v_longPosVectorIut); + } + + /** + * @desc Compute a position using a reference position, a distance and an orientation + * @param p_iutLongPosVector Reference position + * @param p_distance Distance to the reference position (in meter) + * @param p_orientation direction of the computed position (0 to 359; 0 means North) + * @return LongPosVector + */ + function f_computePositionUsingDistance(in LongPosVector p_iutLongPosVector, in float p_distance, in integer p_orientation) + return LongPosVector { + var LongPosVector v_result := p_iutLongPosVector; + + log("*** f_computePositionUsingDistance: INFO: calling fx_computePositionUsingDistance() ***"); + fx_computePositionUsingDistance(p_iutLongPosVector.latitude, p_iutLongPosVector.longitude, p_distance, p_orientation, v_result.latitude, v_result.longitude); + + return v_result; + } + + } // End of group posVectorFunctions + + group externalFunctions { + + /** + * @desc External function to compute timestamp based on current time + * @return Unix-Epoch-Time mod 2^32 + */ + external function fx_computeGnTimestamp() return UInt32; + + } // End of group externalFunctions + + group security { + + /** + * @desc Waiting for the GN message with Security + * @param p_InSecMsg SecurityMessage template + * @param p_received returns received SecurityMessage + */ + altstep a_securedMessage ( + in template (present) EtsiTs103097Data p_InSecMsg, + out EtsiTs103097Data p_received + ) runs on ItsGeoNetworking { + var GeoNetworkingInd v_geoNw; + [] geoNetworkingPort.receive(mw_geoNwInd( + mw_geoNwSecPdu( + p_InSecMsg, + mw_geoNwAnyPacket_withPayload(?) + ))) -> value v_geoNw { + p_received := f_getSecuredMessage(v_geoNw.msgIn); + } + } // End of 'altstep' statement + + /** + * @desc Receive GN message with security containing certificate as a signer info + * @param p_cert returns the certificate used for sign received message + */ + altstep a_securedMessageWithCertificate( + out EtsiTs103097Data p_received + ) runs on ItsGeoNetworking { + + [] a_securedMessage ( + mw_etsiTs103097Data_signed( + mw_signedData( + -, + mw_toBeSignedData( + mw_signedDataPayload + ), + mw_signerIdentifier_certificate // containing certificate + ) + ), + p_received + ) { + // Nothing to do + } + } // End of 'altstep' a_securedMessageWithCertificate + + /** + * @desc Receive GN message with security containing digest as a signer info + * @param p_cert returns the certificate used for sign received message + */ + altstep a_securedMessageWithDigest( + out EtsiTs103097Data p_received + ) runs on ItsGeoNetworking { + [] a_securedMessage ( + mw_etsiTs103097Data_signed( + mw_signedData( + -, + mw_toBeSignedData( + mw_signedDataPayload + ), + mw_signerIdentifier_digest // containing digest + ) + ), + p_received + ) { + // Nothing to do + } + } // End of altstep a_securedMessageWithDigest + + } // End of group altSteps + + group waitingHelpers { + + /** + * @desc Adapt the GN payload in case of BTP-A/B + * @return The adapated GN payload if PX_GN_UPPER_LAYER is set to BTP-A/B, the unchanged payload otherwise + */ + function f_adapPayload( + in GnRawPayload p_payload, + in integer p_dest_port := 0, + in integer p_info_port := 0 + ) return GnRawPayload { + + if ((PX_GN_UPPER_LAYER == e_btpA) or (PX_GN_UPPER_LAYER == e_btpB)) { + var GnRawPayload v_btp_payload := int2oct(p_dest_port, 2) & int2oct(p_info_port, 2); // Add BTP payload + return v_btp_payload & p_payload; + } + + return p_payload; + } + + /** + * @desc Wait for GN message with security containing certificate as a signer info + * @return the certificate used for sign received message + */ + function f_waitForCertificate( + out EtsiTs103097Certificate p_cert + ) runs on ItsGeoNetworking return boolean { + var EtsiTs103097Data v_recv; + var boolean v_ret := false; + + alt { + [] a_securedMessageWithCertificate(v_recv) { + var SignerIdentifier v_signerIdentifier; + if (f_getMsgSignerIdentifier(v_recv, v_signerIdentifier) == true) { + if (ischosen(v_signerIdentifier.certificate)) { + p_cert := v_signerIdentifier.certificate[0]; + v_ret := true; + } + } + } + } // End of 'alt' statement + + return v_ret; + } // End of function f_waitForCertificate + + /** + * @desc Ask for the certificate chain and wait for GN message with security containing certificate chain as a signer info + * @return the certificate chain used for sign received message + */ + function f_askForCertificateChain( + in template(value) octetstring p_CamPayload + ) runs on ItsGeoNetworking return boolean { + var EtsiTs103097Data v_recv; + var boolean v_ret := false; + + alt { + [] a_securedMessageWithCertificate(v_recv) { + var SignerIdentifier v_signerIdentifier; + if (f_getMsgSignerIdentifier(v_recv, v_signerIdentifier) == true) { // Get AT certificate + if(ischosen(v_signerIdentifier.digest)) { + f_sendCertificateRequest(v_signerIdentifier.digest, p_CamPayload); // Request issuer + if(tc_ac.running) { + tc_ac.stop; + tc_ac.start; + } + v_ret := true; + } + } + } + } + return v_ret; + } // End of function f_askForCertificateChain + + /** + * @desc Ask for the certificate chain and wait for GN message with security containing certificate chain as a signer info + * @return the certificate chain used for sign received message + */ + function f_askAndWaitForCertificateChain( + out SequenceOfCertificate p_chain, + in template(value) octetstring p_CamPayload + ) runs on ItsGeoNetworking return boolean { + // Local variables + var EtsiTs103097Data v_recv; + var SignerIdentifier v_signerIdentifier; + var boolean v_ret := false; + + f_askForCertificateChain(p_CamPayload); // Get AT certificate and request for the issuer + alt { + [] a_securedMessageWithCertificate(v_recv) { // Get AA certificate + tc_ac.stop; + + if (f_getMsgSignerIdentifier(v_recv, v_signerIdentifier) == true) { + p_chain := v_signerIdentifier.certificate; + } + } + } // End of 'alt' statement + + return v_ret; + } // End of function f_askAndWaitForCertificateChain + + /** + * @desc Send a CAM message with a certificate and wait the certificate chain request message + * @remark This function is used only for testing against another ATS + * @param p_certificate The certificate identifier + * @param p_CamPayload The CAM paylaod + * @return true on success, flase otherwise + */ + function f_sendCertificateAndWaitForCertificateChainRequest( + in charstring p_certificate, + in template(value) octetstring p_CamPayload + ) runs on ItsGeoNetworking return boolean { + // Local variables + var EtsiTs103097Data v_recv; + + f_sendCertificate(p_certificate, p_CamPayload); + /* FIXME To be reviewed alt { + [] a_securedMessage ( + mw_securedMessage( + superset( + mw_header_field_unrecognised_certificate + )), + v_recv + ) { + // Nothing to do + log("*** " & testcasename() & ": DEBUG: Receive certificate ***") + } + }*/ // End of 'alt' statement + + return true; + } // End of function f_sendCertificateAndWaitForCertificateChainRequest + + } // End of group waitingHelpers + + group CertRequests{ + + function f_sendCertificateRequest( + in template (value) HashedId8 p_digest, + in template (value) octetstring p_payload + ) runs on ItsGeoNetworking { + var GeoNetworkingReq v_gnReq; + var GnNonSecuredPacket v_gnNonSecuredPacket; + var template (value) ToBeSignedData v_toBeSignedData; + var template (value) EtsiTs103097Data v_securedMessage; + + // Build signed EtsiTs103097Data + v_gnNonSecuredPacket := valueof(m_geoNwShbPacket( + f_getPosition(c_compNodeC), // FIXME FSCOM To be verified + m_mccMco + )); + // Add CAM payload + v_gnNonSecuredPacket.payload := valueof(p_payload); + + /* FIXME To be reviewed f_buildGnSecuredCam( + v_securedMessage, + m_payload_signed(bit2oct(encvalue(v_gnNonSecuredPacket))), + e_certificate, + { + m_header_field_unrecognised_certificate( + f_HashedId3FromHashedId8( + valueof(p_digest) + )) + }, + "" + ); + + // Build secured Gn packet + v_gnReq := valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwSecPdu( + v_gnNonSecuredPacket, + v_securedMessage + ) + )); // End of template m_geoNwReq_linkLayerBroadcast + + // Send Message + f_sendGeoNetMessage(v_gnReq);*/ + + } // End of function f_sendCertificateRequest + + /** + * @desc Send a CAM message with a certificate + * @remark This function is used only for testing against another ATS + * @param p_certificate The certificate identifier + * @param p_CamPayload The CAM paylaod + * @return true on success, flase otherwise + * @see f_sendCertificateAndWaitForCertificateChainRequest + */ + function f_sendCertificate( + in charstring p_certificate, + in template (value) octetstring p_payload + ) runs on ItsGeoNetworking { + var GeoNetworkingReq v_gnReq; + var GnNonSecuredPacket v_gnNonSecuredPacket; + var template (value) ToBeSignedData v_toBeSignedData; + var template (value) EtsiTs103097Data v_securedMessage; + + // Build signed EtsiTs103097Data + /* FIXME To be reviewed v_gnNonSecuredPacket := valueof(m_geoNwShbPacket( + f_getPosition(c_compNodeC) // FIXME To be verified YANN + )); + // Add CAM payload + v_gnNonSecuredPacket.payload := valueof(p_payload); + + f_buildGnSecuredCam( + v_securedMessage, + m_payload_signed(bit2oct(encvalue(v_gnNonSecuredPacket))), + e_certificate, + -, + p_certificate + ); + + // Build secured Gn packet + v_gnReq := valueof(m_geoNwReq_linkLayerBroadcast( + m_geoNwSecPdu( + v_gnNonSecuredPacket, + v_securedMessage + ) + )); // End of template m_geoNwReq_linkLayerBroadcast + + // Send Message + f_sendGeoNetMessage(v_gnReq);*/ + + } // End of function f_sendCertificate + + } // End of group CertRequests + + group messageGetters { + + /** + * @desc return EtsiTs103097Data field of GeoNetworking packet + * @param p_msg GeoNetworking packet + * @return the EtsiTs103097Data if any + */ + function f_getSecuredMessage( + in GeoNetworkingPdu p_msg + ) return EtsiTs103097Data { + return p_msg.gnPacket.securedMsg; + } + + } + +} // End of module LibItsGeoNetworking_Functions