From 60c1a5a62afe7bb340615679cac9849a262747fb Mon Sep 17 00:00:00 2001 From: berge Date: Tue, 21 Feb 2017 14:48:26 +0000 Subject: [PATCH] Review/Reorg of GN Forwarding TCs --- .../ItsGeoNetworking_TestCases.ttcn | 5289 ++--- .../ItsGeoNetworking_TestControl.ttcn | 354 +- .../ItsGeoNetworking_TpFunctions.ttcn | 18241 +++++++++------- 3 files changed, 12826 insertions(+), 11058 deletions(-) diff --git a/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestCases.ttcn b/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestCases.ttcn index 13539798a..e25b544bd 100644 --- a/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestCases.ttcn +++ b/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestCases.ttcn @@ -3095,2651 +3095,3024 @@ module ItsGeoNetworking_TestCases { // 6.2.2.8 group geoGeoUnicast { - /** - * @desc Check that a GUC request over upper Gn SAP triggers the origination of a - * GUC packet - *
-            * Pics Selection: PICS_GN_GUC_SRC AND (PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == 'GREEDY' OR PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == 'UNSPECIFIED')
-            * 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 is requested to send a GUC packet to ItsNodeB
-            *      }
-            *      then {
-            *          the IUT sends a GeoNetworking packet
-            *              containing a correctly formatted Common Header
-            *                  containing HT field
-            *                      set to '2' (GEOUNICAST)
-            *              containing GUC Extended Header
-            *                  containing DEPV field
-            *                      indicating same position as the SOPV value of the Beacon information received
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/BV-01 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.2, 9.3.6.3 - */ - testcase TC_GEONW_PON_GUC_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - f_GEONW_PON_GUC_BV_01(); - - } // end TC_GEONW_PON_GUC_BV_01 - - /** - * @desc Check that a received GUC packet is routed to the correct next hop neighbour according - * to the greedy forwarding rules - *
-            * Pics Selection:  PICS_GN_GUC_FWD AND (PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == 'GREEDY' OR PICS_GN_GEOUNICAST_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 and
-            *      the IUT having received Beacon information from ItsNodeC
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a GUC packet addressed to ItsNodeA from ItsNodeC
-            *              containing TrafficClass.SCF set to 1
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating value greater than 1
-            *       }
-            *      then {
-            *          the IUT selects ItsNodeB as the next hop ITS station and
-            *          the IUT forwards the GUC packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/BV-02 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.3, Annex D.2 - */ - testcase TC_GEONW_PON_GUC_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GUC_BV_02(); - - } // end TC_GEONW_PON_GUC_BV_02 - - /** - * @desc Check that the protocol header fields (RHL, PV) are correctly updated at each forwarding step - *
-            * Pics Selection: PICS_GN_GUC_FWD
-            * Config Id: CF03
-            * 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 a GUC packet (GEOUNI1) originated by ItsNodeA
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a GUC packet (GEOUNI2) addressed to ItsNodeA from ItsNodeC
-            *              containing TrafficClass.SCF set to 1
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating value greater than 1
-            *              containing Common Header
-            *                  containing MHL field
-            *                      indicating value MHL1
-            *              containing GUC Extended Header
-            *                  containing DEPV field
-            *                      indicating position different from the SOPV value of GEOUNI1
-            *                  containing TST field
-            *                      indicating older value than the TimeStamp value of GEOUNI1
-            *      }
-            *      then {
-            *          the IUT selects ItsNodeB as the next hop ITS station and
-            *          the IUT forwards GEOUNI2
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating value decreased by 1 from the incoming value
-            *              containing Common Header
-            *                  containing MHL field
-            *                      indicating value MHL1
-            *              containing GUC Extended Header
-            *                  containing DEPV field
-            *                      indicating same position as the SOPV value of GEOUNI1
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/BV-03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.3 - */ - testcase TC_GEONW_PON_GUC_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GUC_BV_03(); - - } // end TC_GEONW_PON_GUC_BV_03 - - /** - * @desc Check that the RHL restriction is correctly handled at the forwarding step - *
-            * Pics Selection: PICS_GN_GUC_FWD
-            * Config Id: CF03
-            * 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
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a GUC packet addressed to ItsNodeA from ItsNodeC
-            *              containing TrafficClass.SCF set to 1
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating 1
-            *      }
-            *      then {
-            *          the IUT does not forward the GUC packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/BO-04 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.3 - */ - testcase TC_GEONW_PON_GUC_BO_04() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GUC_BO_04(); - - } // end TC_GEONW_PON_GUC_BO_04 - - /** - * @desc Check that a received GUC packet is passed over the Gn SAP to the correct upper - * protocol if the Destination address matches the IUT address - *
-            * Pics Selection: PICS_GN_GUC_DST
-            * Config Id: CF01
-            * Initial conditions:
-            *  with {
-            *    the IUT being in the "initial state"
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a GUC packet addressed to it
-            *      }
-            *      then {
-            *          the IUT passes the received GUC packet to the correct Upper Layer protocol
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/BV-05 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4 - */ - testcase TC_GEONW_PON_GUC_BV_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - f_GEONW_PON_GUC_BV_05(); - - } // end TC_GEONW_PON_GUC_BV_05 - - /** - * @desc Check that a received GUC packet is forwarded at the correct time according to the - * contention based forwarding rules - *
-            * Pics Selection: PICS_GN_GUC_FWD AND PICS_GN_GEOUNICAST_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
-            *      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 {
-            *          the IUT receives a GUC packet addressed to ItsNodeA from ItsNodeC
-            *              containing TrafficClass.SCF set to 1
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating value greater than 1
-            *      }
-            *      then {
-            *          the IUT re-broadcasts the received GUC packet
-            *              upon expiry of calculated CBF delay (see note)
-            *      }
-            *  }
-            *  NOTE: The CBF delay timer value is calculated from the itsGnDefaultMaxCommunicationRange,
-            *        itsGnGeoUnicastCbfMinTime, and itsGnGeoUnicastCbfMaxTime MIB attributes, and the distance value
-            *        between IUT and ItsNodeC
-            *
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/BV-06 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.3, Annex D.3 - */ - testcase TC_GEONW_PON_GUC_BV_06() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GUC_BV_06(); - - } // end TC_GEONW_PON_GUC_BV_06 - - /** - * @desc Check that a received GUC packet forwarding is correctly handling the minimum delay - * value according to the contention based forwarding rules - *
-            * Pics Selection: PICS_GN_GUC_FWD AND PICS_GN_GEOUNICAST_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
-            *      the IUT having received Beacon information from ItsNodeC and
-            *      the distance between IUT and ItsNodeA being
-            *          larger than the itsGnDefaultMaxCommunicationRange MIB attribute
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a GUC packet addressed to ItsNodeA from ItsNodeC
-            *              containing TrafficClass.SCF set to 1
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating value greater than 1
-            *      }
-            *      then {
-            *          the IUT re-broadcasts the received GUC packet
-            *              upon expiry of itsGnGeoUnicastCbfMinTime delay
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/BV-07 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.3, Annex D.3 - */ - testcase TC_GEONW_PON_GUC_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GUC_BV_07(); - - } // end TC_GEONW_PON_GUC_BV_07 - - /** - * @desc Check that GUC packet forwarding correctly avoids packet duplication according to the - * contention based forwarding rules - *
-            * Pics Selection: PICS_GN_GUC_FWD AND PICS_GN_GEOUNICAST_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
-            *      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 GUC packet addressed to ItsNodeA from ItsNodeC
-            *          containing TrafficClass.SCF set to 1
-            *          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 {
-            *          the IUT receives the same GBC packet from ItsNodeD
-            *              before expiration of the CBF timer
-            *      }
-            *      then {
-            *          the IUT does not re-broadcast the received GUC packet
-            *      }
-            *  }
-            *  NOTE:    the CBF delay timer value is calculated from the itsGnDefaultMaxCommunicationRange,
-            *           itsGnGeoUnicastCbfMinTime, and itsGnGeoUnicastCbfMaxTime MIB attributes, and the
-            *           distance value between IUT and ItsNodeC
-            *
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/BV-08 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.3, Annex D.3 - */ - testcase TC_GEONW_PON_GUC_BV_08() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GUC_BV_08(); - - } // end TC_GEONW_PON_GUC_BV_08 - - /** - * @desc Check that a received GUC packet is forwarded at the correct time according to the - * contention based forwarding rules when the sender is unknown - *
-            * Pics Selection: PICS_GN_GUC_FWD AND PICS_GN_GEOUNICAST_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
-            *      the IUT not having received any message from ItsNodeC and
-            *      the distance between IUT and ItsNodeA being
-            *          less than the itsGnDefaultMaxCommunicationRange MIB attribute and
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a GUC packet addressed to ItsNodeA from ItsNodeC
-            *              containing TrafficClass.SCF set to 1
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating value greater than 1
-            *      }
-            *      then {
-            *          the IUT re-broadcasts the received GUC packet
-            *              upon expiry of CBF_MAX
-            *      }
-            *  }
-            *
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/BV-10 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.3, Annex D.3 - */ - testcase TC_GEONW_PON_GUC_BV_10() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GUC_BV_10(); - - } // end TC_GEONW_PON_GUC_BV_10 - - /** - * @desc Check that a GUC request over upper Gn SAP triggers the origination of a GUC packet - *
-            * Pics Selection: PICS_GN_GUC_SRC AND PICS_GN_GEOUNICAST_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
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *  	when {
-            *  		the IUT is requested to send a GUC packet to ItsNodeB
-            *  	}
-            *  	then {
-            *  		the IUT broadcasts a GeoNetworking packet
-            *  			containing a correctly formatted Common Header
-            *  				containing HT field
-            *  					set to '2' (GEOUNICAST)
-            *  			containing GUC Extended Header
-            *  				containing DEPV field
-            *  					indicating same position as the SOPV value of the received Beacon information
-            *  	}
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/BV-11 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.3, Annex D.3 - */ - testcase TC_GEONW_PON_GUC_BV_11() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GUC_BV_11(); - - } // end TC_GEONW_PON_GUC_BV_11 - - /** - * @desc Check that a received GUC packet is not triggering forwarding if received twice or more - *
-            * Pics Selection: PICS_GN_GUC_FWD AND (PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == 'GREEDY' OR PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == 'UNSPECIFIED')
-            * Config Id: CF03
-            * Initial conditions:
-            *  with {
-            *  	the IUT being in the "initial state" and
-            *  	the IUT having received Beacon information from ItsNodeC and
-            *  	the IUT having received Beacon information from ItsNodeB and
-            *  	the IUT having received a GUC packet addressed to ItsNodeA from ItsNodeC
-            *  		containing TrafficClass.SCF set to 1
-            *  		containing Basic Header
-            *  			containing RHL field
-            *  				indicating value greater than 1 and
-            *  	the IUT having forwarded the GUC packet
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *  	when {
-            *  		the IUT receives the same GUC packet from ItsNodeB
-            *  			containing Basic Header
-            *  				containing RHL field
-            *  					indicating HL1 - 1
-            *  	}
-            *  	then {
-            *  		the IUT does forward the packet
-            *  	}
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/BO-12 - * @reference EN 302 636-4-1 [1], clause 9.3.9.3 - */ - testcase TC_GEONW_PON_GUC_BO_12() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GUC_BO_12(); - - } // end TC_GEONW_PON_GUC_BO_12 - - /** - * @desc Check that a received GUC packet is not passed over the Gn SAP to the correct upper protocol - * when the Destination address matches the IUT address if received twice or more - *
-            * Pics Selection: PICS_GN_GUC_DST AND (PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == 'GREEDY' OR PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == 'UNSPECIFIED')
-            * Config Id: CF03
-            * Initial conditions:
-            *  with {
-            *  	the IUT being in the "initial state" and
-            *  	the IUT having received Beacon information from ItsNodeC and
-            *  	the IUT having received Beacon information from ItsNodeB and
-            *  	the IUT having received a GUC packet addressed to IUT from ItsNodeC
-            *  		containing TrafficClass.SCF set to 1
-            *  		containing Basic Header
-            *  			containing RHL field
-            *  				indicating value greater than 1 and
-            *  	the IUT having forwarded the GUC packet
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *  	when {
-            *  		the IUT receives the same GUC packet from ItsNodeB
-            *  			containing Basic Header
-            *  				containing RHL field
-            *  					indicating HL1 - 1
-            *  	}
-            *  	then {
-            *  		the IUT does not pass the received GUC packet to any Upper Layer protocol
-            *  	}
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/BO-13 - * @reference EN 302 636-4-1 [1], clause 9.3.9.3 - */ - testcase TC_GEONW_PON_GUC_BO_13() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GUC_BO_13(); - - } // end TC_GEONW_PON_GUC_BV_13 - - } // end geoGeoUnicast - - // 6.2.2.9 - group geoGeoBroadcast { - - /** - * @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
-            * 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 is requested to send a GBC packet
-            *              containing TrafficClass.SCF set to 1
-            *              containing DestinationArea
-            *                  indicating AREA1
-            *      }
-            *      then {
-            *          the IUT broadcasts immediately the GBC packet
-            *              containing DestinationArea
-            *                  indicating AREA1
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/BV-01 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.2 - */ - testcase TC_GEONW_PON_GBC_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GBC_BV_01(); - - } // end TC_GEONW_PON_GBC_BV_01 - - /** - * @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_GEOBROADCAST_FORWARDING_ALGORITHM == 'SIMPLE'
-            *			 							OR PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'UNSPECIFIED'
-            *										OR PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'ADVANCED')
-            * 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 is requested to send a GBC packet
-            *              containing TrafficClass.SCF set to 1
-            *              containing DestinationArea
-            *                  indicating AREA2
-            *      }
-            *      then {
-            *          the IUT selects ItsNodeB as the next hop ITS station 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.3.1 TP/GEONW/PON/GBC/BV-02 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.2, Annex E.2 - */ - testcase TC_GEONW_PON_GBC_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GBC_BV_02(); - - } // end TC_GEONW_PON_GBC_BV_02 - - /** - * @desc Check that a received GBC packet is triggering re-broadcasting if received for the first - * time within its destination area - *
-            * Pics Selection: PICS_GN_GBC_SRC AND (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'SIMPLE'
-            * 										OR PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'UNSPECIFIED'
-            * 										OR PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'ADVANCED')
-            * 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 DestinationArea
-            *                  indicating AREA1
-            *      }
-            *      then {
-            *          the IUT re-broadcasts immediately the GBC packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/BV-03 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.3, Annex E.2 - */ - testcase TC_GEONW_PON_GBC_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GBC_BV_03(); - - } // end TC_GEONW_PON_GBC_BV_03 - - /** - * @desc Check that a received GBC packet is not triggering re-broadcasting if received for - * the second or more time (duplicate packet detection) - *
-            * Pics Selection:  PICS_GN_GBC_FWD  AND (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'SIMPLE' OR PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'UNSPECIFIED')
-            * 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
-            *                  indicating value HL1 higher than 1
-            *          containing GBC Extended Header
-            *              containing SN field
-            *                  indicating value SN1
-            *              containing DestinationArea
-            *                  indicating AREA1 and
-            *      the IUT having re-broadcast the GBC packet
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives the same GBC packet from ItsNodeD
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating value lower than HL1
-            *              containing GBC Extended Header
-            *                  containing SN field
-            *                      indicating value SN1
-            *      }
-            *      then {
-            *          the IUT does not re-broadcast the GBC packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/BO-04 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.3, Annex A.2 - */ - testcase TC_GEONW_PON_GBC_BO_04() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GBC_BO_04(); - - } // end TC_GEONW_PON_GBC_BO_04 - - /** - * @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
-            * 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 {
-            *          the IUT receives a GBC packet generated by ItsNodeC
-            *              containing TrafficClass.SCF set to 1
-            *              containing DestinationArea
-            *                  indicating AREA2
-            *      }
-            *      then {
-            *          the IUT selects ItsNodeB as the next hop ITS station 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.3.1 TP/GEONW/PON/GBC/BV-05 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.3, Annex E.2 - */ - testcase TC_GEONW_PON_GBC_BV_05() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GBC_BV_05(); - - } // end TC_GEONW_PON_GBC_BV_05 - - /** - * @desc Check that a received GBC packet is not triggering line forwarding if received out of its - * destination area for the second or more time - *
-            * Pics Selection: PICS_GN_GBC_FWD  AND (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'SIMPLE' OR PICS_GN_GEOBROADCAST_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
-            *      the IUT having received a GBC packet from ItsNodeC
-            *          containing TrafficClass.SCF set to 1
-            *          containing Basic Header
-            *              containing RHL field
-            *                  indicating value HL1 higher than 1
-            *          containing GBC Extended Header
-            *              containing SN field
-            *                  indicating value SN1
-            *              containing DestinationArea
-            *                  indicating AREA2
-            *      the IUT having forwarded the received GBC packet
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives the same GBC packet from ItsNodeD
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating value lower than HL1
-            *              containing GBC Extended Header
-            *                  containing SN field
-            *                      indicating value SN1
-            *      }
-            *      then {
-            *          the IUT does not forward the received GBC packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/BO-06 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.3 - */ - testcase TC_GEONW_PON_GBC_BO_06() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GBC_BO_06(); - - } // end TC_GEONW_PON_GBC_BO_06 - - /** - * @desc Check that the protocol header fields (RHL) are correctly updated during a GBC re- - * 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 {
-            *          the IUT receives a GBC packet
-            *              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 AREA1
-            *      }
-            *      then {
-            *          the IUT re-broadcasts 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.3.1 TP/GEONW/PON/GBC/BV-07 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.3 - */ - testcase TC_GEONW_PON_GBC_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GBC_BV_07(); - - } // end TC_GEONW_PON_GBC_BV_07 - - /** - * @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 {
-            *      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
-            *                      indicating 1
-            *              containing GBC Extended Header
-            *                  containing DestinationArea
-            *                      indicating AREA1
-            *      }
-            *      then {
-            *          the IUT does not re-broadcast the GBC packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/BV-08 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.3 - */ - testcase TC_GEONW_PON_GBC_BV_08() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GBC_BV_08(); - - } // end TC_GEONW_PON_GBC_BV_08 - - /** - * @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 {
-            *      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 AREA1
-            *      }
-            *      then {
-            *          the IUT passes the received GBC packet to the correct Upper Layer protocol
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/BV-09 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.3 - */ - testcase TC_GEONW_PON_GBC_BV_09() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - f_GEONW_PON_GBC_BV_09(); - - } // end TC_GEONW_PON_GBC_BV_09 - - /** - * @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  AND (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'SIMPLE' OR PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'UNSPECIFIED')
-            * 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
-            *                  indicating HL1
-            *          containing GBC Extended Header
-            *              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 {
-            *          the IUT receives the same GBC packet from ItsNodeD
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating value lower than HL1
-            *                  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.3.1 TP/GEONW/PON/GBC/BO-10 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.3 - */ - testcase TC_GEONW_PON_GBC_BO_10() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GBC_BO_10(); - - } // end TC_GEONW_PON_GBC_BO_10 - - /** - * @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
-            *                  indicating AREA2
-            *      }
-            *      then {
-            *          the IUT does not pass the received GBC packet to any Upper Layer protocol
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/BV-11 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.3 - */ - testcase TC_GEONW_PON_GBC_BV_11() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - f_GEONW_PON_GBC_BV_11(); - - } // end TC_GEONW_PON_GBC_BV_11 - - /** - * @desc Check that a GBC request over upper Gn SAP triggers the broadcasting of a GBC packet if this CBF is selected in the MIB - *
-            * Pics Selection:  PICS_GN_GBC_SRC AND (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'CBF'
-            * 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 is requested to send a GBC packet
-            *              containing TrafficClass.SCF set to 1
-            *              containing DestinationArea
-            *                  indicating AREA1
-            *      }
-            *      then {
-            *          the IUT broadcasts immediately the GBC packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/BV-12 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.2, Annex D.2 - */ - testcase TC_GEONW_PON_GBC_BV_12() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GBC_BV_12(); - - } // end TC_GEONW_PON_GBC_BV_12 - - /** - * @desc Check that a received GBC packet is discarded when indicating a too big GeoArea - *
-            * 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
-            *      the IUT having received Beacon information from ItsNodeD
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a GBC packet from ItsNodeC
-            *              containing TrafficClass.SCF set to 1
-            *              containing DestinationArea
-            *                  indicating a geoArea bigger than itsGnMaxGeoAreaSize
-            *      }
-            *      then {
-            *          the IUT does not forward the received GBC packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/BO-19 - * @reference EN 302 636-4-1 [1], Annex B.3 - */ - testcase TC_GEONW_PON_GBC_BO_19() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GBC_BO_19(); - - } // end TC_GEONW_PON_GBC_BO_19 - - /** - * @desc Check that a received GBC packet is triggering rebroadcast if received out of its - * destination area for the first time from an unknown sender - *
-            * 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 and
-            *      the IUT not having received any message from ItsNodeD
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a GBC packet generated by ItsNodeC from ItsNodeD
-            *              containing TrafficClass.SCF set to 1
-            *              containing DestinationArea
-            *                  indicating AREA2
-            *      }
-            *      then {
-            *          the IUT re-broadcasts the GBC packet immediately
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/BV-20 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.3, Annex E.2, E3 and E.4 - */ - testcase TC_GEONW_PON_GBC_BV_20() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GBC_BV_20(); - - } // end TC_GEONW_PON_GBC_BV_20 - - /** - * @desc Check that a received GBC packet is triggering rebroadcast if received out of its - * destination area for the first time from a known sender with PAI=0 - *
-            * 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 and
-            *      the IUT having received Beacon information from ItsNodeD
-            *          containing SOPV.PAI indicating 0
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a GBC packet generated by ItsNodeC from ItsNodeD
-            *              containing TrafficClass.SCF set to 1
-            *              containing DestinationArea
-            *                  indicating AREA2
-            *      }
-            *      then {
-            *          the IUT re-broadcasts the GBC packet immediately
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/BV-21 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.3, Annex E.2, E.3 and E.4 - */ - testcase TC_GEONW_PON_GBC_BV_21() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GBC_BV_21(); - - } // end TC_GEONW_PON_GBC_BV_21 - - } // end geoGeoBroadcast - - // 6.2.2.10 - group geoTopologicallyScopedBroadcast { - - /** - * @desc Check that a TSB request over upper Gn SAP triggers the origination of a TSB - * packet - *
-            * Pics Selection: PICS_GN_TSB_SRC
-            * Config Id: CF02
-            * 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 {
-            *          the IUT is requested to send a TSB packet
-            *      }
-            *      then {
-            *          the IUT broadcasts a TSB packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/TSB/BV-01 - * @reference EN 302 636-4-1 [1], clauses 9.3.9.2 - */ - testcase TC_GEONW_PON_TSB_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_TSB_BV_01(); - - } // end TC_GEONW_PON_TSB_BV_01 - - /** - * @desc Check that a received TSB packet is triggering re-broadcasting if received for the first time - *
-            * Pics Selection: PICS_GN_TSB_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 {
-            *          the IUT receives a TSB packet
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating HL1 higher than 1
-            *      }
-            *      then {
-            *          the IUT re-broadcasts the TSB packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/TSB/BV-02 - * @reference EN 302 636-4-1 [1], clauses 9.3.9.3 - */ - testcase TC_GEONW_PON_TSB_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_TSB_BV_02(); - - } // end TC_GEONW_PON_TSB_BV_02 - - /** - * @desc Check that a received TSB packet is not triggering re-broadcasting if received for the second or - * more time - *
-            * Pics Selection: PICS_GN_TSB_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 and
-            *      the IUT having received a TSB packet from ItsNodeB
-            *          containing Basic Header
-            *              containing RHL field
-            *                  indicating HL1 higher than 1
-            *          containing TSB Extended Header
-            *              containing SN field
-            *                  indicating value SN1 and
-            *      the IUT having re-broadcast the TSB packet
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives the same TSB packet from ItsNodeD
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating HL1 - 1
-            *              containing TSB Extended Header
-            *                  containing SN field
-            *                      indicating value SN1
-            *      }
-            *      then {
-            *          the IUT does not re-broadcast the TSB packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/TSB/BO-03 - * @reference EN 302 636-4-1 [1], clauses 9.3.9.3 - */ - testcase TC_GEONW_PON_TSB_BO_03() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_TSB_BO_03(); - - } // end TC_GEONW_PON_TSB_BO_03 - - /** - * @desc Check that the protocol header fields (RHL) are correctly updated during a TSB re- - * broadcasting step - *
-            * Pics Selection: PICS_GN_TSB_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 {
-            *          the IUT receives a TSB packet
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating HL1
-            *              containing Common Header
-            *                  containing MHL field
-            *                      indicating value MHL1
-            *      }
-            *      then {
-            *          the IUT re-broadcasts the TSB 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.3.1 TP/GEONW/PON/TSB/BV-04 - * @reference EN 302 636-4-1 [1], clauses 9.3.9.3 - */ - testcase TC_GEONW_PON_TSB_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_TSB_BV_04(); - - } // end TC_GEONW_PON_TSB_BV_04 - - /** - * @desc Check that the RHL restriction is correctly handled at a TSB re-broadcasting step - *
-            * Pics Selection: PICS_GN_TSB_FWD
-            * Config Id: CF02
-            * Initial conditions:
-            *  with {
-            *      the IUT being in the "initial state"
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a TSB packet
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating 1
-            *      }
-            *      then {
-            *          the IUT does not re-broadcast the TSB packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/TSB/BO-05 - * @reference EN 302 636-4-1 [1], clauses 9.3.9.3 - */ - testcase TC_GEONW_PON_TSB_BO_05() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_TSB_BO_05(); - - } // end TC_GEONW_PON_TSB_BO_05 - - /** - * @desc Check that a received TSB packet is passed over the Gn SAP to the correct upper protocol if it is - * received for the first time - *
-            * Pics Selection: PICS_GN_TSB_DST
-            * Config Id: CF01
-            * Initial conditions:
-            *  with {
-            *    the IUT being in the "initial state"
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *    when {
-            *      the IUT receives a TSB packet
-            *    }
-            *    then {
-            *      the IUT passes the received TSB packet to the correct Upper Layer protocol
-            *    }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/TSB/BV-06 - * @reference EN 302 636-4-1 [1], clauses 9.3.9.3 - */ - testcase TC_GEONW_PON_TSB_BV_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - f_GEONW_PON_TSB_BV_06(); - - } // end TC_GEONW_PON_TSB_BV_06 - - /** - * @desc Check that a received TSB packet is not passed over the Gn SAP if it is received for the second - * or more time - *
-            * Pics Selection: PICS_GN_TSB_DST
-            * Config Id: CF02
-            * Initial conditions:
-            *  with {
-            *      the IUT being in the "initial state" and
-            *      the IUT having received a TSB packet from ItsNodeB
-            *          containing Basic Header
-            *              containing RHL field
-            *                  indicating HL1 higher than 1
-            *          containing TSB Extended Header
-            *              containing SN field
-            *                  indicating value SN1 and
-            *      the IUT having passed the received TSB packet to the correct Upper Layer protocol
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives the same TSB packet from ItsNodeD
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating HL1 - 1
-            *              containing TSB Extended Header
-            *                  containing SN field
-            *                      indicating value SN1
-            *      }
-            *      then {
-            *          the IUT does not pass the received TSB packet to any Upper Layer protocol
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/TSB/BO-07 - * @reference EN 302 636-4-1 [1], clauses 9.3.9.3 - */ - testcase TC_GEONW_PON_TSB_BO_07() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_TSB_BO_07(); - - } // end TC_GEONW_PON_TSB_BO_07 - - } // end geoTopologicallyScopedBroadcast - - // 6.2.2.11 - group geoSingleHopBroadcast { - - /** - * @desc Check that a SHB request over upper Gn SAP triggers the origination of a SHB - * packet - *
-            * Pics Selection: PICS_GN_SHB_SRC
-            * 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 is requested to send a SHB packet
-            *      }
-            *      then {
-            *          the IUT broadcasts the SHB packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/SHB/BV-01 - * @reference EN 302 636-4-1 [1], clauses 9.3.10.2 - */ - testcase TC_GEONW_PON_SHB_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_SHB_BV_01(); - - } // end TC_GEONW_PON_SHB_BV_01 - - /** - * @desc Check that a received SHB packet is passed over the Gn SAP to the correct upper protocol if it is - * received for the first time - *
-            * Pics Selection: PICS_GN_SHB_DST
-            * Config Id: CF02
-            * Initial conditions:
-            *  with {
-            *    the IUT being in the "initial state"
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a SHB packet
-            *      }
-            *      then {
-            *          the IUT passes the received SHB packet to the Upper Layer protocol
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/SHB/BV-02 - * @reference EN 302 636-4-1 [1], clauses 9.3.10.3 - */ - testcase TC_GEONW_PON_SHB_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - f_GEONW_PON_SHB_BV_02(); - - } // end TC_GEONW_PON_SHB_BV_02 - - } // end geoSingleHopBroadcast - - // 6.2.2.12 - group geoGeoAnycast { - - /** - * @desc Check that GAC request over upper Gn SAP triggers broadcasting of a GAC packet if the IUT is within the Destination Area - *
-            * Pics Selection: PICS_GN_GAC_SRC
-            * 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 is requested to send a GAC packet
-            *              containing TrafficClass.SCF set to 1
-            *              containing DestinationArea
-            *                  indicating AREA1
-            *      }
-            *      then {
-            *          the IUT broadcasts the GAC packet
-            *              containing DestinationArea
-            *                  indicating AREA1
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/BV-01 - * @reference EN 302 636-4-1 [1], clauses 9.3.12.2 - */ - testcase TC_GEONW_PON_GAC_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GAC_BV_01(); - - } // end TC_GEONW_PON_GAC_BV_01 - - /** - * @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_GEOUNICAST_FORWARDING_ALGORITHM == 'GREEDY' OR PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == 'UNSPECIFIED')
-            * 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 is requested to send a GAC packet
-            *              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.3.1 TP/GEONW/PON/GAC/BV-02 - * @reference EN 302 636-4-1 [1], clauses 9.3.12.2, Annex D.2 - */ - testcase TC_GEONW_PON_GAC_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GAC_BV_02(); + group gucAllForwardingAlgorithms { + + /** + * @desc Check that the protocol header fields (RHL, PV) are correctly updated at each forwarding step + *
+                * Pics Selection: PICS_GN_GUC_FWD
+                * Config Id: CF03
+                * 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 a GUC packet (GEOUNI1) originated by ItsNodeA
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
+                *          the IUT receives a GUC packet (GEOUNI2) addressed to ItsNodeA from ItsNodeC
+                *              containing TrafficClass.SCF set to 1
+                *              containing Basic Header
+                *                  containing RHL field
+                *                      indicating value greater than 1
+                *              containing Common Header
+                *                  containing MHL field
+                *                      indicating value MHL1
+                *              containing GUC Extended Header
+                *                  containing DEPV field
+                *                      indicating position different from the SOPV value of GEOUNI1
+                *                  containing TST field
+                *                      indicating older value than the TimeStamp value of GEOUNI1
+                *      }
+                *      then {
+                *          the IUT retransmits GEOUNI2
+                *              containing Basic Header
+                *                  containing RHL field
+                *                      indicating value decreased by 1 from the incoming value
+                *              containing Common Header
+                *                  containing MHL field
+                *                      indicating value MHL1
+                *              containing GUC Extended Header
+                *                  containing DEPV field
+                *                      indicating same position as the SOPV value of GEOUNI1
+                *      }
+                *  }
+                * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/ALL/BV-03 + * @reference EN 302 636-4-1 [1], clauses 10.3.8.3 + */ + testcase TC_GEONW_PON_GUC_ALL_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GUC_ALL_BV_03(); - } // end TC_GEONW_PON_GAC_BV_02 - - /** - * @desc Check that a received GAC packet is not triggering forwarding or re-broadcasting if the IUT - * is within the Destination Area - *
-            * Pics Selection: PICS_GN_GAC_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 {
-            *          the IUT receives a GAC packet
-            *              containing TrafficClass.SCF set to 1
-            *              containing DestinationArea
-            *                  indicating AREA1
-            *      }
-            *      then {
-            *          IUT does not re-broadcast the received GAC packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/BV-03 - * @reference EN 302 636-4-1 [1], clauses 9.3.12.3 - */ - testcase TC_GEONW_PON_GAC_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GAC_BV_03(); + } // end TC_GEONW_PON_GUC_ALL_BV_03 + + /** + * @desc Check that the RHL restriction is correctly handled at the forwarding step + *
+                * Pics Selection: PICS_GN_GUC_FWD
+                * Config Id: CF03
+                * 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
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
+                *          the IUT receives a GUC packet addressed to ItsNodeA from ItsNodeC
+                *              containing TrafficClass.SCF set to 1
+                *              containing Basic Header
+                *                  containing RHL field
+                *                      indicating 1
+                *      }
+                *      then {
+                *          the IUT does not retrnasmit the GUC packet
+                *      }
+                *  }
+                * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/ALL/BO-04 + * @reference EN 302 636-4-1 [1], clauses 10.3.8.3 + */ + testcase TC_GEONW_PON_GUC_ALL_BO_04() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GUC_ALL_BO_04(); - } // end TC_GEONW_PON_GAC_BV_03 - - /** - * @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
-            * 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 receives a GAC packet from ItsNodeC
-            *              containing TrafficClass.SCF set to 1
-            *              containing DestinationArea
-            *                  indicating AREA2
-            *      }
-            *      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.3.1 TP/GEONW/PON/GAC/BV-04 - * @reference EN 302 636-4-1 [1], clauses 9.3.12.3, Annex E.2 - */ - testcase TC_GEONW_PON_GAC_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GAC_BV_04(); + } // end TC_GEONW_PON_GUC_ALL_BO_04 + + /** + * @desc Check that a received GUC packet is passed over the Gn SAP to the correct upper + * protocol if the Destination address matches the IUT address + *
+                * Pics Selection: PICS_GN_GUC_DST
+                * Config Id: CF01
+                * Initial conditions:
+                *  with {
+                *    the IUT being in the "initial state"
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
+                *          the IUT receives a GUC packet addressed to it
+                *      }
+                *      then {
+                *          the IUT passes the received GUC packet to the correct Upper Layer protocol
+                *      }
+                *  }
+                * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/ALL/BV-05 + * @reference EN 302 636-4-1 [1], clauses 10.3.8.4 + */ + testcase TC_GEONW_PON_GUC_ALL_BV_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_GUC_ALL_BV_05(); + + } // end TC_GEONW_PON_GUC_ALL_BV_06 + + /** + * @desc Check that a received GUC packet is not passed over the Gn SAP if the Destination + * address does not match the IUT address + *
+                * Pics Selection: PICS_GN_GUC_FWD
+                * Config Id: CF01
+                * 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
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
+                *          the IUT receives a GUC packet addressed to ItsNodeB from ItsNodeC
+                *      }
+                *      then {
+                *          the IUT does not pass the received GUC packet to any Upper Layer
+                *      }
+                *  }
+                * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/ALL/BV-06 + * @reference EN 302 636-4-1 [1], clauses 10.3.8.4 + */ + testcase TC_GEONW_PON_GUC_ALL_BV_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_GUC_ALL_BV_06(); + + } // end TC_GEONW_PON_GUC_ALL_BV_06 + + /** + * @desc Check that a received GUC packet is not passed over the Gn SAP to the correct upper protocol + * when the Destination address matches the IUT address if received twice or more + *
+                * Pics Selection: PICS_GN_GUC_DST
+                * Config Id: CF03
+                * Initial conditions:
+                *  with {
+                *   the IUT being in the "initial state" and
+                *   the IUT having received Beacon information from ItsNodeC and
+                *   the IUT having received Beacon information from ItsNodeB and
+                *   the IUT having received a GUC packet addressed to IUT from ItsNodeC
+                *       containing TrafficClass.SCF set to 1
+                *       containing Basic Header
+                *           containing RHL field
+                *               indicating value greater than 1 
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *   when {
+                *       the IUT receives the same GUC packet from ItsNodeB
+                *           containing Basic Header
+                *               containing RHL field
+                *                   indicating HL1 - 1
+                *   }
+                *   then {
+                *       the IUT does not pass the received GUC packet to any Upper Layer protocol
+                *   }
+                *  }
+                * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/ALL/BO-08 + * @reference EN 302 636-4-1 [1], clause 10.3.9.3 + */ + testcase TC_GEONW_PON_GUC_ALL_BO_08() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GUC_ALL_BO_08(); - } // end TC_GEONW_PON_GAC_BV_04 - - /** - * @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
-            * 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
-            *      the IUT having received a GAC packet from ItsNodeC
-            *          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
-            *                  indicating AREA2
-            *      the IUT having forwarded the GAC packet
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives the same GAC packet from other neighbour
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating value lower than HL1
-            *              containing GAC Extended Header
-            *                  containing SN field
-            *                      indicating value SN1
-            *      }
-            *      then {
-            *          the IUT does not forward the received GAC packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/BO-05 - * @reference EN 302 636-4-1 [1], clauses 9.3.12.3 - */ - testcase TC_GEONW_PON_GAC_BO_05() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GAC_BO_05(); + } // end TC_GEONW_PON_GUC_ALL_BV_08 + + } // end gucAllForwardingAlgorithms + + group gucGreedyForwarding { + + /** + * @desc Check that a GUC request over upper Gn SAP triggers the origination of a + * GUC packet + *
+                * Pics Selection: PICS_GN_GUC_SRC AND (PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'GREEDY' OR PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'UNSPECIFIED')
+                * 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 is requested to send a GUC packet to ItsNodeB
+                *      }
+                *      then {
+                *          the IUT sends a GeoNetworking packet
+                *              containing a correctly formatted Common Header
+                *                  containing HT field
+                *                      set to '2' (GEOUNICAST)
+                *              containing GUC Extended Header
+                *                  containing DEPV field
+                *                      indicating same position as the SOPV value of the Beacon information received
+                *      }
+                *  }
+                * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/GRD/BV-01 + * @reference EN 302 636-4-1 [1], clauses 10.3.8.2, Annex E.2 + */ + testcase TC_GEONW_PON_GUC_GRD_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - } // end TC_GEONW_PON_GAC_BO_05 - - /** - * @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
-            *      the IUT having received Beacon information from ItsNodeB
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a GAC 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
-            *                  indicating AREA2
-            *      }
-            *      then {
-            *          the IUT selects the ItsNodeB as the next hop
-            *          the IUT forwards the GAC packet
-            *              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.3.1 TP/GEONW/PON/GAC/BV-06 - * @reference EN 302 636-4-1 [1], clauses 9.3.6.3 and 9.3.12.3 - */ - testcase TC_GEONW_PON_GAC_BV_06() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GAC_BV_06(); + f_GEONW_PON_GUC_GRD_BV_01(); - } // end TC_GEONW_PON_GAC_BV_06 - - /** - * @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
-            *      the IUT having received Beacon information from ItsNodeB
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a GAC packet from ItsNodeC
-            *              containing TrafficClass.SCF set to 1
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating 1
-            *              containing GAC Extended Header
-            *                  containing DestinationArea
-            *                      indicating AREA2
-            *      }
-            *      then {
-            *         the IUT does not forward the GAC packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/BO-07 - * @reference EN 302 636-4-1 [1], clauses 9.3.12.3 - */ - testcase TC_GEONW_PON_GAC_BO_07() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GAC_BO_07(); + } // end TC_GEONW_PON_GUC_GRD_BV_01 - } // end TC_GEONW_PON_GAC_BO_07 - - /** - * @desc Check that a received GAC packet is passed over the Gn SAP to the correct upper - * protocol if it is received for the first time within the GAC destination area - *
-            * Pics Selection: PICS_GN_GAC_DST
-            * Config Id: CF01
-            * Initial conditions:
-            *  with {
-            *      the IUT being in the "initial state"
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a GAC packet from ItsNodeB
-            *              containing TrafficClass.SCF set to 1
-            *              containing DestinationArea
-            *                  indicating AREA1
-            *      }
-            *      then {
-            *          the IUT passes the received GAC packet to the correct Upper Layer protocol
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/BV-08 - * @reference EN 302 636-4-1 [1], clauses 9.3.12.3 - */ - testcase TC_GEONW_PON_GAC_BV_08() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - f_GEONW_PON_GAC_BV_08(); - - } // end TC_GEONW_PON_GAC_BV_08 - - /** - * @desc Check that a received GAC packet is not passed over the Gn SAP if it is received for - * the second or more time - *
-            * Pics Selection: PICS_GN_GAC_DST
-            * Config Id: CF02
-            * Initial conditions:
-            *  with {
-            *      the IUT being in the "initial state" and
-            *      the IUT having received a GAC packet from ItsNodeD
-            *          containing TrafficClass.SCF set to 1
-            *          containing Basic Header
-            *              containing RHL field
-            *                  indicating HL1
-            *          containing GAC Extended Header
-            *              containing SN field
-            *                  indicating value SN1 and
-            *              containing DestinationArea
-            *                  indicating AREA1 and
-            *      the IUT having passed the received GAC packet to the correct Upper Layer protocol
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives the same GAC packet from ItsNodeB
-            *              containing Basic Header
-            *                  containing RHL field
-            *                      indicating value lower than HL1
-            *              containing GAC Extended Header
-            *                  containing SN field
-            *                      indicating value SN1
-            *      }
-            *      then {
-            *          the IUT does not pass the received GAC packet to any Upper Layer protocol
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/BO-09 - * @reference EN 302 636-4-1 [1], clauses 9.3.12.3 - */ - testcase TC_GEONW_PON_GAC_BO_09() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GAC_BO_09(); + /** + * @desc Check that a received GUC packet is routed to the correct next hop neighbour according + * to the greedy forwarding rules + *
+                * Pics Selection:  PICS_GN_GUC_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 and
+                *      the IUT having received Beacon information from ItsNodeC
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
+                *          the IUT receives a GUC packet addressed to ItsNodeA from ItsNodeC
+                *              containing TrafficClass.SCF set to 1
+                *              containing Basic Header
+                *                  containing RHL field
+                *                      indicating value greater than 1
+                *       }
+                *      then {
+                *          the IUT selects ItsNodeB as the next hop and
+                *          the IUT forwards the GUC packet
+                *      }
+                *  }
+                * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/GRD/BV-02 + * @reference EN 302 636-4-1 [1], clauses 10.3.8.3, Annex E.2 + */ + testcase TC_GEONW_PON_GUC_GRD_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { - } // end TC_GEONW_PON_GAC_BO_09 - - /** - * @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_DST
-            * Config Id: CF01
-            * Initial conditions:
-            *  with {
-            *      the IUT being in the "initial state"
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a GAC packet from ItsNodeB
-            *              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.3.1 TP/GEONW/PON/GAC/BV-10 - * @reference EN 302 636-4-1 [1], clauses 9.3.12.3 - */ - testcase TC_GEONW_PON_GAC_BV_10() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - f_GEONW_PON_GAC_BV_10(); - - } // end TC_GEONW_PON_GAC_BV_10 + f_GEONW_PON_GUC_GRD_BV_02(); + + } // end TC_GEONW_PON_GUC_GRD_BV_02 + + /** + * @desc Check that a received GUC packet is not triggering forwarding if received twice or more + *
+                * Pics Selection: PICS_GN_GUC_FWD AND (PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'GREEDY' OR PICS_GN_NON_AREA_FORWARDING_ALGORITHM == 'UNSPECIFIED')
+                * Config Id: CF03
+                * Initial conditions:
+                *  with {
+                *   the IUT being in the "initial state" and
+                *   the IUT having received Beacon information from ItsNodeC and
+                *   the IUT having received Beacon information from ItsNodeB and
+                *   the IUT having received a GUC packet addressed to ItsNodeA from ItsNodeC
+                *       containing TrafficClass.SCF set to 1
+                *       containing Basic Header
+                *           containing RHL field
+                *               indicating value greater than 1 and
+                *   the IUT having forwarded the GUC packet
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *   when {
+                *       the IUT receives the same GUC packet from ItsNodeB
+                *           containing Basic Header
+                *               containing RHL field
+                *                   indicating HL1 - 1
+                *   }
+                *   then {
+                *       the IUT does forward the packet
+                *   }
+                *  }
+                * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/GRD/BO-07 + * @reference EN 302 636-4-1 [1], clause 10.3.9.3, Annex E.2 + */ + testcase TC_GEONW_PON_GUC_GRD_BO_07() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GUC_GRD_BO_07(); + + } // end TC_GEONW_PON_GUC_GRD_BO_07 + + } // end gucGreedyForwarding - /** - * @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
-            *      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
-            *                  indicating a geoArea bigger than itsGnMaxGeoAreaSize
-            *      }
-            *      then {
-            *          the IUT does not forward the received GAC packet
-            *      }
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/BO-11 - * @reference EN 302 636-4-1 [1], Annex B.3 - */ - testcase TC_GEONW_PON_GAC_BO_11() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GAC_BO_11(); + group gucContentionBasedForwarding { + + /** + * @desc Check that a GUC request over upper Gn SAP triggers the origination of a GUC packet + *
+                * Pics Selection: PICS_GN_GUC_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
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *   when {
+                *       the IUT is requested to send a GUC packet to ItsNodeB
+                *   }
+                *   then {
+                *       the IUT broadcasts a GeoNetworking packet
+                *           containing a correctly formatted Common Header
+                *               containing HT field
+                *                   set to '2' (GEOUNICAST)
+                *           containing GUC Extended Header
+                *               containing DEPV field
+                *                   indicating same position as the SOPV value of the received Beacon information
+                *   }
+                *  }
+                * 
+ * + * @see ETSI TS 102 871-2 v1.3.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 + */ + testcase TC_GEONW_PON_GUC_CBF_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GUC_CBF_BV_01(); + + } // end TC_GEONW_PON_GUC_CBF_BV_01 + + /** + * @desc Check that a received GUC packet is forwarded at the correct time according to the + * contention based forwarding rules + *
+                * Pics Selection: PICS_GN_GUC_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
+                *      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 {
+                *          the IUT receives a GUC packet addressed to ItsNodeA from ItsNodeC
+                *              containing TrafficClass.SCF set to 1
+                *              containing Basic Header
+                *                  containing RHL field
+                *                      indicating value greater than 1
+                *      }
+                *      then {
+                *          the IUT re-broadcasts the received GUC 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.3.1 TP/GEONW/PON/GUC/CBF/BV-02 + * @reference EN 302 636-4-1 [1], clauses 10.3.8.3, Annex E.3 + */ + testcase TC_GEONW_PON_GUC_CBF_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GUC_CBF_BV_02(); + + } // end TC_GEONW_PON_GUC_CBF_BV_02 + + /** + * @desc Check that GUC packet forwarding correctly avoids packet duplication according to the + * contention based forwarding rules + *
+                * Pics Selection: PICS_GN_GUC_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
+                *      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 GUC packet addressed to ItsNodeA from ItsNodeC
+                *          containing TrafficClass.SCF set to 1
+                *          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 {
+                *          the IUT receives the same GUC packet from ItsNodeD
+                *              before expiration of the CBF timer
+                *      }
+                *      then {
+                *          the IUT does not re-broadcast the GUC 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.3.1 TP/GEONW/PON/GUC/CBF/BV-07 + * @reference EN 302 636-4-1 [1], clauses 10.3.8.3, Annex E.3 + */ + testcase TC_GEONW_PON_GUC_CBF_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GUC_CBF_BV_07(); + + } // end TC_GEONW_PON_GUC_CBF_BV_07 + + /** + * @desc Check that a received GUC packet forwarding is correctly handling the minimum delay + * value according to the contention based forwarding rules + *
+                * Pics Selection: PICS_GN_GUC_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
+                *      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 {
+                *          the IUT receives a GUC packet addressed to ItsNodeA from ItsNodeC
+                *              containing TrafficClass.SCF set to 1
+                *              containing Basic Header
+                *                  containing RHL field
+                *                      indicating value greater than 1
+                *      }
+                *      then {
+                *          the IUT re-broadcasts the received GUC packet
+                *              upon expiry of itsGnCbfMinTime delay
+                *      }
+                *  }
+                * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/CBF/BV-20 + * @reference EN 302 636-4-1 [1], clauses 10.3.8.3, Annex E.3 + */ + testcase TC_GEONW_PON_GUC_CBF_BV_20() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GUC_CBF_BV_20(); + + } // end TC_GEONW_PON_GUC_CBF_BV_20 + + /** + * @desc Check that a received GUC packet is forwarded at the correct time according to the + * contention based forwarding rules when the sender is unknown + *
+                * Pics Selection: PICS_GN_GUC_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
+                *      the IUT not having received any message from ItsNodeC and
+                *      the distance between IUT and ItsNodeA being
+                *          less than the itsGnDefaultMaxCommunicationRange MIB attribute and
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
+                *          the IUT receives a GUC packet addressed to ItsNodeA from ItsNodeC
+                *              containing TrafficClass.SCF set to 1
+                *              containing Basic Header
+                *                  containing RHL field
+                *                      indicating value greater than 1
+                *      }
+                *      then {
+                *          the IUT re-broadcasts the received GUC packet
+                *              upon expiry of CBF_MAX
+                *      }
+                *  }
+                *
+                * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/CBF/BV-21 + * @reference EN 302 636-4-1 [1], clauses 10.3.8.3, Annex E.3 + */ + testcase TC_GEONW_PON_GUC_CBF_BV_21() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GUC_CBF_BV_21(); + + } // end TC_GEONW_PON_GUC_CBF_BV_21 + + /** + * @desc Check that a received GUC packet is forwarded at the correct time according to the contention + * based forwarding rules when the sender is known sender with an uncertain position (PAI = 0). + *
+                * Pics Selection: PICS_GN_GUC_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
+                *      the IUT having received Beacon information from ItsNodeD
+                *          containing Beacon ExtendedHeader
+                *              containing SOPV field
+                *                  containing PAI
+                *                      set to ‘0’
+                *  }
+                * Expected behaviour:
+                *  ensure that {
+                *      when {
+                *          the IUT receives a GUC packet addressed to ItsNodeA generated by ItsNodeC from ItsNodeD
+                *              containing TrafficClass.SCF set to 1
+                *                  containing Basic Header
+                *                      containing RHL field
+                *                          indicating value greater than 1
+                *      }
+                *      then {
+                *          the IUT re-broadcasts the GUC packet
+                *              upon expiry of CBF_MAX
+                *      }
+                *  }
+                *
+                * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/CBF/BV-22 + * @reference EN 302 636-4-1 [1], clauses 10.3.8.3, Annex E.3 + */ + testcase TC_GEONW_PON_GUC_CBF_BV_22() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GUC_CBF_BV_22(); + + } // end TC_GEONW_PON_GUC_CBF_BV_22 + + } // end gucContentionBasedForwarding + + } // end geoGeoUnicast + + // 6.2.2.9 + group geoGeoBroadcast { + + group gbcNonAreaForwarding { + + group gbcNonAreaAllForwardingAlgorithm { + + /** + * @desc Check that the protocol header fields (RHL) are correctly updated during a GBC forwarding step + *
+                    * 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
+                    *      the IUT having received Beacon information from ItsNodeC
+                    *  }
+                    * 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
+                    *                  indicating AREA2
+                    *      }
+                    *      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 DestinationArea
+                    *                  indicating AREA2
+                    *      }
+                    *  }
+                    * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/NONAREA/ALL/BV-03 + * @reference EN 302 636-4-1 [1], clauses 10.3.11.3 + */ + testcase TC_GEONW_PON_GBC_NONAREA_ALL_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { - } // end TC_GEONW_PON_GAC_BO_11 - - /** - * @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_GEOUNICAST_FORWARDING_ALGORITHM == 'CBF'
-            * 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 is requested to send a GAC packet
-            *  			containing TrafficClass.SCF set to 1
-            *  			containing DestinationArea
-            *  				indicating AREA2
-            *  	}
-            *  	then {
-            *  		the IUT broadcasts the packet immediately
-            *  	}
-            *  }
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/BV-13 - * @reference EN 302 636-4-1 [1], clauses 9.3.12.2 - */ - testcase TC_GEONW_PON_GAC_BV_13() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_GAC_BV_13(); + f_GEONW_PON_GBC_NONAREA_ALL_BV_03(); - } // end TC_GEONW_PON_GAC_BV_13 - - } // end geoGeoAnycast + } // end 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
+					* Config Id: CF03
+					* 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 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
+					*                      indicating AREA2
+					*      }
+					*      then {
+					*          the IUT does not retransmit the GBC packet
+					*      }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/NONAREA/ALL/BV-04 + * @reference EN 302 636-4-1 [1], clauses 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 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
+					*                  indicating AREA2
+					*      }
+					*      then {
+					*          the IUT does not pass the received GBC packet to any Upper Layer protocol
+					*      }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/NONAREA/ALL/BV-06 + * @reference EN 302 636-4-1 [1], clauses 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 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
+					* 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 receives a GBC packet from ItsNodeC
+					*              containing TrafficClass.SCF set to 1
+					*              containing DestinationArea
+					*                  indicating a geoArea bigger than itsGnMaxGeoAreaSize
+					*      }
+					*      then {
+					*          the IUT does not retransmit the received GBC packet
+					*      }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/NONAREA/ALL/BO-09 + * @reference EN 302 636-4-1 [1], 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(); + + } // end TC_GEONW_PON_GBC_NONAREA_ALL_BO_09 + + /** + * @desc Check that a received GBC packet from inside of the destination area is discarded if + * received for the first time when IUT is outside of the destination area + *
+					* Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_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 ItsNodeC and
+    				*      the IUT having received Beacon information from ItsNodeD
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives the a GBC packet from ItsNodeD
+					*              containing TrafficClass.SCF set to 1
+					*              containing GBC Extended Header
+					*                  containing DestinationArea
+					*                      indicating AREA2
+					*      }
+					*      then {
+					*          the IUT discards the received GBC packet
+					*      }
+					*  }
+					*
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/NONAREA/ALL/BO-10 + * @reference EN 302 636-4-1 [1], Annex D + */ + testcase TC_GEONW_PON_GBC_NONAREA_ALL_BO_10() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GBC_NONAREA_ALL_BO_10(); + + } // end TC_GEONW_PON_GBC_NONAREA_ALL_BO_10 + + } // end gbcNonAreaAllForwardingAlgorithm + + 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
+					*      the IUT having received Beacon information from ItsNodeD and
+					*      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
+					*                  indicating AREA2
+					*      }
+					*      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.3.1 TP/GEONW/PON/GBC/NONAREA/GRD/BV-01 + * @reference EN 302 636-4-1 [1], clauses 10.3.11.2, 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 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
+					*      the IUT having received Beacon information from ItsNodeD and
+					*      the IUT having received Beacon information from ItsNodeC
+					*  }
+					* 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 {
+					*          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.3.1 TP/GEONW/PON/GBC/NONAREA/GRD/BV-02 + * @reference EN 302 636-4-1 [1], clauses 10.3.11.3, 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 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
+					*      the IUT having received a GBC packet from ItsNodeC
+					*          containing TrafficClass.SCF set to 1
+					*          containing Basic Header
+					*              containing RHL field
+					*                  indicating value HL1 higher than 1
+					*          containing GBC Extended Header
+					*              containing SN field
+					*                  indicating value SN1
+					*              containing DestinationArea
+					*                  indicating AREA2
+					*      the IUT having forwarded the received GBC packet
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives the same GBC packet from ItsNodeD
+					*              containing Basic Header
+					*                  containing RHL field
+					*                      indicating value lower than HL1
+					*              containing GBC Extended Header
+					*                  containing SN field
+					*                      indicating value SN1
+					*      }
+					*      then {
+					*          the IUT does not forward the received GBC packet
+					*      }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/NONAREA/GRD/BO-07 + * @reference EN 302 636-4-1 [1], clauses 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(); + + } // end TC_GEONW_PON_GBC_NONAREA_GRD_BO_07 + + } // end gbcNonAreaGreedyForwarding + + 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
+					*      the IUT having received Beacon information from ItsNodeD and
+					*      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
+					*                  indicating AREA2
+					*      }
+					*      then {
+					*          the IUT broadcasts immediately the GBC packet
+					*      }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-01 + * @reference EN 302 636-4-1 [1], clauses 10.3.11.2, 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 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
+					*      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 {
+					*          the IUT receives a GBC packet addressed to ItsNodeA from ItsNodeC
+					*              containing TrafficClass.SCF set to 1
+					*              containing Basic Header
+					*                  containing RHL field
+					*                      indicating value greater than 1
+					*      }
+					*      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.3.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-02 + * @reference EN 302 636-4-1 [1], clauses 10.3.11.3, 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 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
+                    *      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
+                    *                  indicating value greater than 1 and 
+                    *      the IUT having started a CBF timer for this packet (see note)
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives the same GBC packet from ItsNodeB
+					*              before expiration of the CBF timer
+					*      }
+					*      then {
+					*          the IUT does not re-broadcast the GBC packet
+					*      }
+					*  }
+					*  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.3.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-07 + * @reference EN 302 636-4-1 [1], clauses 10.3.11.3, 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 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 + *
+					* 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
+					*      the IUT having received Beacon information from ItsNodeC and
+					*      the distance between IUT and ItsNodeC being
+					*          less than itsGnDefaultMaxCommunicationRange MIB attribute
+					*  }
+					* 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
+					*                      indicating value greater than 1
+					*      }
+					*      then {
+					*          the IUT re-broadcasts the received GBC packet
+					*              upon expiry of itsGnGeoCbfMinTime delay
+					*      }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-20 + * @reference EN 302 636-4-1 [1], clauses 10.3.11.3, 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 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 + *
+                    * Pics Selection: PICS_GN_GBC_FWD 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 not having received any message from ItsNodeD
+                    *  }
+                    * Expected behaviour:
+                    *  ensure that {
+                    *      when {
+                    *          the IUT receives the a GBC packet generated by ItsNodeC from ItsNodeD
+                    *              containing TrafficClass.SCF set to 1
+                    *              containing GBC Extended Header
+                    *                  containing DestinationArea
+                    *                      indicating AREA2
+                    *      }
+                    *      then {
+                    *          the IUT re-broadcasts the GBC packet 
+                    *              upon expiry of CBF_MAX
+                    *      }
+                    *  }
+                    *
+                    * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-21 + * @reference EN 302 636-4-1 [1], 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 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) + *
+                    * Pics Selection: PICS_GN_GBC_FWD 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
+                    *        containing Beacon ExtendedHeader
+                    *            containing SOPV field
+                    *                containing PAI
+                    *                    set to '0'
+                    * }
+                    * Expected behaviour:
+                    *  ensure that {
+                    *      when {
+                    *          the IUT receives the a GBC packet generated by ItsNodeC from ItsNodeD
+                    *              containing TrafficClass.SCF set to 1
+                    *              containing GBC Extended Header
+                    *                  containing DestinationArea
+                    *                      indicating AREA2
+                    *      }
+                    *      then {
+                    *          the IUT re-broadcasts the GBC packet
+                    *              upon expiry of CBF_MAX
+                    *      }
+                    *  }
+                    *
+                    * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/NONAREA/CBF/BV-22 + * @reference EN 302 636-4-1 [1], 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(); + + } // end TC_GEONW_PON_GBC_NONAREA_CBF_BV_22 + + } // end gbcNonAreaContentionBasedForwarding + + } // end gbcNonAreaForwarding + + group gbcAreaForwarding { + + 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
+					* 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 is requested to send a GBC packet
+					*              containing TrafficClass.SCF set to 1
+					*              containing DestinationArea
+					*                  indicating AREA1
+					*      }
+					*      then {
+					*          the IUT broadcasts immediately the GBC packet
+					*              containing DestinationArea
+					*                  indicating AREA1
+					*      }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/AREA/ALL/BV-01 + * @reference EN 302 636-4-1 [1], clauses 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(); - // 6.2.2.13 - group geoGeoBroadcastCbfAlgorithm { + } // end 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 + *
+					* 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 {
+					*          the IUT receives a GBC packet
+					*              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 AREA1
+					*      }
+					*      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.3.1 TP/GEONW/PON/GBC/AREA/ALL/BV-03 + * @reference EN 302 636-4-1 [1], clauses 9.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 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 {
+					*      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
+					*                      indicating 1
+					*              containing GBC Extended Header
+					*                  containing DestinationArea
+					*                      indicating AREA1
+					*      }
+					*      then {
+					*          the IUT does not retransmit the GBC packet
+					*      }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/AREA/ALL/BV-04 + * @reference EN 302 636-4-1 [1], clauses 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 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 {
+					*      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 AREA1
+					*      }
+					*      then {
+					*          the IUT passes the received GBC packet to the correct Upper Layer protocol
+					*      }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/AREA/ALL/BV-05 + * @reference EN 302 636-4-1 [1], clauses 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 TC_GEONW_PON_GBC_AREA_ALL_BV_05 - /** - * @desc Check that a received GBC packet is discarded if received twice or more - *
-            * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_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
-            *      the IUT having received a GBC packet from ItsNodeC
-            *          containing TrafficClass.SCF set to 1
-            *          containing GBC Extended Header
-            *              containing DestinationArea
-            *                  indicating AREA1
-            *      the IUT having saved the packet into CBF buffer
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives the same GBC packet from ItsNodeD
-            *      }
-            *      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.3.1 TP/GEONW/PON/BCA/BV-01 - * @reference EN 302 636-4-1 [1], Annex E.3 - */ - testcase TC_GEONW_PON_BCA_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { + /** + * @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
+					*      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
+					*                  indicating HL1
+					*          containing GBC Extended Header
+					*              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 {
+					*          the IUT receives the same GBC packet from ItsNodeD
+					*              containing Basic Header
+					*                  containing RHL field
+					*                      indicating value lower than HL1
+					*                  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.3.1 TP/GEONW/PON/GBC/AREA/ALL/BO-08 + * @reference EN 302 636-4-1 [1], clauses 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(); + + } // end TC_GEONW_PON_GBC_AREA_ALL_BO_08 + + } // end gbcAreaAllForwardingAlgorithm + + group gbcAreaSimpleForwarding { + + /** + * @desc Check that a received GBC packet is triggering re-broadcasting if received for the first + * time within its destination area + *
+					* Pics Selection: PICS_GN_GBC_FWD AND (PICS_GN_AREA_FORWARDING_ALGORITHM == 'SIMPLE'
+					*                                       OR PICS_GN_AREA_FORWARDING_ALGORITHM == 'UNSPECIFIED')
+					* 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 DestinationArea
+					*                  indicating AREA1
+					*      }
+					*      then {
+					*          the IUT re-broadcasts immediately the GBC packet
+					*      }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/AREA/SMP/BV-02 + * @reference EN 302 636-4-1 [1], clauses 10.3.11.3, 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 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) + *
+					* Pics Selection:  PICS_GN_GBC_FWD  AND (PICS_GN_AREA_FORWARDING_ALGORITHM == 'SIMPLE' 
+					*                                        OR PICS_GN_AREA_FORWARDING_ALGORITHM == 'UNSPECIFIED')
+					* 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
+					*                  indicating value HL1 higher than 1
+					*          containing GBC Extended Header
+					*              containing SN field
+					*                  indicating value SN1
+					*              containing DestinationArea
+					*                  indicating AREA1 and
+					*      the IUT having re-broadcast the GBC packet
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives the same GBC packet from ItsNodeD
+					*              containing Basic Header
+					*                  containing RHL field
+					*                      indicating value lower than HL1
+					*              containing GBC Extended Header
+					*                  containing SN field
+					*                      indicating value SN1
+					*      }
+					*      then {
+					*          the IUT does not re-broadcast the GBC packet
+					*      }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/AREA/SMP/BO-07 + * @reference EN 302 636-4-1 [1], clauses 10.3.11.3, Annex A.2 + */ + testcase TC_GEONW_PON_GBC_AREA_SMP_BO_07() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GBC_AREA_SMP_BO_07(); + + } // end TC_GEONW_PON_GBC_AREA_SMP_BO_07 - f_GEONW_PON_BCA_BV_01(); + } // end gbcAreaSimpleForwarding + + 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
+					*      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 {
+					*          the IUT receives the a GBC packet from ItsNodeC
+					*              containing TrafficClass.SCF set to 1
+					*              containing GBC Extended Header
+					*                  containing DestinationArea
+					*                      indicating AREA1
+					*      }
+					*      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.3.1 TP/GEONW/PON/GBC/AREA/CBF/BV-02 + * @reference EN 302 636-4-1 [1], 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 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 {
+					*      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 GBC Extended Header
+					*              containing DestinationArea
+					*                  indicating AREA1
+					*      the IUT having saved the packet into CBF buffer
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives the same GBC packet from ItsNodeD
+					*      }
+					*      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.3.1 TP/GEONW/PON/GBC/AREA/CBF/BV-07 + * @reference EN 302 636-4-1 [1], 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 TC_GEONW_PON_BCA_BV_01 - - /** - * @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_GEOBROADCAST_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 and
-            *      the IUT having received Beacon information from ItsNodeC
-            *  }
-            * 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 {
-            *          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.3.1 TP/GEONW/PON/BCA/BV-02 - * @reference EN 302 636-4-1 [1], Annex E.3 - */ - testcase TC_GEONW_PON_BCA_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_BCA_BV_02(); + } // end 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
+					*      the IUT having received Beacon information from ItsNodeB and
+					*      the IUT not having received any message from ItsNodeD
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives the a GBC packet generated by ItsNodeC from ItsNodeD
+					*              containing TrafficClass.SCF set to 1
+					*              containing GBC Extended Header
+					*                  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.3.1 TP/GEONW/PON/GBC/AREA/CBF/BV-21 + * @reference EN 302 636-4-1 [1], 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(); - } // end TC_GEONW_PON_BCA_BV_02 - - /** - * @desc Check that a received GBC packet from outside of the destination area is triggering line - * forwarding if received for the first time when IUT is outside of the destination area - *
-            * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_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 and
-            *      the IUT having received Beacon information from ItsNodeC
-            *  }
-            * 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 AREA2
-            *      }
-            *      then {
-            *          the IUT selects ItsNodeB as next hop ITS station and
-            *          the IUT forwards the GBC packet (see note)
-            *      }
-            *  }
-            *
-            *  NOTE: Next hop ITS Statoin being identified by the MAC layer address of ItsNodeB
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BCA/BV-03 - * @reference EN 302 636-4-1 [1], Annex E.3 - */ - testcase TC_GEONW_PON_BCA_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_BCA_BV_03(); + } // end 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
+					*      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 {
+					*          the IUT receives the a GBC packet generated by ItsNodeC from ItsNodeD
+					*              containing TrafficClass.SCF set to 1
+					*              containing GBC Extended Header
+					*                  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 re-broadcasts the received GeoBroedcast packet
+					*              upon expiry of the contention timer
+					*      }
+					*  }
+					*
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/AREA/CBF/BV-22 + * @reference EN 302 636-4-1 [1], 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(); - } // end TC_GEONW_PON_BCA_BV_03 - - /** - * @desc Check that a received GBC packet from inside of the destination area is discarded if - * received for the first time when IUT is outside of the destination area - *
-            * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_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
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives the a GBC packet from ItsNodeD
-            *              containing TrafficClass.SCF set to 1
-            *              containing GBC Extended Header
-            *                  containing DestinationArea
-            *                      indicating AREA2
-            *      }
-            *      then {
-            *          the IUT discards the received GBC packet
-            *      }
-            *  }
-            *
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BCA/BO-04 - * @reference EN 302 636-4-1 [1], Annex E.3 - */ - testcase TC_GEONW_PON_BCA_BO_04() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_BCA_BO_04(); + } // end TC_GEONW_PON_GBC_AREA_CBF_BV_22 + + } // end gbcAreaContentionBasedForwarding + + group gbcAreaAdvancedForwarding { + + /** + * @desc Check that a received GBC packet with Broadcast MAC destination is triggering + * contention if received for the first time from an unknown sender when IUT is inside the + * destination area + *
+					* Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_AREA_FORWARDING_ALGORITHM == 'ADVANCED'
+					* Config Id: CF05
+					* 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 ItsNodeE
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives a GBC packet from ItsNodeE
+					*              addressed to link-layer broadcast address
+					*              containing TrafficClass.SCF set to 1
+					*              containing GBC Extended Header
+					*                  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 re-broadcasts the received GBC packet
+					*              upon expiry of the contention timer
+					*      }
+					*  }
+					*
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/AREA/ADV/BV-21 + * @reference EN 302 636-4-1 [1], Annex F.4 + */ + testcase TC_GEONW_PON_GBC_AREA_ADV_BV_21() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GBC_AREA_ADV_BV_21(); - } // end TC_GEONW_PON_BCA_BO_04 - - /** - * @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_GEOBROADCAST_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 not having received any message from ItsNodeD
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives the a GBC packet generated by ItsNodeC from ItsNodeD
-            *              containing TrafficClass.SCF set to 1
-            *              containing GBC Extended Header
-            *                  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.3.1 TP/GEONW/PON/BCA/BV-05 - * @reference EN 302 636-4-1 [1], Annex E.3 - */ - testcase TC_GEONW_PON_BCA_BV_05() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_BCA_BV_05(); + } // end TC_GEONW_PON_GBC_AREA_ADV_BV_21 + + /** + * @desc Check that a received GBC packet is discarded if received more than MAX_COUNTER + * times when IUT is inside of the destination area + *
+					* Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_AREA_FORWARDING_ALGORITHM == 'ADVANCED'
+					* Config Id: CF06
+					* 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 ItsNodeF and
+					*      the IUT having received a GBC packet GBC1 from ItsNodeF
+					*          containing TrafficClass.SCF set to 1
+					*          containing GBC Extended Header
+					*              containing DestinationArea
+					*                  indicating AREA1
+					*      the IUT having saved the packet into CBF buffer
+					*      the IUT having received MAX_COUNTER - 1 times the GBC1 packet
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives the same GBC packet GBC1
+					*      }
+					*      then {
+					*          the IUT removes GBC1 from the CBF buffer
+					*          the IUT discards the new received GBC packet
+					*      }
+					*  }
+					*
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/AREA/ADV/BV-23 + * @reference EN 302 636-4-1 [1], Annex F.4 + */ + testcase TC_GEONW_PON_GBC_AREA_ADV_BV_23() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GBC_AREA_ADV_BV_23(); - } // end TC_GEONW_PON_BCA_BV_05 - - /** - * @desc Check that a received GBC packet from outside of the destination area is triggering re-broadcast - * if received for the first time when IUT is outside of the destination area from an - * unknown sender - *
-            * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_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 not having received any message from ItsNodeD
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives the a GBC packet generated by ItsNodeC from ItsNodeD
-            *              containing TrafficClass.SCF set to 1
-            *              containing GBC Extended Header
-            *                  containing DestinationArea
-            *                      indicating AREA2
-            *      }
-            *      then {
-            *          the IUT re-broadcasts the GBC packet immediately
-            *      }
-            *  }
-            *
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BCA/BV-06 - * @reference EN 302 636-4-1 [1], Annex E.3 - */ - testcase TC_GEONW_PON_BCA_BV_06() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_BCA_BV_06(); + } // end TC_GEONW_PON_GBC_AREA_ADV_BV_23 + + /** + * @desc Check that a received GBC packet is discarded if received more than 1 times when IUT + * is inside of the destination area and inside the sectorial area of the GBC packet Sender + *
+					* Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_AREA_FORWARDING_ALGORITHM == 'ADVANCED'
+					* Config Id: CF05
+					* 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 ItsNodeE and
+					*      the IUT having received a GBC packet GBC1 from ItsNodeB
+					*          containing TrafficClass.SCF set to 1
+					*          containing GBC Extended Header
+					*              containing DestinationArea
+					*                  indicating AREA1
+					*      the IUT having saved the packet into CBF buffer
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives the same GBC packet GBC1 from ItsNodeE
+					*          the IUT is inside the sectorial area of ItsNodeB
+					*      }
+					*      then {
+					*          the IUT removes GBC1 from the CBF buffer
+					*          the IUT discards the new received GBC packet
+					*      }
+					*  }
+					*
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/AREA/ADV/BV-24 + * @reference EN 302 636-4-1 [1], Annex F.4 + */ + testcase TC_GEONW_PON_GBC_AREA_ADV_BV_24() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GBC_AREA_ADV_BV_24(); - } // end TC_GEONW_PON_BCA_BV_06 - - /** - * @desc Check that a received GBC packet is rebroadcasted 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_GBC_FWD AND PICS_GN_GEOBROADCAST_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
-            *        containing Beacon ExtendedHeader
-            *            containing SOPV field
-            *                containing PAI
-            *                    set to '0'
-            * }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives the a GBC packet generated by ItsNodeC from ItsNodeD
-            *              containing TrafficClass.SCF set to 1
-            *              containing GBC Extended Header
-            *                  containing DestinationArea
-            *                      indicating AREA2
-            *      }
-            *      then {
-            *          the IUT re-broadcasts the GBC packet
-            *      }
-            *  }
-            *
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BCA/BV-07 - * @reference EN 302 636-4-1 [1], Annex E.3 - */ - testcase TC_GEONW_PON_BCA_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_BCA_BV_07(); + } // end TC_GEONW_PON_GBC_AREA_ADV_BV_24 + + /** + * @desc Check that a received GBC packet is triggering contention if received more than 1 times when the IUT + * is inside of the destination area and outside the sectorial area of the GBC packet Sender (Angle_FSR > Angle_TH) + *
+					* Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_AREA_FORWARDING_ALGORITHM == 'ADVANCED'
+					* Config Id: CF06
+					* 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 ItsNodeF and
+					*      the IUT having received a GBC packet GBC1 from ItsNodeB
+					*          containing TrafficClass.SCF set to 1
+					*          containing GBC Extended Header
+					*              containing DestinationArea
+					*                  indicating AREA1
+					*      the IUT having saved the packet into CBF buffer
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives the same GBC packet GBC1 from ItsNodeF
+					*          the IUT is outside the sectorial area of ItsNodeB
+					*      }
+					*      then {
+					*          the IUT saves the GBC packet GBC1 from ItsNodeF and
+					*          the IUT starts the contention timer and
+					*          the IUT re-broadcasts the received GBC packet
+					*              upon expiry of the contention timer
+					*      }
+					*  }
+					*
+					*  Note: In this configuration IUT is outside sectorial area of ItsNodeB to the angle FSR
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/AREA/ADV/BV-25 + * @reference EN 302 636-4-1 [1], Annex F.4 + */ + testcase TC_GEONW_PON_GBC_AREA_ADV_BV_25() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GBC_AREA_ADV_BV_25(); - } // end TC_GEONW_PON_BCA_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_GEOBROADCAST_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
-            *        containing Beacon ExtendedHeader
-            *            containing SOPV field
-            *                containing PAI
-            *                    set to '0'
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives the a GBC packet generated by ItsNodeC from ItsNodeD
-            *              containing TrafficClass.SCF set to 1
-            *              containing GBC Extended Header
-            *                  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 re-broadcasts the received GeoBroedcast packet
-            *              upon expiry of the contention timer
-            *      }
-            *  }
-            *
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BCA/BV-08 - * @reference EN 302 636-4-1 [1], Annex E.3 - */ - testcase TC_GEONW_PON_BCA_BV_08() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_BCA_BV_08(); + } // end TC_GEONW_PON_GBC_AREA_ADV_BV_25 + + /** + * @desc Check that a received GBC packet is triggering contention if received more than 1 times when IUT + * is inside the destination area and outside the sectorial area of the GBC packet Sender (Dist_R > Dist_F) + *
+					* Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_AREA_FORWARDING_ALGORITHM == 'ADVANCED'
+					* Config Id: CF07
+					* 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 a GBC packet GBC1 from ItsNodeB
+					*          containing TrafficClass.SCF set to 1
+					*          containing GBC Extended Header
+					*              containing DestinationArea
+					*                  indicating AREA1
+					*      the IUT having saved packet into the CBF buffer
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives the same GBC packet GBC1 from ItsNodeD
+					*          the IUT is outside the sectorial area of ItsNodeB
+					*      }
+					*      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
+					*      }
+					*  }
+					*
+					* Note: In this configuration IUT is outside sectorial area of ItsNodeB because of dist_R > dist_F
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/AREA/ADV/BV-26 + * @reference EN 302 636-4-1 [1], Annex F.4 + */ + testcase TC_GEONW_PON_GBC_AREA_ADV_BV_26() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GBC_AREA_ADV_BV_26(); + + } // end TC_GEONW_PON_GBC_AREA_ADV_BV_26 + + /** + * @desc Check that a received GBC packet with Unicast MAC destination is triggering line + * forwarding if received for the first time when IUT is inside the destination area + *
+					* Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_AREA_FORWARDING_ALGORITHM == 'ADVANCED'
+					* Config Id: CF05
+					* 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 ItsNodeE and
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives a GBC packet from ItsNodeE
+					*              addressed to IUT's link-layer address
+					*              containing TrafficClass.SCF set to 1
+					*              containing GBC Extended Header
+					*                  containing DestinationArea
+					*                      indicating AREA1
+					*      }
+					*      then {
+					*          the IUT selects ItsNodeB as the next hop ITS station and
+					*          the IUT forwards the GBC packet
+					*      }
+					*  }
+					*
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/AREA/ADV/BV-27 + * @reference EN 302 636-4-1 [1], Annex F.4 + */ + testcase TC_GEONW_PON_GBC_AREA_ADV_BV_27() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GBC_AREA_ADV_BV_27(); - } // end TC_GEONW_PON_BCA_BV_08 + } // end TC_GEONW_PON_GBC_AREA_ADV_BV_27 + + /** + * @desc Check that a received GBC packet with Unicast MAC destination is triggering + * rebroadcast if received for the first time when IUT is inside the destination area. + *
+					* Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_AREA_FORWARDING_ALGORITHM == 'ADVANCED'
+					* Config Id: CF05
+					* 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 ItsNodeE
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*   when {
+					*       the IUT receives a GBC packet from ItsNodeE addressed to IUT's link-layer address
+					*           containing TrafficClass.SCF set to 1
+					*           containing GBC Extended Header
+					*               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 re-broadcasts the received GBC packet
+					*           upon expiry of the contention timer
+					*   }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/AREA/ADV/BV-28 + * @reference EN 302 636-4-1 [1], Annex F.4 + */ + testcase TC_GEONW_PON_GBC_AREA_ADV_BV_28() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GBC_AREA_ADV_BV_28(); + + } // end TC_GEONW_PON_BAA_BV_28 + + /** + * @desc Check that a received GBC packet with Broadcast destination is triggering contention if + * received for the first time from known sender when IUT is inside the destination area + *
+					* Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_AREA_FORWARDING_ALGORITHM == 'ADVANCED'
+					* Config Id: CF05
+					* 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 ItsNodeE
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives a GBC packet from ItsNodeE
+					*              addressed to broadcast link-layer address
+					*              containing TrafficClass.SCF set to 1
+					*              containing GBC Extended Header
+					*                  containing DestinationArea
+					*                      indicating AREA1
+					*      }
+					*      then {
+					*          the IUT calculates and 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.3.1 TP/GEONW/PON/GBC/AREA/ADV/BV-29 + * @reference EN 302 636-4-1 [1], Annex F.4 + */ + testcase TC_GEONW_PON_GBC_AREA_ADV_BV_29() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GBC_AREA_ADV_BV_29(); + + } // end TC_GEONW_PON_GBC_AREA_ADV_BV_29 + + } // end gbcAreaAdvancedForwarding + } // end gbcAreaForwarding + + } // end geoGeoBroadcast + + // 6.2.2.10 + group geoTopologicallyScopedBroadcast { + /** - * @desc Check that a received GBC packet is discarded if received more than MAX_COUNTER - * times when IUT is inside of the destination area + * @desc Check that a TSB request over upper Gn SAP triggers the origination of a TSB + * packet *
-            * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'ADVANCED'
-            * Config Id: CF06
+            * Pics Selection: PICS_GN_TSB_SRC
+            * Config Id: CF02
             * 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 ItsNodeF and
-            *      the IUT having received a GBC packet GBC1 from ItsNodeF
-            *          containing TrafficClass.SCF set to 1
-            *          containing GBC Extended Header
-            *              containing DestinationArea
-            *                  indicating AREA1
-            *      the IUT having saved the packet into CBF buffer
-            *      the IUT having received MAX_COUNTER - 1 times the GBC1 packet
+            *      the IUT having received Beacon information from ItsNodeD
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when {
-            *          the IUT receives the same GBC packet GBC1
+            *          the IUT is requested to send a TSB packet
             *      }
             *      then {
-            *          the IUT removes GBC1 from the CBF buffer
-            *          the IUT discards the new received GBC packet
+            *          the IUT broadcasts a TSB packet
             *      }
             *  }
-            *
             * 
* - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BAA/BV-01 - * @reference EN 302 636-4-1 [1], Annex E.4 + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/TSB/BV-01 + * @reference EN 302 636-4-1 [1], clauses 10.3.9.2 */ - testcase TC_GEONW_PON_BAA_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { + testcase TC_GEONW_PON_TSB_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { - f_GEONW_PON_BAA_BV_01(); + f_GEONW_PON_TSB_BV_01(); - } // end TC_GEONW_PON_BAA_BV_01 + } // end TC_GEONW_PON_TSB_BV_01 /** - * @desc Check that a received GBC packet is discarded if received more than 1 times when IUT - * is inside of the destination area and inside the sectorial area of the GBC packet Sender + * @desc Check that a received TSB packet is triggering re-broadcasting if received for the first time *
-            * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'ADVANCED'
-            * Config Id: CF05
+            * Pics Selection: PICS_GN_TSB_FWD
+            * Config Id: CF02
             * 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 ItsNodeE and
-            *      the IUT having received a GBC packet GBC1 from ItsNodeB
-            *          containing TrafficClass.SCF set to 1
-            *          containing GBC Extended Header
-            *              containing DestinationArea
-            *                  indicating AREA1
-            *      the IUT having saved the packet into CBF buffer
+            *      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 the same GBC packet GBC1 from ItsNodeE
-            *          the IUT is inside the sectorial area of ItsNodeB
+            *          the IUT receives a TSB packet
+            *              containing Basic Header
+            *                  containing RHL field
+            *                      indicating HL1 higher than 1
             *      }
             *      then {
-            *          the IUT removes GBC1 from the CBF buffer
-            *          the IUT discards the new received GBC packet
+            *          the IUT re-broadcasts the TSB packet
             *      }
             *  }
-            *
             * 
* - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BAA/BV-02 - * @reference EN 302 636-4-1 [1], Annex E.4 + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/TSB/BV-02 + * @reference EN 302 636-4-1 [1], clauses 10.3.9.3 */ - testcase TC_GEONW_PON_BAA_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { - - f_GEONW_PON_BAA_BV_02(); - - } // end TC_GEONW_PON_BAA_BV_02 - + testcase TC_GEONW_PON_TSB_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_TSB_BV_02(); + + } // end TC_GEONW_PON_TSB_BV_02 + /** - * @desc Check that a received GBC packet is triggering contention if received more than 1 times when the IUT - * is inside of the destination area and outside the sectorial area of the GBC packet Sender (Angle_FSR > Angle_TH) + * @desc Check that the protocol header fields (RHL) are correctly updated during a TSB re- + * broadcasting step *
-            * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'ADVANCED'
-            * Config Id: CF06
+            * Pics Selection: PICS_GN_TSB_FWD
+            * Config Id: CF02
             * 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 ItsNodeF and
-            *      the IUT having received a GBC packet GBC1 from ItsNodeB
-            *          containing TrafficClass.SCF set to 1
-            *          containing GBC Extended Header
-            *              containing DestinationArea
-            *                  indicating AREA1
-            *      the IUT having saved the packet into CBF buffer
+            *      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 the same GBC packet GBC1 from ItsNodeF
-            *          the IUT is outside the sectorial area of ItsNodeB
+            *          the IUT receives a TSB packet
+            *              containing Basic Header
+            *                  containing RHL field
+            *                      indicating HL1
+            *              containing Common Header
+            *                  containing MHL field
+            *                      indicating value MHL1
             *      }
             *      then {
-            *          the IUT saves the GBC packet GBC1 from ItsNodeF and
-            *          the IUT starts the contention timer and
-            *          the IUT re-broadcasts the received GBC packet
-            *              upon expiry of the contention timer
+            *          the IUT re-broadcasts the TSB packet
+            *              containing Basic Header
+            *                  containing RHL field
+            *                      indicating value (HL1 -1)
+            *              containing Common Header
+            *                  containing MHL field
+            *                      indicating value MHL1
             *      }
             *  }
-            *
-            *  Note: In this configuration IUT is outside sectorial area of ItsNodeB to the angle FSR
             * 
* - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BAA/BV-03 - * @reference EN 302 636-4-1 [1], Annex E.4 + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/TSB/BV-03 + * @reference EN 302 636-4-1 [1], clauses 10.3.9.3 */ - testcase TC_GEONW_PON_BAA_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { + testcase TC_GEONW_PON_TSB_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { - f_GEONW_PON_BAA_BV_03(); + f_GEONW_PON_TSB_BV_03(); - } // end TC_GEONW_PON_BAA_BV_03 + } // end TC_GEONW_PON_TSB_BV_03 /** - * @desc Check that a received GBC packet with Unicast MAC destination is triggering line - * forwarding if received for the first time when IUT is inside the destination area + * @desc Check that the RHL restriction is correctly handled at a TSB re-broadcasting step *
-            * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'ADVANCED'
-            * Config Id: CF05
+            * Pics Selection: PICS_GN_TSB_FWD
+            * Config Id: CF02
             * 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 ItsNodeE and
+            *      the IUT being in the "initial state"
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when {
-            *          the IUT receives a GBC packet from ItsNodeE
-            *              addressed to IUT's link-layer address
-            *              containing TrafficClass.SCF set to 1
-            *              containing GBC Extended Header
-            *                  containing DestinationArea
-            *                      indicating AREA1
+            *          the IUT receives a TSB packet
+            *              containing Basic Header
+            *                  containing RHL field
+            *                      indicating 1
             *      }
             *      then {
-            *          the IUT selects ItsNodeB as the next hop ITS station and
-            *          the IUT forwards the GBC packet
+            *          the IUT does not re-broadcast the TSB packet
             *      }
             *  }
-            *
             * 
* - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BAA/BV-04 - * @reference EN 302 636-4-1 [1], Annex E.4 + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/TSB/BO-04 + * @reference EN 302 636-4-1 [1], clauses 10.3.9.3 */ - testcase TC_GEONW_PON_BAA_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem { + testcase TC_GEONW_PON_TSB_BO_04() runs on ItsMtc system ItsGeoNetworkingSystem { - f_GEONW_PON_BAA_BV_04(); + f_GEONW_PON_TSB_BO_04(); - } // end TC_GEONW_PON_BAA_BV_04 - + } // end TC_GEONW_PON_TSB_BO_04 + /** - * @desc Check that a received GBC packet with Unicast MAC destination is triggering - * rebroadcast if received for the first time when IUT is inside the destination area. + * @desc Check that a received TSB packet is passed over the Gn SAP to the correct upper protocol if it is + * received for the first time *
-            * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'ADVANCED'
-            * Config Id: CF05
+            * Pics Selection: PICS_GN_TSB_DST
+            * Config Id: CF01
             * 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 ItsNodeE
+            *    the IUT being in the "initial state"
             *  }
             * Expected behaviour:
             *  ensure that {
-            *  	when {
-            *  		the IUT receives a GBC packet from ItsNodeE addressed to IUT's link-layer address
-            *  			containing TrafficClass.SCF set to 1
-            *  			containing GBC Extended Header
-            *  				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 re-broadcasts the received GBC packet
-            *  			upon expiry of the contention timer
-            *  	}
+            *    when {
+            *      the IUT receives a TSB packet
+            *    }
+            *    then {
+            *      the IUT passes the received TSB packet to the correct Upper Layer protocol
+            *    }
             *  }
             * 
* - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BAA/BV-05 - * @reference EN 302 636-4-1 [1], Annex E.4 + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/TSB/BV-05 + * @reference EN 302 636-4-1 [1], clauses 10.3.9.3 */ - testcase TC_GEONW_PON_BAA_BV_05() runs on ItsMtc system ItsGeoNetworkingSystem { + testcase TC_GEONW_PON_TSB_BV_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - f_GEONW_PON_BAA_BV_05(); - - } // end TC_GEONW_PON_BAA_BV_05 + f_GEONW_PON_TSB_BV_05(); + } // end TC_GEONW_PON_TSB_BV_05 + /** - * @desc Check that a received GBC packet with Broadcast destination is triggering contention if - * received for the first time from known sender when IUT is inside the destination area + * @desc Check that a received TSB packet is not triggering re-broadcasting if received for the second or + * more time *
-            * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'ADVANCED'
-            * Config Id: CF05
+            * Pics Selection: PICS_GN_TSB_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 and
-            *      the IUT having received Beacon information from ItsNodeE
+            *      the IUT having received a TSB packet from ItsNodeB
+            *          containing Basic Header
+            *              containing RHL field
+            *                  indicating HL1 higher than 1
+            *          containing TSB Extended Header
+            *              containing SN field
+            *                  indicating value SN1 and
+            *      the IUT having re-broadcast the TSB packet
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when {
-            *          the IUT receives a GBC packet from ItsNodeE
-            *              addressed to broadcast link-layer address
-            *              containing TrafficClass.SCF set to 1
-            *              containing GBC Extended Header
-            *                  containing DestinationArea
-            *                      indicating AREA1
+            *          the IUT receives the same TSB packet from ItsNodeD
+            *              containing Basic Header
+            *                  containing RHL field
+            *                      indicating HL1 - 1
+            *              containing TSB Extended Header
+            *                  containing SN field
+            *                      indicating value SN1
             *      }
             *      then {
-            *          the IUT calculates and starts the contention timer and
-            *          the IUT re-broadcasts the received GBC packet
-            *              upon expiry of the contention timer
+            *          the IUT does not re-broadcast the TSB packet
             *      }
             *  }
-            *
             * 
* - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BAA/BV-06 - * @reference EN 302 636-4-1 [1], Annex E.4 + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/TSB/BO-07 + * @reference EN 302 636-4-1 [1], clauses 10.3.9.3 */ - testcase TC_GEONW_PON_BAA_BV_06() runs on ItsMtc system ItsGeoNetworkingSystem { + testcase TC_GEONW_PON_TSB_BO_07() runs on ItsMtc system ItsGeoNetworkingSystem { - f_GEONW_PON_BAA_BV_06(); + f_GEONW_PON_TSB_BO_07(); - } // end TC_GEONW_PON_BAA_BV_06 - + } // end TC_GEONW_PON_TSB_BO_07 + + /** - * @desc Check that a received GBC packet from outside the destination area is triggering line - * forwarding if received for the first time from known sender when IUT is outside the destination area + * @desc Check that a received TSB packet is not passed over the Gn SAP if it is received for the second + * or more time *
-            * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'ADVANCED'
-            * Config Id: CF04
+            * Pics Selection: PICS_GN_TSB_DST
+            * Config Id: CF02
             * 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
+            *      the IUT having received a TSB packet from ItsNodeB
+            *          containing Basic Header
+            *              containing RHL field
+            *                  indicating HL1 higher than 1
+            *          containing TSB Extended Header
+            *              containing SN field
+            *                  indicating value SN1 and
+            *      the IUT having passed the received TSB packet to the correct Upper Layer protocol
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when {
-            *          the IUT receives a GBC packet from ItsNodeC
-            *              containing TrafficClass.SCF set to 1
-            *              containing GBC Extended Header
-            *                  containing DestinationArea
-            *                      indicating AREA2
+            *          the IUT receives the same TSB packet from ItsNodeD
+            *              containing Basic Header
+            *                  containing RHL field
+            *                      indicating HL1 - 1
+            *              containing TSB Extended Header
+            *                  containing SN field
+            *                      indicating value SN1
             *      }
             *      then {
-            *          the IUT selects ItsNodeB as the next hop ITS station and
-            *          the IUT forwards the GBC packet
+            *          the IUT does not pass the received TSB packet to any Upper Layer protocol
             *      }
             *  }
-            *
             * 
* - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BAA/BV-07 - * @reference EN 302 636-4-1 [1], Annex E.4 + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/TSB/BO-08 + * @reference EN 302 636-4-1 [1], clauses 10.3.9.3 */ - testcase TC_GEONW_PON_BAA_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { + testcase TC_GEONW_PON_TSB_BO_08() runs on ItsMtc system ItsGeoNetworkingSystem { - f_GEONW_PON_BAA_BV_07(); + f_GEONW_PON_TSB_BO_08(); - } // end TC_GEONW_PON_BAA_BV_07 + } // end TC_GEONW_PON_TSB_BO_08 + } // end geoTopologicallyScopedBroadcast + + // 6.2.2.11 + group geoSingleHopBroadcast { + /** - * @desc Check that a received GBC packet with from inside the destination area is discarded if - * received for the first time from known sender when IUT is outside the destination area + * @desc Check that a SHB request over upper Gn SAP triggers the origination of a SHB + * packet *
-            * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'ADVANCED'
-            * Config Id: CF04
+            * Pics Selection: PICS_GN_SHB_SRC
+            * Config Id: CF02
             * 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
+            *      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 from ItsNodeD
-            *              containing TrafficClass.SCF set to 1
-            *              containing GBC Extended Header
-            *                  containing DestinationArea
-            *                      indicating AREA2
+            *          the IUT is requested to send a SHB packet
             *      }
             *      then {
-            *          the IUT discards the received GBC packet
+            *          the IUT broadcasts the SHB packet
             *      }
             *  }
-            *
             * 
* - * @see ETSI TS 102 871-2 v2.1.1 TP/GEONW/PON/BAA/BO-08 - * @reference EN 302 636-4-1 [1], Annex E.4 + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/SHB/BV-01 + * @reference EN 302 636-4-1 [1], clauses 10.3.10.2 */ - testcase TC_GEONW_PON_BAA_BO_08() runs on ItsMtc system ItsGeoNetworkingSystem { + testcase TC_GEONW_PON_SHB_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { - f_GEONW_PON_BAA_BO_08(); + f_GEONW_PON_SHB_BV_01(); - } // end TC_GEONW_PON_BAA_BO_08 + } // end TC_GEONW_PON_SHB_BV_01 /** - * @desc Check that a received GBC packet with Broadcast MAC destination is triggering - * contention if received for the first time from an unknown sender when IUT is inside the - * destination area + * @desc Check that a received SHB packet is passed over the Gn SAP to the correct upper protocol if it is + * received for the first time *
-            * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'ADVANCED'
-            * Config Id: CF05
+            * Pics Selection: PICS_GN_SHB_DST
+            * Config Id: CF02
             * 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 ItsNodeE
+            *    the IUT being in the "initial state"
             *  }
             * Expected behaviour:
             *  ensure that {
             *      when {
-            *          the IUT receives a GBC packet from ItsNodeE
-            *              addressed to link-layer broadcast address
-            *              containing TrafficClass.SCF set to 1
-            *              containing GBC Extended Header
-            *                  containing DestinationArea
-            *                      indicating AREA1
+            *          the IUT receives a SHB packet
             *      }
             *      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 GBC packet
-            *              upon expiry of the contention timer
+            *          the IUT passes the received SHB packet to the Upper Layer protocol
             *      }
             *  }
-            *
             * 
* - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BAA/BV-09 - * @reference EN 302 636-4-1 [1], Annex E.4 + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/SHB/BV-05 + * @reference EN 302 636-4-1 [1], clauses 10.3.10.3 */ - testcase TC_GEONW_PON_BAA_BV_09() runs on ItsMtc system ItsGeoNetworkingSystem { + testcase TC_GEONW_PON_SHB_BV_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - f_GEONW_PON_BAA_BV_09(); - - } // end TC_GEONW_PON_BAA_BV_09 + f_GEONW_PON_SHB_BV_05(); - /** - * @desc Check that a received GBC packet is triggering re-broadcast if received from unknown - * sender for the first time when IUT is outside the destination area - *
-            * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'ADVANCED'
-            * 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 not having received any message from ItsNodeD
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives a GBC packet generated by ItsNodeC from ItsNodeD
-            *              containing TrafficClass.SCF set to 1
-            *              containing GBC Extended Header
-            *                  containing DestinationArea
-            *                      indicating AREA2
-            *      }
-            *      then {
-            *          the IUT re-broadcasts the GBC packet immediately
-            *      }
-            *  }
-            *
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BAA/BV-10 - * @reference EN 302 636-4-1 [1], Annex E.4 - */ - testcase TC_GEONW_PON_BAA_BV_10() runs on ItsMtc system ItsGeoNetworkingSystem { + } // end TC_GEONW_PON_SHB_BV_05 + + } // end geoSingleHopBroadcast + + // 6.2.2.12 + group geoGeoAnycast { + + group gacNonAreaForwarding { - f_GEONW_PON_BAA_BV_10(); + 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
+					*      the IUT having received Beacon information from ItsNodeB
+                    *      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 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 {
+					*          the IUT retrnasmits the GAC packet
+					*              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.3.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 + */ + testcase TC_GEONW_PON_GAC_NONAREA_ALL_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GAC_NONAREA_ALL_BV_03(); + + } // end 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
+					*      the IUT having received Beacon information from ItsNodeB
+                    *      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 Basic Header
+					*                  containing RHL field
+					*                      indicating 1
+					*              containing GAC Extended Header
+					*                  containing DestinationArea
+					*                      indicating AREA2
+					*      }
+					*      then {
+					*         the IUT does not retransmit the GAC packet
+					*      }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/NONAREA/ALL/BO-04 + * @reference EN 302 636-4-1 [1], clauses 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 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 {
+					*      the IUT being in the "initial state"
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives a GAC packet from ItsNodeB
+					*              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.3.1 TP/GEONW/PON/GAC/BV-06 + * @reference EN 302 636-4-1 [1], clauses 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 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
+					*      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
+					*                  indicating a geoArea bigger than itsGnMaxGeoAreaSize
+					*      }
+					*      then {
+					*          the IUT does not retransmit the received GAC packet
+					*      }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/NONAREA/ALL/BO-09 + * @reference EN 302 636-4-1 [1], 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 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
+                    *      the IUT having received Beacon information from ItsNodeC and
+					*      the IUT having received Beacon information from ItsNodeD
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives a GAC packet from ItsNodeD
+                    *              containing TrafficClass.SCF set to 1
+                    *              containing GAC Extended Header
+                    *                  containing DestinationArea
+                    *                      indicating AREA2
+					*      }
+					*      then {
+					*          the IUT discards the received GAC packet
+					*      }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/NONAREA/ALL/BV-10 + * @reference EN 302 636-4-1 [1], Annex D + */ + testcase TC_GEONW_PON_GAC_NONAREA_ALL_BV_10() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GAC_NONAREA_ALL_BV_10(); + + } // end TC_GEONW_PON_GAC_NONAREA_ALL_BV_10 + + } // end gacNonAreaAllForwardingAlgorithm + + 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
+					*      the IUT having received Beacon information from ItsNodeD and
+					*      the IUT having received Beacon information from ItsNodeB
+					*  }
+					* 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 {
+					*          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.3.1 TP/GEONW/PON/GAC/NONAREA/GRD/BV-02 + * @reference EN 302 636-4-1 [1], clauses 10.3.12.2, 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 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
+					*      the IUT having received Beacon information from ItsNodeB
+					*      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
+					*                  indicating AREA2
+					*      }
+					*      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.3.1 TP/GEONW/PON/GAC/NONAREA/GRD/BV-02 + * @reference EN 302 636-4-1 [1], clauses 10.3.12.3, 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 TC_GEONW_PON_BAA_BV_10 + } // end 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
+					*      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 Basic Header
+					*              containing RHL field
+					*                  indicating value HL1 higher than 1
+					*          containing GAC Extended Header
+					*              containing SN field
+					*                  indicating value SN1 and
+					*              containing DestinationArea
+					*                  indicating AREA2
+					*      the IUT having forwarded the GAC packet
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*      when {
+					*          the IUT receives the same GAC packet from other neighbour
+					*              containing Basic Header
+					*                  containing RHL field
+					*                      indicating value lower than HL1
+					*              containing GAC Extended Header
+					*                  containing SN field
+					*                      indicating value SN1
+					*      }
+					*      then {
+					*          the IUT does not forward the received GAC packet
+					*      }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/NONAREA/GRD/BO-07 + * @reference EN 302 636-4-1 [1], clauses 10.3.12.3 + */ + testcase TC_GEONW_PON_GAC_NONAREA_GRD_BO_07() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GAC_NONAREA_GRD_BO_07(); + + } // end TC_GEONW_PON_GAC_NONAREA_GRD_BO_07 - /** - * @desc Check that a received GBC packet is triggering contention if received more than 1 times when IUT - * is inside the destination area and outside the sectorial area of the GBC packet Sender (Dist_R > Dist_F) - *
-            * Pics Selection: PICS_GN_GBC_FWD AND PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == 'ADVANCED'
-            * Config Id: CF07
-            * 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 a GBC packet GBC1 from ItsNodeB
-            *          containing TrafficClass.SCF set to 1
-            *          containing GBC Extended Header
-            *              containing DestinationArea
-            *                  indicating AREA1
-            *      the IUT having saved packet into the CBF buffer
-            *  }
-            * Expected behaviour:
-            *  ensure that {
-            *      when {
-            *          the IUT receives the same GBC packet GBC1 from ItsNodeD
-            *          the IUT is outside the sectorial area of ItsNodeB
-            *      }
-            *      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
-            *      }
-            *  }
-            *
-            * Note: In this configuration IUT is outside sectorial area of ItsNodeB because of dist_R > dist_F
-            * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BAA/BV-11 - * @reference EN 302 636-4-1 [1], Annex E.4 - */ - testcase TC_GEONW_PON_BAA_BV_11() runs on ItsMtc system ItsGeoNetworkingSystem { + } // end gacNonAreaGreedyForwarding + + 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
+					*   the IUT having received Beacon information from ItsNodeD and
+					*   the IUT having received Beacon information from ItsNodeB
+					*  }
+					* 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 {
+					*       the IUT broadcasts immediately the GAC packet 
+					*   }
+					*  }
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-01 + * @reference EN 302 636-4-1 [1], clauses 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 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
+                    *   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 {
+					*       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 {
+					*       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.3.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-02 + * @reference EN 302 636-4-1 [1], clauses 10.3.12.2, Annex E3 + */ + testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GAC_NONAREA_CBF_BV_02(); + + } // end 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
+                    *   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 GAC packet addressed to ItsNodeA from ItsNodeC
+                    *       containing TrafficClass.SCF set to 1
+                    *       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 {
+					*       the IUT receives the same GAC packet from ItsNodeB
+                    *           before expiration of the CBF timer
+					*   }
+					*   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.3.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-07 + * @reference EN 302 636-4-1 [1], clauses 10.3.12.3, Annex E3 + */ + testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GAC_NONAREA_CBF_BV_07(); + + } // end 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
+                    *   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 {
+					*       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 {
+					*       the IUT re-broadcasts the received GAC packet
+                    *           upon expiry of itsGnCbfMinTime delay
+					*   }
+					*  }
+					*  
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-20 + * @reference EN 302 636-4-1 [1], clauses 10.3.12.3, Annex E3 + */ + testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_20() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GAC_NONAREA_CBF_BV_20(); + + } // end 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
+                    *   the IUT not having received any message from ItsNodeD
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*   when {
+					*       the IUT receives a GAC packet generated by ItsNodeC from ItsNodeD
+                    *           containing TrafficClass.SCF set to 1
+                    *           containing GAC Extended Header
+                    *               containing DestinationArea
+                    *                   indicating AREA2
+					*   }
+					*   then {
+					*       the IUT re-broadcasts the GAC packet
+					*           upon expiry of CBF_MAX
+					*   }
+					*  }
+					*  
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-21 + * @reference EN 302 636-4-1 [1], Annex E3 + */ + testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_21() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GAC_NONAREA_CBF_BV_21(); + + } // end 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
+                    *       containing Beacon ExtendedHeader 
+                    *           containing SOPV field
+                    *               containing PAI
+                    *                   set to ‘0’
+					*  }
+					* Expected behaviour:
+					*  ensure that {
+					*   when {
+					*       the IUT receives a GAC packet generated by ItsNodeC from ItsNodeD
+					*           containing TrafficClass.SCF set to 1
+					*           containing GAC Extended Header
+					*               containing DestinationArea
+					*                   indicating AREA2
+					*   }
+					*   then {
+					*       the IUT re-broadcasts the GAC packet
+					*           upon expiry of CBF_MAX
+					*   }
+					*  }
+					*  
+					* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/NONAREA/CBF/BV-22 + * @reference EN 302 636-4-1 [1], Annex E3 + */ + testcase TC_GEONW_PON_GAC_NONAREA_CBF_BV_22() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GAC_NONAREA_CBF_BV_22(); + + } // end TC_GEONW_PON_GAC_NONAREA_CBF_BV_22 - f_GEONW_PON_BAA_BV_11(); + } // end gacNonAreaContentionBasedForwarding + + } // end gacNonAreaForwarding + + group gacAreaForwarding { + + /** + * @desc Check that GAC request over upper Gn SAP triggers broadcasting of a GAC packet if the IUT is within the Destination Area + *
+				* Pics Selection: PICS_GN_GAC_SRC
+				* 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 is requested to send a GAC packet
+				*              containing TrafficClass.SCF set to 1
+				*              containing DestinationArea
+				*                  indicating AREA1
+				*      }
+				*      then {
+				*          the IUT broadcasts immediately the GAC packet
+				*              containing DestinationArea
+				*                  indicating AREA1
+				*      }
+				*  }
+				* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/AREA/ALL/BV-01 + * @reference EN 302 636-4-1 [1], clauses 10.3.12.2 + */ + testcase TC_GEONW_PON_GAC_AREA_ALL_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GAC_AREA_ALL_BV_01(); + + } // end TC_GEONW_PON_GAC_AREA_ALL_BV_01 + + /** + * @desc Check that a received GAC packet is not triggering forwarding or re-broadcasting if the IUT + * is within the Destination Area + *
+				* Pics Selection: PICS_GN_GAC_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 {
+				*          the IUT receives a GAC packet
+				*              containing TrafficClass.SCF set to 1
+				*              containing DestinationArea
+				*                  indicating AREA1
+				*      }
+				*      then {
+				*          IUT does not retransmit the received GAC packet
+				*      }
+				*  }
+				* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/AREA/ALL/BV-02 + * @reference EN 302 636-4-1 [1], clauses 10.3.12.3 + */ + testcase TC_GEONW_PON_GAC_AREA_ALL_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GAC_AREA_ALL_BV_02(); - } // end TC_GEONW_PON_BAA_BV_11 + } // end TC_GEONW_PON_GAC_AREA_ALL_BV_02 + + /** + * @desc Check that a received GAC packet is passed over the Gn SAP to the correct upper + * protocol if it is received for the first time within the GAC destination area + *
+				* Pics Selection: PICS_GN_GAC_DST
+				* Config Id: CF01
+				* Initial conditions:
+				*  with {
+				*      the IUT being in the "initial state"
+				*  }
+				* Expected behaviour:
+				*  ensure that {
+				*      when {
+				*          the IUT receives a GAC packet from ItsNodeB
+				*              containing TrafficClass.SCF set to 1
+				*              containing DestinationArea
+				*                  indicating AREA1
+				*      }
+				*      then {
+				*          the IUT passes the received GAC packet to the correct Upper Layer protocol
+				*      }
+				*  }
+				* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/AREA/ALL/BV-05 + * @reference EN 302 636-4-1 [1], clauses 10.3.12.3 + */ + testcase TC_GEONW_PON_GAC_AREA_ALL_BV_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_GAC_AREA_ALL_BV_05(); + + } // end TC_GEONW_PON_GAC_AREA_ALL_BV_05 + + /** + * @desc Check that a received GAC packet is not passed over the Gn SAP if it is received for + * the second or more time + *
+				* Pics Selection: PICS_GN_GAC_DST
+				* Config Id: CF02
+				* Initial conditions:
+				*  with {
+				*      the IUT being in the "initial state" and
+				*      the IUT having received a GAC packet from ItsNodeD
+				*          containing TrafficClass.SCF set to 1
+				*          containing Basic Header
+				*              containing RHL field
+				*                  indicating HL1
+				*          containing GAC Extended Header
+				*              containing SN field
+				*                  indicating value SN1 and
+				*              containing DestinationArea
+				*                  indicating AREA1 and
+				*      the IUT having passed the received GAC packet to the correct Upper Layer protocol
+				*  }
+				* Expected behaviour:
+				*  ensure that {
+				*      when {
+				*          the IUT receives the same GAC packet from ItsNodeB
+				*              containing Basic Header
+				*                  containing RHL field
+				*                      indicating value lower than HL1
+				*              containing GAC Extended Header
+				*                  containing SN field
+				*                      indicating value SN1
+				*      }
+				*      then {
+				*          the IUT does not pass the received GAC packet to any Upper Layer protocol
+				*      }
+				*  }
+				* 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/AREA/ALL/BO-08 + * @reference EN 302 636-4-1 [1], clauses 10.3.12.3 + */ + testcase TC_GEONW_PON_GAC_AREA_ALL_BO_08() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_GAC_AREA_ALL_BO_08(); + + } // end TC_GEONW_PON_GAC_AREA_ALL_BO_08 + + } // end gacAreaForwarding - } // end geoGeoBroadcastCbfAlgorithm + } // end geoGeoAnycast } // end geoProtocolOperation diff --git a/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestControl.ttcn b/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestControl.ttcn index cf176f62b..7921d3d37 100644 --- a/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestControl.ttcn +++ b/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestControl.ttcn @@ -263,169 +263,219 @@ module ItsGeoNetworking_TestControl { execute(TC_GEONW_PON_BEA_TI_02()); } - /* PON/GUC */ - - if(PICS_GN_GUC_SRC) { - if ((PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == e_greedy) or (PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == e_unspecified)) { - execute(TC_GEONW_PON_GUC_BV_01()); - } - - if (PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == e_cbf) { - execute(TC_GEONW_PON_GUC_BV_11()); - } - } - - if(PICS_GN_GUC_FWD) { - if ((PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == e_greedy) or (PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == e_unspecified)) { - execute(TC_GEONW_PON_GUC_BV_02()); - } - - execute(TC_GEONW_PON_GUC_BV_03()); - execute(TC_GEONW_PON_GUC_BO_04()); + /* 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_DST) { + execute(TC_GEONW_PON_GUC_ALL_BV_05()); + execute(TC_GEONW_PON_GUC_ALL_BO_08()); + } - if (PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == e_cbf) { - execute(TC_GEONW_PON_GUC_BV_06()); - execute(TC_GEONW_PON_GUC_BV_07()); - execute(TC_GEONW_PON_GUC_BV_08()); - execute(TC_GEONW_PON_GUC_BV_10()); + 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_FWD) { + execute(TC_GEONW_PON_GUC_GRD_BV_02()); + execute(TC_GEONW_PON_GUC_GRD_BO_07()); + } } - - if ((PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == e_greedy) or (PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == e_unspecified)) { - execute(TC_GEONW_PON_GUC_BO_12()); - } - } - - if(PICS_GN_GUC_DST) { - execute(TC_GEONW_PON_GUC_BV_05()); - - if ((PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == e_greedy) or (PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == e_unspecified)) { - execute(TC_GEONW_PON_GUC_BO_13()); - } - } - - /* PON/GBC */ - - if(PICS_GN_GBC_SRC) { - execute(TC_GEONW_PON_GBC_BV_01()); - if ((PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_simple) or (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_unspecified) or (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_advanced)) { - execute(TC_GEONW_PON_GBC_BV_02()); - } - if ((PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_simple) or (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_unspecified)) { - execute(TC_GEONW_PON_GBC_BV_03()); - } - if (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_cbf) { - execute(TC_GEONW_PON_GBC_BV_12()); - } - } - - if(PICS_GN_GBC_FWD) { - if ((PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_simple) or (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_unspecified)) { - execute(TC_GEONW_PON_GBC_BO_04()); - } - execute(TC_GEONW_PON_GBC_BV_05()); - if ((PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_simple) or (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_unspecified)) { - execute(TC_GEONW_PON_GBC_BO_06()); + + 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_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()); + } } - execute(TC_GEONW_PON_GBC_BV_07()); - execute(TC_GEONW_PON_GBC_BV_08()); - execute(TC_GEONW_PON_GBC_BV_11()); - execute(TC_GEONW_PON_GBC_BO_19()); - execute(TC_GEONW_PON_GBC_BV_20()); - execute(TC_GEONW_PON_GBC_BV_21()); - } - - if(PICS_GN_GBC_DST) { - execute(TC_GEONW_PON_GBC_BV_09()); - if ((PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_simple) or (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_unspecified)) { - execute(TC_GEONW_PON_GBC_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_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_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()); + } + } + } /* 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_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_BO_03()); - execute(TC_GEONW_PON_TSB_BV_04()); - execute(TC_GEONW_PON_TSB_BO_05()); - } - if(PICS_GN_TSB_DST) { - execute(TC_GEONW_PON_TSB_BV_06()); - execute(TC_GEONW_PON_TSB_BO_07()); - } /* PON/SHB */ - - if(PICS_GN_SHB_SRC) { - execute(TC_GEONW_PON_SHB_BV_01()); - } - if(PICS_GN_SHB_DST) { - execute(TC_GEONW_PON_SHB_BV_02()); - } + 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()); + } + } + /* PON/GAC */ - - if(PICS_GN_GAC_SRC) { - execute(TC_GEONW_PON_GAC_BV_01()); - if ((PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_simple) or (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_unspecified)) { - execute(TC_GEONW_PON_GAC_BV_02()); - } - if (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_cbf) { - execute(TC_GEONW_PON_GAC_BV_13()); - } - } - - if(PICS_GN_GAC_FWD) { - execute(TC_GEONW_PON_GAC_BV_03()); - execute(TC_GEONW_PON_GAC_BV_04()); - execute(TC_GEONW_PON_GAC_BO_05()); - execute(TC_GEONW_PON_GAC_BV_06()); - execute(TC_GEONW_PON_GAC_BO_07()); - execute(TC_GEONW_PON_GAC_BO_11()); - } - - if(PICS_GN_GAC_DST) { - execute(TC_GEONW_PON_GAC_BV_08()); - execute(TC_GEONW_PON_GAC_BO_09()); - execute(TC_GEONW_PON_GAC_BV_10()); - } - - /* PON/BCA */ - - if(PICS_GN_GBC_FWD) { - if (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_cbf) { - execute(TC_GEONW_PON_BCA_BV_01()); - execute(TC_GEONW_PON_BCA_BV_02()); - execute(TC_GEONW_PON_BCA_BV_03()); - execute(TC_GEONW_PON_BCA_BO_04()); - execute(TC_GEONW_PON_BCA_BV_05()); - execute(TC_GEONW_PON_BCA_BV_06()); - execute(TC_GEONW_PON_BCA_BV_07()); - execute(TC_GEONW_PON_BCA_BV_08()); - } - } - - /* PON/BAA */ - - if(PICS_GN_GBC_FWD) { - if (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_advanced) { - execute(TC_GEONW_PON_BAA_BV_01()); - execute(TC_GEONW_PON_BAA_BV_02()); - execute(TC_GEONW_PON_BAA_BV_03()); - execute(TC_GEONW_PON_BAA_BV_04()); - execute(TC_GEONW_PON_BAA_BV_05()); - execute(TC_GEONW_PON_BAA_BV_06()); - execute(TC_GEONW_PON_BAA_BV_07()); - execute(TC_GEONW_PON_BAA_BO_08()); - execute(TC_GEONW_PON_BAA_BV_09()); - execute(TC_GEONW_PON_BAA_BV_10()); - execute(TC_GEONW_PON_BAA_BV_11()); - } - } + 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_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_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()); + } + } /* CAP */ diff --git a/ttcn/AtsGeoNetworking/ItsGeoNetworking_TpFunctions.ttcn b/ttcn/AtsGeoNetworking/ItsGeoNetworking_TpFunctions.ttcn index 5f1b39483..f2b388117 100644 --- a/ttcn/AtsGeoNetworking/ItsGeoNetworking_TpFunctions.ttcn +++ b/ttcn/AtsGeoNetworking/ItsGeoNetworking_TpFunctions.ttcn @@ -6169,7883 +6169,7042 @@ module ItsGeoNetworking_TpFunctions { // 6.2.2.8 group geoGeoUnicast { - /** - * @desc TP Function for TC_GEONW_PON_GUC_BV_01 - */ - function f_GEONW_PON_GUC_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_getGeoUnicastForwardingAlgorithm() != e_greedy) and (f_getGeoUnicastForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_GEOUNICAST_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)), - ? + 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 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 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() ) - ) { - 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( - ?, + + // Postamble + f_poNeighbour(); + + } // end 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 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 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_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 f_GEONW_PON_GUC_BV_01 - - group GEONW_PON_GUC_BV_02 { + ); + + 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 f_GEONW_PON_GUC_ALL_BO_04_nodeC + + } // end GEONW_PON_GUC_ALL_BO_04 /** - * @desc TP Function for TC_GEONW_PON_GUC_BV_02 + * @desc TP Function for TC_GEONW_PON_GUC_ALL_BV_05 */ - function f_GEONW_PON_GUC_BV_02() runs on ItsMtc { + function f_GEONW_PON_GUC_ALL_BV_05() runs on ItsGeoNetworking { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; + var template (value) GeoNetworkingPdu v_gnPacket; + var integer i; + var GnRawPayload v_sentRawPayload; // Test control - if (not PICS_GN_GUC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if ((f_getGeoUnicastForwardingAlgorithm() != e_greedy) and (f_getGeoUnicastForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == (e_greedy or e_unspecified) required for executing the TC ***"); + if (not PICS_GN_GUC_DST) { + log("*** " & testcasename() & ": PICS_GN_GUC_DST 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_BV_02_nodeB()); - v_nodeC.start(f_GEONW_PON_GUC_BV_02_nodeC()); - v_nodeD.start(f_GEONW_PON_GUC_BV_02_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_GUC_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_BV_02) - */ - function f_GEONW_PON_GUC_BV_02_nodeB() runs on ItsGeoNetworking { + f_cf01Up(); - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + // Test adapter configuration // Preamble - f_prNeighbour(); + f_prDefault(); 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); - } + 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); + + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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_poDefault(); + f_cf01Down(); - } // end f_GEONW_PON_GUC_BV_02_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_BV_02) - */ - function f_GEONW_PON_GUC_BV_02_nodeC() runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } // end 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; + var GnRawPayload v_sentRawPayload; + + // 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 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 f_GEONW_PON_GUC_ALL_BO_08 - // 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 + /** + * @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 ), -, - f_getIutMacAddress() - ) - ); - - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BV_02_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GUC_BV_02) - */ - function f_GEONW_PON_GUC_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); + c_defaultHopLimit - 1 + ); + var GnRawPayload v_sentRawPayload; + + // Preamble + f_prNeighbour(); + f_sleep(PX_TAC); + v_sentRawPayload := f_adaptPayloadForUtInd_m(valueof(v_gnPacket.gnPacket.packet.payload)); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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 f_GEONW_PON_GUC_ALL_BO_08_nodeB - // Postamble - f_poNeighbour(); + /** + * @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 f_GEONW_PON_GUC_ALL_BO_08_nodeC - } // end f_GEONW_PON_GUC_BV_02_nodeD - - } // end GEONW_PON_GUC_BV_02 + } // end GEONW_PON_GUC_ALL_BO_08 - group GEONW_PON_GUC_BV_03 { - + } // end gucAllForwardingAlgorithm + + group gucGreedyForwarding { + /** - * @desc TP Function for TC_GEONW_PON_GUC_BV_03 + * @desc TP Function for TC_GEONW_PON_GUC_GRD_BV_01 */ - function f_GEONW_PON_GUC_BV_03() runs on ItsMtc { + function f_GEONW_PON_GUC_GRD_BV_01() runs on ItsGeoNetworking { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; + var LongPosVector v_longPosVectorNodeB; // Test control - if (not PICS_GN_GUC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); + 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_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_GUC_BV_03_nodeB()); - v_nodeC.start(f_GEONW_PON_GUC_BV_03_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end f_GEONW_PON_GUC_BV_03 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_BV_03) - */ - function f_GEONW_PON_GUC_BV_03_nodeB() runs on ItsGeoNetworking { + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + // Test adapter configuration // 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 + 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_geoNwUnicastPacketWithHl( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ?, - c_defaultHopLimit - ), - -, - c_defaultHopLimit - 1 + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), + ? + ) + ) ) - ) - ) { + ) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); + log("*** " & testcasename() & ": DEPV of the received GUC message correctly set ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - ?, - ? + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + ?, + ? + ) ) ) - ) - ) { + ) { tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Fields not correctly updated ***"); + log("*** " & testcasename() & ": DEPV of the received GUC message incorrectly set ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + log("*** " & testcasename() & ": Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); } } // Postamble f_poNeighbour(); + f_cf01Down(); - } // end f_GEONW_PON_GUC_BV_03_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_BV_03) - */ - function f_GEONW_PON_GUC_BV_03_nodeC() runs on ItsGeoNetworking { + } // end f_GEONW_PON_GUC_GRD_BV_01 + + group GEONW_PON_GUC_GRD_BV_02 { - // Local variables - var LongPosVector v_obsoleteLongPosVectorNodeA := f_getPosition(c_compNodeA); + /** + * @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 f_GEONW_PON_GUC_GRD_BV_02 - // Preamble - f_prNeighbour(); - v_obsoleteLongPosVectorNodeA.timestamp_ := v_obsoleteLongPosVectorNodeA.timestamp_ - 1000; - v_obsoleteLongPosVectorNodeA.latitude := v_obsoleteLongPosVectorNodeA.latitude - 1; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + /** + * @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 f_GEONW_PON_GUC_GRD_BV_02_nodeB - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(v_obsoleteLongPosVectorNodeA), - vc_localSeqNumber, + /** + * @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 ), -, - c_defaultHopLimit - ), - -, - f_getIutMacAddress() - ) - ); - - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); + f_getIutMacAddress() + ) + ); + + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_GUC_GRD_BV_02_nodeC - } // end f_GEONW_PON_GUC_BV_03_nodeC - - } // end GEONW_PON_GUC_BV_03 - - group GEONW_PON_GUC_BO_04 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_BO_04 - */ - function f_GEONW_PON_GUC_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_BO_04_nodeB()); - v_nodeC.start(f_GEONW_PON_GUC_BO_04_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end f_GEONW_PON_GUC_BO_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_BO_04) - */ - function f_GEONW_PON_GUC_BO_04_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + /** + * @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 f_GEONW_PON_GUC_GRD_BV_02_nodeD - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } // end GEONW_PON_GUC_GRD_BV_02 + + group GEONW_PON_GUC_GRD_BO_07 { - // 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: Forwarded GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + /** + * @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; } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + 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; } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BO_04_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_BO_04) - */ - function f_GEONW_PON_GUC_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 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 f_GEONW_PON_GUC_GRD_BO_07 - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - vc_localSeqNumber + /** + * @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 ), -, - 1 - ), - -, - f_getIutMacAddress() - ) - ); - - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BO_04_nodeC - - } // end GEONW_PON_GUC_BO_04 - - /** - * @desc TP Function for TC_GEONW_PON_GUC_BV_05 - */ - function f_GEONW_PON_GUC_BV_05() runs on ItsGeoNetworking { - - // Local variables - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - var GnRawPayload v_sentRawPayload; - - // 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); - - v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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 f_GEONW_PON_GUC_BV_05 - - group GEONW_PON_GUC_BV_06 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_BV_06 - */ - function f_GEONW_PON_GUC_BV_06() 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_getGeoUnicastForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_GEOUNICAST_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_BV_06_nodeB(v_distance, v_longPosVectorNodeA)); - v_nodeC.start(f_GEONW_PON_GUC_BV_06_nodeC(v_longPosVectorNodeA)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_msgSent, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end f_GEONW_PON_GUC_BV_06 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_BV_06) - * @param p_distanceToNodeA Distance between IUT and NodeA - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_BV_06_nodeB(in float p_distanceToNodeA, in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables - timer t_toCbf := (int2float(f_getGeoUnicastCbfMaxTime()) - + ( - int2float(f_getGeoUnicastCbfMinTime() - f_getGeoUnicastCbfMaxTime()) - / int2float(f_getCbfMaxCommunicationRange()) - ) * p_distanceToNodeA) * 0.95 / 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)), - ? + f_getIutMacAddress() + ) + ); + + tc_noac.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 ***"); + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: Duplicate GUC was forwarded ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } - else { - log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: Duplicate GUC not forwarded ***"); + 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 f_GEONW_PON_GUC_GRD_BO_07_nodeB - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BV_06_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_BV_06) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_BV_06_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 + /** + * @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 ), -, - 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)), - ? + 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_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); + ) { + 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 f_GEONW_PON_GUC_BV_06_nodeC - - } // end GEONW_PON_GUC_BV_06 - - group GEONW_PON_GUC_BV_07 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_BV_07 - */ - function f_GEONW_PON_GUC_BV_07() 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_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_getGeoUnicastForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_GEOUNICAST_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_BV_07_nodeB(v_longPosVectorNodeA)); - v_nodeC.start(f_GEONW_PON_GUC_BV_07_nodeC(v_longPosVectorNodeA)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_msgSent, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end f_GEONW_PON_GUC_BV_07 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_BV_07) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_BV_07_nodeB(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables - timer t_toCbf := int2float(f_getGeoUnicastCbfMinTime()) / 1000.0; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_GUC_GRD_BO_07_nodeC - // Test Body - log("*** " & testcasename() & ": INFO: Message sent ***"); - f_selfOrClientSyncAndVerdict(c_msgSent, e_success); + } // 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 f_GEONW_PON_GUC_CBF_BV_01 - tc_ac.start; - t_toCbf.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? + /** + * @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; - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: IUT re-broadcasted the packet too early ***"); + ) { + 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); } - else { - log("*** " & testcasename() & ": PASS: Forwarded GUC received ***"); + } + + // Postamble + f_poNeighbour(); + + } // end 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); + } } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: Ready for receiving re-broadcasting ***"); - repeat; + + // Postamble + f_poNeighbour(); + + } // end 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; } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + // 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 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) * 0.95 / 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 f_GEONW_PON_GUC_BV_07_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_BV_07) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_BV_07_nodeC(LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_GUC_CBF_BV_02_nodeB - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(p_longPosVectorNodeA), - vc_localSeqNumber + /** + * @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 ), -, - 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)), - ? + 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: 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); + ) { + 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 f_GEONW_PON_GUC_BV_07_nodeC - - } // end GEONW_PON_GUC_BV_07 - - group GEONW_PON_GUC_BV_08 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_BV_08 - */ - function f_GEONW_PON_GUC_BV_08() 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_getGeoUnicastForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_GEOUNICAST_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_BV_08_nodeB(v_longPosVectorNodeA)); - v_nodeC.start(f_GEONW_PON_GUC_BV_08_nodeC(v_longPosVectorNodeA)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end f_GEONW_PON_GUC_BV_08 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_BV_08) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_BV_08_nodeB(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_GUC_CBF_BV_02_nodeC - // Test Body - f_sleepIgnoreDef(int2float(f_getGeoUnicastCbfMaxTime())/2000.0); + } // 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 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 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 f_GEONW_PON_GUC_CBF_BV_07_nodeC + + } // end GEONW_PON_GUC_CBF_BV_07 + + group GEONW_PON_GUC_CBF_BV_20 { - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(p_longPosVectorNodeA), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - 1 - ), - -, - f_getIutMacAddress() - ) - ); + /** + * @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 f_GEONW_PON_GUC_CBF_BV_20 - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? + /** + * @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_noac.stop; - log("*** " & testcasename() & ": FAIL: Forwarded GUC received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + ) { + 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); + } } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BV_08_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_BV_08) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_BV_08_nodeC(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_GUC_CBF_BV_20_nodeB - // 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 + /** + * @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 ), -, - c_defaultHopLimit - ), - -, - f_getIutMacAddress() - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? + 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() & ": 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); + ) { + 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(); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_GUC_CBF_BV_20_nodeC - } // end f_GEONW_PON_GUC_BV_08_nodeC - - } // end GEONW_PON_GUC_BV_08 - - group GEONW_PON_GUC_BV_10 { + } // end GEONW_PON_GUC_CBF_BV_20 - /** - * @desc TP Function for TC_GEONW_PON_GUC_BV_10 - */ - function f_GEONW_PON_GUC_BV_10() runs on ItsMtc { + group GEONW_PON_GUC_CBF_BV_21 { - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var float v_distance := int2float(f_getCbfMaxCommunicationRange() - 10); - var LongPosVector v_longPosVectorIut, v_longPosVectorNodeA; + /** + * @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_nodeC.start(f_GEONW_PON_GUC_CBF_BV_21_nodeD(v_longPosVectorNodeA)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // end f_GEONW_PON_GUC_CBF_BV_21 - // Test control - if (not PICS_GN_GUC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getGeoUnicastForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } + /** + * @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 f_GEONW_PON_GUC_CBF_BV_21_nodeB - // 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_BV_10_nodeB(v_longPosVectorNodeA)); - v_nodeC.start(f_GEONW_PON_GUC_BV_10_nodeC(v_longPosVectorNodeA)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end f_GEONW_PON_GUC_BV_10 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_BV_10) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_BV_10_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_getGeoUnicastCbfMaxTime())/2000.0); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? + /** + * @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.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); + } } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); + // Postamble + f_poNeighbour(); + + } // end 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()) * 0.95 / 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 f_GEONW_PON_GUC_CBF_BV_21_nodeD - } // end f_GEONW_PON_GUC_BV_10_nodeB + } // end GEONW_PON_GUC_CBF_BV_21 - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_BV_10) - * @param p_longPosVectorNodeA Position vector of NodeA - */ - function f_GEONW_PON_GUC_BV_10_nodeC(in LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Local variables + group GEONW_PON_GUC_CBF_BV_22 { - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + /** + * @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_nodeC.start(f_GEONW_PON_GUC_CBF_BV_22_nodeD(v_longPosVectorNodeA)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // end f_GEONW_PON_GUC_CBF_BV_22 - // 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() - ) - ); + /** + * @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 f_GEONW_PON_GUC_CBF_BV_22_nodeB - f_sleepIgnoreDef(int2float(f_getGeoUnicastCbfMaxTime())/2000.0); + /** + * @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 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()) * 0.95 / 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 f_GEONW_PON_GUC_CBF_BV_22_nodeD - 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); + } // 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 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 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 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 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 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 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; + var GnRawPayload v_sentRawPayload; + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GUC was not forwarded ***"); + + // 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); } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BV_10_nodeC - - } // end GEONW_PON_GUC_BV_10 + else { + log("*** " & testcasename() & ": PASS: GN was NOT transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_GBC_NONAREA_ALL_BV_06 - group GEONW_PON_GUC_BV_11 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_BV_11 - */ - function f_GEONW_PON_GUC_BV_11() 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_getGeoUnicastForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_GEOUNICAST_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_BV_11_nodeB()); - v_nodeC.start(f_GEONW_PON_GUC_BV_11_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end f_GEONW_PON_GUC_BV_11 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_BV_11) - */ - function f_GEONW_PON_GUC_BV_11_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)), - ? + 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 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 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) + ) ) ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GUC received ***"); + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body 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 f_GEONW_PON_GUC_BV_11_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_BV_11) - */ - function f_GEONW_PON_GUC_BV_11_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)), - ? + + // Postamble + f_poNeighbour(); + + } // end 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 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 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 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 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_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 f_GEONW_PON_GUC_BV_11_nodeC - - } // end GEONW_PON_GUC_BV_11 + ); + + 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 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 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 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 f_GEONW_PON_GBC_NONAREA_GRD_BV_01_nodeD + + } // end GEONW_PON_GBC_NONAREA_GRD_BV_01 - group GEONW_PON_GUC_BO_12 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_BO_12 - */ - function f_GEONW_PON_GUC_BO_12() 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_getGeoUnicastForwardingAlgorithm() != e_greedy) and (f_getGeoUnicastForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_GEOUNICAST_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_BO_12_nodeB()); - v_nodeC.start(f_GEONW_PON_GUC_BO_12_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end f_GEONW_PON_GUC_BO_12 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_BO_12) - */ - function f_GEONW_PON_GUC_BO_12_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)), - ? + 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 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 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) + ) ) ) - ) - ) { - 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)), - ? + ); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end 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 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 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 template (present) GeoNetworkingInd v_msgInd; + + // 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.msgIn.basicHeader.routerHopLimit := ?; + tc_noac.start; + alt { + [] geoNetworkingPort.receive(v_msgInd) { + 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 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 ) ) - ) - ) { - 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 f_GEONW_PON_GUC_BO_12_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_BO_12) - */ - function f_GEONW_PON_GUC_BO_12_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)), - ? + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end 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.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 f_GEONW_PON_GUC_BO_12_nodeC - - } // end GEONW_PON_GUC_BO_12 - - group GEONW_PON_GUC_BO_13 { - - /** - * @desc TP Function for TC_GEONW_PON_GUC_BO_13 - */ - function f_GEONW_PON_GUC_BO_13() 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; - } - if ((f_getGeoUnicastForwardingAlgorithm() != e_greedy) and (f_getGeoUnicastForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == (e_greedy or e_unspecified) 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_BO_13_nodeB()); - v_nodeC.start(f_GEONW_PON_GUC_BO_13_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end f_GEONW_PON_GUC_BV_13 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_BO_13) - */ - function f_GEONW_PON_GUC_BO_13_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 - ); - var GnRawPayload v_sentRawPayload; - - // Preamble - f_prNeighbour(); - f_sleep(PX_TAC); - v_sentRawPayload := f_adaptPayloadForUtInd_m(valueof(v_gnPacket.gnPacket.packet.payload)); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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 f_GEONW_PON_GUC_BO_13_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_BO_13) - */ - function f_GEONW_PON_GUC_BO_13_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 f_GEONW_PON_GUC_BO_13_nodeC - - } // end GEONW_PON_GUC_BO_13 + ); + + 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 f_GEONW_PON_GBC_NONAREA_GRD_BO_07_nodeD - } // end geoGeoUnicast - - // 6.2.2.9 - group geoGeoBroadcast { + } // end GEONW_PON_GBC_NONAREA_GRD_BO_07 - group GEONW_PON_GBC_BV_01 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_BV_01 - */ - function f_GEONW_PON_GBC_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_BV_01_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_BV_01_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_GBC_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_01) - */ - function f_GEONW_PON_GBC_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 f_GEONW_PON_GBC_BV_01_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_01) - */ - function f_GEONW_PON_GBC_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 f_GEONW_PON_GBC_BV_01_nodeD - - } // end GEONW_PON_GBC_BV_01 - - group GEONW_PON_GBC_BV_02 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_BV_02 - */ - function f_GEONW_PON_GBC_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_getGeoBroadcastForwardingAlgorithm() != e_simple) and (f_getGeoBroadcastForwardingAlgorithm() != e_unspecified) and (f_getGeoBroadcastForwardingAlgorithm() != e_advanced)) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_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_BV_02_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_BV_02_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_GBC_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_02) - */ - function f_GEONW_PON_GBC_BV_02_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 f_GEONW_PON_GBC_BV_02_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_02) - */ - function f_GEONW_PON_GBC_BV_02_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 f_GEONW_PON_GBC_BV_02_nodeD - - } // end GEONW_PON_GBC_BV_02 - - group GEONW_PON_GBC_BV_03 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_BV_03 - */ - function f_GEONW_PON_GBC_BV_03() 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_getGeoBroadcastForwardingAlgorithm() != e_simple) and (f_getGeoBroadcastForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_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_BV_03_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_BV_03_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_GBC_BV_03 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_03) - */ - function f_GEONW_PON_GBC_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) - ) - ) - ) - ); - - 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 f_GEONW_PON_GBC_BV_03_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_03) - */ - function f_GEONW_PON_GBC_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 { - [] 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 f_GEONW_PON_GBC_BV_03_nodeD - - } // end GEONW_PON_GBC_BV_03 - - group GEONW_PON_GBC_BO_04 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_BO_04 - */ - function f_GEONW_PON_GBC_BO_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; - } - if ((f_getGeoBroadcastForwardingAlgorithm() != e_simple) and (f_getGeoBroadcastForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_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_BO_04_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_BO_04_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_GBC_BO_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BO_04) - */ - function f_GEONW_PON_GBC_BO_04_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 f_GEONW_PON_GBC_BO_04_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BO_04) - */ - function f_GEONW_PON_GBC_BO_04_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var template (present) 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))); - - v_msgInd.msgIn.basicHeader.routerHopLimit := ?; - 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 f_GEONW_PON_GBC_BO_04_nodeD - - } // end GEONW_PON_GBC_BO_04 - - group GEONW_PON_GBC_BV_05 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_BV_05 - */ - function f_GEONW_PON_GBC_BV_05() 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; - } - - // 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_BV_05_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_BV_05_nodeC()); - v_nodeD.start(f_GEONW_PON_GBC_BV_05_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_GBC_BV_05 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_05) - */ - function f_GEONW_PON_GBC_BV_05_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 f_GEONW_PON_GBC_BV_05_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_BV_05) - */ - function f_GEONW_PON_GBC_BV_05_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 f_GEONW_PON_GBC_BV_05_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_05) - */ - function f_GEONW_PON_GBC_BV_05_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 f_GEONW_PON_GBC_BV_05_nodeD - - } // end GEONW_PON_GBC_BV_05 - - group GEONW_PON_GBC_BO_06 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_BO_06 - */ - function f_GEONW_PON_GBC_BO_06() 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_getGeoBroadcastForwardingAlgorithm() != e_simple) and (f_getGeoBroadcastForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == ( e_simple 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_BO_06_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_BO_06_nodeC(v_sequenceNumber)); - v_nodeD.start(f_GEONW_PON_GBC_BO_06_nodeD(v_sequenceNumber)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_GBC_BO_06 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BO_06) - */ - function f_GEONW_PON_GBC_BO_06_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var template (present) GeoNetworkingInd v_msgInd; - - // 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.msgIn.basicHeader.routerHopLimit := ?; - tc_noac.start; - alt { - [] geoNetworkingPort.receive(v_msgInd) { - 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 f_GEONW_PON_GBC_BO_06_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_BO_06) - */ - function f_GEONW_PON_GBC_BO_06_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 f_GEONW_PON_GBC_BO_06_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BO_06) - */ - function f_GEONW_PON_GBC_BO_06_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 f_GEONW_PON_GBC_BO_06_nodeD - - } // end GEONW_PON_GBC_BO_06 - - group GEONW_PON_GBC_BV_07 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_BV_07 - */ - function f_GEONW_PON_GBC_BV_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; - } - - // 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_BV_07_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_BV_07_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_GBC_BV_07 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_07) - */ - function f_GEONW_PON_GBC_BV_07_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 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 f_GEONW_PON_GBC_BV_07_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_07) - */ - function f_GEONW_PON_GBC_BV_07_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 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 f_GEONW_PON_GBC_BV_07_nodeD - - } // end GEONW_PON_GBC_BV_07 - - group GEONW_PON_GBC_BV_08 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_BV_08 - */ - function f_GEONW_PON_GBC_BV_08() 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_BV_08_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_BV_08_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_GBC_BV_08 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_08) - */ - function f_GEONW_PON_GBC_BV_08_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 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 f_GEONW_PON_GBC_BV_08_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_08) - */ - function f_GEONW_PON_GBC_BV_08_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 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 f_GEONW_PON_GBC_BV_08_nodeD - - } // end GEONW_PON_GBC_BV_08 - - /** - * @desc TP Function for TC_GEONW_PON_GBC_BV_09 - */ - function f_GEONW_PON_GBC_BV_09() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - var GnRawPayload v_sentRawPayload; - - // 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); - - v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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 f_GEONW_PON_GBC_BV_09 - - group GEONW_PON_GBC_BO_10 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_BO_10 - */ - function f_GEONW_PON_GBC_BO_10() 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; - } - if ((f_getGeoBroadcastForwardingAlgorithm() != e_simple) and (f_getGeoBroadcastForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == ( e_simple or e_unspecified ) 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_BO_10_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_BO_10_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_GBC_BO_10 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BO_10) - */ - function f_GEONW_PON_GBC_BO_10_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var template (present) GeoNetworkingPdu v_gnPacket; - var integer i; - var GnRawPayload v_sentRawPayload; - - // 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); - - v_sentRawPayload := f_adaptPayloadForUtInd_m(valueof(v_gnPacket.gnPacket.packet.payload)); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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 f_GEONW_PON_GBC_BO_10_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BO_10) - */ - function f_GEONW_PON_GBC_BO_10_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var template (value) 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 f_GEONW_PON_GBC_BO_10_nodeD - - } // end GEONW_PON_GBC_BO_10 - - /** - * @desc TP Function for TC_GEONW_PON_GBC_BV_11 - */ - function f_GEONW_PON_GBC_BV_11() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - var GnRawPayload v_sentRawPayload; - - // 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 f_GEONW_PON_GBC_BV_11 - - group GEONW_PON_GBC_BV_12 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_BV_12 - */ - function f_GEONW_PON_GBC_BV_12() 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_getGeoBroadcastForwardingAlgorithm() != e_cbf)) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_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_BV_12_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_BV_12_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_GBC_BV_12 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_12) - */ - function f_GEONW_PON_GBC_BV_12_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 f_GEONW_PON_GBC_BV_12_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_12) - */ - function f_GEONW_PON_GBC_BV_12_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 f_GEONW_PON_GBC_BV_12_nodeD - - } // end GEONW_PON_GBC_BV_12 - - group GEONW_PON_GBC_BO_19 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_BO_19 - */ - function f_GEONW_PON_GBC_BO_19() 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_BO_19_nodeB(v_distanceTooBig)); - v_nodeC.start(f_GEONW_PON_GBC_BO_19_nodeC(v_distanceTooBig)); - v_nodeD.start(f_GEONW_PON_GBC_BO_19_nodeD(v_distanceTooBig)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_GBC_BO_19 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BO_19) - */ - function f_GEONW_PON_GBC_BO_19_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 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 f_GEONW_PON_GBC_BO_19_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_BO_19) - */ - function f_GEONW_PON_GBC_BO_19_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 f_GEONW_PON_GBC_BO_19_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BO_19) - */ - function f_GEONW_PON_GBC_BO_19_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 f_GEONW_PON_GBC_BO_19_nodeD - - } // end GEONW_PON_GBC_BO_19 - - group GEONW_PON_GBC_BV_20 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_BV_20 - */ - function f_GEONW_PON_GBC_BV_20() 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; - } - - // 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_BV_20_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_BV_20_nodeC()); - v_nodeD.start(f_GEONW_PON_GBC_BV_20_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_GBC_BV_20 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_20) - */ - function f_GEONW_PON_GBC_BV_20_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 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 f_GEONW_PON_GBC_BV_20_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_BV_20) - */ - function f_GEONW_PON_GBC_BV_20_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_area2) - )))) { - 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 f_GEONW_PON_GBC_BV_20_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_20) - */ - function f_GEONW_PON_GBC_BV_20_nodeD() 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( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2) - ) - ) - ) - ); - 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 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 f_GEONW_PON_GBC_BV_20_nodeD - - } // end GEONW_PON_GBC_BV_20 - - group GEONW_PON_GBC_BV_21 { - - /** - * @desc TP Function for TC_GEONW_PON_GBC_BV_21 - */ - function f_GEONW_PON_GBC_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; - } - - // 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_BV_21_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_BV_21_nodeC()); - v_nodeD.start(f_GEONW_PON_GBC_BV_21_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_GBC_BV_21 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_20) - */ - function f_GEONW_PON_GBC_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 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 f_GEONW_PON_GBC_BV_21_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_BV_21) - */ - function f_GEONW_PON_GBC_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_area2) - )))) { - 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 f_GEONW_PON_GBC_BV_21_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_21) - */ - function f_GEONW_PON_GBC_BV_21_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); - - // 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_area2) - ) - ) - ) - ); - 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 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 f_GEONW_PON_GBC_BV_21_nodeD - - } // end GEONW_PON_GBC_BV_21 - - } // 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 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 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 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 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); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeB - ), - -, - c_defaultHopLimit - ) - ) - ); - - 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 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 f_GEONW_PON_TSB_BV_02_nodeD - - } // end GEONW_PON_TSB_BV_02 - - group GEONW_PON_TSB_BO_03 { - - /** - * @desc TP Function for TC_GEONW_PON_TSB_BO_03 - */ - function f_GEONW_PON_TSB_BO_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_BO_03_nodeB()); - v_nodeD.start(f_GEONW_PON_TSB_BO_03_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_TSB_BO_03 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BO_03) - */ - function f_GEONW_PON_TSB_BO_03_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_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeB - ), - -, - c_defaultHopLimit - ); - - 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 f_GEONW_PON_TSB_BO_03_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BO_03) - */ - function f_GEONW_PON_TSB_BO_03_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var template (value) 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 f_GEONW_PON_TSB_BO_03_nodeD - - } // end GEONW_PON_TSB_BO_03 - - group GEONW_PON_TSB_BV_04 { - - /** - * @desc TP Function for TC_GEONW_PON_TSB_BV_04 - */ - function f_GEONW_PON_TSB_BV_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_BV_04_nodeB()); - v_nodeD.start(f_GEONW_PON_TSB_BV_04_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_TSB_BV_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BV_04) - */ - function f_GEONW_PON_TSB_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_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeB, - c_defaultHopLimit - ), - -, - c_defaultHopLimit - ) - ) - ); - - 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 f_GEONW_PON_TSB_BV_04_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BV_04) - */ - function f_GEONW_PON_TSB_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_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 f_GEONW_PON_TSB_BV_04_nodeD - - } // end GEONW_PON_TSB_BV_04 - - group GEONW_PON_TSB_BO_05 { - - /** - * @desc TP Function for TC_GEONW_PON_TSB_BO_05 - */ - function f_GEONW_PON_TSB_BO_05() 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_05_nodeB()); - v_nodeD.start(f_GEONW_PON_TSB_BO_05_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_TSB_BO_05 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BO_05) - */ - function f_GEONW_PON_TSB_BO_05_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_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeB - ), - -, - 1 - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_TSB_BO_05_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BO_05) - */ - function f_GEONW_PON_TSB_BO_05_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 f_GEONW_PON_TSB_BO_05_nodeD - - } // end GEONW_PON_TSB_BO_05 - - /** - * @desc TP Function for TC_GEONW_PON_TSB_BV_06 - */ - function f_GEONW_PON_TSB_BV_06() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - var GnRawPayload v_sentRawPayload; - - // 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 - ) - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - f_sleep(PX_TAC); - - v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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 f_GEONW_PON_TSB_BV_06 - - group GEONW_PON_TSB_BO_07 { - - /** - * @desc TP Function for TC_GEONW_PON_TSB_BV_06 - */ - 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_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_07_nodeB()); - v_nodeD.start(f_GEONW_PON_TSB_BO_07_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end 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 (value) GeoNetworkingPdu v_gnPacket; - var integer i; - var GnRawPayload v_sentRawPayload; - - // Preamble - f_prNeighbour(); - v_gnPacket := m_geoNwPdu(m_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeB - ), - -, - c_defaultHopLimit - ); - 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); - - v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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); - - v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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 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 template (value) 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 f_GEONW_PON_TSB_BO_07_nodeD - - } // end GEONW_PON_TSB_BO_07 - - } // 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 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 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 f_GEONW_PON_SHB_BV_01_nodeD - - } // end GEONW_PON_SHB_BV_01 - - /** - * @desc TP Function for TC_GEONW_PON_SHB_BV_02 - */ - function f_GEONW_PON_SHB_BV_02() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - var GnRawPayload v_sentRawPayload; - - // 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)); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - f_sleep(PX_TAC); - - v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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 f_GEONW_PON_SHB_BV_02 - - } // end geoSingleHopBroadcast - - // 6.2.2.12 - group geoGeoAnycast { - - group GEONW_PON_GAC_BV_01 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_BV_01 - */ - function f_GEONW_PON_GAC_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_BV_01_nodeB()); - v_nodeD.start(f_GEONW_PON_GAC_BV_01_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_GAC_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_BV_01) - */ - function f_GEONW_PON_GAC_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 f_GEONW_PON_GAC_BV_01_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_BV_01) - */ - function f_GEONW_PON_GAC_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 f_GEONW_PON_GAC_BV_01_nodeD - - } // end GEONW_PON_GAC_BV_01 - - group GEONW_PON_GAC_BV_02 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_BV_02 - */ - function f_GEONW_PON_GAC_BV_02() 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_getGeoBroadcastForwardingAlgorithm() != e_simple) and (f_getGeoBroadcastForwardingAlgorithm() != e_unspecified)) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_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_GAC_BV_02_nodeB()); - v_nodeD.start(f_GEONW_PON_GAC_BV_02_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_GAC_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_BV_02) - */ - function f_GEONW_PON_GAC_BV_02_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 f_GEONW_PON_GAC_BV_02_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_BV_02) - */ - function f_GEONW_PON_GAC_BV_02_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 f_GEONW_PON_GAC_BV_02_nodeD - - } // end GEONW_PON_GAC_BV_02 - - group GEONW_PON_GAC_BV_03 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_BV_03 - */ - function f_GEONW_PON_GAC_BV_03() 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_BV_03_nodeB()); - v_nodeD.start(f_GEONW_PON_GAC_BV_03_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_GAC_BV_03 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_BV_03) - */ - function f_GEONW_PON_GAC_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_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 re-forwarded ***"); - 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 f_GEONW_PON_GAC_BV_03_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_BV_03) - */ - function f_GEONW_PON_GAC_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_noac.start; - alt { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoAnycastArea(c_area1)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC message re-forwarded ***"); - 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 f_GEONW_PON_GAC_BV_03_nodeD - - } // end GEONW_PON_GAC_BV_03 - - group GEONW_PON_GAC_BV_04 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_BV_03 - */ - function f_GEONW_PON_GAC_BV_04() 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; - } - - // 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_BV_04_nodeB()); - v_nodeC.start(f_GEONW_PON_GAC_BV_04_nodeC()); - v_nodeD.start(f_GEONW_PON_GAC_BV_04_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_GAC_BV_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_BV_04) - */ - function f_GEONW_PON_GAC_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_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 f_GEONW_PON_GAC_BV_04_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_BV_04) - */ - function f_GEONW_PON_GAC_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_geoNwAnycastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area2) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GAC_BV_04_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_BV_04) - */ - function f_GEONW_PON_GAC_BV_04_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 f_GEONW_PON_GAC_BV_04_nodeD - - } // end GEONW_PON_GAC_BV_04 - - group GEONW_PON_GAC_BO_05 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_BO_05 - */ - function f_GEONW_PON_GAC_BO_05() 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; - } - - // 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_BO_05_nodeB()); - v_nodeC.start(f_GEONW_PON_GAC_BO_05_nodeC(v_sequenceNumber)); - v_nodeD.start(f_GEONW_PON_GAC_BO_05_nodeD(v_sequenceNumber)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_GAC_BO_05 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_BO_05) - */ - function f_GEONW_PON_GAC_BO_05_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var template (present) GeoNetworkingInd v_msgInd; - - // 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.msgIn.basicHeader.routerHopLimit := ?; - tc_noac.start; - alt { - [] geoNetworkingPort.receive(v_msgInd) { - 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 f_GEONW_PON_GAC_BO_05_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_BO_05) - */ - function f_GEONW_PON_GAC_BO_05_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 f_GEONW_PON_GAC_BO_05_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_BO_05) - */ - function f_GEONW_PON_GAC_BO_05_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 f_GEONW_PON_GAC_BO_05_nodeD - - } // end GEONW_PON_GAC_BO_05 - - group GEONW_PON_GAC_BV_06 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_BV_06 - */ - function f_GEONW_PON_GAC_BV_06() 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_BV_06_nodeB()); - v_nodeC.start(f_GEONW_PON_GAC_BV_06_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end f_GEONW_PON_GAC_BV_06 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_BV_06) - */ - function f_GEONW_PON_GAC_BV_06_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 forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GAC message not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GAC_BV_06_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_BV_06) - */ - function f_GEONW_PON_GAC_BV_06_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 f_GEONW_PON_GAC_BV_06_nodeC - - } // end GEONW_PON_GAC_BV_06 - - group GEONW_PON_GAC_BO_07 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_BO_07 - */ - function f_GEONW_PON_GAC_BO_07() 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_BO_07_nodeB()); - v_nodeC.start(f_GEONW_PON_GAC_BO_07_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end f_GEONW_PON_GAC_BO_07 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_BO_07) - */ - function f_GEONW_PON_GAC_BO_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 { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GAC message re-forwarded ***"); - 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 f_GEONW_PON_GAC_BO_07_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_BO_07) - */ - function f_GEONW_PON_GAC_BO_07_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 - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GAC_BO_07_nodeC - - } // end GEONW_PON_GAC_BO_07 - - /** - * @desc TP Function for TC_GEONW_PON_GAC_BV_08 - */ - function f_GEONW_PON_GAC_BV_08() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - var GnRawPayload v_sentRawPayload; - - // 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); - - v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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 f_GEONW_PON_GAC_BV_08 - - group GEONW_PON_GAC_BO_09 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_BO_09 - */ - function f_GEONW_PON_GAC_BO_09() 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_BO_09_nodeB()); - v_nodeD.start(f_GEONW_PON_GAC_BO_09_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_GAC_BO_09 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_BO_09) - */ - function f_GEONW_PON_GAC_BO_09_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - var GnRawPayload v_sentRawPayload; - - // Preamble - f_prNeighbour(); - - f_sleep(PX_TAC); - - v_gnPacket := m_geoNwPdu(m_geoNwAnycastPacket( - v_longPosVectorNodeD, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area1) - ), - -, - c_defaultHopLimit - ); - v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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 f_GEONW_PON_GAC_BO_09_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_BO_09) - */ - function f_GEONW_PON_GAC_BO_09_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 f_GEONW_PON_GAC_BO_09_nodeD - - } // end GEONW_PON_GAC_BO_09 - - /** - * @desc TP Function for TC_GEONW_PON_GAC_BV_10 - */ - function f_GEONW_PON_GAC_BV_10() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - var GnRawPayload v_sentRawPayload; - - // 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_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 f_GEONW_PON_GAC_BV_10 - - group GEONW_PON_GAC_BO_11 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_BO_11 - */ - function f_GEONW_PON_GAC_BO_11() 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_BO_11_nodeB(v_distanceTooBig)); - v_nodeC.start(f_GEONW_PON_GAC_BO_11_nodeC(v_distanceTooBig)); - v_nodeD.start(f_GEONW_PON_GAC_BO_11_nodeD(v_distanceTooBig)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_GAC_BO_11 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_BO_11) - */ - function f_GEONW_PON_GAC_BO_11_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 forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GAC_BO_11_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_BO_11) - */ - function f_GEONW_PON_GAC_BO_11_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) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GAC_BO_11_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_BO_11) - */ - function f_GEONW_PON_GAC_BO_11_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 forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GAC message not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GAC_BO_11_nodeD - - } // end GEONW_PON_GAC_BO_11 - - group GEONW_PON_GAC_BV_13 { - - /** - * @desc TP Function for TC_GEONW_PON_GAC_BV_13 - */ - function f_GEONW_PON_GAC_BV_13() 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_getGeoBroadcastForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_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_BV_13_nodeB()); - v_nodeD.start(f_GEONW_PON_GAC_BV_13_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end f_GEONW_PON_GAC_BV_13 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_BV_13) - */ - function f_GEONW_PON_GAC_BV_13_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 f_GEONW_PON_GAC_BV_13_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_BV_13) - */ - function f_GEONW_PON_GAC_BV_13_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 f_GEONW_PON_GAC_BV_13_nodeD - - } // end GEONW_PON_GAC_BV_13 - - } // end geoGeoAnycast - - // 6.2.2.13 - group geoGeoBroadcastCbfAlgorithm { - - group GEONW_PON_BCA_BV_01 { - - /** - * @desc TP Function for TC_GEONW_PON_BCA_BV_01 - */ - function f_GEONW_PON_BCA_BV_01() 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_getGeoBroadcastForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - -// if (f_getGeoBroadcastCbfMinTime() < 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_BCA_BV_01_nodeB()); - v_nodeC.start(f_GEONW_PON_BCA_BV_01_nodeC(v_sequenceNumberC)); - v_nodeD.start(f_GEONW_PON_BCA_BV_01_nodeD(v_sequenceNumberC)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_BCA_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BCA_BV_01) - */ - function f_GEONW_PON_BCA_BV_01_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 f_GEONW_PON_BCA_BV_01_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_BCA_BV_01) - */ - function f_GEONW_PON_BCA_BV_01_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 f_GEONW_PON_BCA_BV_01_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_BCA_BV_01) - */ - function f_GEONW_PON_BCA_BV_01_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 f_GEONW_PON_BCA_BV_01_nodeD - - } // end GEONW_PON_BCA_BV_01 - - group GEONW_PON_BCA_BV_02 { - - /** - * @desc TP Function for TC_GEONW_PON_BCA_BV_02 - */ - function f_GEONW_PON_BCA_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_getGeoBroadcastForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - -// if (f_getGeoBroadcastCbfMinTime() < 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_BCA_BV_02_nodeB()); - v_nodeC.start(f_GEONW_PON_BCA_BV_02_nodeC()); - v_nodeD.start(f_GEONW_PON_BCA_BV_02_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_BCA_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BCA_BV_02) - */ - function f_GEONW_PON_BCA_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 f_GEONW_PON_BCA_BV_02_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_BCA_BV_02) - */ - function f_GEONW_PON_BCA_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_getGeoBroadcastCbfMaxTime()) - + ( - int2float(f_getGeoBroadcastCbfMinTime() - f_getGeoBroadcastCbfMaxTime()) - / int2float(f_getCbfMaxCommunicationRange()) - ) * f_distance(v_longPosVectorNodeC, v_longPosVectorIut)) * 0.95 / 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; + } // 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 { - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + // 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; } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + if ((f_getNonAreaForwardingAlgorithm() != e_cbf)) { + log("*** " & testcasename() & ": PICS_GN_NON_AREA_FORWARDING_ALGORITHM == ( e_cbf ) required for executing the TC ***"); + setverdict(inconc); + stop; } - } - [] 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 f_GEONW_PON_BCA_BV_02_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_BCA_BV_02) - */ - function f_GEONW_PON_BCA_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 f_GEONW_PON_BCA_BV_02_nodeD - - } // end GEONW_PON_BCA_BV_02 - - group GEONW_PON_BCA_BV_03 { - - /** - * @desc TP Function for TC_GEONW_PON_BCA_BV_03 - */ - function f_GEONW_PON_BCA_BV_03() 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_getGeoBroadcastForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - -// if (f_getGeoBroadcastCbfMinTime() < 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_BCA_BV_03_nodeB()); - v_nodeC.start(f_GEONW_PON_BCA_BV_03_nodeC()); - v_nodeD.start(f_GEONW_PON_BCA_BV_03_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_BCA_BV_03 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BCA_BV_03) - */ - function f_GEONW_PON_BCA_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 { - [] geoNetworkingPort.receive(mw_geoNwInd_withLinkLayerDestination(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2) - )), - f_getTsGnLocalAddress(c_compNodeB).mid - )) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC correctly forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BCA_BV_03_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_BCA_BV_03) - */ - function f_GEONW_PON_BCA_BV_03_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // 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 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 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 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 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 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)) * 0.95 / 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 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 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 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 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 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 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 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 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(); - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2) + } // end 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 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 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 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()) * 0.95 / 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) + ) + ) ) - ) - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Message was broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: Message not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BCA_BV_03_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_BCA_BV_03) - */ - function f_GEONW_PON_BCA_BV_03_nodeD() 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 was broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: Message not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BCA_BV_03_nodeD - - } // end GEONW_PON_BCA_BV_03 - - group GEONW_PON_BCA_BO_04 { - - /** - * @desc TP Function for TC_GEONW_PON_BCA_BO_04 - */ - function f_GEONW_PON_BCA_BO_04() 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_getGeoBroadcastForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - -// if (f_getGeoBroadcastCbfMinTime() < 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_BCA_BO_04_nodeB()); - v_nodeC.start(f_GEONW_PON_BCA_BO_04_nodeC()); - v_nodeD.start(f_GEONW_PON_BCA_BO_04_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_BCA_BO_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BCA_BO_04) - */ - function f_GEONW_PON_BCA_BO_04_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 f_GEONW_PON_BCA_BO_04_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_BCA_BO_04) - */ - function f_GEONW_PON_BCA_BO_04_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 f_GEONW_PON_BCA_BO_04_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_BCA_BO_04) - */ - function f_GEONW_PON_BCA_BO_04_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + ); + + 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 f_GEONW_PON_GBC_NONAREA_CBF_BV_21_nodeD + + } // end GEONW_PON_GBC_NONAREA_CBF_BV_21 - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeD, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2) + 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 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 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()) * 0.95 / 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 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 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 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 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 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 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 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 f_GEONW_PON_GBC_AREA_ALL_BV_03_nodeD + + } // end GEONW_PON_GBC_AREA_ALL_BV_03 - 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); + 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 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 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 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; + var GnRawPayload v_sentRawPayload; + + // 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); + + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); i:=i+1) { + // empty on purpose } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BCA_BO_04_nodeD - - } // end GEONW_PON_BCA_BO_04 - - group GEONW_PON_BCA_BV_05 { - - /** - * @desc TP Function for TC_GEONW_PON_BCA_BV_05 - */ - function f_GEONW_PON_BCA_BV_05() 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_getGeoBroadcastForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - -// if (f_getGeoBroadcastCbfMinTime() < 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_BCA_BV_05_nodeB()); - v_nodeC.start(f_GEONW_PON_BCA_BV_05_nodeC()); - v_nodeD.start(f_GEONW_PON_BCA_BV_05_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_BCA_BV_05 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BCA_BV_05) - */ - function f_GEONW_PON_BCA_BV_05_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 ***"); + if(i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); + else { + log("*** " & testcasename() & ": FAIL: GN was not transmitted to upper layer ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BCA_BV_05_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_BCA_BV_05) - */ - function f_GEONW_PON_BCA_BV_05_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_GBC_AREA_ALL_BV_05 - // 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 ***"); + 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 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; + var GnRawPayload v_sentRawPayload; + + // 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); + + v_sentRawPayload := f_adaptPayloadForUtInd_m(valueof(v_gnPacket.gnPacket.packet.payload)); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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 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 template (value) 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); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BCA_BV_05_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_BCA_BV_05) - */ - function f_GEONW_PON_BCA_BV_05_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - timer t_toCbf := int2float(f_getGeoBroadcastCbfMaxTime()) * 0.95 / 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) + + // Postamble + f_poNeighbour(); + + } // end 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 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) + ) + ) ) - ) - ) - ); - - 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; + ); + + 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 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 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 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 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 template (present) 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))); + + v_msgInd.msgIn.basicHeader.routerHopLimit := ?; + 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 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 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 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)) * 0.95 / 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 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 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 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 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 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 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 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 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 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()) * 0.95 / 1000.0; + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + // 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); + } } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poDefault(); + + } // end 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; } - } - [] 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 f_GEONW_PON_BCA_BV_05_nodeD - - } // end GEONW_PON_BCA_BV_05 - - group GEONW_PON_BCA_BV_06 { - - /** - * @desc TP Function for TC_GEONW_PON_BCA_BV_06 - */ - function f_GEONW_PON_BCA_BV_06() 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_getGeoBroadcastForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - -// if (f_getGeoBroadcastCbfMinTime() < 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_BCA_BV_06_nodeB()); - v_nodeC.start(f_GEONW_PON_BCA_BV_06_nodeC()); - v_nodeD.start(f_GEONW_PON_BCA_BV_06_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_BCA_BV_06 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BCA_BV_06) - */ - function f_GEONW_PON_BCA_BV_06_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 f_GEONW_PON_BCA_BV_06_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_BCA_BV_06) - */ - function f_GEONW_PON_BCA_BV_06_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 f_GEONW_PON_BCA_BV_06_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_BCA_BV_06) - */ - function f_GEONW_PON_BCA_BV_06_nodeD() 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( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2) - ) - ) - ) - ); - - 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_poDefault(); - - } // end f_GEONW_PON_BCA_BV_06_nodeD - - } // end GEONW_PON_BCA_BV_06 - - group GEONW_PON_BCA_BV_07 { - - /** - * @desc TP Function for TC_GEONW_PON_BCA_BV_07 - */ - function f_GEONW_PON_BCA_BV_07() 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_getGeoBroadcastForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - -// if (f_getGeoBroadcastCbfMinTime() < 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_BCA_BV_07_nodeB()); - v_nodeC.start(f_GEONW_PON_BCA_BV_07_nodeC()); - v_nodeD.start(f_GEONW_PON_BCA_BV_07_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_BCA_BV_07 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BCA_BV_07) - */ - function f_GEONW_PON_BCA_BV_07_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 f_GEONW_PON_BCA_BV_07_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_BCA_BV_07) - */ - function f_GEONW_PON_BCA_BV_07_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // 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) + 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 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 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 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()) * 0.95 / 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) + ) + ) ) - ) - ) - ); - - 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 f_GEONW_PON_BCA_BV_07_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_BCA_BV_07) - */ - function f_GEONW_PON_BCA_BV_07_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 f_GEONW_PON_BCA_BV_07_nodeD - - } // end GEONW_PON_BCA_BV_07 + ); + + 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 f_GEONW_PON_GBC_AREA_CBF_BV_22_nodeD + + } // end GEONW_PON_GBC_AREA_CBF_BV_22 - group GEONW_PON_BCA_BV_08 { - - /** - * @desc TP Function for TC_GEONW_PON_BCA_BV_08 - */ - function f_GEONW_PON_BCA_BV_08() 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_getGeoBroadcastForwardingAlgorithm() != e_cbf) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_cbf required for executing the TC ***"); - setverdict(inconc); - stop; - } - -// if (f_getGeoBroadcastCbfMinTime() < 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_BCA_BV_08_nodeB()); - v_nodeC.start(f_GEONW_PON_BCA_BV_08_nodeC()); - v_nodeD.start(f_GEONW_PON_BCA_BV_08_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_BCA_BV_08 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BCA_BV_08) - */ - function f_GEONW_PON_BCA_BV_08_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 f_GEONW_PON_BCA_BV_08_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_BCA_BV_08) - */ - function f_GEONW_PON_BCA_BV_08_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 f_GEONW_PON_BCA_BV_08_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_BCA_BV_08) - */ - function f_GEONW_PON_BCA_BV_08_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_getGeoBroadcastCbfMaxTime()) * 0.95 / 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) + } // 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 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()) * 0.95 / 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 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()) * 0.95 / 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 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 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 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 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 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 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 f_GEONW_PON_GBC_AREA_ADV_BV_24_nodeE + + } // end GEONW_PON_GBC_AREA_ADV_BV_24 - 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; + 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 { - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + // 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; } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + if (f_getAreaForwardingAlgorithm() != e_advanced) { + log("*** " & testcasename() & ": PICS_GN_AREA_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + setverdict(inconc); + stop; } - } - [] 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 f_GEONW_PON_BCA_BV_08_nodeD - - } // end GEONW_PON_BCA_BV_08 + + // 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 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 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)) * 0.95 / 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 f_GEONW_PON_GBC_AREA_ADV_BV_25_nodeF + + } // end GEONW_PON_GBC_AREA_ADV_BV_25 - } // end geoGeoBroadcastCbfAlgorithm - - // 6.2.2.13 - group geoGeoBroadcastAdvAlgorithm { - - group GEONW_PON_BAA_BV_01 { - - /** - * @desc TP Function for TC_GEONW_PON_BAA_BV_01 - */ - function f_GEONW_PON_BAA_BV_01() 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_getGeoBroadcastForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); - setverdict(inconc); - stop; - } - -// if (f_getGeoBroadcastCbfMinTime() < 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_BAA_BV_01_nodeB()); - v_nodeF.start(f_GEONW_PON_BAA_BV_01_nodeF()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf06Down(); - - } // end f_GEONW_PON_BAA_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_01) - */ - function f_GEONW_PON_BAA_BV_01_nodeB() runs on ItsGeoNetworking { - - // Local variables + 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 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 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)) * 0.95 / 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 f_GEONW_PON_GBC_AREA_ADV_BV_26_nodeD + + } // end GEONW_PON_GBC_AREA_ADV_BV_26 - // 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 ***"); + 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 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 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 f_GEONW_PON_BAA_BV_01_nodeB - - /** - * @desc Behavior function for NodeF (TC_GEONW_PON_BAA_BV_01) - */ - function f_GEONW_PON_BAA_BV_01_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, + + // Postamble + f_poNeighbour(); + + } // end 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 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 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 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 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)) * 0.95 / 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 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)) * 0.95 / 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) ) - ); - 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 f_GEONW_PON_BAA_BV_01_nodeF - - } // end GEONW_PON_BAA_BV_01 + ) + ) + ); + + 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 f_GEONW_PON_GBC_AREA_ADV_BV_29_nodeE + + } // end GEONW_PON_GBC_AREA_ADV_BV_29 + + } // end gbcAreaAdvancedForwarding - group GEONW_PON_BAA_BV_02 { + } // end gbcAreaForwarding + + } // end geoGeoBroadcast + + // 6.2.2.10 + group geoTopologicallyScopedBroadcast { + + group GEONW_PON_TSB_BV_01 { /** - * @desc TP Function for TC_GEONW_PON_BAA_BV_02 + * @desc TP Function for TC_GEONW_PON_TSB_BV_01 */ - function f_GEONW_PON_BAA_BV_02() runs on ItsMtc { + function f_GEONW_PON_TSB_BV_01() runs on ItsMtc { // Local variables var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeE; - + 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_getGeoBroadcastForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + if (not PICS_GN_TSB_SRC) { + log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***"); setverdict(inconc); stop; } -// if (f_getGeoBroadcastCbfMinTime() < 300) { -// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); -// setverdict(inconc); -// stop; -// } - // Test component configuration - f_cf05Up(); + f_cf02Up(); // Preamble - + // Start components v_nodeB := f_getComponent(c_compNodeB); - v_nodeE := f_getComponent(c_compNodeE); - v_nodeB.start(f_GEONW_PON_BAA_BV_02_nodeB()); - v_nodeE.start(f_GEONW_PON_BAA_BV_02_nodeE()); + 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_cf05Down(); + f_cf02Down(); - } // end f_GEONW_PON_BAA_BV_02 + } // end f_GEONW_PON_TSB_BV_01 /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_02) + * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BV_01) */ - function f_GEONW_PON_BAA_BV_02_nodeB() runs on ItsGeoNetworking { + function f_GEONW_PON_TSB_BV_01_nodeB() runs on ItsGeoNetworking { // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); // 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; + 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(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Message not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message received ***"); + [] 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 f_GEONW_PON_BAA_BV_02_nodeB + } // end f_GEONW_PON_TSB_BV_01_nodeB /** - * @desc Behavior function for NodeE (TC_GEONW_PON_BAA_BV_02) + * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BV_01) */ - function f_GEONW_PON_BAA_BV_02_nodeE() runs on ItsGeoNetworking { + function f_GEONW_PON_TSB_BV_01_nodeD() runs on ItsGeoNetworking { // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); // 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; + tc_ac.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 ***"); + [] 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 f_GEONW_PON_BAA_BV_02_nodeE + } // end f_GEONW_PON_TSB_BV_01_nodeD - } // end GEONW_PON_BAA_BV_02 + } // end GEONW_PON_TSB_BV_01 - group GEONW_PON_BAA_BV_03 { + group GEONW_PON_TSB_BV_02 { /** - * @desc TP Function for TC_GEONW_PON_BAA_BV_03 + * @desc TP Function for TC_GEONW_PON_TSB_BV_02 */ - function f_GEONW_PON_BAA_BV_03() runs on ItsMtc { + function f_GEONW_PON_TSB_BV_02() runs on ItsMtc { // Local variables var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeF; - + 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_getGeoBroadcastForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + if (not PICS_GN_TSB_FWD) { + log("*** " & testcasename() & ": PICS_GN_TSB_FWD required for executing the TC ***"); setverdict(inconc); stop; } -// if (f_getGeoBroadcastCbfMinTime() < 300) { -// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); -// setverdict(inconc); -// stop; -// } - // Test component configuration - f_cf06Up(); + f_cf02Up(); // Preamble - + // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeF := f_getComponent(c_compNodeF); - v_nodeB.start(f_GEONW_PON_BAA_BV_03_nodeB()); - v_nodeF.start(f_GEONW_PON_BAA_BV_03_nodeF()); + 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_cf06Down(); + f_cf02Down(); - } // end f_GEONW_PON_BAA_BV_03 + } // end f_GEONW_PON_TSB_BV_02 /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_03) + * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BV_02) */ - function f_GEONW_PON_BAA_BV_03_nodeB() runs on ItsGeoNetworking { + function f_GEONW_PON_TSB_BV_02_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 + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeB + ), + -, + c_defaultHopLimit ) ) - )); - 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) - )))) { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) + ) + ) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: GBC message received ***"); + log("*** " & testcasename() & ": PASS: TSB packet received correctly ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + log("*** " & testcasename() & ": FAIL: Expected TSB message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } } @@ -14053,62 +13212,39 @@ module ItsGeoNetworking_TpFunctions { // Postamble f_poNeighbour(); - } // end f_GEONW_PON_BAA_BV_03_nodeB + } // end f_GEONW_PON_TSB_BV_02_nodeB /** - * @desc Behavior function for NodeF (TC_GEONW_PON_BAA_BV_03) + * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BV_02) */ - function f_GEONW_PON_BAA_BV_03_nodeF() runs on ItsGeoNetworking { + function f_GEONW_PON_TSB_BV_02_nodeD() 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_getGeoBroadcastCbfMaxTime()) - + ( - int2float(f_getGeoBroadcastCbfMinTime() - f_getGeoBroadcastCbfMaxTime()) - / int2float(f_getCbfMaxCommunicationRange()) - ) * f_distance(v_longPosVectorNodeF, v_longPosVectorIut)) * 0.95 / 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; + [] 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: GBC message not received ***"); + log("*** " & testcasename() & ": FAIL: Expected TSB message not received ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_error); } } @@ -14116,1203 +13252,3412 @@ module ItsGeoNetworking_TpFunctions { // Postamble f_poNeighbour(); - } // end f_GEONW_PON_BAA_BV_03_nodeF + } // end f_GEONW_PON_TSB_BV_02_nodeD - } // end GEONW_PON_BAA_BV_03 + } // end GEONW_PON_TSB_BV_02 - group GEONW_PON_BAA_BV_04 { + group GEONW_PON_TSB_BV_03 { /** - * @desc TP Function for TC_GEONW_PON_BAA_BV_04 + * @desc TP Function for TC_GEONW_PON_TSB_BV_03 */ - function f_GEONW_PON_BAA_BV_04() runs on ItsMtc { + function f_GEONW_PON_TSB_BV_03() runs on ItsMtc { // Local variables var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeE; + 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_getGeoBroadcastForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + if (not PICS_GN_TSB_FWD) { + log("*** " & testcasename() & ": PICS_GN_TSB_FWD required for executing the TC ***"); setverdict(inconc); stop; } -// if (f_getGeoBroadcastCbfMinTime() < 300) { -// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); -// setverdict(inconc); -// stop; -// } - // Test component configuration - f_cf05Up(); + f_cf02Up(); // Preamble // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeE := f_getComponent(c_compNodeE); - v_nodeB.start(f_GEONW_PON_BAA_BV_04_nodeB()); - v_nodeE.start(f_GEONW_PON_BAA_BV_04_nodeE()); + 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_cf05Down(); + f_cf02Down(); - } // end f_GEONW_PON_BAA_BV_04 + } // end f_GEONW_PON_TSB_BV_03 /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_04) + * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BV_03) */ - function f_GEONW_PON_BAA_BV_04_nodeB() runs on ItsGeoNetworking { + function f_GEONW_PON_TSB_BV_03_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 + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeB, + c_defaultHopLimit + ), + -, + c_defaultHopLimit + ) + ) + ); + tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeA), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ), + -, + c_defaultHopLimit - 1 + ) + ) + ) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: packet correctly forwarded ***"); + log("*** " & testcasename() & ": PASS: TSB packet received correctly ***"); f_selfOrClientSyncAndVerdict(c_tbDone, e_success); } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + [] 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 f_GEONW_PON_BAA_BV_04_nodeB + } // end f_GEONW_PON_TSB_BV_03_nodeB /** - * @desc Behavior function for NodeE (TC_GEONW_PON_BAA_BV_04) + * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BV_03) */ - function f_GEONW_PON_BAA_BV_04_nodeE() runs on ItsGeoNetworking { + function f_GEONW_PON_TSB_BV_03_nodeD() 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 - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeA, - 0, - f_getGeoBroadcastArea(c_area1) - ) - ), - -, - f_getIutMacAddress() - ) - ); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + 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 f_GEONW_PON_BAA_BV_04_nodeE + } // end f_GEONW_PON_TSB_BV_03_nodeD - } // end GEONW_PON_BAA_BV_04 - - group GEONW_PON_BAA_BV_05 { + } // end GEONW_PON_TSB_BV_03 + + group GEONW_PON_TSB_BO_04 { /** - * @desc TP Function for TC_GEONW_PON_BAA_BV_05 + * @desc TP Function for TC_GEONW_PON_TSB_BO_04 */ - function f_GEONW_PON_BAA_BV_05() runs on ItsMtc { + function f_GEONW_PON_TSB_BO_04() runs on ItsMtc { // Local variables var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeE; + 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_getGeoBroadcastForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + if (not PICS_GN_TSB_FWD) { + log("*** " & testcasename() & ": PICS_GN_TSB_FWD required for executing the TC ***"); setverdict(inconc); stop; } -// if (f_getGeoBroadcastCbfMinTime() < 300) { -// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); -// setverdict(inconc); -// stop; -// } - // Test component configuration - f_cf05Up(); + f_cf02Up(); // Preamble // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeE := f_getComponent(c_compNodeE); - v_nodeB.start(f_GEONW_PON_BAA_BV_05_nodeB()); - v_nodeE.start(f_GEONW_PON_BAA_BV_05_nodeE()); + 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_cf05Down(); + f_cf02Down(); - } // end f_GEONW_PON_BAA_BV_05 + } // end f_GEONW_PON_TSB_BO_04 /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_05) + * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BO_04) */ - function f_GEONW_PON_BAA_BV_05_nodeB() runs on ItsGeoNetworking { + function f_GEONW_PON_TSB_BO_04_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_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); - } - } + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeB + ), + -, + 1 + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); // Postamble f_poNeighbour(); - } // end f_GEONW_PON_BAA_BV_05_nodeB + } // end f_GEONW_PON_TSB_BO_04_nodeB /** - * @desc Behavior function for NodeE (TC_GEONW_PON_BAA_BV_05) + * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BO_04) */ - function f_GEONW_PON_BAA_BV_05_nodeE() runs on ItsGeoNetworking { + function f_GEONW_PON_TSB_BO_04_nodeD() 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 - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeA, - 0, - f_getGeoBroadcastArea(c_area1) + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) ) - ), - -, - 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 ***"); + ) { + 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 f_GEONW_PON_BAA_BV_05_nodeE + } // end f_GEONW_PON_TSB_BO_04_nodeD - } // end GEONW_PON_BAA_BV_05 - - group GEONW_PON_BAA_BV_06 { + } // 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; + var GnRawPayload v_sentRawPayload; + + // 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 + ) + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + f_sleep(PX_TAC); + + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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 f_GEONW_PON_TSB_BV_05 + + group GEONW_PON_TSB_BO_07 { /** - * @desc TP Function for TC_GEONW_PON_BAA_BV_06 + * @desc TP Function for TC_GEONW_PON_TSB_BO_07 */ - function f_GEONW_PON_BAA_BV_06() runs on ItsMtc { + function f_GEONW_PON_TSB_BO_07() runs on ItsMtc { // Local variables var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeE; - + 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_getGeoBroadcastForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + if (not PICS_GN_TSB_FWD) { + log("*** " & testcasename() & ": PICS_GN_TSB_FWD required for executing the TC ***"); setverdict(inconc); stop; } -// if (f_getGeoBroadcastCbfMinTime() < 300) { -// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); -// setverdict(inconc); -// stop; -// } - // Test component configuration - f_cf05Up(); + f_cf02Up(); // Preamble // Start components v_nodeB := f_getComponent(c_compNodeB); - v_nodeE := f_getComponent(c_compNodeE); - v_nodeB.start(f_GEONW_PON_BAA_BV_06_nodeB()); - v_nodeE.start(f_GEONW_PON_BAA_BV_06_nodeE()); + 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_cf05Down(); + f_cf02Down(); - } // end f_GEONW_PON_BAA_BV_06 + } // end f_GEONW_PON_TSB_BO_07 /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_06) + * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BO_07) */ - function f_GEONW_PON_BAA_BV_06_nodeB() runs on ItsGeoNetworking { + function f_GEONW_PON_TSB_BO_07_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_getGeoBroadcastCbfMaxTime()) - + ( - int2float(f_getGeoBroadcastCbfMinTime() - f_getGeoBroadcastCbfMaxTime()) - / int2float(f_getCbfMaxCommunicationRange()) - ) * f_distance(v_longPosVectorNodeE, v_longPosVectorIut)) * 0.95 / 1000.0; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var template (present) GeoNetworkingPdu v_gnPacket; // Preamble f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + v_gnPacket := m_geoNwPdu( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeB + ), + -, + c_defaultHopLimit + ); - // 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); - } + 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); } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; + [] tc_noac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: Expected TSB message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + } + + // 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 f_GEONW_PON_BAA_BV_06_nodeB + } // end f_GEONW_PON_TSB_BO_07_nodeB /** - * @desc Behavior function for NodeE (TC_GEONW_PON_BAA_BV_06) + * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BO_07) */ - function f_GEONW_PON_BAA_BV_06_nodeE() runs on ItsGeoNetworking { + function f_GEONW_PON_TSB_BO_07_nodeD() 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_getGeoBroadcastCbfMaxTime()) - + ( - int2float(f_getGeoBroadcastCbfMinTime() - f_getGeoBroadcastCbfMaxTime()) - / int2float(f_getCbfMaxCommunicationRange()) - ) * f_distance(v_longPosVectorNodeE, v_longPosVectorIut)) * 0.95 / 1000.0; + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var template (value) GeoNetworkingInd v_msgInd; // 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) - )))) { + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) + ) + ) -> value v_msgInd { 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; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); } [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + 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 f_GEONW_PON_BAA_BV_06_nodeE + } // end f_GEONW_PON_TSB_BO_07_nodeD - } // end GEONW_PON_BAA_BV_06 + } // end GEONW_PON_TSB_BO_07 - group GEONW_PON_BAA_BV_07 { + group GEONW_PON_TSB_BO_08 { /** - * @desc TP Function for TC_GEONW_PON_BAA_BV_07 + * @desc TP Function for TC_GEONW_PON_TSB_BV_08 */ - function f_GEONW_PON_BAA_BV_07() runs on ItsMtc { + function f_GEONW_PON_TSB_BO_08() 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_getGeoBroadcastForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + if (not PICS_GN_TSB_DST) { + log("*** " & testcasename() & ": PICS_GN_TSB_DST required for executing the TC ***"); setverdict(inconc); stop; } -// if (f_getGeoBroadcastCbfMinTime() < 300) { -// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); -// setverdict(inconc); -// stop; -// } - // Test component configuration - f_cf04Up(); + f_cf02Up(c_compNodeB); // 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_BAA_BV_07_nodeB()); - v_nodeC.start(f_GEONW_PON_BAA_BV_07_nodeC()); - v_nodeD.start(f_GEONW_PON_BAA_BV_07_nodeD()); + v_nodeB.start(f_GEONW_PON_TSB_BO_08_nodeB()); + v_nodeD.start(f_GEONW_PON_TSB_BO_08_nodeD()); // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); // Cleanup - f_cf04Down(); + f_cf02Down(); - } // end f_GEONW_PON_BAA_BV_07 + } // end f_GEONW_PON_TSB_BO_08 /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_07) + * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BO_08) */ - function f_GEONW_PON_BAA_BV_07_nodeB() runs on ItsGeoNetworking { + function f_GEONW_PON_TSB_BO_08_nodeB() runs on ItsGeoNetworking { // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var template (value) GeoNetworkingPdu v_gnPacket; + var integer i; + var GnRawPayload v_sentRawPayload; // Preamble f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + v_gnPacket := m_geoNwPdu(m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeB + ), + -, + c_defaultHopLimit + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_gnPacket))); - // Test Body tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoBroadcastArea(c_area2) - )))) { + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) + ) + ) { tc_ac.stop; - log("*** " & testcasename() & ": PASS: packet correctly forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + f_sleep(PX_TAC); + + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + log("*** " & testcasename() & ": INCONC: Pre-conditions: TSB not rebroadcasted ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); } } - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BAA_BV_07_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_BAA_BV_07) - */ - function f_GEONW_PON_BAA_BV_07_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, - 0, - f_getGeoBroadcastArea(c_area2) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + f_sleep(PX_TAC); + + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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 f_GEONW_PON_BAA_BV_07_nodeC + } // end f_GEONW_PON_TSB_BO_08_nodeB /** - * @desc Behavior function for NodeD (TC_GEONW_PON_BAA_BV_07) + * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BO_08) */ - function f_GEONW_PON_BAA_BV_07_nodeD() runs on ItsGeoNetworking { + function f_GEONW_PON_TSB_BO_08_nodeD() runs on ItsGeoNetworking { // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var template (value) GeoNetworkingInd v_msgInd; + var integer i; + var template (value) GeoNetworkingPdu v_gnPacket; // Preamble f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - // Test Body - tc_noac.start; + tc_ac.start; alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Message not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + [] 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_noac.timeout { - log("*** " & testcasename() & ": PASS: No message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, 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 f_GEONW_PON_BAA_BV_07_nodeD + } // end f_GEONW_PON_TSB_BO_08_nodeD - } // end GEONW_PON_BAA_BV_07 + } // end GEONW_PON_TSB_BO_08 + + } // end geoTopologicallyScopedBroadcast + + // 6.2.2.11 + group geoSingleHopBroadcast { - group GEONW_PON_BAA_BO_08 { + group GEONW_PON_SHB_BV_01 { /** - * @desc TP Function for TC_GEONW_PON_BAA_BO_08 + * @desc TP Function for TC_GEONW_PON_SHB_BV_01 */ - function f_GEONW_PON_BAA_BO_08() runs on ItsMtc { + function f_GEONW_PON_SHB_BV_01() 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_getGeoBroadcastForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + if (not PICS_GN_SHB_SRC) { + log("*** " & testcasename() & ": PICS_GN_SHB_SRC required for executing the TC ***"); setverdict(inconc); stop; } -// if (f_getGeoBroadcastCbfMinTime() < 300) { -// log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_CBF_MIN_TIME >= 300 required for executing the TC ***"); -// setverdict(inconc); -// stop; -// } - // Test component configuration - f_cf04Up(); + f_cf02Up(); // 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_BAA_BO_08_nodeB()); - v_nodeC.start(f_GEONW_PON_BAA_BO_08_nodeC()); - v_nodeD.start(f_GEONW_PON_BAA_BO_08_nodeD()); + v_nodeB.start(f_GEONW_PON_SHB_BV_01_nodeB()); + v_nodeD.start(f_GEONW_PON_SHB_BV_01_nodeD()); // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); // Cleanup - f_cf04Down(); + f_cf02Down(); - } // end f_GEONW_PON_BAA_BO_08 + } // end f_GEONW_PON_SHB_BV_01 /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BO_08) + * @desc Behavior function for NodeB (TC_GEONW_PON_SHB_BV_01) */ - function f_GEONW_PON_BAA_BO_08_nodeB() runs on ItsGeoNetworking { + 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 - tc_noac.start; + 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(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Message not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message received ***"); + [] 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 f_GEONW_PON_BAA_BO_08_nodeB + } // end f_GEONW_PON_SHB_BV_01_nodeB /** - * @desc Behavior function for NodeC (TC_GEONW_PON_BAA_BO_08) + * @desc Behavior function for NodeD (TC_GEONW_PON_SHB_BV_01) */ - function f_GEONW_PON_BAA_BO_08_nodeC() runs on ItsGeoNetworking { + 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_noac.start; + tc_ac.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 ***"); + [] 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 f_GEONW_PON_BAA_BO_08_nodeC + } // end f_GEONW_PON_SHB_BV_01_nodeD - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_BAA_BO_08) - */ - function f_GEONW_PON_BAA_BO_08_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, - 0, - f_getGeoBroadcastArea(c_area2) + } // 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; + var GnRawPayload v_sentRawPayload; + + // 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)); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + f_sleep(PX_TAC); + + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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 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 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 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 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 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 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 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; + var GnRawPayload v_sentRawPayload; + + // 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 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 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 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) + ) + ) ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BAA_BO_08_nodeD - - } // end GEONW_PON_BAA_BO_08 + ); + + 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 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 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 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 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 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 f_GEONW_PON_GAC_NONAREA_ALL_BV_10_nodeD + + } // end GEONW_PON_GAC_NONAREA_ALL_BV_10 - group GEONW_PON_BAA_BV_09 { - - /** - * @desc TP Function for TC_GEONW_PON_BAA_BV_09 - */ - function f_GEONW_PON_BAA_BV_09() 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_getGeoBroadcastForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); - setverdict(inconc); - stop; - } - -// if (f_getGeoBroadcastCbfMinTime() < 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_BAA_BV_09_nodeB()); - v_nodeE.start(f_GEONW_PON_BAA_BV_09_nodeE()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf05Down(); - - } // end f_GEONW_PON_BAA_BV_09 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_09) - */ - function f_GEONW_PON_BAA_BV_09_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - timer t_toCbf := int2float(f_getGeoBroadcastCbfMaxTime()) * 0.95 / 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; + } // 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 { - if(t_toCbf.running) { - t_toCbf.stop; - log("*** " & testcasename() & ": FAIL: GBC retransmitted before CBF timer expiration ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + // 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; } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + 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; } - } - [] 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 f_GEONW_PON_BAA_BV_06_nodeB - - /** - * @desc Behavior function for NodeE (TC_GEONW_PON_BAA_BV_09) - */ - function f_GEONW_PON_BAA_BV_09_nodeE() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - timer t_toCbf := int2float(f_getGeoBroadcastCbfMaxTime()) * 0.95 / 1000.0; - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // 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 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 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 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 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 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 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 f_GEONW_PON_GAC_NONAREA_GRD_BV_02_nodeD + + } // end GEONW_PON_GAC_NONAREA_GRD_BV_02 - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - 0, - f_getGeoBroadcastArea(c_area1) + 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 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 template (present) GeoNetworkingInd v_msgInd; + + // 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.msgIn.basicHeader.routerHopLimit := ?; + tc_noac.start; + alt { + [] geoNetworkingPort.receive(v_msgInd) { + 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 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 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 + ) ) - ) - ) - ); - - 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); + 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); + } } - else { - log("*** " & testcasename() & ": PASS: GBC message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end 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; } - } - [] 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); - } - } + 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 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 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 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 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 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)) * 0.95 / 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 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 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 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 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 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 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 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 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(); - // Postamble - f_poNeighbour(); + } // end 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 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 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 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()) * 0.95 / 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 f_GEONW_PON_GAC_NONAREA_CBF_BV_21_nodeD + + } // end GEONW_PON_GAC_NONAREA_CBF_BV_21 - } // end f_GEONW_PON_BAA_BV_09_nodeE - - } // end GEONW_PON_BAA_BV_09 + 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 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 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()) * 0.95 / 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 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 f_GEONW_PON_GAC_NONAREA_CBF_BV_22_nodeD + + } // end GEONW_PON_GAC_NONAREA_CBF_BV_22 - group GEONW_PON_BAA_BV_10 { - - /** - * @desc TP Function for TC_GEONW_PON_BAA_BV_10 - */ - function f_GEONW_PON_BAA_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_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getGeoBroadcastForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); - setverdict(inconc); - stop; - } - -// if (f_getGeoBroadcastCbfMinTime() < 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_BAA_BV_10_nodeB()); - v_nodeC.start(f_GEONW_PON_BAA_BV_10_nodeC()); - v_nodeD.start(f_GEONW_PON_BAA_BV_10_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end f_GEONW_PON_BAA_BV_10 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_10) - */ - function f_GEONW_PON_BAA_BV_10_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + } // end gacNonAreaContentionBasedForwarding + + } // end gacNonAreaForwarding + + group gacAreaForwarding { + + group GEONW_PON_GAC_AREA_ALL_BV_01 { - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + /** + * @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 f_GEONW_PON_GAC_AREA_ALL_BV_01 - // 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: packet correctly forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + /** + * @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.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + + 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 f_GEONW_PON_GAC_AREA_ALL_BV_01_nodeB - // Postamble - f_poNeighbour(); + /** + * @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 f_GEONW_PON_GAC_AREA_ALL_BV_01_nodeD - } // end f_GEONW_PON_BAA_BV_10_nodeB + } // end GEONW_PON_GAC_AREA_ALL_BV_01 - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_BAA_BV_10) - */ - function f_GEONW_PON_BAA_BV_10_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + group GEONW_PON_GAC_AREA_ALL_BV_02 { - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + /** + * @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 f_GEONW_PON_GAC_AREA_ALL_BV_02 - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - 0, - f_getGeoBroadcastArea(c_area2) + /** + * @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_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: 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); + ); + + 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 f_GEONW_PON_BAA_BV_10_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_BAA_BV_10) - */ - function f_GEONW_PON_BAA_BV_10_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_GAC_AREA_ALL_BV_02_nodeB - // 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: 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); + /** + * @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(); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_GAC_AREA_ALL_BV_02_nodeD - } // end f_GEONW_PON_BAA_BV_10_nodeD - - } // end GEONW_PON_BAA_BV_10 - - group GEONW_PON_BAA_BV_11 { + } // end GEONW_PON_GAC_AREA_ALL_BV_02 /** - * @desc TP Function for TC_GEONW_PON_BAA_BV_11 + * @desc TP Function for TC_GEONW_PON_GAC_AREA_ALL_BV_05 */ - function f_GEONW_PON_BAA_BV_11() runs on ItsMtc { + function f_GEONW_PON_GAC_AREA_ALL_BV_05() runs on ItsGeoNetworking { // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - + var LongPosVector v_longPosVectorNodeB; + var template (value) GeoNetworkingPdu v_gnPacket; + var integer i; + var GnRawPayload v_sentRawPayload; + // Test control - if (not PICS_GN_GBC_FWD) { - log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); - setverdict(inconc); - stop; - } - if (f_getGeoBroadcastForwardingAlgorithm() != e_advanced) { - log("*** " & testcasename() & ": PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_advanced required for executing the TC ***"); + if (not PICS_GN_GAC_DST) { + log("*** " & testcasename() & ": PICS_GN_GAC_DST required for executing the TC ***"); setverdict(inconc); stop; } -// if (f_getGeoBroadcastCbfMinTime() < 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_BAA_BV_11_nodeB()); - v_nodeD.start(f_GEONW_PON_BAA_BV_11_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf06Down(); - - } // end f_GEONW_PON_BAA_BV_11 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_11) - */ - function f_GEONW_PON_BAA_BV_11_nodeB() runs on ItsGeoNetworking { + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + // Test adapter configuration // 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); - } + // 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); + + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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 f_GEONW_PON_BAA_BV_11_nodeB + } // end f_GEONW_PON_GAC_AREA_ALL_BV_05 - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_BAA_BV_11) - */ - function f_GEONW_PON_BAA_BV_11_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_getGeoBroadcastCbfMaxTime()) - + ( - int2float(f_getGeoBroadcastCbfMinTime() - f_getGeoBroadcastCbfMaxTime()) - / int2float(f_getCbfMaxCommunicationRange()) - ) * f_distance(v_longPosVectorNodeB, v_longPosVectorIut)) * 0.95 / 1000.0; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); + group GEONW_PON_GAC_AREA_ALL_BO_08 { - // Test Body - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - 0, - f_getGeoBroadcastArea(c_area1) - ) - ) - )); + /** + * @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 f_GEONW_PON_GAC_AREA_ALL_BO_08 - 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); - } + /** + * @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; + var GnRawPayload v_sentRawPayload; + + // Preamble + f_prNeighbour(); + + f_sleep(PX_TAC); + + v_gnPacket := m_geoNwPdu(m_geoNwAnycastPacket( + v_longPosVectorNodeD, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area1) + ), + -, + c_defaultHopLimit + ); + v_sentRawPayload := f_adaptPayloadForUtInd_m(v_gnPacket.gnPacket.packet.payload); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_sentRawPayload); 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); } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; + else { + log("*** " & testcasename() & ": INCONC: GN was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + + // 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 f_GEONW_PON_GAC_AREA_ALL_BO_08_nodeB - // Postamble - f_poNeighbour(); + /** + * @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 f_GEONW_PON_GAC_AREA_ALL_BO_08_nodeD - } // end f_GEONW_PON_BAA_BV_11_nodeD - - } // end GEONW_PON_BAA_BV_11 + } // end GEONW_PON_GAC_AREA_ALL_BO_08 - } // end geoGeoBroadcastCbfAlgorithm + } // end gacAreaForwarding + + } // end geoGeoAnycast } // end geoProtocolOperation -- GitLab