diff --git a/javasrc/adapter/org/etsi/its/adapter/layers/BtpLayer.java b/javasrc/adapter/org/etsi/its/adapter/layers/BtpLayer.java index 092945cbd88ea4cc66af6ed0ea5dfb8fb8b48456..90f73924b728836df769906819485805d934d575 100644 --- a/javasrc/adapter/org/etsi/its/adapter/layers/BtpLayer.java +++ b/javasrc/adapter/org/etsi/its/adapter/layers/BtpLayer.java @@ -8,6 +8,7 @@ */ package org.etsi.its.adapter.layers; +import java.util.HashMap; import java.util.Map; import java.util.Stack; @@ -121,6 +122,9 @@ public class BtpLayer extends Layer { byte[] payload = new byte[payloadLength]; System.arraycopy(message, 4, payload, 0, payloadLength); + lowerInfo.put(BTP_DSTPORT, dstPort); + lowerInfo.put(BTP_DSTPORTINFO, srcPort); + super.receive(payload, lowerInfo); } } diff --git a/javasrc/adapter/org/etsi/its/adapter/layers/GnLayer.java b/javasrc/adapter/org/etsi/its/adapter/layers/GnLayer.java index 5c9908ba609308e17b2b50fe5b09a177f0172c43..34875bd64d347bbd7bf4d1002089880a41246d73 100644 --- a/javasrc/adapter/org/etsi/its/adapter/layers/GnLayer.java +++ b/javasrc/adapter/org/etsi/its/adapter/layers/GnLayer.java @@ -79,7 +79,16 @@ public class GnLayer extends Layer implements Runnable, IEthernetSpecific { * Parameter name for destination area's angle */ public static final String GN_ANGLE = "GnAngle"; + + /** + * Parameter name for traffic class + */ + public static final String GN_TRAFFICCLASS = "GnTrafficClass"; + /** + * Parameter name for packet's lifetime + */ + public static final String GN_LIFETIME = "GnLifetime"; /** * GeoNetworking header type for unknown messages @@ -295,15 +304,20 @@ public class GnLayer extends Layer implements Runnable, IEthernetSpecific { public void receive(byte[] message, Map lowerInfo) { // System.out.println(">>> GnLayer.receive: " + ByteHelper.byteArrayToString(message)); - byte[] basicHdr = new byte[4]; // TODO To be removed + byte[] basicHdr = new byte[4]; System.arraycopy(message, 4, basicHdr, 0, 4); byte[] versionNh = new byte[1]; System.arraycopy(basicHdr, 0, versionNh, 0, 1); - int nextHeader = (int)(versionNh[0] & (byte)0x0F); + byte nextHeader = (byte)(versionNh[0] & (byte)0x0F); + int lt_multiplier = (int)(basicHdr[2] & (byte)0xFC) >> 2; + int lt_base = (int)(basicHdr[2] & (byte)0x03); + int lifetime = computeGnLifeTime(lt_multiplier, lt_base); if (!management.isSecuredModeSet()) { // Secure mode disabled byte[] commonHdr = new byte[8]; System.arraycopy(message, 4, commonHdr, 0, 8); + nextHeader = (byte)((commonHdr[0] & (byte)0xF0) >> 4); + int trafficClass = (int)(commonHdr[2]); byte[] htHst = new byte[1]; System.arraycopy(commonHdr, 1, htHst, 0, 1); @@ -343,6 +357,10 @@ public class GnLayer extends Layer implements Runnable, IEthernetSpecific { byte[] payload = new byte[payloadLength]; System.arraycopy(message, message.length - payloadLength, payload, 0, payloadLength); lowerInfo.put(GN_NEXTHEADER, nextHeader); + lowerInfo.put(GN_TYPE, headerType); + lowerInfo.put(GN_SUBTYPE, headerSubType); + lowerInfo.put(GN_LIFETIME, lifetime); + lowerInfo.put(GN_TRAFFICCLASS, trafficClass); super.receive(payload, lowerInfo); } } @@ -395,6 +413,8 @@ public class GnLayer extends Layer implements Runnable, IEthernetSpecific { byte[] commonHdr = new byte[8]; System.arraycopy(message, offset, commonHdr, 0, 8); // System.out.println("GnLayer.receive: commonHdr: " + ByteHelper.byteArrayToString(commonHdr)); + nextHeader = (byte)((commonHdr[0] & (byte)0xF0) >> 4); + int trafficClass = (int)(commonHdr[2]); byte[] htHst = new byte[1]; System.arraycopy(commonHdr, 1, htHst, 0, 1); @@ -432,9 +452,11 @@ public class GnLayer extends Layer implements Runnable, IEthernetSpecific { if(payloadLength > 0) { byte[] payload = new byte[payloadLength]; System.arraycopy(message, message.length - payloadLength - 68, payload, 0, payloadLength); -// System.out.println("GnLayer.receive: payload: " + ByteHelper.byteArrayToString(payload)); lowerInfo.put(GN_NEXTHEADER, nextHeader); -// System.out.println("GnLayer.receive: call super.receive: " + ByteHelper.byteArrayToString(payload)); + lowerInfo.put(GN_TYPE, headerType); + lowerInfo.put(GN_SUBTYPE, headerSubType); + lowerInfo.put(GN_LIFETIME, lifetime); + lowerInfo.put(GN_TRAFFICCLASS, trafficClass); super.receive(payload, lowerInfo); } } @@ -443,6 +465,19 @@ public class GnLayer extends Layer implements Runnable, IEthernetSpecific { } // End of method receive /** + * Computes GN lifetime value + * @param lt_multiplier GN LT multiplier + * @param lt_base GN LT base + * @return GN lifetime value in ms + */ + private int computeGnLifeTime(int lt_multiplier, int lt_base) { + + final int[] base = {50, 1000, 10000, 100000}; + + return base[lt_base] * lt_multiplier; + } + + /** * Builds encoded Basic Header * @return Encoded Basic Header */ diff --git a/javasrc/adapter/org/etsi/its/adapter/ports/CamPort.java b/javasrc/adapter/org/etsi/its/adapter/ports/CamPort.java index 76d9f002ba9ca18975de70f44ba79d809fe752f7..25b432d47bacb3c514ea777d075bced1afeed0c2 100644 --- a/javasrc/adapter/org/etsi/its/adapter/ports/CamPort.java +++ b/javasrc/adapter/org/etsi/its/adapter/ports/CamPort.java @@ -9,7 +9,9 @@ package org.etsi.its.adapter.ports; import java.util.HashMap; +import java.util.Map; +import org.etsi.common.ByteHelper; import org.etsi.its.adapter.layers.BtpLayer; import org.etsi.its.adapter.layers.GnLayer; @@ -18,7 +20,7 @@ import org.etsi.its.adapter.layers.GnLayer; */ public class CamPort extends ProtocolPort { - /** + /** * Constructor * @param portName Name of the port * @param componentName Name of the component owning this port instance @@ -29,6 +31,25 @@ public class CamPort extends ProtocolPort { super(portName, componentName, lowerStackDesc, linkLayerAddress); } + /* (non-Javadoc) + * @see org.etsi.its.adapter.ports.ProtocolPort#receive(byte[], java.util.Map) + */ + @Override + public void receive(byte[] message, Map lowerInfo) { + + // Encode with CAM indication header + byte[] msgInd = ByteHelper.concat( + message, + (byte[])lowerInfo.get(GnLayer.GN_NEXTHEADER), + (byte[])lowerInfo.get(GnLayer.GN_TYPE), + (byte[])lowerInfo.get(GnLayer.GN_SUBTYPE), + (byte[])lowerInfo.get(GnLayer.GN_LIFETIME), + (byte[])lowerInfo.get(GnLayer.GN_TRAFFICCLASS), + (byte[])lowerInfo.get(BtpLayer.BTP_DSTPORT), + (byte[])lowerInfo.get(BtpLayer.BTP_DSTPORTINFO)); + super.receive(msgInd, lowerInfo); + } + /* (non-Javadoc) * @see org.etsi.its.adapter.ports.IPort#send(byte[]) */ diff --git a/javasrc/adapter/org/etsi/its/adapter/ports/DenmPort.java b/javasrc/adapter/org/etsi/its/adapter/ports/DenmPort.java index 2f2c146156e682c50e0fc66cc2b0cf843e31eb08..37bde8d3f510f6b504a4644ac64ab0f6f60cb0e3 100644 --- a/javasrc/adapter/org/etsi/its/adapter/ports/DenmPort.java +++ b/javasrc/adapter/org/etsi/its/adapter/ports/DenmPort.java @@ -9,7 +9,9 @@ package org.etsi.its.adapter.ports; import java.util.HashMap; +import java.util.Map; +import org.etsi.common.ByteHelper; import org.etsi.its.adapter.layers.BtpLayer; import org.etsi.its.adapter.layers.GnLayer; @@ -29,6 +31,25 @@ public class DenmPort extends ProtocolPort { super(portName, componentName, lowerStackDesc, linkLayerAddress); } + /* (non-Javadoc) + * @see org.etsi.its.adapter.ports.ProtocolPort#receive(byte[], java.util.Map) + */ + @Override + public void receive(byte[] message, Map lowerInfo) { + + // Encode with CAM indication header + byte[] msgInd = ByteHelper.concat( + message, + (byte[])lowerInfo.get(GnLayer.GN_NEXTHEADER), + (byte[])lowerInfo.get(GnLayer.GN_TYPE), + (byte[])lowerInfo.get(GnLayer.GN_SUBTYPE), + (byte[])lowerInfo.get(GnLayer.GN_LIFETIME), + (byte[])lowerInfo.get(GnLayer.GN_TRAFFICCLASS), + (byte[])lowerInfo.get(BtpLayer.BTP_DSTPORT), + (byte[])lowerInfo.get(BtpLayer.BTP_DSTPORTINFO)); + super.receive(msgInd, lowerInfo); + } + /* (non-Javadoc) * @see org.etsi.its.adapter.ports.IPort#send(byte[]) */ diff --git a/javasrc/codec/org/etsi/ttcn/codec/CodecFactory.java b/javasrc/codec/org/etsi/ttcn/codec/CodecFactory.java index 44d512d5e405d640cc9b74316153cc2b53b43b79..69db1c76bc4e1c51059cf4ec2ffdaee20598231f 100644 --- a/javasrc/codec/org/etsi/ttcn/codec/CodecFactory.java +++ b/javasrc/codec/org/etsi/ttcn/codec/CodecFactory.java @@ -64,6 +64,7 @@ public class CodecFactory { org.etsi.ttcn.codec.its.geonetworking.Plugin.init(); org.etsi.ttcn.codec.its.btp.Plugin.init(); org.etsi.ttcn.codec.its.security.Plugin.init(); + org.etsi.ttcn.codec.its.facilities.Plugin.init(); } } diff --git a/javasrc/codec/org/etsi/ttcn/codec/its/facilities/FacilitiesInd.java b/javasrc/codec/org/etsi/ttcn/codec/its/facilities/FacilitiesInd.java new file mode 100644 index 0000000000000000000000000000000000000000..eb2761fe4bd01cdd9429229d57cb9e94001ce8d3 --- /dev/null +++ b/javasrc/codec/org/etsi/ttcn/codec/its/facilities/FacilitiesInd.java @@ -0,0 +1,85 @@ +/** + * @author ETSI / STF462 / Alexandre Berge + * @version $URL$ + * $Id$ + */ +package org.etsi.ttcn.codec.its.facilities; + +import org.etsi.ttcn.codec.CodecBuffer; +import org.etsi.ttcn.codec.MainCodec; +import org.etsi.ttcn.codec.generic.Record; +import org.etsi.ttcn.tci.RecordValue; +import org.etsi.ttcn.tci.Type; +import org.etsi.ttcn.tci.Value; + +public class FacilitiesInd extends Record { + + public FacilitiesInd(MainCodec mainCodec) { + super(mainCodec); + } + + @Override + protected void preDecode(CodecBuffer buf, Type decodingHypothesis) { + + int msgLen = buf.getNbBits() - 8 - 8 - 8 - 32 - 8 - 16 - 16; + int offset = 0; + + messageBuffer = buf.getBuffer(offset, msgLen); offset += msgLen; + gnNh = buf.getBuffer(offset, 8); offset += 8; + gnHt = buf.getBuffer(offset, 8); offset += 8; + gnHst = buf.getBuffer(offset, 8); offset += 8; + gnLifetime = buf.getBuffer(offset, 32); offset += 32; + gnTc = buf.getBuffer(offset, 8); offset += 8; + btpDestinationPort = buf.getBuffer(offset, 16); offset += 16; + btpInfo = buf.getBuffer(offset, 16); offset += 16; + } + + @Override + protected void preDecodeField(String fieldName, CodecBuffer buf, Type decodingHypothesis, RecordValue rv) { + + if(fieldName.equals("gnNextHeader")) { + buf.overwriteWith(gnNh); + } + else if(fieldName.equals("gnHeaderType")) { + buf.overwriteWith(gnHt); + } + else if(fieldName.equals("gnHeaderSubtype")) { + buf.overwriteWith(gnHst); + } + else if(fieldName.equals("gnLifetime")) { + buf.overwriteWith(gnLifetime); + } + else if(fieldName.equals("gnTrafficClass")) { + buf.overwriteWith(gnTc); + } + else if(fieldName.equals("btpDestinationPort")) { + buf.overwriteWith(btpDestinationPort); + } + else if(fieldName.equals("btpInfo")) { + buf.overwriteWith(btpInfo); + } + else { + buf.overwriteWith(messageBuffer); + } + } + + @Override + protected void postDecodeField(String fieldName, CodecBuffer buf, Type decodingHypothesis, RecordValue rv) { + + } + + @Override + public CodecBuffer encode(Value value) { + + return super.encode(value); + } + + private CodecBuffer messageBuffer = null; + private CodecBuffer gnNh = null; + private CodecBuffer gnHt = null; + private CodecBuffer gnHst = null; + private CodecBuffer gnLifetime = null; + private CodecBuffer gnTc = null; + private CodecBuffer btpDestinationPort = null; + private CodecBuffer btpInfo = null; +} diff --git a/javasrc/codec/org/etsi/ttcn/codec/its/facilities/Plugin.java b/javasrc/codec/org/etsi/ttcn/codec/its/facilities/Plugin.java new file mode 100644 index 0000000000000000000000000000000000000000..a072752ef5b56c021e5f2006e77c576857940532 --- /dev/null +++ b/javasrc/codec/org/etsi/ttcn/codec/its/facilities/Plugin.java @@ -0,0 +1,19 @@ +/** + * @author ETSI / STF484 / Alexandre Berge + * @version $URL$ + * $Id$ + */ +package org.etsi.ttcn.codec.its.facilities; + +import org.etsi.ttcn.tci.TciTypeClass; +import org.etsi.ttcn.codec.CodecFactory; + +public class Plugin { + + public static void init() { + + CodecFactory cf = CodecFactory.getInstance(); + cf.setCodec(TciTypeClass.RECORD, "LibIts_Interface", "CamInd", FacilitiesInd.class); + cf.setCodec(TciTypeClass.RECORD, "LibIts_Interface", "DenmInd", FacilitiesInd.class); + } +} \ No newline at end of file diff --git a/javasrc/codec/org/etsi/ttcn/codec/its/uppertester/UtDenmTrigger.java b/javasrc/codec/org/etsi/ttcn/codec/its/uppertester/UtDenmTrigger.java index 53fa668e0108598ecaae3edcc85af5bec84b9f55..5c08a495a498a4b4288d538820ec116d70545a94 100644 --- a/javasrc/codec/org/etsi/ttcn/codec/its/uppertester/UtDenmTrigger.java +++ b/javasrc/codec/org/etsi/ttcn/codec/its/uppertester/UtDenmTrigger.java @@ -96,6 +96,7 @@ public class UtDenmTrigger extends UtRecord implements IMarkerCallback { validityDuration(0x80), repetitionDuration(0x40), transmissionInterval(0x04), + repetitionInterval(0x02), /* DenmUpdate */ //validityDuration(0x80), @@ -104,6 +105,7 @@ public class UtDenmTrigger extends UtRecord implements IMarkerCallback { relevanceTrafficDirection(0x10), trafficClass(0x08), //transmissionInterval(0x04), + //repetitionInterval(0x02), /* Reserved */ reserved(0x00); diff --git a/ttcn/AtsCAM/ItsCam_TestCases.ttcn b/ttcn/AtsCAM/ItsCam_TestCases.ttcn index 880fed0af3e7144078fb67437a4d804d2f1d8090..246cb57cfbf647cddb56544117c738e55fbabe0d 100644 --- a/ttcn/AtsCAM/ItsCam_TestCases.ttcn +++ b/ttcn/AtsCAM/ItsCam_TestCases.ttcn @@ -1,32 +1,18 @@ /** - * @author ETSI / STF405 / STF449 + * @author ETSI / STF405 / STF449 / STF484 * @version $URL$ * $Id$ - * @desc CAM Testcases (TP version: 0.0.1) + * @desc CAM Testcases * */ module ItsCam_TestCases { - // LibCommon - import from LibCommon_Sync all; - import from LibCommon_VerdictControl all; - import from LibCommon_Time all; - // LibIts - import from LibItsCommon_Functions all; - import from LibItsCommon_TypesAndValues { - type UtChangePosition - }; import from LibItsCam_TestSystem all; - import from LibItsCam_Functions all; - import from LibItsCam_Templates all; - import from LibItsCam_TypesAndValues all; - import from LibItsCam_Pics {modulepar all}; - import from ITS_Container language "ASN.1:1997" all; - import from CAM_PDU_Descriptions language "ASN.1:1997" all; - import from DENM_PDU_Descriptions language "ASN.1:1997" all; + // Ats Its + import from ItsCam_TpFunctions all; // 5.2.1 group camMessageDissemination { @@ -37,7 +23,7 @@ module ItsCam_TestCases { * @desc Check that protocolVersion is set to 1 and messageID is * set to 2. *
-             * Pics Selection: PICS_CAMHEADER
+             * Pics Selection: PICS_CAM_GENERATION
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -58,42 +44,12 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/FMT/BV-01 + * @see ETSI TS 102 868-2 TP/CAM/MSD/FMT/BV-01 * @reference ETSI EN 302 637-2 , Annex B.1 */ testcase TC_CAM_MSD_FMT_BV_01() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_any )){ - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_FMT_BV_01(); } // end TC_CAM_MSD_FMT_BV_01 @@ -101,7 +57,7 @@ module ItsCam_TestCases { * @desc Check that LF container is included in 1st CAM since CA * basic service activation. *
-             * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+             * Pics Selection: PICS_CAM_GENERATION
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -121,47 +77,12 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/FMT/BV-02 + * @see ETSI TS 102 868-2 TP/CAM/MSD/FMT/BV-02 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_FMT_BV_02() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_LF_any )){ - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] camPort.receive(mw_camInd ( mw_camMsg_any )){ - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Expected CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_FMT_BV_02(); } // end TC_CAM_MSD_FMT_BV_02 @@ -170,7 +91,7 @@ module ItsCam_TestCases { * the generation of the last CAM with the low frequency * container generation is equal or larger than 500 ms. *
-             * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+             * Pics Selection: PICS_CAM_GENERATION
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -197,104 +118,20 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/FMT/BV-03 + * @see ETSI TS 102 868-2 TP/CAM/MSD/FMT/BV-03 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_FMT_BV_03() runs on ItsCam system ItsCamSystem { - // Local variables - timer t_minTransInterval := c_lowFrequencyGenerationTime * 1.05; - var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s - var integer v_cntSpeed, v_cntTime; - var CamInd v_camInd; - var boolean v_nextCamWithLF := false; - const integer c_cntTimeLimit := 10; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - camPort.clear; - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_LF_any )){ - tc_ac.stop; - t_minTransInterval.start; - log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - } - } - - // Test Body - for (v_cntSpeed:=0; v_cntSpeed value v_camInd { - tc_ac.stop; - if(v_nextCamWithLF == true) { - log("*** " & testcasename() & ": FAIL: No LowFrequency container in received CAM ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": INFO: CAM retransmission w/o LowFrequency container ***"); - tc_ac.start; - repeat; - } - } - [] t_minTransInterval.timeout { - v_nextCamWithLF := true; - log("*** " & testcasename() & ": INFO: Next CAM shall contain LowFrequency container ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - } - log("*** " & testcasename() & ": PASS: Generation of CAM messages including lowFrequencyContainer was successful ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_FMT_BV_03(); } // end TC_CAM_MSD_FMT_BV_03 - /** * @desc Check that specialVehicle container is included in 1st CAM * since CA basic service activation. *
-             * Pics Selection: PICS_SPECIALVEHICLECONTAINER
+             * Pics Selection: PICS_CAM_GENERATION AND PICS_SPECIALVEHICLECONTAINER
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -315,49 +152,12 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/FMT/BV-04 + * @see ETSI TS 102 868-2 TP/CAM/MSD/FMT/BV-04 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_FMT_BV_04() runs on ItsCam system ItsCamSystem { - // Local variables - var VehicleRole v_vehicleRole := c_vehicleRole_roadWork; - - // Test control - if (not PICS_SPECIALVEHICLECONTAINER) { - testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER needs to be set to true"); - } - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Set vehicle role - f_utTriggerEvent(m_setVehicleRole(v_vehicleRole)); - - // Test Body - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_SVC_any )){ - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_FMT_BV_04(); } // end TC_CAM_MSD_FMT_BV_04 @@ -367,7 +167,7 @@ module ItsCam_TestCases { * special vehicle container generation is equal or larger * than 500 ms. *
-             * Pics Selection: PICS_SPECIALVEHICLECONTAINER
+             * Pics Selection: PICS_CAM_GENERATION AND PICS_SPECIALVEHICLECONTAINER
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -394,101 +194,12 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/FMT/BV-05 + * @see ETSI TS 102 868-2 TP/CAM/MSD/FMT/BV-05 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_FMT_BV_05() runs on ItsCam system ItsCamSystem { - // Local variables - timer t_minTransInterval := c_specialVehicleGenerationTime * 1.05; - var VehicleRole v_vehicleRole := roadWork; - var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s - var integer v_cntSpeed, v_cntTime; - var CamInd v_camInd; - var boolean v_nextCamWithSVC := false; - const integer c_cntTimeLimit := 10; - - // Test control - if (not PICS_SPECIALVEHICLECONTAINER) { - testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER needs to be set to true"); - } - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - // Set vehicle role - f_utTriggerEvent(m_setVehicleRole(v_vehicleRole)); - camPort.clear; - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_SVC_any )){ - tc_ac.stop; - t_minTransInterval.start; - log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - } - } - - // Test Body - for (v_cntSpeed:=0; v_cntSpeed value v_camInd { - tc_ac.stop; - if(v_nextCamWithSVC == true) { - log("*** " & testcasename() & ": FAIL: No SpecialVehicle container in received CAM ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": INFO: CAM retransmission w/o SpecialVehicle container ***"); - tc_ac.start; - repeat; - } - } - [] t_minTransInterval.timeout { - v_nextCamWithSVC := true; - log("*** " & testcasename() & ": INFO: Next CAM shall contain SpecialVehicle container ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - } - log("*** " & testcasename() & ": PASS: Generation of CAM messages including SpecialVehicleContainer was successful ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_FMT_BV_05(); } // end TC_CAM_MSD_FMT_BV_05 @@ -498,49 +209,11 @@ module ItsCam_TestCases { group camInVehicleData { - type record of UtCamTrigger UtCamTriggers; - type record of CAM CamPdus; - - function f_CAM_MSD_INA_BV_01(in charstring p_INFO, in template (value) UtCamTriggers p_utTriggers, in template (present) CamPdus p_camPdus) runs on ItsCam { - - // Local variables - var integer v_cnt; - - log("*** " & testcasename() & ": Checking INFO==" & p_INFO & " ***"); - - if (lengthof(p_utTriggers) != lengthof(p_camPdus)) { - log("*** " & testcasename() & ": INCONC: Invalid testcase configuration: Number of event triggers and expected CAM messages differs ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - for (v_cnt:=0; v_cnt - * Pics Selection: PICS_HIGHFREQUENCYCONTAINER + * Pics Selection: PICS_CAM_GENERATION * Initial conditions: * with { * the IUT being in the "initial state @@ -565,62 +238,12 @@ module ItsCam_TestCases { * } * * - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_01() runs on ItsCam system ItsCamSystem { - // Local variables - var CamInd v_camInd; - var template (present) CurvatureValue v_curVal := ?; - var boolean v_initialReceived := false; - const CurvatureValue c_curValOffset := 1; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - log("*** " & testcasename() & ": Checking INFO==Curvature value ***"); - - // change the curvature value to retrieve the current value - f_utTriggerEvent(m_changeCurvature(c_curValOffset)); - - tc_ac.start; - alt { - [] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_curvature(v_curVal)) )) -> value v_camInd { - tc_ac.stop; - if (v_initialReceived) { - log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***"); - v_initialReceived := true; - //change again the curvature value and set the expectation to the measured value - v_curVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.curvature.curvatureValue+c_curValOffset; - f_utTriggerEvent(m_changeCurvature(c_curValOffset)); - tc_ac.start; - repeat; - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_01(); } // end TC_CAM_MSD_INA_BV_01_01 @@ -628,7 +251,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -654,35 +277,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-02 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-02 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_02() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Brake pedal being activated", - { m_setAccelerationControlStatus(c_brakePedalEngaged) }, - { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_On)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_02(); } // end TC_CAM_MSD_INA_BV_01_02 @@ -690,7 +290,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -716,35 +316,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-03 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-03 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_03() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Brake pedal being deactivated", - { m_setAccelerationControlStatus(c_brakePedalEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, - { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_Off)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_03(); } // end TC_CAM_MSD_INA_BV_01_03 @@ -752,7 +329,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -778,35 +355,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-04 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-04 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_04() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Gas pedal being activated", - { m_setAccelerationControlStatus(c_gasPedalEngaged) }, - { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_On)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_04(); } // end TC_CAM_MSD_INA_BV_01_04 @@ -814,7 +368,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -840,35 +394,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-05 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-05 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_05() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Gas pedal being deactivated", - { m_setAccelerationControlStatus(c_gasPedalEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, - { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_Off)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_05(); } // end TC_CAM_MSD_INA_BV_01_05 @@ -876,7 +407,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -902,35 +433,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-06 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-06 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_06() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Emergency brake being activated", - { m_setAccelerationControlStatus(c_emergencyBrakeEngaged) }, - { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_On)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_06(); } // end TC_CAM_MSD_INA_BV_01_06 @@ -938,7 +446,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -964,35 +472,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-07 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-07 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_07() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Emergency brake being deactivated", - { m_setAccelerationControlStatus(c_emergencyBrakeEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, - { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_Off)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_07(); } // end TC_CAM_MSD_INA_BV_01_07 @@ -1000,7 +485,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1026,35 +511,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-08 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-08 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_08() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Collision warning being activated", - { m_setAccelerationControlStatus(c_collisionWarningEngaged) }, - { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_On)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_08(); } // end TC_CAM_MSD_INA_BV_01_08 @@ -1062,7 +524,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1088,35 +550,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-09 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-09 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_09() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Collision warning being deactivated", - { m_setAccelerationControlStatus(c_collisionWarningEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, - { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_Off)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_09(); } // end TC_CAM_MSD_INA_BV_01_09 @@ -1124,7 +563,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1150,35 +589,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-10 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-10 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_10() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "ACC being activated", - { m_setAccelerationControlStatus(c_accEngaged) }, - { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_On)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_10(); } // end TC_CAM_MSD_INA_BV_01_10 @@ -1186,7 +602,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1212,35 +628,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-11 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-11 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_11() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "ACC being deactivated", - { m_setAccelerationControlStatus(c_accEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, - { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_Off)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_11(); } // end TC_CAM_MSD_INA_BV_01_11 @@ -1248,7 +641,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1274,35 +667,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-12 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-12 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_12() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Cruise control being activated", - { m_setAccelerationControlStatus(c_cruiseControlEngaged) }, - { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_On)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_12(); } // end TC_CAM_MSD_INA_BV_01_12 @@ -1310,7 +680,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1336,35 +706,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-13 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-13 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_13() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Cruise control being deactivated", - { m_setAccelerationControlStatus(c_cruiseControlEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, - { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_Off)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_13(); } // end TC_CAM_MSD_INA_BV_01_13 @@ -1372,7 +719,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1398,35 +745,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-14 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-14 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_14() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Speed limiter being activated", - { m_setAccelerationControlStatus(c_speedLimiterEngaged) }, - { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_On)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_14(); } // end TC_CAM_MSD_INA_BV_01_14 @@ -1434,7 +758,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1460,35 +784,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-15 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-15 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_15() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Speed limiter control being deactivated", - { m_setAccelerationControlStatus(c_speedLimiterEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, - { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_Off)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_15(); } // end TC_CAM_MSD_INA_BV_01_15 @@ -1496,7 +797,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1522,35 +823,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-16 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-16 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_16() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Low beam headlights being activated", - { m_setExteriorLightsStatus(c_lowBeamHeadlightsOn) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOn)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_16(); } // end TC_CAM_MSD_INA_BV_01_16 @@ -1558,7 +836,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1584,35 +862,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-17 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-17 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_17() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Low beam headlights being deactivated", - { m_setExteriorLightsStatus(c_lowBeamHeadlightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOff)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_17(); } // end TC_CAM_MSD_INA_BV_01_17 @@ -1620,7 +875,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1646,35 +901,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-18 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-18 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_18() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "High beam headlights being activated", - { m_setExteriorLightsStatus(c_highBeamHeadlightsOn) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOn)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_18(); } // end TC_CAM_MSD_INA_BV_01_18 @@ -1682,7 +914,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1708,35 +940,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-19 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-19 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_19() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "High beam headlights being deactivated", - { m_setExteriorLightsStatus(c_highBeamHeadlightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOff)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_19(); } // end TC_CAM_MSD_INA_BV_01_19 @@ -1744,7 +953,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1770,35 +979,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-20 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-20 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_20() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Left turn signal being activated", - { m_setExteriorLightsStatus(c_leftTurnSignalOn) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOn)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_20(); } // end TC_CAM_MSD_INA_BV_01_20 @@ -1806,7 +992,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1832,35 +1018,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-21 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-21 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_21() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Left turn signal being deactivated", - { m_setExteriorLightsStatus(c_leftTurnSignalOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOff)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_21(); } // end TC_CAM_MSD_INA_BV_01_21 @@ -1868,7 +1031,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1894,35 +1057,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-22 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-22 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_22() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Right turn signal being activated", - { m_setExteriorLightsStatus(c_rightTurnSignalOn) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOn)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_22(); } // end TC_CAM_MSD_INA_BV_01_22 @@ -1930,7 +1070,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -1956,35 +1096,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-23 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-23 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_23() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Right turn signal being deactivated", - { m_setExteriorLightsStatus(c_rightTurnSignalOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOff)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_23(); } // end TC_CAM_MSD_INA_BV_01_23 @@ -1992,7 +1109,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -2018,35 +1135,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-24 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-24 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_24() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Daytime running lights being activated", - { m_setExteriorLightsStatus(c_daytimeRunningLightsOn) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOn)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_24(); } // end TC_CAM_MSD_INA_BV_01_24 @@ -2054,7 +1148,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -2080,35 +1174,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-25 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-25 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_25() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Daytime running lights being deactivated", - { m_setExteriorLightsStatus(c_daytimeRunningLightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOff)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_25(); } // end TC_CAM_MSD_INA_BV_01_25 @@ -2116,7 +1187,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -2142,35 +1213,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-26 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-26 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_26() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Reverse light being activated", - { m_setExteriorLightsStatus(c_reverseLightOn) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOn)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_26(); } // end TC_CAM_MSD_INA_BV_01_26 @@ -2178,7 +1226,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -2204,35 +1252,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-27 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-27 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_27() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Reverese light being deactivated", - { m_setExteriorLightsStatus(c_reverseLightOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOff)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_27(); } // end TC_CAM_MSD_INA_BV_01_27 @@ -2240,7 +1265,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -2266,35 +1291,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-28 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-28 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_28() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Fog lights being activated", - { m_setExteriorLightsStatus(c_fogLightOn) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOn)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_28(); } // end TC_CAM_MSD_INA_BV_01_28 @@ -2302,7 +1304,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -2328,35 +1330,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-29 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-29 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_29() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Fog lights being deactivated", - { m_setExteriorLightsStatus(c_fogLightOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOff)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_29(); } // end TC_CAM_MSD_INA_BV_01_29 @@ -2364,7 +1343,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -2390,35 +1369,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-30 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-30 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_30() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Parking lights being activated", - { m_setExteriorLightsStatus(c_parkingLightsOn) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOn)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_30(); } // end TC_CAM_MSD_INA_BV_01_30 @@ -2426,7 +1382,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_LOWFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -2452,35 +1408,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-31 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-31 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_31() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_CAM_MSD_INA_BV_01( - "Parking lights being deactivated", - { m_setExteriorLightsStatus(c_parkingLightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, - { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOff)) } - ); - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_31(); } // end TC_CAM_MSD_INA_BV_01_31 @@ -2488,7 +1421,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -2513,62 +1446,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-32 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-32 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_32() runs on ItsCam system ItsCamSystem { - // Local variables - var CamInd v_camInd; - var template (present) HeadingValue v_headingVal := ?; - var boolean v_initialReceived := false; - const HeadingValue c_headingValOffset := 1; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - log("*** " & testcasename() & ": Checking INFO==Heading value ***"); - - // change the heading value to retrieve the current value - f_utTriggerEvent(m_changeHeading(c_headingValOffset)); - - tc_ac.start; - alt { - [] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_heading(v_headingVal)) )) -> value v_camInd { - tc_ac.stop; - if (v_initialReceived) { - log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***"); - v_initialReceived := true; - //change again the heading value and set the expectation to the measured value - v_headingVal := (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue+c_headingValOffset) mod 3601; - f_utTriggerEvent(m_changeHeading(c_headingValOffset)); - tc_ac.start; - repeat; - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_32(); } // end TC_CAM_MSD_INA_BV_01_32 @@ -2576,7 +1459,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -2601,62 +1484,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-33 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-33 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_33() runs on ItsCam system ItsCamSystem { - // Local variables - var CamInd v_camInd; - var template (present) SpeedValue v_speedVal := ?; - var boolean v_initialReceived := false; - const SpeedValue c_speedValOffset := 1; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - log("*** " & testcasename() & ": Checking INFO==Speed value ***"); - - // change the speed value to retrieve the current value - f_utTriggerEvent(m_changeSpeed(c_speedValOffset)); - - tc_ac.start; - alt { - [] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_speed(v_speedVal)) )) -> value v_camInd { - tc_ac.stop; - if (v_initialReceived) { - log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***"); - v_initialReceived := true; - //change again the speed value and set the expectation to the measured value - v_speedVal := (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.speed.speedValue+c_speedValOffset) mod 16384; - f_utTriggerEvent(m_changeSpeed(c_speedValOffset)); - tc_ac.start; - repeat; - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_33(); } // end TC_CAM_MSD_INA_BV_01_33 @@ -2664,7 +1497,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -2689,59 +1522,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-34 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-34 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_34() runs on ItsCam system ItsCamSystem { - // Local variables - var CamInd v_camInd; - var DriveDirection v_driveVal := backward; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - log("*** " & testcasename() & ": Checking INFO==Drive direction value ***"); - - // change the drive direction - f_utTriggerEvent(m_setDriveDirection(v_driveVal)); - - tc_ac.start; - alt { - [] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_driveDirection(v_driveVal)) )) -> value v_camInd { - tc_ac.stop; - if (v_driveVal==forward) { - log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***"); - //change again the drive direction and set the expectation to the measured value - v_driveVal := forward; - f_utTriggerEvent(m_setDriveDirection(v_driveVal)); - tc_ac.start; - repeat; - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_34(); } // end TC_CAM_MSD_INA_BV_01_34 @@ -2749,7 +1535,7 @@ module ItsCam_TestCases { * @desc Check that latest value of in-vehicle data is included * in CAM. *
-                 * Pics Selection: PICS_HIGHFREQUENCYCONTAINER
+                 * Pics Selection: PICS_CAM_GENERATION
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state
@@ -2774,68 +1560,12 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-01-35 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-01-35 * @reference ETSI EN 302 637-2 , clause 5.2 */ testcase TC_CAM_MSD_INA_BV_01_35() runs on ItsCam system ItsCamSystem { - // Local variables - var CamInd v_camInd; - var template (present) YawRateValue v_yawRateVal := ?; - var boolean v_initialReceived := false; - const YawRateValue c_yawRateValOffset := 1; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - log("*** " & testcasename() & ": Checking INFO==Yaw rate value ***"); - - // change the yaw rate value to retrieve the current value - f_utTriggerEvent(m_changeYawRate(c_yawRateValOffset)); - - tc_ac.start; - alt { - [] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_yawRate(v_yawRateVal)) )) -> value v_camInd { - tc_ac.stop; - if (v_initialReceived) { - log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***"); - v_initialReceived := true; - //change again the yaw rate value and set the expectation to the measured value - v_yawRateVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.yawRate.yawRateValue; - if (valueof(v_yawRateVal)>=32767) { - v_yawRateVal := -32766; - } - else { - v_yawRateVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.yawRate.yawRateValue+c_yawRateValOffset; - } - f_utTriggerEvent(m_changeYawRate(c_yawRateValOffset)); - tc_ac.start; - repeat; - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_01_35(); } // end TC_CAM_MSD_INA_BV_01_35 @@ -2845,7 +1575,7 @@ module ItsCam_TestCases { * @desc Check that publicTransportContainer is included if * vehicleRole is set to publicTransport(1). *
-             * Pics Selection: PICS_PUBLICTRANS
+             * Pics Selection: PICS_CAM_GENERATION AND PICS_PUBLICTRANS
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -2866,50 +1596,12 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-02 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-02 * @reference ETSI EN 302 637-2 , Annex B.11 */ testcase TC_CAM_MSD_INA_BV_02() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - if (not PICS_SPECIALVEHICLECONTAINER and not PICS_PUBLICTRANS) { - testcase.stop(testcasename() - & ": PICS_SPECIALVEHICLECONTAINER and PICS_PUBLICTRANS need to be set to true"); - } - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Set vehicle role - f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_publicTransport)); - - // Test Body - log("*** " & testcasename() & ": Expected template: ", mw_camInd ( mw_camMsg_SVC( mw_publicTransport_any )), " ***"); - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_publicTransport_any ))){ - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_02(); } // end TC_CAM_MSD_INA_BV_02 @@ -2917,7 +1609,7 @@ module ItsCam_TestCases { * @desc Check that specialTransportContainer is included if * vehicleRole is set to specialTransport(2). *
-             * Pics Selection: PICS_SPECIALTRANS
+             * Pics Selection: PICS_CAM_GENERATION AND PICS_SPECIALTRANS
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -2938,49 +1630,12 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-03 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-03 * @reference ETSI EN 302 637-2 , Annex B.12 */ testcase TC_CAM_MSD_INA_BV_03() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - if (not PICS_SPECIALVEHICLECONTAINER and not PICS_SPECIALTRANS) { - testcase.stop(testcasename() - & ": PICS_SPECIALVEHICLECONTAINER and PICS_SPECIALTRANS need to be set to true"); - } - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Set vehicle role - f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_specialTransport)); - - // Test Body - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_specialTransport_any ))){ - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_03(); } // end TC_CAM_MSD_INA_BV_03 @@ -2988,7 +1643,7 @@ module ItsCam_TestCases { * @desc Check that dangerousGoodsContainer is included if * vehicleRole is set to dangerousGoods(3). *
-             * Pics Selection: PICS_DANGEROUSGOODS
+             * Pics Selection: PICS_CAM_GENERATION AND PICS_DANGEROUSGOODS
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -3009,49 +1664,12 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-04 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-04 * @reference ETSI EN 302 637-2 , Annex B.13 */ testcase TC_CAM_MSD_INA_BV_04() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - if (not PICS_SPECIALVEHICLECONTAINER and not PICS_DANGEROUSGOODS) { - testcase.stop(testcasename() - & ": PICS_SPECIALVEHICLECONTAINER and PICS_DANGEROUSGOODS need to be set to true"); - } - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Set vehicle role - f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_dangerousGoods)); - - // Test Body - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_dangerousGoods_any ))){ - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_04(); } // end TC_CAM_MSD_INA_BV_04 @@ -3059,7 +1677,7 @@ module ItsCam_TestCases { * @desc Check that roadWorksContainerBasic is included if * vehicleRole is set to roadWork(4). *
-             * Pics Selection: PICS_ROADWORKS
+             * Pics Selection: PICS_CAM_GENERATION AND PICS_ROADWORKS
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -3080,49 +1698,12 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-05 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-05 * @reference ETSI EN 302 637-2 , Annex B.14 */ testcase TC_CAM_MSD_INA_BV_05() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - if (not PICS_SPECIALVEHICLECONTAINER and not PICS_ROADWORKS) { - testcase.stop(testcasename() - & ": PICS_SPECIALVEHICLECONTAINER and PICS_ROADWORKS need to be set to true"); - } - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Set vehicle role - f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_roadWork)); - - // Test Body - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_roadWorks_any ))){ - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_05(); } // end TC_CAM_MSD_INA_BV_05 @@ -3130,7 +1711,7 @@ module ItsCam_TestCases { * @desc Check that rescueContainer is included if vehicleRole is * set to rescue(5). *
-             * Pics Selection: PICS_RESCUE
+             * Pics Selection: PICS_CAM_GENERATION AND PICS_RESCUE
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -3151,49 +1732,12 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-06 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-06 * @reference ETSI EN 302 637-2 , Annex B.15 */ testcase TC_CAM_MSD_INA_BV_06() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - if (not PICS_SPECIALVEHICLECONTAINER and not PICS_RESCUE) { - testcase.stop(testcasename() - & ": PICS_SPECIALVEHICLECONTAINER and PICS_RESCUE need to be set to true"); - } - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Set vehicle role - f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_rescue)); - - // Test Body - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_rescue_any ))){ - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_06(); } // end TC_CAM_MSD_INA_BV_06 @@ -3201,7 +1745,7 @@ module ItsCam_TestCases { * @desc Check that emergencyContainer is included if vehicleRole * is set to emergency(6). *
-             * Pics Selection: PICS_EMERGENCY
+             * Pics Selection: PICS_CAM_GENERATION AND PICS_EMERGENCY
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -3222,49 +1766,12 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-07 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-07 * @reference ETSI EN 302 637-2 , Annex B.16 */ testcase TC_CAM_MSD_INA_BV_07() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - if (not PICS_SPECIALVEHICLECONTAINER and not PICS_EMERGENCY) { - testcase.stop(testcasename() - & ": PICS_SPECIALVEHICLECONTAINER and PICS_EMERGENCY need to be set to true"); - } - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Set vehicle role - f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_emergency)); - - // Test Body - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_emergency_any ))){ - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_07(); } // end TC_CAM_MSD_INA_BV_07 @@ -3272,7 +1779,7 @@ module ItsCam_TestCases { * @desc Check that safetyCarContainer is included if vehicleRole * is set to safetyCar(7). *
-             * Pics Selection: PICS_SAFETY_CAR
+             * Pics Selection: PICS_CAM_GENERATION AND PICS_SAFETY_CAR
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -3293,49 +1800,12 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/INA/BV-08 + * @see ETSI TS 102 868-2 TP/CAM/MSD/INA/BV-08 * @reference ETSI EN 302 637-2 , Annex B.17 */ testcase TC_CAM_MSD_INA_BV_08() runs on ItsCam system ItsCamSystem { - // Local variables - - // Test control - if (not PICS_SPECIALVEHICLECONTAINER and not PICS_SAFETY_CAR) { - testcase.stop(testcasename() - & ": PICS_SPECIALVEHICLECONTAINER and PICS_SAFETY_CAR need to be set to true"); - } - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Set vehicle role - f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_safetyCar)); - - // Test Body - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_safetyCar_any ))){ - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_INA_BV_08(); } // end TC_CAM_MSD_INA_BV_08 @@ -3343,13 +1813,11 @@ module ItsCam_TestCases { group camGenerationFrequency { - group CAM_MSD_GFQ_BV_01 { - /** * @desc Check that CAMs are not generated more frequently than * T_GenCamMin. *
-                 * Pics Selection: PICS_T_GENCAMMIN
+             * Pics Selection: PICS_CAM_GENERATION AND PICS_T_GENCAMMIN
                  * Initial conditions: 
                  *     with {
                  *         the IUT being in the "initial state"
@@ -3365,101 +1833,20 @@ module ItsCam_TestCases {
                  *     }
                  * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-01 + * @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/TI-01 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ - testcase TC_CAM_MSD_GFQ_BV_01() runs on ItsCam system ItsCamSystem { - - // Local variables - timer t_minTransInterval := PICS_T_GENCAMMIN * 0.95; - var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s - var integer v_cntSpeed, v_cntTime; - var FncRetCode v_ret; - - // Test control + testcase TC_CAM_MSD_GFQ_TI_01() runs on ItsCam system ItsCamSystem { - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - camPort.clear; - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_any )){ - tc_ac.stop; - t_minTransInterval.start; - log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - } - } - - // Test Body - for (v_cntSpeed:=0; v_cntSpeed - * Pics Selection: PICS_T_GENCAMMAX + * Pics Selection: PICS_CAM_GENERATION * Initial conditions: * with { * the IUT being in the "initial state" @@ -3475,93 +1862,20 @@ module ItsCam_TestCases { * } * * - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-02 + * @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/TI-02 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ - testcase TC_CAM_MSD_GFQ_BV_02() runs on ItsCam system ItsCamSystem { - - // Local variables - timer t_maxTransInterval := PICS_T_GENCAMMAX * 1.05; - var integer v_cntSpeed, v_cntTime; - var FncRetCode v_ret; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration + testcase TC_CAM_MSD_GFQ_TI_02() runs on ItsCam system ItsCamSystem { - // Preamble - f_prInitialState(); - camPort.clear; - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_any )){ - tc_ac.stop; - t_maxTransInterval.start; - log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - } - } + f_CAM_MSD_GFQ_TI_02(); - // Test Body - for (v_cntTime:=0; v_cntTime<10; v_cntTime:=v_cntTime + 1) { - v_ret := f_CAM_MSD_GFQ_BV_02(t_maxTransInterval); - select (v_ret) { - case (e_error) { - log("*** " & testcasename() & ": FAIL: No CAM message received BEFORE expiry of the maximum generation timer interval ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - case (e_timeout) { - log("*** " & testcasename() & ": INCONC: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - } - t_maxTransInterval.stop; - log("*** " & testcasename() & ": PASS: Generation of CAM messages was successful ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } // end TC_CAM_MSD_GFQ_TI_02 - // Postamble - f_poDefault(); - f_cfDown(); - - } // end TC_CAM_MSD_GFQ_BV_02 - - function f_CAM_MSD_GFQ_BV_02(timer t_maxTransInterval) runs on ItsCam return FncRetCode { - - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_any )) { - tc_ac.stop; - t_maxTransInterval.stop; - t_maxTransInterval.start; - } - [] t_maxTransInterval.timeout { - return e_error; - } - [] tc_ac.timeout { - t_maxTransInterval.stop; - return e_timeout; - } - } - - return e_success - } // end function f_CAM_MSD_GFQ_BV_01 - - } //end group CAM_MSD_GFQ_BV_02 - /** * @desc Check that TGenCam is set to T_GenCamMax after generating * N_GenCam due to condition 2. *
-             * Pics Selection: PICS_T_GENCAMMAX
+             * Pics Selection: PICS_CAM_GENERATION
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -3580,112 +1894,15 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-03 + * @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/TI-03 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ - testcase TC_CAM_MSD_GFQ_BV_03() runs on ItsCam system ItsCamSystem { + testcase TC_CAM_MSD_GFQ_TI_03() runs on ItsCam system ItsCamSystem { - // Local variables - timer t_maxTransInterval_min := PICS_T_GENCAMMAX * 0.95; - timer t_maxTransInterval_max := PICS_T_GENCAMMAX * 1.05; - timer t_interval_1_measure := PX_TWAIT; - timer t_interval_1_min; - timer t_interval_1_max; - var float v_interval_1_min; - var float v_interval_1_max; - var integer v_N_GenCam := 3; - var integer v_i; + f_CAM_MSD_GFQ_TI_03(); - // Test control + } // end TC_CAM_MSD_GFQ_TI_03 - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_any )){ - t_interval_1_measure.start; - tc_ac.stop; - log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - } - } - f_utTriggerEvent(m_changeSpeed(1000)); - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_any )){ - var float v_measured := t_interval_1_measure.read; - log("Elapsed time since last CAM: ", v_measured); - tc_ac.stop; - v_interval_1_min := v_measured * 0.8; - v_interval_1_max := v_measured * 1.2; - log("*** " & testcasename() & ": INFO: Initial conditions: Condition 1 CAM message received ***"); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 1 CAM message not received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - } - } - for (v_i:=1; v_i <= v_N_GenCam; v_i:=v_i+1) { - t_interval_1_min.start(v_interval_1_min); - t_interval_1_max.start(v_interval_1_max); - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_any )){ - if (t_interval_1_min.running) { - log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 2 CAM#", v_i, " message received BEFORE INTERVAL_1 expired ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - } - t_interval_1_max.stop; - log("*** " & testcasename() & ": INFO: Initial conditions: Condition 2 CAM#", v_i, " message received ***"); - } - [] t_interval_1_min.timeout { - repeat; - } - [] t_interval_1_max.timeout { - log("*** " & testcasename() & ": INCONC: Initial conditions: Condition 2 CAM#", v_i, " message not received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - } - } - } - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - t_maxTransInterval_min.start; - t_maxTransInterval_max.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_any )){ - if (t_maxTransInterval_min.running) { - log("*** " & testcasename() & ": FAIL: Next CAM message received BEFORE T_GenCamMax expired ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - t_maxTransInterval_max.stop; - log("*** " & testcasename() & ": PASS: Next CAM message received AFTER T_GenCamMax expired ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] t_maxTransInterval_min.timeout { - repeat; - } - [] t_maxTransInterval_max.timeout { - log("*** " & testcasename() & ": FAIL: Next CAM message not received AFTER T_GenCamMax expired ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); - - } // end TC_CAM_MSD_GFQ_BV_03 - /** * @desc Check that CAM is generated immediately when the time * elapsed since the last CAM generation is equal or larger @@ -3693,7 +1910,7 @@ module ItsCam_TestCases { * current direction of the originating ITS-S (towards North) * and direction included in previous CAM exceeds 4°. *
-             * Pics Selection: PICS_T_GENCAMDCC
+             * Pics Selection: PICS_CAM_GENERATION
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -3717,62 +1934,12 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-04 + * @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/BV-04 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_GFQ_BV_04() runs on ItsCam system ItsCamSystem { - // Local variables - timer t_genCam_Dcc := PICS_T_GENCAMDCC * 0.95; - var CamInd v_camPdu; - var HeadingValue v_headingValue; - var HeadingValue v_changeHeadingValue := 50; // 4° == 40 - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - camPort.clear; - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_heading( ? ) ) )) -> value v_camPdu { - tc_ac.stop; - v_headingValue := v_camPdu.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue; - t_genCam_Dcc.start; - log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - } - } - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - t_genCam_Dcc.timeout; - f_utTriggerEvent(m_changeHeading(v_changeHeadingValue)); - t_genCam_Dcc.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_heading( (v_headingValue + v_changeHeadingValue) mod 3600) ) )){ - tc_ac.stop; - log("*** " & testcasename() & ": PASS: CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] t_genCam_Dcc.timeout { - log("*** " & testcasename() & ": FAIL: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_GFQ_BV_04(); } // end TC_CAM_MSD_GFQ_BV_04 @@ -3782,7 +1949,7 @@ module ItsCam_TestCases { * than T_GenCam_Dcc and the current position and position * included in previous CAM exceeds 4 m. *
-             * Pics Selection: PICS_T_GENCAMDCC
+             * Pics Selection: PICS_CAM_GENERATION
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -3805,69 +1972,12 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-05 + * @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/BV-05 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_GFQ_BV_05() runs on ItsCam system ItsCamSystem { - // Local variables - timer t_genCam_Dcc := PICS_T_GENCAMDCC * 0.95; - var CamInd v_camPdu; - var ReferencePosition v_referencePosition; - var integer v_changePosValue := 4; // 4m - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - camPort.clear; - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camPdu { - tc_ac.stop; - v_referencePosition := v_camPdu.msgIn.cam.camParameters.basicContainer.referencePosition; - t_genCam_Dcc.start; - log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - } - } - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - t_genCam_Dcc.timeout; - v_referencePosition := f_computePositionUsingDistance(v_referencePosition, v_changePosValue); - f_utChangePosition( - valueof(UtChangePosition: { - latitude := v_referencePosition.latitude, - longitude := v_referencePosition.longitude, - elevation := 0 // FIXME := v_referencePosition.altitude - } - )); - t_genCam_Dcc.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_BC_refPos ( v_referencePosition ) )){ - tc_ac.stop; - log("*** " & testcasename() & ": PASS: CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] t_genCam_Dcc.timeout { - log("*** " & testcasename() & ": FAIL: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_GFQ_BV_05(); } // end TC_CAM_MSD_GFQ_BV_05 @@ -3878,7 +1988,7 @@ module ItsCam_TestCases { * current speed and speed included in previous CAM * exceeds 0,5 m/s. *
-             * Pics Selection: PICS_T_GENCAMDCC
+             * Pics Selection: PICS_CAM_GENERATION
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -3902,62 +2012,12 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-06 + * @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/BV-06 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ testcase TC_CAM_MSD_GFQ_BV_06() runs on ItsCam system ItsCamSystem { - // Local variables - timer t_genCam_Dcc := PICS_T_GENCAMDCC * 0.95; - var CamInd v_camPdu; - var SpeedValue v_speedValue; - var SpeedValue v_changeSpeedValue := 50; // 0,5 m/s == 50 cm/s - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - camPort.clear; - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_speed( ? ) ) )) -> value v_camPdu { - tc_ac.stop; - v_speedValue := v_camPdu.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.speed.speedValue; - t_genCam_Dcc.start; - log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - } - } - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - t_genCam_Dcc.timeout; - f_utTriggerEvent(m_changeSpeed(v_changeSpeedValue)); - t_genCam_Dcc.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_speed( (v_speedValue + v_changeSpeedValue) mod 16384 ) ) )){ - tc_ac.stop; - log("*** " & testcasename() & ": PASS: CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] t_genCam_Dcc.timeout { - log("*** " & testcasename() & ": FAIL: CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_GFQ_BV_06(); } // end TC_CAM_MSD_GFQ_BV_06 @@ -3966,7 +2026,7 @@ module ItsCam_TestCases { * elapsed since the last CAM generation is equal or larger * than T_GenCam and equal or larger than T_GenCam_Dcc. *
-             * Pics Selection: PICS_T_GENCAM AND PICS_T_GENCAMDCC
+             * Pics Selection: PICS_CAM_GENERATION
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -3984,93 +2044,20 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-07 + * @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/TI-07 * @reference ETSI EN 302 637-2 , clause 6.1.3 */ - testcase TC_CAM_MSD_GFQ_BV_07() runs on ItsCam system ItsCamSystem { - - // Local variables - timer t_maxTransInterval_min := PICS_T_GENCAMMAX * 0.95; - timer t_maxTransInterval_max := PICS_T_GENCAMMAX * 1.05; - timer t_genCam_measure := PX_TWAIT; - timer t_genCam_min; - timer t_genCam_max; - var float v_genCam_min; - var float v_genCam_max; + testcase TC_CAM_MSD_GFQ_TI_07() runs on ItsCam system ItsCamSystem { - // Test control + f_CAM_MSD_GFQ_TI_07(); - // Test component configuration - f_cfUp(); + } // end TC_CAM_MSD_GFQ_TI_07 - // Test adapter configuration - - // Preamble - f_prInitialState(); - camPort.clear; - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_any )){ - tc_ac.stop; - t_genCam_measure.start; - log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - } - } - f_utTriggerEvent(m_changeSpeed(1000)); - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_any )){ - var float v_measured := t_genCam_measure.read; - tc_ac.stop; - v_genCam_min := v_measured * 0.9; - v_genCam_max := v_measured * 1.1; - log("*** " & testcasename() & ": INFO: Initial conditions: Anticipated CAM message received ***"); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Initial conditions: Anticipated CAM message not received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - } - } - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - t_genCam_min.start(v_genCam_min); - t_genCam_max.start(v_genCam_max); - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_any )){ - if (t_genCam_min.running) { - log("*** " & testcasename() & ": FAIL: Anticipated CAM message received BEFORE T_GenCam expired ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - t_genCam_max.stop; - log("*** " & testcasename() & ": PASS: Anticipated CAM message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] t_genCam_min.timeout { - repeat; - } - [] t_genCam_max.timeout { - log("*** " & testcasename() & ": FAIL: Anticipated CAM message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - f_cfDown(); - - } // end TC_CAM_MSD_GFQ_BV_07 - /** * @desc Check that maximum CAM generation frequency for RSU ITS-S is 1Hz * *
-             * Pics Selection: PICS_RSU
+             * Pics Selection: PICS_CAM_GENERATION AND PICS_RSU
              * Initial conditions: 
              *     with {
              *         the IUT being in the "initial state"
@@ -4086,65 +2073,110 @@ module ItsCam_TestCases {
              *     }
              * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSD/GFQ/BV-08 + * @see ETSI TS 102 868-2 TP/CAM/MSD/GFQ/TI-08 * @reference ETSI EN 302 637-2 , clause 6.1.4 */ - testcase TC_CAM_MSD_GFQ_BV_08() runs on ItsCam system ItsCamSystem { + testcase TC_CAM_MSD_GFQ_TI_08() runs on ItsCam system ItsCamSystem { - // Local constants - const float c_minTime := 0.95; - const float c_maxTime := 1.05; + f_CAM_MSD_GFQ_TI_08(); - // Local variables + } // end TC_CAM_MSD_GFQ_TI_08 - // Test component configuration - f_cfUp(); + } // end group camGenerationFrequency - // Preamble - f_prInitialState(); - camPort.clear; - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_any )){ - tc_ac.stop; - log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); - } - } + group camLowerLayerParameters { - // Test Body - tc_ac.start; - alt { - [] camPort.receive(mw_camInd ( mw_camMsg_any )){ - if ( ( tc_ac.read*1000.0 > c_minTime ) and ( tc_ac.read*1000.0 < c_maxTime )) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: CAM message received in time***"); - f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_success); - } - else { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: CAM message not received in time***"); - f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_error); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: CAM message not received ***"); - f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout); - } - } + /** + * @desc Check that CAM is encapsulated in BTP type B packet + *
+             * Pics Selection: PICS_CAM_GENERATION
+             * Initial conditions: 
+             *     with {
+             *         the IUT being in the "initial state"
+             *     }
+             * Expected behaviour:
+             *  ensure that {
+             *      when {
+             *          a CAM is generated
+             *      }
+             *      then {
+             *          the IUT sends a CAM
+             *              encapsulated in a BTP-B packet
+             *      }
+             *  } 
+             * 
+ * + * @see ETSI TS 102 868-2 TP/CAM/MSD/PAR/BV-01 + * @reference ETSI EN 302 637-2 , clause 5.3.4.1 + */ + testcase TC_CAM_MSD_PAR_BV_01() runs on ItsCam system ItsCamSystem { - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSD_PAR_BV_01(); - } // end TC_CAM_MSD_GFQ_BV_08 + } // end TC_CAM_MSD_PAR_BV_01 - } // end group camGenerationFrequency + /** + * @desc Check that CAM is encapsulated in SHB packet + *
+             * Pics Selection: PICS_CAM_GENERATION
+             * Initial conditions: 
+             *     with {
+             *         the IUT being in the "initial state"
+             *     }
+             * Expected behaviour:
+             *  ensure that {
+             *      when {
+             *          a CAM is generated
+             *      }
+             *      then {
+             *          the IUT sends a CAM
+             *              encapsulated in a SHB packet
+             *      }
+             *  } 
+             * 
+ * + * @see ETSI TS 102 868-2 TP/CAM/MSD/PAR/BV-02 + * @reference ETSI EN 302 637-2 , clause 5.3.4.1 + */ + testcase TC_CAM_MSD_PAR_BV_02() runs on ItsCam system ItsCamSystem { + + f_CAM_MSD_PAR_BV_02(); + + } // end TC_CAM_MSD_PAR_BV_02 + + /** + * @desc Check that CAM is encapsulated in GN packet with lifetime lower than 1s + *
+             * Pics Selection: PICS_CAM_GENERATION
+             * Initial conditions: 
+             *     with {
+             *         the IUT being in the "initial state"
+             *     }
+             * Expected behaviour:
+             *  ensure that {
+             *      when {
+             *          a CAM is generated
+             *      }
+             *      then {
+             *          the IUT sends a CAM
+             *              encapsulated in a GN packet
+             *                  containing Basic Header
+             *                      containing Lifetime field 
+             *                          indicating value lower than 1s
+             *      }
+             *  } 
+             * 
+ * + * @see ETSI TS 102 868-2 TP/CAM/MSD/PAR/BV-03 + * @reference ETSI EN 302 637-2 , clause 5.3.4.1 + */ + testcase TC_CAM_MSD_PAR_BV_03() runs on ItsCam system ItsCamSystem { + + f_CAM_MSD_PAR_BV_03(); + + } // end TC_CAM_MSD_PAR_BV_03 + + } // end group camLowerLayerParameters } // end group camMessageDissemination @@ -4154,7 +2186,7 @@ module ItsCam_TestCases { * @desc Check that content of received CAM is transmitted to * applications and other facilities. *
-         * Pics Selection: PICS_CANRECEPTION
+         * Pics Selection: PICS_CAM_RECEPTION
          * Initial conditions: 
          *     with {
          *         the IUT being in the "initial state"
@@ -4171,55 +2203,12 @@ module ItsCam_TestCases {
          *     }
          * 
* - * @version 0.0.2 - * @see ETSI TS 102 868-2 v0.0.2 TP/CAM/MSP/BV-01 + * @see ETSI TS 102 868-2 TP/CAM/MSP/BV-01 * @reference ETSI EN 302 637-2 , clause 4.2.2 */ testcase TC_CAM_MSP_BV_01() runs on ItsCam system ItsCamSystem { - // Local variables - var CamReq v_camReq; - var integer i; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_camReq := valueof( - m_camReq( - m_camMsg_vehicle( - f_getTsStationId(), - f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime - m_tsPosition - ) - ) - ); - camPort.send( v_camReq ) ; - - f_sleep(PX_TNOAC); - for(i:=0; i < lengthof(vc_utEvents) and not match(v_camReq, vc_utEvents[i].camMsg); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utEvents)) { - log("*** " & testcasename() & ": FAIL: CAM was transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: CAM was not transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poDefault(); - f_cfDown(); + f_CAM_MSP_BV_01(); } // end TC_CAM_MSP_BV_01 diff --git a/ttcn/AtsCAM/ItsCam_TestControl.ttcn b/ttcn/AtsCAM/ItsCam_TestControl.ttcn index b242d1a8217988cad83cc200db0c6d32cd762ecd..7b16f588a90cc15b2650a2a35ab28eefb5aeabba 100644 --- a/ttcn/AtsCAM/ItsCam_TestControl.ttcn +++ b/ttcn/AtsCAM/ItsCam_TestControl.ttcn @@ -16,34 +16,27 @@ module ItsCam_TestControl { // Test Execution control { - execute(TC_CAM_MSD_FMT_BV_01()); - - if ( PICS_LOWFREQUENCYCONTAINER ) { + if(PICS_CAM_GENERATION) { + execute(TC_CAM_MSD_FMT_BV_01()); execute(TC_CAM_MSD_FMT_BV_02()); execute(TC_CAM_MSD_FMT_BV_03()); - } - if ( PICS_SPECIALVEHICLECONTAINER ) { execute(TC_CAM_MSD_FMT_BV_04()); execute(TC_CAM_MSD_FMT_BV_05()); - } - - execute(TC_CAM_MSD_INA_BV_01_01()); - execute(TC_CAM_MSD_INA_BV_01_02()); - execute(TC_CAM_MSD_INA_BV_01_03()); - execute(TC_CAM_MSD_INA_BV_01_04()); - execute(TC_CAM_MSD_INA_BV_01_05()); - execute(TC_CAM_MSD_INA_BV_01_06()); - execute(TC_CAM_MSD_INA_BV_01_07()); - execute(TC_CAM_MSD_INA_BV_01_08()); - execute(TC_CAM_MSD_INA_BV_01_09()); - execute(TC_CAM_MSD_INA_BV_01_10()); - execute(TC_CAM_MSD_INA_BV_01_11()); - execute(TC_CAM_MSD_INA_BV_01_12()); - execute(TC_CAM_MSD_INA_BV_01_13()); - execute(TC_CAM_MSD_INA_BV_01_14()); - execute(TC_CAM_MSD_INA_BV_01_15()); - - if (PICS_LOWFREQUENCYCONTAINER) { + execute(TC_CAM_MSD_INA_BV_01_01()); + execute(TC_CAM_MSD_INA_BV_01_02()); + execute(TC_CAM_MSD_INA_BV_01_03()); + execute(TC_CAM_MSD_INA_BV_01_04()); + execute(TC_CAM_MSD_INA_BV_01_05()); + execute(TC_CAM_MSD_INA_BV_01_06()); + execute(TC_CAM_MSD_INA_BV_01_07()); + execute(TC_CAM_MSD_INA_BV_01_08()); + execute(TC_CAM_MSD_INA_BV_01_09()); + execute(TC_CAM_MSD_INA_BV_01_10()); + execute(TC_CAM_MSD_INA_BV_01_11()); + execute(TC_CAM_MSD_INA_BV_01_12()); + execute(TC_CAM_MSD_INA_BV_01_13()); + execute(TC_CAM_MSD_INA_BV_01_14()); + execute(TC_CAM_MSD_INA_BV_01_15()); execute(TC_CAM_MSD_INA_BV_01_16()); execute(TC_CAM_MSD_INA_BV_01_17()); execute(TC_CAM_MSD_INA_BV_01_18()); @@ -60,14 +53,11 @@ module ItsCam_TestControl { execute(TC_CAM_MSD_INA_BV_01_29()); execute(TC_CAM_MSD_INA_BV_01_30()); execute(TC_CAM_MSD_INA_BV_01_31()); - } - - execute(TC_CAM_MSD_INA_BV_01_32()); - execute(TC_CAM_MSD_INA_BV_01_33()); - execute(TC_CAM_MSD_INA_BV_01_34()); - execute(TC_CAM_MSD_INA_BV_01_35()); - - if (PICS_SPECIALVEHICLECONTAINER) { + execute(TC_CAM_MSD_INA_BV_01_32()); + execute(TC_CAM_MSD_INA_BV_01_33()); + execute(TC_CAM_MSD_INA_BV_01_34()); + execute(TC_CAM_MSD_INA_BV_01_35()); + if (PICS_PUBLICTRANS) { execute(TC_CAM_MSD_INA_BV_02()); } @@ -89,17 +79,25 @@ module ItsCam_TestControl { if (PICS_SAFETY_CAR) { execute(TC_CAM_MSD_INA_BV_08()); } - } + + execute(TC_CAM_MSD_GFQ_TI_01()); + execute(TC_CAM_MSD_GFQ_TI_02()); + execute(TC_CAM_MSD_GFQ_TI_03()); + execute(TC_CAM_MSD_GFQ_BV_04()); + execute(TC_CAM_MSD_GFQ_BV_05()); + execute(TC_CAM_MSD_GFQ_BV_06()); + execute(TC_CAM_MSD_GFQ_TI_07()); + execute(TC_CAM_MSD_GFQ_TI_08()); + + execute(TC_CAM_MSD_PAR_BV_01()); + execute(TC_CAM_MSD_PAR_BV_02()); + execute(TC_CAM_MSD_PAR_BV_03()); + + } - execute(TC_CAM_MSD_GFQ_BV_01()); - execute(TC_CAM_MSD_GFQ_BV_02()); - execute(TC_CAM_MSD_GFQ_BV_03()); - execute(TC_CAM_MSD_GFQ_BV_04()); - execute(TC_CAM_MSD_GFQ_BV_05()); - execute(TC_CAM_MSD_GFQ_BV_06()); - execute(TC_CAM_MSD_GFQ_BV_07()); - - execute(TC_CAM_MSP_BV_01()); + if(PICS_CAM_RECEPTION) { + execute(TC_CAM_MSP_BV_01()); + } } diff --git a/ttcn/AtsCAM/ItsCam_TpFunctions.ttcn b/ttcn/AtsCAM/ItsCam_TpFunctions.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7fba619724b0d4b39e000dc39df2f0f7f814ce0c --- /dev/null +++ b/ttcn/AtsCAM/ItsCam_TpFunctions.ttcn @@ -0,0 +1,3038 @@ +/** + * @author ETSI STF484 + * @version $URL$ + * $Id$ + * @desc CAM TP functions + * + */ + +module ItsCam_TpFunctions { + + // LibCommon + import from LibCommon_Sync all; + import from LibCommon_VerdictControl all; + import from LibCommon_Time all; + import from LibCommon_BasicTypesAndValues all; + + // LibIts + import from LibItsCommon_Functions all; + import from LibItsCommon_TypesAndValues { + type UtChangePosition + }; + import from LibItsCam_TestSystem all; + import from LibItsCam_Functions all; + import from LibItsCam_Templates all; + import from LibItsCam_TypesAndValues all; + import from LibItsCam_Pics {modulepar all}; + + import from ITS_Container language "ASN.1:1997" all; + import from CAM_PDU_Descriptions language "ASN.1:1997" all; + + // 5.2.1 + group camMessageDissemination { + + group camMessageFormat { + + /** + * @desc TP Function for TC_CAM_MSD_FMT_BV_01 + */ + function f_CAM_MSD_FMT_BV_01() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_any )){ + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_FMT_BV_01 + + /** + * @desc TP Function for TC_CAM_MSD_FMT_BV_02 + */ + function f_CAM_MSD_FMT_BV_02() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_LF_any )){ + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] camPort.receive(mw_camInd ( mw_camMsg_any )){ + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Expected CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_FMT_BV_02 + + /** + * @desc TP Function for TC_CAM_MSD_FMT_BV_03 + */ + function f_CAM_MSD_FMT_BV_03() runs on ItsCam { + + // Local variables + timer t_minTransInterval := c_lowFrequencyGenerationTime * 1.05; + var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s + var integer v_cntSpeed, v_cntTime; + var CamInd v_camInd; + var boolean v_nextCamWithLF := false; + const integer c_cntTimeLimit := 10; + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + camPort.clear; + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_LF_any )){ + tc_ac.stop; + t_minTransInterval.start; + log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); + } + } + + // Test Body + for (v_cntSpeed:=0; v_cntSpeed value v_camInd { + tc_ac.stop; + if(v_nextCamWithLF == true) { + log("*** " & testcasename() & ": FAIL: No LowFrequency container in received CAM ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": INFO: CAM retransmission w/o LowFrequency container ***"); + tc_ac.start; + repeat; + } + } + [] t_minTransInterval.timeout { + v_nextCamWithLF := true; + log("*** " & testcasename() & ": INFO: Next CAM shall contain LowFrequency container ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + } + log("*** " & testcasename() & ": PASS: Generation of CAM messages including lowFrequencyContainer was successful ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_FMT_BV_03 + + /** + * @desc TP Function for TC_CAM_MSD_FMT_BV_04 + */ + function f_CAM_MSD_FMT_BV_04() runs on ItsCam { + + // Local variables + var VehicleRole v_vehicleRole := c_vehicleRole_roadWork; + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (not PICS_SPECIALVEHICLECONTAINER) { + testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER needs to be set to true"); + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Set vehicle role + f_utTriggerEvent(m_setVehicleRole(v_vehicleRole)); + + // Test Body + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_SVC_any )){ + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_FMT_BV_04 + + /** + * @desc TP Function for TC_CAM_MSD_FMT_BV_05 + */ + function f_CAM_MSD_FMT_BV_05() runs on ItsCam { + + // Local variables + timer t_minTransInterval := c_specialVehicleGenerationTime * 1.05; + var VehicleRole v_vehicleRole := roadWork; + var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s + var integer v_cntSpeed, v_cntTime; + var CamInd v_camInd; + var boolean v_nextCamWithSVC := false; + const integer c_cntTimeLimit := 10; + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (not PICS_SPECIALVEHICLECONTAINER) { + testcase.stop(testcasename() & ": PICS_SPECIALVEHICLECONTAINER needs to be set to true"); + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + // Set vehicle role + f_utTriggerEvent(m_setVehicleRole(v_vehicleRole)); + camPort.clear; + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_SVC_any )){ + tc_ac.stop; + t_minTransInterval.start; + log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); + } + } + + // Test Body + for (v_cntSpeed:=0; v_cntSpeed value v_camInd { + tc_ac.stop; + if(v_nextCamWithSVC == true) { + log("*** " & testcasename() & ": FAIL: No SpecialVehicle container in received CAM ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": INFO: CAM retransmission w/o SpecialVehicle container ***"); + tc_ac.start; + repeat; + } + } + [] t_minTransInterval.timeout { + v_nextCamWithSVC := true; + log("*** " & testcasename() & ": INFO: Next CAM shall contain SpecialVehicle container ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + } + log("*** " & testcasename() & ": PASS: Generation of CAM messages including SpecialVehicleContainer was successful ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_FMT_BV_05 + + } // end group camMessageFormat + + group camInformationAdaptation { + + group camInVehicleData { + + type record of UtCamTrigger UtCamTriggers; + type record of CAM CamPdus; + + function f_CAM_MSD_INA_BV_01(in charstring p_INFO, in template (value) UtCamTriggers p_utTriggers, in template (present) CamPdus p_camPdus) runs on ItsCam { + + // Local variables + var integer v_cnt; + + log("*** " & testcasename() & ": Checking INFO==" & p_INFO & " ***"); + + if (lengthof(p_utTriggers) != lengthof(p_camPdus)) { + log("*** " & testcasename() & ": INCONC: Invalid testcase configuration: Number of event triggers and expected CAM messages differs ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + for (v_cnt:=0; v_cnt value v_camInd { + tc_ac.stop; + if (v_initialReceived) { + log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***"); + v_initialReceived := true; + //change again the curvature value and set the expectation to the measured value + v_curVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.curvature.curvatureValue+c_curValOffset; + f_utTriggerEvent(m_changeCurvature(c_curValOffset)); + tc_ac.start; + repeat; + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_01 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_02 + */ + function f_CAM_MSD_INA_BV_01_02() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Brake pedal being activated", + { m_setAccelerationControlStatus(c_brakePedalEngaged) }, + { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_On)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_02 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_03 + */ + function f_CAM_MSD_INA_BV_01_03() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Brake pedal being deactivated", + { m_setAccelerationControlStatus(c_brakePedalEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, + { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_brakePedalActive_Off)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_03 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_04 + */ + function f_CAM_MSD_INA_BV_01_04() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Gas pedal being activated", + { m_setAccelerationControlStatus(c_gasPedalEngaged) }, + { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_On)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_04 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_05 + */ + function f_CAM_MSD_INA_BV_01_05() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Gas pedal being deactivated", + { m_setAccelerationControlStatus(c_gasPedalEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, + { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_gasPedalActive_Off)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_05 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_06 + */ + function f_CAM_MSD_INA_BV_01_06() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Emergency brake being activated", + { m_setAccelerationControlStatus(c_emergencyBrakeEngaged) }, + { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_On)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_06 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_07 + */ + function f_CAM_MSD_INA_BV_01_07() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Emergency brake being deactivated", + { m_setAccelerationControlStatus(c_emergencyBrakeEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, + { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_emergencyBrakeActive_Off)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_07 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_08 + */ + function f_CAM_MSD_INA_BV_01_08() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Collision warning being activated", + { m_setAccelerationControlStatus(c_collisionWarningEngaged) }, + { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_On)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_08 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_09 + */ + function f_CAM_MSD_INA_BV_01_09() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Collision warning being deactivated", + { m_setAccelerationControlStatus(c_collisionWarningEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, + { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_collisionWarningActive_Off)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_09 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_10 + */ + function f_CAM_MSD_INA_BV_01_10() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "ACC being activated", + { m_setAccelerationControlStatus(c_accEngaged) }, + { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_On)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_10 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_11 + */ + function f_CAM_MSD_INA_BV_01_11() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "ACC being deactivated", + { m_setAccelerationControlStatus(c_accEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, + { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_accActive_Off)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_11 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_12 + */ + function f_CAM_MSD_INA_BV_01_12() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Cruise control being activated", + { m_setAccelerationControlStatus(c_cruiseControlEngaged) }, + { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_On)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_12 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_13 + */ + function f_CAM_MSD_INA_BV_01_13() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Cruise control being deactivated", + { m_setAccelerationControlStatus(c_cruiseControlEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, + { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_cruiseControl_Off)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_13 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_14 + */ + function f_CAM_MSD_INA_BV_01_14() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Speed limiter being activated", + { m_setAccelerationControlStatus(c_speedLimiterEngaged) }, + { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_On)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_14 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_15 + */ + function f_CAM_MSD_INA_BV_01_15() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Speed limiter control being deactivated", + { m_setAccelerationControlStatus(c_speedLimiterEngaged), m_setAccelerationControlStatus(c_accCtrlIdle) }, + { mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_On)), mw_camMsg_HF_BV(mw_HF_BV_accCtrl(mw_speedLimiterActive_Off)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_15 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_16 + */ + function f_CAM_MSD_INA_BV_01_16() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Low beam headlights being activated", + { m_setExteriorLightsStatus(c_lowBeamHeadlightsOn) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOn)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_16 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_17 + */ + function f_CAM_MSD_INA_BV_01_17() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Low beam headlights being deactivated", + { m_setExteriorLightsStatus(c_lowBeamHeadlightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_lowBeamLightsOff)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_17 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_18 + */ + function f_CAM_MSD_INA_BV_01_18() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "High beam headlights being activated", + { m_setExteriorLightsStatus(c_highBeamHeadlightsOn) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOn)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_18 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_19 + */ + function f_CAM_MSD_INA_BV_01_19() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "High beam headlights being deactivated", + { m_setExteriorLightsStatus(c_highBeamHeadlightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_highBeamLightsOff)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_19 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_20 + */ + function f_CAM_MSD_INA_BV_01_20() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Left turn signal being activated", + { m_setExteriorLightsStatus(c_leftTurnSignalOn) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOn)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_20 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_21 + */ + function f_CAM_MSD_INA_BV_01_21() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Left turn signal being deactivated", + { m_setExteriorLightsStatus(c_leftTurnSignalOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_leftTurnSignalOff)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_21 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_22 + */ + function f_CAM_MSD_INA_BV_01_22() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Right turn signal being activated", + { m_setExteriorLightsStatus(c_rightTurnSignalOn) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOn)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_22 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_23 + */ + function f_CAM_MSD_INA_BV_01_23() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Right turn signal being deactivated", + { m_setExteriorLightsStatus(c_rightTurnSignalOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_rightTurnSignalOff)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_23 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_24 + */ + function f_CAM_MSD_INA_BV_01_24() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Daytime running lights being activated", + { m_setExteriorLightsStatus(c_daytimeRunningLightsOn) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOn)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_24 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_25 + */ + function f_CAM_MSD_INA_BV_01_25() runs on ItsCam { + + // Local variables + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test control + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Daytime running lights being deactivated", + { m_setExteriorLightsStatus(c_daytimeRunningLightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_daytimeRunningLightsOff)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_25 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_26 + */ + function f_CAM_MSD_INA_BV_01_26() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Reverse light being activated", + { m_setExteriorLightsStatus(c_reverseLightOn) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOn)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_26 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_27 + */ + function f_CAM_MSD_INA_BV_01_27() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Reverese light being deactivated", + { m_setExteriorLightsStatus(c_reverseLightOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_reverseLightOff)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_27 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_28 + */ + function f_CAM_MSD_INA_BV_01_28() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Fog lights being activated", + { m_setExteriorLightsStatus(c_fogLightOn) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOn)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_28 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_29 + */ + function f_CAM_MSD_INA_BV_01_29() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Fog lights being deactivated", + { m_setExteriorLightsStatus(c_fogLightOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_fogLightOff)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_29 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_30 + */ + function f_CAM_MSD_INA_BV_01_30() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Parking lights being activated", + { m_setExteriorLightsStatus(c_parkingLightsOn) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOn)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_30 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_31 + */ + function f_CAM_MSD_INA_BV_01_31() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_CAM_MSD_INA_BV_01( + "Parking lights being deactivated", + { m_setExteriorLightsStatus(c_parkingLightsOn), m_setExteriorLightsStatus(c_elAllLightsOff) }, + { mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOn)), mw_camMsg_LF_BV(mw_LF_BV_extLights(mw_parkingLightsOff)) } + ); + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_31 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_32 + */ + function f_CAM_MSD_INA_BV_01_32() runs on ItsCam { + + // Local variables + var CamInd v_camInd; + var template (present) HeadingValue v_headingVal := ?; + var boolean v_initialReceived := false; + const HeadingValue c_headingValOffset := 1; + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + log("*** " & testcasename() & ": Checking INFO==Heading value ***"); + + // change the heading value to retrieve the current value + f_utTriggerEvent(m_changeHeading(c_headingValOffset)); + + tc_ac.start; + alt { + [] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_heading(v_headingVal)) )) -> value v_camInd { + tc_ac.stop; + if (v_initialReceived) { + log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***"); + v_initialReceived := true; + //change again the heading value and set the expectation to the measured value + v_headingVal := (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue+c_headingValOffset) mod 3601; + f_utTriggerEvent(m_changeHeading(c_headingValOffset)); + tc_ac.start; + repeat; + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_32 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_33 + */ + function f_CAM_MSD_INA_BV_01_33() runs on ItsCam { + + // Local variables + var CamInd v_camInd; + var template (present) SpeedValue v_speedVal := ?; + var boolean v_initialReceived := false; + const SpeedValue c_speedValOffset := 1; + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + log("*** " & testcasename() & ": Checking INFO==Speed value ***"); + + // change the speed value to retrieve the current value + f_utTriggerEvent(m_changeSpeed(c_speedValOffset)); + + tc_ac.start; + alt { + [] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_speed(v_speedVal)) )) -> value v_camInd { + tc_ac.stop; + if (v_initialReceived) { + log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***"); + v_initialReceived := true; + //change again the speed value and set the expectation to the measured value + v_speedVal := (v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.speed.speedValue+c_speedValOffset) mod 16384; + f_utTriggerEvent(m_changeSpeed(c_speedValOffset)); + tc_ac.start; + repeat; + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_33 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_34 + */ + function f_CAM_MSD_INA_BV_01_34() runs on ItsCam { + + // Local variables + var CamInd v_camInd; + var DriveDirection v_driveVal := backward; + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + log("*** " & testcasename() & ": Checking INFO==Drive direction value ***"); + + // change the drive direction + f_utTriggerEvent(m_setDriveDirection(v_driveVal)); + + tc_ac.start; + alt { + [] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_driveDirection(v_driveVal)) )) -> value v_camInd { + tc_ac.stop; + if (v_driveVal==forward) { + log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***"); + //change again the drive direction and set the expectation to the measured value + v_driveVal := forward; + f_utTriggerEvent(m_setDriveDirection(v_driveVal)); + tc_ac.start; + repeat; + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_34 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_01_35 + */ + function f_CAM_MSD_INA_BV_01_35() runs on ItsCam { + + // Local variables + var CamInd v_camInd; + var template (present) YawRateValue v_yawRateVal := ?; + var boolean v_initialReceived := false; + const YawRateValue c_yawRateValOffset := 1; + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + log("*** " & testcasename() & ": Checking INFO==Yaw rate value ***"); + + // change the yaw rate value to retrieve the current value + f_utTriggerEvent(m_changeYawRate(c_yawRateValOffset)); + + tc_ac.start; + alt { + [] camPort.receive( mw_camInd ( mw_camMsg_HF_BV(mw_HF_BV_yawRate(v_yawRateVal)) )) -> value v_camInd { + tc_ac.stop; + if (v_initialReceived) { + log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": PRECONDITION: Expected CAM message received ***"); + v_initialReceived := true; + //change again the yaw rate value and set the expectation to the measured value + v_yawRateVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.yawRate.yawRateValue; + if (valueof(v_yawRateVal)>=32767) { + v_yawRateVal := -32766; + } + else { + v_yawRateVal := v_camInd.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.yawRate.yawRateValue+c_yawRateValOffset; + } + f_utTriggerEvent(m_changeYawRate(c_yawRateValOffset)); + tc_ac.start; + repeat; + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_01_35 + + } // end group camInVehicleData + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_02 + */ + function f_CAM_MSD_INA_BV_02() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (not PICS_SPECIALVEHICLECONTAINER and not PICS_PUBLICTRANS) { + testcase.stop(testcasename() + & ": PICS_SPECIALVEHICLECONTAINER and PICS_PUBLICTRANS need to be set to true"); + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Set vehicle role + f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_publicTransport)); + + // Test Body + log("*** " & testcasename() & ": Expected template: ", mw_camInd ( mw_camMsg_SVC( mw_publicTransport_any )), " ***"); + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_publicTransport_any ))){ + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_02 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_03 + */ + function f_CAM_MSD_INA_BV_03() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (not PICS_SPECIALVEHICLECONTAINER and not PICS_SPECIALTRANS) { + testcase.stop(testcasename() + & ": PICS_SPECIALVEHICLECONTAINER and PICS_SPECIALTRANS need to be set to true"); + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Set vehicle role + f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_specialTransport)); + + // Test Body + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_specialTransport_any ))){ + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_03 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_04 + */ + function f_CAM_MSD_INA_BV_04() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (not PICS_SPECIALVEHICLECONTAINER and not PICS_DANGEROUSGOODS) { + testcase.stop(testcasename() + & ": PICS_SPECIALVEHICLECONTAINER and PICS_DANGEROUSGOODS need to be set to true"); + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Set vehicle role + f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_dangerousGoods)); + + // Test Body + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_dangerousGoods_any ))){ + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_04 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_05 + */ + function f_CAM_MSD_INA_BV_05() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (not PICS_SPECIALVEHICLECONTAINER and not PICS_ROADWORKS) { + testcase.stop(testcasename() + & ": PICS_SPECIALVEHICLECONTAINER and PICS_ROADWORKS need to be set to true"); + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Set vehicle role + f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_roadWork)); + + // Test Body + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_roadWorks_any ))){ + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_05 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_06 + */ + function f_CAM_MSD_INA_BV_06() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (not PICS_SPECIALVEHICLECONTAINER and not PICS_RESCUE) { + testcase.stop(testcasename() + & ": PICS_SPECIALVEHICLECONTAINER and PICS_RESCUE need to be set to true"); + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Set vehicle role + f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_rescue)); + + // Test Body + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_rescue_any ))){ + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_06 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_07 + */ + function f_CAM_MSD_INA_BV_07() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (not PICS_SPECIALVEHICLECONTAINER and not PICS_EMERGENCY) { + testcase.stop(testcasename() + & ": PICS_SPECIALVEHICLECONTAINER and PICS_EMERGENCY need to be set to true"); + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Set vehicle role + f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_emergency)); + + // Test Body + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_emergency_any ))){ + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_07 + + /** + * @desc TP Function for TC_CAM_MSD_INA_BV_08 + */ + function f_CAM_MSD_INA_BV_08() runs on ItsCam { + + // Local variables + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + if (not PICS_SPECIALVEHICLECONTAINER and not PICS_SAFETY_CAR) { + testcase.stop(testcasename() + & ": PICS_SPECIALVEHICLECONTAINER and PICS_SAFETY_CAR need to be set to true"); + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Set vehicle role + f_utTriggerEvent(m_setVehicleRole(c_vehicleRole_safetyCar)); + + // Test Body + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_SVC( mw_safetyCar_any ))){ + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Expected CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_INA_BV_08 + + } // end group camInformationAdaptation + + group camGenerationFrequency { + + group CAM_MSD_GFQ_TI_01 { + + /** + * @desc TP Function for TC_CAM_MSD_GFQ_TI_01 + */ + function f_CAM_MSD_GFQ_TI_01() runs on ItsCam { + + // Local variables + timer t_minTransInterval := PICS_T_GENCAMMIN * 0.95; + var SpeedValue v_speedValues[5] := { 1000, 2000, 3000, 4000, 5000 } //cm/s + var integer v_cntSpeed, v_cntTime; + var FncRetCode v_ret; + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + camPort.clear; + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_any )){ + tc_ac.stop; + t_minTransInterval.start; + log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); + } + } + + // Test Body + for (v_cntSpeed:=0; v_cntSpeed value v_camPdu { + tc_ac.stop; + v_headingValue := v_camPdu.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue; + t_genCam_Dcc.start; + log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); + } + } + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + t_genCam_Dcc.timeout; + f_utTriggerEvent(m_changeHeading(v_changeHeadingValue)); + t_genCam_Dcc.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_heading( (v_headingValue + v_changeHeadingValue) mod 3600) ) )){ + tc_ac.stop; + log("*** " & testcasename() & ": PASS: CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] t_genCam_Dcc.timeout { + log("*** " & testcasename() & ": FAIL: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_GFQ_BV_04 + + /** + * @desc TP Function for TC_CAM_MSD_GFQ_BV_05 + */ + function f_CAM_MSD_GFQ_BV_05() runs on ItsCam { + + // Local variables + timer t_genCam_Dcc := PICS_T_GENCAMDCC * 0.95; + var CamInd v_camPdu; + var ReferencePosition v_referencePosition; + var integer v_changePosValue := 4; // 4m + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + camPort.clear; + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_any )) -> value v_camPdu { + tc_ac.stop; + v_referencePosition := v_camPdu.msgIn.cam.camParameters.basicContainer.referencePosition; + t_genCam_Dcc.start; + log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); + } + } + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + t_genCam_Dcc.timeout; + v_referencePosition := f_computePositionUsingDistance(v_referencePosition, v_changePosValue); + f_utChangePosition ( valueof ( UtChangePosition: { + latitude := v_referencePosition.latitude, + longitude := v_referencePosition.longitude, + elevation := 0 } ) ); + t_genCam_Dcc.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_BC_refPos ( v_referencePosition ) )){ + tc_ac.stop; + log("*** " & testcasename() & ": PASS: CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] t_genCam_Dcc.timeout { + log("*** " & testcasename() & ": FAIL: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_GFQ_BV_05 + + /** + * @desc TP Function for TC_CAM_MSD_GFQ_BV_06 + */ + function f_CAM_MSD_GFQ_BV_06() runs on ItsCam { + + // Local variables + timer t_genCam_Dcc := PICS_T_GENCAMDCC * 0.95; + var CamInd v_camPdu; + var SpeedValue v_speedValue; + var SpeedValue v_changeSpeedValue := 50; // 0,5 m/s == 50 cm/s + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + camPort.clear; + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_speed( ? ) ) )) -> value v_camPdu { + tc_ac.stop; + v_speedValue := v_camPdu.msgIn.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.speed.speedValue; + t_genCam_Dcc.start; + log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); + } + } + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + t_genCam_Dcc.timeout; + f_utTriggerEvent(m_changeSpeed(v_changeSpeedValue)); + t_genCam_Dcc.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_HF_BV ( mw_HF_BV_speed( (v_speedValue + v_changeSpeedValue) mod 16384 ) ) )){ + tc_ac.stop; + log("*** " & testcasename() & ": PASS: CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] t_genCam_Dcc.timeout { + log("*** " & testcasename() & ": FAIL: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_GFQ_BV_06 + + /** + * @desc TP Function for TC_CAM_MSD_GFQ_TI_07 + */ + function f_CAM_MSD_GFQ_TI_07() runs on ItsCam { + + // Local variables + timer t_maxTransInterval_min := PICS_T_GENCAMMAX * 0.95; + timer t_maxTransInterval_max := PICS_T_GENCAMMAX * 1.05; + timer t_genCam_measure := PX_TWAIT; + timer t_genCam_min; + timer t_genCam_max; + var float v_genCam_min; + var float v_genCam_max; + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + camPort.clear; + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_any )){ + tc_ac.stop; + t_genCam_measure.start; + log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); + } + } + f_utTriggerEvent(m_changeSpeed(1000)); + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_any )){ + var float v_measured := t_genCam_measure.read; + tc_ac.stop; + v_genCam_min := v_measured * 0.9; + v_genCam_max := v_measured * 1.1; + log("*** " & testcasename() & ": INFO: Initial conditions: Anticipated CAM message received ***"); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Initial conditions: Anticipated CAM message not received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); + } + } + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + t_genCam_min.start(v_genCam_min); + t_genCam_max.start(v_genCam_max); + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_any )){ + if (t_genCam_min.running) { + log("*** " & testcasename() & ": FAIL: Anticipated CAM message received BEFORE T_GenCam expired ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + t_genCam_max.stop; + log("*** " & testcasename() & ": PASS: Anticipated CAM message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] t_genCam_min.timeout { + repeat; + } + [] t_genCam_max.timeout { + log("*** " & testcasename() & ": FAIL: Anticipated CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_GFQ_TI_07 + + /** + * @desc TP Function for TC_CAM_MSD_GFQ_TI_08 + */ + function f_CAM_MSD_GFQ_TI_08() runs on ItsCam { + + // Local constants + const float c_minTime := 0.95; + const float c_maxTime := 1.05; + + // Local variables + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Preamble + f_prInitialState(); + camPort.clear; + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_any )){ + tc_ac.stop; + log("*** " & testcasename() & ": INFO: Initial conditions: First CAM message received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Initial conditions: CAM message not received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout); + } + } + + // Test Body + tc_ac.start; + alt { + [] camPort.receive(mw_camInd ( mw_camMsg_any )){ + if ( ( tc_ac.read*1000.0 > c_minTime ) and ( tc_ac.read*1000.0 < c_maxTime )) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: CAM message received in time***"); + f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_success); + } + else { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: CAM message not received in time***"); + f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_error); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: CAM message not received ***"); + f_selfOrClientSyncAndVerdictPreamble(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_GFQ_TI_08 + + } // end group camGenerationFrequency + + group camLowerLayerParameters { + + /** + * @desc TP Function for TC_CAM_MSD_PAR_BV_01 + */ + function f_CAM_MSD_PAR_BV_01() runs on ItsCam { + + // Local variables + const UInt8 c_gnNhBtpB := 2; + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, c_gnNhBtpB)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Expected CAM message encapsultated in BTP-B packet received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, omit)) { + tc_ac.stop; + log("*** " & testcasename() & ": INCONC: no GN NH information in CamInd ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + [] camPort.receive(mw_camInd(mw_camMsg_any)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Expected CAM message received, but not encapsulated in BTP-B packet ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_PAR_BV_01 + + /** + * @desc TP Function for TC_CAM_MSD_PAR_BV_02 + */ + function f_CAM_MSD_PAR_BV_02() runs on ItsCam { + + // Local variables + const UInt8 c_gnHtTsb := 5; + const UInt8 c_GnHstSingleHop := 0; + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, -, c_gnHtTsb, c_GnHstSingleHop)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Expected CAM message encapsulated in SHB packet received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any, -, omit, omit)) { + tc_ac.stop; + log("*** " & testcasename() & ": INCONC: no GN HT/HST information in CamInd ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + [] camPort.receive(mw_camInd(mw_camMsg_any)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Expected CAM message received, but not encapsulated in SHB packet ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_PAR_BV_02 + + /** + * @desc TP Function for TC_CAM_MSD_PAR_BV_03 + */ + function f_CAM_MSD_PAR_BV_03() runs on ItsCam { + + // Local variables + var CamInd v_camInd; + + // Test control + if (not PICS_CAM_GENERATION) { + log("*** " & testcasename() & ": PICS_CAM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] camPort.receive(mw_camIndWithGnParameters(mw_camMsg_any)) -> value v_camInd { + tc_ac.stop; + if(not ispresent(v_camInd.gnLifetime)) { + log("*** " & testcasename() & ": INCONC: no GN lifetime information in CamInd ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + if(v_camInd.gnLifetime <= 1000) { + log("*** " & testcasename() & ": PASS: Expected CAM message received encapsulted in GN packet with correct lifetime value ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: Expected CAM message received encapsulted in GN packet with incorrect lifetime value ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: CAM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSD_PAR_BV_03 + + } // end group camLowerLayerParameters + + } // end group camMessageDissemination + + group camMessageProcessing { + + /** + * @desc TP Function for TC_CAM_MSP_BV_01 + */ + function f_CAM_MSP_BV_01() runs on ItsCam { + + // Local variables + var CamReq v_camReq; + var integer i; + + // Test control + if (not PICS_CAM_RECEPTION) { + log("*** " & testcasename() & ": PICS_CAM_RECEPTION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_camReq := valueof( + m_camReq( + m_camMsg_vehicle( + f_getTsStationId(), + f_getCurrentTime() mod 65536, // See ETSI EN 302 637-2 V1.3.0 - Clause B.3 generationDelatTime + m_tsPosition + ) + ) + ); + camPort.send( v_camReq ) ; + + f_sleep(PX_TNOAC); + for(i:=0; i < lengthof(vc_utEvents) and not match(v_camReq, vc_utEvents[i].camMsg); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utEvents)) { + log("*** " & testcasename() & ": FAIL: CAM was transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: CAM was not transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + + // Postamble + f_poDefault(); + f_cfDown(); + + } // end f_CAM_MSP_BV_01 + + } // end group camMessageProcessing + +} // end ItsCam_TpFunctions diff --git a/ttcn/AtsDENM/ItsDenm_TestCases.ttcn b/ttcn/AtsDENM/ItsDenm_TestCases.ttcn index abffd7dadbd10d20b1ea272c473f18f9eedf489c..be6b764e4e11b930ae80f9cd1d860db561a18f1b 100644 --- a/ttcn/AtsDENM/ItsDenm_TestCases.ttcn +++ b/ttcn/AtsDENM/ItsDenm_TestCases.ttcn @@ -7,21 +7,11 @@ */ module ItsDenm_TestCases { - // LibCommon - import from LibCommon_Sync all; - import from LibCommon_Time all; - import from LibCommon_VerdictControl all; - import from LibCommon_BasicTypesAndValues all; + // ATS ITS + import from ItsDenm_TpFunctions all; // LibIts - import from LibItsCommon_Functions all; - import from LibItsCommon_TypesAndValues all; import from LibItsDenm_TestSystem all; - import from LibItsDenm_Functions all; - import from LibItsDenm_Templates all; - import from LibItsDenm_TypesAndValues all; - import from DENM_PDU_Descriptions language "ASN.1:1997" all; - import from ITS_Container language "ASN.1:1997" all; // 5.2.1 group denMessageTransmission { @@ -53,60 +43,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSGF/BV-01, ETSI EN 302 637-3, Annex B.1 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSGF/BV-01, ETSI EN 302 637-3, Annex B.1 */ testcase TC_DEN_MSGF_BV_01() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; + f_DEN_MSGF_BV_01(); - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm, - mw_anyStationId, - c_protocolVersionDenm, - c_messageId - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Successfully received DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect header information. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_MSGF_BV_01 /** @@ -130,61 +72,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSGF/BV-02, ETSI EN 302 637-3, clause 6.1.3.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSGF/BV-02, ETSI EN 302 637-3, clause 6.1.3.2 */ testcase TC_DEN_MSGF_BV_02() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + f_DEN_MSGF_BV_02(); - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_anyDenmMgmtCon, - -, - mw_denmLocationWithTrace({ ?, * }) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Successfully received DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect location container information. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_MSGF_BV_02 } // end denMessageFormat @@ -211,58 +104,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-01, ETSI EN 302 637-3, clause 6.1.2.1 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-01, ETSI EN 302 637-3, clause 6.1.2.1 */ testcase TC_DEN_EVGN_BV_01() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + f_DEN_EVGN_BV_01(); - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_anyDenmPdu( - mw_itsPduHeader, - mw_denm (mw_anyDenmMgmtCon) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Successfully received DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect header and management information. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVGN_BV_01 /** @@ -288,65 +135,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-02, ETSI EN 302 637-3, clause 6.1.1.1 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-02, ETSI EN 302 637-3, clause 6.1.1.1 */ testcase TC_DEN_EVGN_BV_02() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainerList v_situations := { - m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), - m_situation(c_causeAccident, c_subCauseCode_Unavailable), - m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), - m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) - }; - var boolean v_success := true; - var ActionIDList v_actionIds; - var DenmInd v_denmInd; - var integer i; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) { - f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta)); - f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); - v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID; - } - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + f_DEN_EVGN_BV_02(); - // Test Body - f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta)); - f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); - v_actionIds[lengthof(v_actionIds) - 1] := v_denmInd.msgIn.denm.management.actionID; - - //check the action id - for (i := 0; i < lengthof(v_actionIds) - 1; i:=i + 1) { - if (v_actionIds[lengthof(v_actionIds) - 1].sequenceNumber == v_actionIds[i].sequenceNumber) { - v_success := false; - } - } - if (v_success==true) { - log("*** " & testcasename() & ": PASS: actionID field indicating unused value. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: actionID field indicating used value. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - // Postamble - for (i := 0; i < lengthof(v_actionIds); i:=i + 1) { - f_poCancelEvent(e_iut, v_actionIds[i]); - } - f_cfDown(); - } // end TC_DEN_EVGN_BV_02 /** @@ -372,62 +166,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-03, ETSI EN 302 637-3, clause 6.1.1.1 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-03, ETSI EN 302 637-3, clause 6.1.1.1 */ testcase TC_DEN_EVGN_BV_03() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - var DenmInd v_denmInd; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + f_DEN_EVGN_BV_03(); - // Test Body - v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtConWithActionID( - mw_actionId(f_getIutStationId()) - ) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVGN_BV_03 /** @@ -461,61 +205,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-04, ETSI EN 302 637-3, clause 7.1.3 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-04, ETSI EN 302 637-3, clause 7.1.3 */ testcase TC_DEN_EVGN_BV_04() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - var DenmInd v_denmInd; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration + f_DEN_EVGN_BV_04(); - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_anyDenmMgmtCon, - v_situation - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVGN_BV_04 /** @@ -541,78 +236,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-05, ETSI EN 302 637-3, clause 8.2.1.3 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-05, ETSI EN 302 637-3, clause 8.2.1.3 */ testcase TC_DEN_EVGN_BV_05() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainerList v_situations := { - m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), - m_situation(c_causeAccident, c_subCauseCode_Unavailable), - m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), - m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) - }; - var ActionIDList v_actionIds; - var DenmInd v_denmInd; - var integer i; - var TimestampIts v_timestampIts; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration + f_DEN_EVGN_BV_05(); - // Preamble - f_prInitialState(); - v_timestampIts := f_getCurrentTime(); - for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) { - f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta)); - f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); - v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID; - } - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta)); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtConWithReferenceTime( - mw_timestampIts_withDelta(v_timestampIts) - ) - ) - ) - ) - ) -> value v_denmInd { - tc_ac.stop; - v_actionIds[lengthof(v_actionIds)] := v_denmInd.msgIn.denm.management.actionID; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - for (i := 0; i < lengthof(v_actionIds); i:=i + 1) { - f_poCancelEvent(e_iut, v_actionIds[i]); - } - f_cfDown(); - } // end TC_DEN_EVGN_BV_05 /** @@ -645,77 +274,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-07, ETSI EN 302 637-3, clauses 6.1.1.1, 8.2.1.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-07, ETSI EN 302 637-3, clauses 6.1.1.1, 8.2.1.2 */ testcase TC_DEN_EVGN_BV_07() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainerList v_situations := { - m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), - m_situation(c_causeAccident, c_subCauseCode_Unavailable), - m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), - m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) - }; - var SequenceNumber v_sequenceNumber; - var ActionID v_actionId; - var DenmInd v_denmInd; - var integer i; - - // Test control - - // Test component configuration - f_cfUp(); + f_DEN_EVGN_BV_07(); - // Test adapter configuration - - // Preamble - f_prInitialState(); - for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) { - f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta)); - f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); - f_poCancelEvent(e_iut, v_denmInd.msgIn.denm.management.actionID); - } - //save the last sequence number - v_sequenceNumber := v_denmInd.msgIn.denm.management.actionID.sequenceNumber; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta)); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtConWithActionID( - mw_actionId(-, f_increaseSequenceNumber(v_sequenceNumber)) - ) - ) - ) - ) - ) -> value v_denmInd { - tc_ac.stop; - v_actionId := v_denmInd.msgIn.denm.management.actionID; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVGN_BV_07 /** @@ -749,72 +313,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-08, ETSI EN 302 637-3, clauses 6.1.1.1, 8.2.1.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-08, ETSI EN 302 637-3, clauses 6.1.1.1, 8.2.1.2 */ testcase TC_DEN_EVGN_BV_08() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var SequenceNumber v_firstSequenceNumber; - var DenmInd v_denmInd; - var integer i; - - // Test control - - // Test component configuration - f_cfUp(); + f_DEN_EVGN_BV_08(); - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); - f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); - v_firstSequenceNumber := v_denmInd.msgIn.denm.management.actionID.sequenceNumber; - for (i := 1; i < 65535; i := i + 1) { - f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); - f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); - f_poCancelEvent(e_iut, v_denmInd.msgIn.denm.management.actionID); - } - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtConWithActionID( - mw_actionId(-, f_increaseSequenceNumber(v_firstSequenceNumber)) - ) - ) - ) - ) - ) -> value v_denmInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_iut, m_actionId(v_firstSequenceNumber)); - f_poCancelEvent(e_iut, m_actionId(f_increaseSequenceNumber(v_firstSequenceNumber))); - f_cfDown(); - } // end TC_DEN_EVGN_BV_08 /** @@ -846,59 +350,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVGN/BV-10, ETSI EN 302 637-3, clauses 6.1.1.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVGN/BV-10, ETSI EN 302 637-3, clauses 6.1.1.2 */ testcase TC_DEN_EVGN_BV_10() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var StationID v_stationId; - var DenmInd v_denmInd; - - // Test control + f_DEN_EVGN_BV_10(); - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_stationId := f_getIutStationId ( ); - f_utChangePseudonym ( m_utChangePseudonym ); - f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); - - tc_ac.start; - alt { - [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_anyDenmMgmtCon ) ) ) ) -> value v_denmInd { - tc_ac.stop; - if ( v_denmInd.msgIn.denm.management.actionID.originatingStationID != v_stationId ) { - log("*** " & testcasename() & ": PASS: Successfully received expected DENM - Pseudonym changed. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: received expected DENM - Pseudonym not changed. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_cfDown(); - } // end TC_DEN_EVGN_BV_10 } // end denEventGeneration @@ -926,63 +383,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVUP/BV-01, ETSI EN 302 637-3, clause 6.1.2.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVUP/BV-01, ETSI EN 302 637-3, clause 6.1.2.2 */ testcase TC_DEN_EVUP_BV_01() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - var DenmInd v_denmInd; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); - f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; - f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation)); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_anyDenmPdu( - mw_itsPduHeader, - mw_denm (mw_anyDenmMgmtCon) - ) - ) - ) -> value v_denmInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } + f_DEN_EVUP_BV_01(); - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVUP_BV_01 /** @@ -1012,67 +418,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVUP/BV-02, ETSI EN 302 637-3, clauses 6.1.2.2, 8.1.1.1 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVUP/BV-02, ETSI EN 302 637-3, clauses 6.1.2.2, 8.1.1.1 */ testcase TC_DEN_EVUP_BV_02() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - var DenmInd v_denmInd; + f_DEN_EVUP_BV_02(); - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); - f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; - f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation)); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_anyDenmPdu( - mw_itsPduHeader, - mw_denm ( - mw_denmMgmtConWithActionID( - v_actionId - ) - ) - ) - ) - ) -> value v_denmInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVUP_BV_02 /** @@ -1105,78 +456,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVUP/BV-03, ETSI EN 302 637-3, clause 6.1.2.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVUP/BV-03, ETSI EN 302 637-3, clause 6.1.2.2 */ testcase TC_DEN_EVUP_BV_03() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var TimestampIts v_referenceTime1 , v_timestampIts , v_msgtimestamp; - var Int16 v_diff; - var ActionID v_actionId; - var DenmInd v_denmInd; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); - f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - v_referenceTime1 := v_denmInd.msgIn.denm.management.referenceTime; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; - f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation)); + f_DEN_EVUP_BV_03(); - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_anyDenmPdu( - mw_itsPduHeader, - mw_denm ( - mw_denmMgmtCon( - v_actionId - ) - ) - ) - ) - ) -> value v_denmInd { - tc_ac.stop; - v_timestampIts := f_getCurrentTime(); - v_msgtimestamp := v_denmInd.msgIn.denm.management.referenceTime; - if ( ( ( v_timestampIts + v_diff ) > v_msgtimestamp ) and ( v_msgtimestamp > v_referenceTime1 ) ) { - log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: ReferenceTime not updated correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVUP_BV_03 /** @@ -1204,72 +489,14 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVUP/BV-05, ETSI EN 302 637-3, clause 8.1.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVUP/BO-04, ETSI EN 302 637-3, clause 8.1.2 */ - testcase TC_DEN_EVUP_BV_04() runs on ItsDenm system ItsDenmSystem { - - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - var DenmInd v_denmInd; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); - f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + testcase TC_DEN_EVUP_BO_04() runs on ItsDenm system ItsDenmSystem { - // Test Body - v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; - f_utUpdateEvent(m_utUpdateEvent(m_actionId(f_increaseSequenceNumber(v_actionId.sequenceNumber), f_getIutStationId()), v_situation)); + f_DEN_EVUP_BO_04(); - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_anyDenmPdu( - mw_itsPduHeader, - mw_denm ( - mw_denmMgmtCon( - m_actionId( - f_increaseSequenceNumber(v_actionId.sequenceNumber), - f_getIutStationId() - ) - ) - ) - ) - ) - ) -> value v_denmInd { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received updated DENM for the actionId which is not in originator ITS-S message table. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": PASS: No DENM was sent. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } + } // end TC_DEN_EVUP_BO_04 - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - - } // end TC_DEN_EVUP_BV_05 - } // end denEventUpdate // 5.2.1.4 @@ -1306,67 +533,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-01, ETSI EN 302 637-3, clauses 6.1.2.4, 8.2.1.3 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BV-01, ETSI EN 302 637-3, clauses 6.1.2.4, 8.2.1.3 */ testcase TC_DEN_EVTR_BV_01() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - var DenmInd v_denmInd; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta, c_duration_10sec)); - f_awaitDenMessage( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon( - mw_anyActionId, -, -, -, - c_duration_2sec - ) - ) - ) - ), - v_denmInd - ); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + f_DEN_EVTR_BV_01(); - // Test Body - f_utTerminateEvent(m_utEventCancellation(v_actionId)); - - tc_ac.start; - alt { - [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( - mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, -, isCancellation ))))) -> value v_denmInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_cfDown(); - } // end TC_DEN_EVTR_BV_01 /** @@ -1400,53 +572,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-02, ETSI EN 302 637-3, clause 6.1.2.4 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BV-02, ETSI EN 302 637-3, clause 6.1.2.4 */ testcase TC_DEN_EVTR_BV_02() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - var DenmInd v_denmInd; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) ); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + f_DEN_EVTR_BV_02(); - // Test Body - f_utTerminateEvent(m_utEventCancellation(v_actionId)); - - tc_ac.start; - alt { - [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( - mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, -, isNegation ))))) -> value v_denmInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_cfDown(); - } // end TC_DEN_EVTR_BV_02 /** @@ -1488,99 +619,12 @@ module ItsDenm_TestCases { * } * } * - * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-03, ETSI EN 302 637-3, clauses 6.1.2.4, 8.2.1.3 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BV-03, ETSI EN 302 637-3, clauses 6.1.2.4, 8.2.1.3 */ testcase TC_DEN_EVTR_BV_03() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var TimestampIts v_referenceTime1 := f_getCurrentTime(); - var TimestampIts v_referenceTime2; - var ActionID v_actionId; - var DenmInd v_denmInd; - - // Test control - - // Test component configuration - f_cfUp(); + f_DEN_EVTR_BV_03(); - // Test adapter configuration - - // Preamble - f_prInitialState(); - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId, - -, - -, - -, - v_referenceTime1 - ), - v_situation, - m_denmLocation_zeroDelta - ) - ); - - v_referenceTime2 := f_getCurrentTime(); - v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId, - -, - -, - -, - v_referenceTime2 - ), - v_situation, - m_denmLocation_zeroDelta - ) - ); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_utTerminateEvent(m_utEventCancellation(v_actionId)); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm ( - m_denmMgmtConTermination( - v_actionId, - -, - -, - -, - -, - v_referenceTime2, - isNegation - ) - ) - ) - ) - ) -> value v_denmInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_cfDown(); - } // end TC_DEN_EVTR_BV_03 /** @@ -1614,68 +658,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-04, ETSI EN 302 637-3, clause 7.1.1 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BV-04, ETSI EN 302 637-3, clause 7.1.1 */ testcase TC_DEN_EVTR_BV_04() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - var DenmInd v_denmInd; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta, c_duration_10sec)); - f_awaitDenMessage( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon( - mw_anyActionId - ) - ) - ) - ), - v_denmInd - ); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_utTerminateEvent(m_utEventCancellation(v_actionId)); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, -, isCancellation ), omit, omit, omit ) ) ) ) -> value v_denmInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } + f_DEN_EVTR_BV_04(); - // Postamble - f_cfDown(); - } // end TC_DEN_EVTR_BV_04 /** @@ -1711,55 +699,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-05, ETSI EN 302 637-3, clause 7.1.1 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BV-05, ETSI EN 302 637-3, clause 7.1.1 */ testcase TC_DEN_EVTR_BV_05() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - var DenmInd v_denmInd; + f_DEN_EVTR_BV_05(); - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) ); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_utTerminateEvent(m_utEventCancellation(v_actionId)); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, -, isNegation ), omit, omit, omit ) ) ) ) -> value v_denmInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_cfDown(); - } // end TC_DEN_EVTR_BV_05 /** @@ -1791,86 +736,17 @@ module ItsDenm_TestCases { * } * } * NOTE: Event associated to ACTION_ID1 cannot be present in receiving ITS-S message - * table as its stationID is IUT’s stationID (see TP/DEN/EVTR/BV-07) + * table as its stationID is IUT’s stationID (see TP/DEN/EVTR/BO-07) * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-06, ETSI EN 302 637-3, clauses 8.2.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BO-06, ETSI EN 302 637-3, clauses 8.2.2 */ - testcase TC_DEN_EVTR_BV_06() runs on ItsDenm system ItsDenmSystem { - - // Local variables - var template (value) SituationContainerList v_situations := { - m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), - m_situation(c_causeAccident, c_subCauseCode_Unavailable), - m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), - m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) - }; - var ActionID v_unknownActionId; - var ActionIDList v_actionIds; - var DenmInd v_denmInd; - var integer i; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - for (i := 0; i < lengthof(v_situations); i:=i + 1) { - f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta)); - f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); - v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID; - } - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + testcase TC_DEN_EVTR_BO_06() runs on ItsDenm system ItsDenmSystem { - // Test Body - v_unknownActionId := valueof(m_actionId( - f_increaseSequenceNumber( - v_actionIds[lengthof(v_actionIds)].sequenceNumber - ), - f_getIutStationId() - )); - f_utTerminateEvent(m_utEventCancellation(v_unknownActionId)); + f_DEN_EVTR_BO_06(); - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_anyDenmPdu( - mw_itsPduHeader, - mw_denm ( - mw_denmMgmtCon(v_unknownActionId) - ) - ) - ) - ) -> value v_denmInd { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received termination DENM for the unknown actionId. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": PASS: No termination DENM was sent. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } + } // end TC_DEN_EVTR_BO_06 - // Postamble - for (i := 0; i < lengthof(v_situations); i:=i + 1) { - f_poCancelEvent(e_iut, v_actionIds[i]); - } - f_cfDown(); - - } // end TC_DEN_EVTR_BV_06 - /** * @desc Check that DEN Basic Service does not send any termination DENM if actionID is not in * originating ITS-S message table or receiving ITS-S message table (other stationID) @@ -1900,77 +776,15 @@ module ItsDenm_TestCases { * } * } * NOTE: Event associated to ACTION_ID1 cannot be present in originating ITS-S message table as its - * stationID is not IUT’s stationID (see TP/DEN/EVTR/BV-06) + * stationID is not IUT’s stationID (see TP/DEN/EVTR/BO-06) * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-07, ETSI EN 302 637-3, clauses 8.2.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BO-07, ETSI EN 302 637-3, clauses 8.2.2 */ - testcase TC_DEN_EVTR_BV_07() runs on ItsDenm system ItsDenmSystem { - - // Local constants - const SequenceNumber v_initialSequenceNumber := 0; - // Local variables - var template (value) SituationContainerList v_situations := { - m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), - m_situation(c_causeAccident, c_subCauseCode_Unavailable), - m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), - m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) - }; - var SequenceNumber v_sequenceNumber := v_initialSequenceNumber; - var ActionID v_unknownActionId; - var ActionIDList v_actionIds; - var DenmInd v_denmInd; - var integer i; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - for (i := 0; i < lengthof(v_situations); i:=i + 1) { - v_sequenceNumber := f_increaseSequenceNumber(v_sequenceNumber); - v_actionIds[i] := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId(v_sequenceNumber) ), v_situations[i], m_denmLocation_zeroDelta ) ); - } - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + testcase TC_DEN_EVTR_BO_07() runs on ItsDenm system ItsDenmSystem { - // Test Body - v_unknownActionId := valueof(m_actionId( - f_increaseSequenceNumber( - v_actionIds[lengthof(v_actionIds)].sequenceNumber - ), - f_getTsStationId() - )); - f_utTerminateEvent(m_utEventCancellation(v_unknownActionId)); + f_DEN_EVTR_BO_07(); - tc_ac.start; - alt { - [] denmPort.receive( mw_denmInd( mw_anyDenmPdu( mw_itsPduHeader, mw_denm ( mw_denmMgmtCon(v_unknownActionId) ) ) ) ) -> value v_denmInd { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received termination DENM for the unknown actionId. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": PASS: No termination DENM was sent. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - for (i := 0; i < lengthof(v_situations); i:=i + 1) { - f_poCancelEvent(e_ets, v_actionIds[i]); - } - f_cfDown(); - } // end TC_DEN_EVTR_BV_07 /** @@ -2007,69 +821,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVTR/BV-08, ETSI EN 302 637-3, clause 8.2.1.3 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVTR/BV-08, ETSI EN 302 637-3, clause 8.2.1.3 */ testcase TC_DEN_EVTR_BV_08() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var TimestampIts v_referenceTime1 , v_timestampIts , v_msgtimestamp; - var Int16 v_diff; - var ActionID v_actionId; - var DenmInd v_denmInd; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); - f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); - v_timestampIts := f_getCurrentTime(); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - v_referenceTime1 := v_denmInd.msgIn.denm.management.referenceTime; - v_diff := v_referenceTime1 - v_timestampIts; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + f_DEN_EVTR_BV_08(); - // Test Body - f_utTerminateEvent ( m_utEventCancellation ( v_actionId ) ); - - tc_ac.start; - alt { - [] denmPort.receive ( - mw_denmInd ( mw_denmPdu ( mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, -, isCancellation ) ) ) ) ) -> value v_denmInd { - tc_ac.stop; - v_timestampIts := f_getCurrentTime(); - v_msgtimestamp := v_denmInd.msgIn.denm.management.referenceTime; - if ( ( ( v_timestampIts + v_diff ) > v_msgtimestamp ) and ( v_msgtimestamp > v_referenceTime1 ) ) { - log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: ReferenceTime not updated correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVTR_BV_08 } // end denEventTermination @@ -2111,83 +868,14 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-01, ETSI EN 302 637-3, clause 6.1.2.3 and 8.2.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/TI-01, ETSI EN 302 637-3, clause 6.1.2.3 and 8.2.2 */ - testcase TC_DEN_EVRP_BV_01() runs on ItsDenm system ItsDenmSystem { - - // Local constants - const TransmissionInterval c_repetitionInterval := c_interval_1sec; // INTERVAL_1 - const ValidityDuration c_validityDuration := c_duration_10sec; // DURATION_2 - const ValidityDuration c_repetitionDuration := c_validityDuration; // DURATION_1 - const float c_lowerRepetitionInterval := int2float(c_repetitionInterval)*0.95; - const float c_upperRepetitionInterval := int2float(c_repetitionInterval)*1.05; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var template (present) DenmInd v_expectedDenmInd := mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon( - mw_actionId, - -, - -, - c_validityDuration - ) - ) - ) - ); - var ActionID v_actionId; - var DenmInd v_denmInd; - // Local timers - timer t_repetition; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration + testcase TC_DEN_EVRP_TI_01() runs on ItsDenm system ItsDenmSystem { - // Preamble - f_prInitialState(); - f_utTriggerEvent ( m_utTriggerEvent ( v_situation, m_denmLocation_zeroDelta, c_validityDuration, c_repetitionDuration, c_repetitionInterval ) ); - f_awaitDenMessage(v_expectedDenmInd, v_denmInd); - t_repetition.start(2.0 * int2float(c_repetitionInterval/1000)); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + f_DEN_EVRP_TI_01(); - // Test Body - alt { - [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { - if (match(t_repetition.read*1000.0, (c_lowerRepetitionInterval..c_upperRepetitionInterval))) { - t_repetition.stop; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - t_repetition.stop; - log("*** " & testcasename() & ": FAIL: Received expected DENM, interval was not correct. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - t_repetition.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] t_repetition.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } + } // end TC_DEN_EVRP_TI_01 - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - - } // end TC_DEN_EVRP_BV_01 - /** * @desc Check that the repeated DENM is always the most up-to-date message *
        
@@ -2219,96 +907,12 @@ module ItsDenm_TestCases {
            *  }
            * 
* - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-02, ETSI EN 302 637-3, clause 6.1.2.3 and 8.2.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-02, ETSI EN 302 637-3, clause 6.1.2.3 and 8.2.2 */ testcase TC_DEN_EVRP_BV_02() runs on ItsDenm system ItsDenmSystem { - // Local constants - const ValidityDuration c_validityDuration := c_duration_10sec; - const TransmissionInterval c_repetitionInterval := c_interval_5sec; - const ValidityDuration c_repetitionDuration := c_validityDuration; - const float c_lowerRepetitionInterval := int2float(c_repetitionInterval)*0.95; - const float c_upperRepetitionInterval := int2float(c_repetitionInterval)*1.05; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var template (present) DenmInd v_expectedDenmInd := mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon( - mw_actionId, - -, - -, - c_validityDuration - ) - ) - ) - ); - var ActionID v_actionId; - var DenmInd v_denmInd; - // Local timers - timer t_repetition; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_utTriggerEvent( - m_utTriggerEvent( - v_situation, - m_denmLocation_zeroDelta, - c_validityDuration, - c_repetitionDuration, - c_repetitionInterval - ) - ); - f_awaitDenMessage(v_expectedDenmInd, v_denmInd); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; - //update event after 1 second - tc_noac.start(1.0); - tc_noac.timeout; - v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; - f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation)); - v_expectedDenmInd.msgIn.denm.situation := v_situation; - f_awaitDenMessage(v_expectedDenmInd, v_denmInd); - t_repetition.start(2.0 * int2float(c_repetitionInterval/1000)); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + f_DEN_EVRP_BV_02(); - // Test Body - alt { - [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { - if (match(t_repetition.read*1000.0, (c_lowerRepetitionInterval..c_upperRepetitionInterval))) { - t_repetition.stop; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - t_repetition.stop; - log("*** " & testcasename() & ": FAIL: Received expected DENM, interval was not correct. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - t_repetition.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] t_repetition.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVRP_BV_02 /** @@ -2345,77 +949,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-03, ETSI EN 302 637-3, clauses 6.1.2.4 and 8.2.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-03, ETSI EN 302 637-3, clauses 6.1.2.4 and 8.2.2 */ testcase TC_DEN_EVRP_BV_03() runs on ItsDenm system ItsDenmSystem { - // Local constants - const ValidityDuration c_validityDuration := c_duration_10sec; - const TransmissionInterval c_repetitionInterval := c_interval_4sec; - const ValidityDuration c_repetitionDuration := c_validityDuration; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var template (present) DenmInd v_expectedDenmInd := mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon( - mw_actionId, - -, - -, - c_validityDuration - ) - ) - ) - ); - var ActionID v_actionId; - var DenmInd v_denmInd; - var integer i; - // Local timers - timer t_validity; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_utTriggerEvent(m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_validityDuration, c_repetitionDuration, c_repetitionInterval )); - f_awaitDenMessage(v_expectedDenmInd, v_denmInd); - t_validity.start(1.5 * int2float(c_validityDuration)); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; - //await retransmitted DENM message based on the repetition interval in between the validity duration - for (i:=0; i<(c_validityDuration/(c_repetitionInterval/1000)); i:=i+1) { - f_awaitDenMessage(v_expectedDenmInd, v_denmInd); - } - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - alt { - [] t_validity.timeout { - log("*** " & testcasename() & ": PASS: Retransmission of DENM stopped successfully. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(v_expectedDenmInd) { - t_validity.stop; - log("*** " & testcasename() & ": FAIL: Retransmission of DENM was not stopped. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - t_validity.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } + f_DEN_EVRP_BV_03(); - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVRP_BV_03 /** @@ -2452,77 +991,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-04, ETSI EN 302 637-3, clause 8.2.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-04, ETSI EN 302 637-3, clause 8.2.2 */ testcase TC_DEN_EVRP_BV_04() runs on ItsDenm system ItsDenmSystem { - // Local constants - const ValidityDuration c_validityDuration := c_duration_10sec; - const TransmissionInterval c_repetitionInterval := c_interval_2sec; - const ValidityDuration c_repetitionDuration := c_duration_5sec; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var template (present) DenmInd v_expectedDenmInd := mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon( - mw_actionId, - -, - -, - c_validityDuration - ) - ) - ) - ); - var ActionID v_actionId; - var DenmInd v_denmInd; - var integer i; - // Local timers - timer t_repetition; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta, c_validityDuration, c_repetitionDuration, c_repetitionInterval )); - f_awaitDenMessage(v_expectedDenmInd, v_denmInd); - t_repetition.start(1.5 * int2float(c_repetitionDuration)); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; - //await retransmitted DENM message based on the repetition interval in between the repetition duration - for (i:=0; i<(c_repetitionDuration/(c_repetitionInterval/1000)); i:=i+1) { - f_awaitDenMessage(v_expectedDenmInd, v_denmInd); - } - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - alt { - [] t_repetition.timeout { - log("*** " & testcasename() & ": PASS: Retransmission of DENM stopped successfully. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { - t_repetition.stop; - log("*** " & testcasename() & ": FAIL: Retransmission of DENM was not stopped. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - t_repetition.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } + f_DEN_EVRP_BV_04(); - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVRP_BV_04 /** @@ -2551,81 +1025,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-05, ETSI EN 302 637-3, clause 8.1.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-05, ETSI EN 302 637-3, clause 8.1.2 */ testcase TC_DEN_EVRP_BV_05() runs on ItsDenm system ItsDenmSystem { - // Local constants - const ValidityDuration c_validityDuration := c_duration_10sec; - const ValidityDuration c_repetitionDuration := c_validityDuration; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var template (present) DenmInd v_expectedDenmInd := mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon( - mw_actionId, - -, - -, - -, - c_validityDuration - ) - ) - ) - ); - var ActionID v_actionId; - var DenmInd v_denmInd; - var integer i; - // Local timers - timer t_validity; + f_DEN_EVRP_BV_05(); - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_utTriggerEvent( - m_utTriggerEvent( - v_situation, - m_denmLocation_zeroDelta, - c_validityDuration, - c_repetitionDuration, - omit //no repetitionInterval - ) - ); - f_awaitDenMessage(v_expectedDenmInd, v_denmInd); - t_validity.start(1.5 * int2float(c_validityDuration)); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - alt { - [] t_validity.timeout { - log("*** " & testcasename() & ": PASS: No retransmission of DENM occured as expected. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { - t_validity.stop; - log("*** " & testcasename() & ": FAIL: Unexpected retransmission of DENM occured. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - t_validity.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVRP_BV_05 /** @@ -2654,80 +1059,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-06, ETSI EN 302 637-3, clause 8.1.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-06, ETSI EN 302 637-3, clause 8.1.2 */ testcase TC_DEN_EVRP_BV_06() runs on ItsDenm system ItsDenmSystem { - // Local constants - const ValidityDuration c_validityDuration := c_duration_10sec; - const TransmissionInterval c_repetitionInterval := c_interval_2sec; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var template (present) DenmInd v_expectedDenmInd := mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon( - mw_actionId, - -, - -, - c_validityDuration - ) - ) - ) - ); - var ActionID v_actionId; - var DenmInd v_denmInd; - var integer i; - // Local timers - timer t_validity; - - // Test control + f_DEN_EVRP_BV_06(); - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_utTriggerEvent( - m_utTriggerEvent( - v_situation, - m_denmLocation_zeroDelta, - c_validityDuration, - omit, //no repetitionDuration - c_repetitionInterval - ) - ); - f_awaitDenMessage(v_expectedDenmInd, v_denmInd); - t_validity.start(1.5 * int2float(c_validityDuration)); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - alt { - [] t_validity.timeout { - log("*** " & testcasename() & ": PASS: No retransmission of DENM occured as expected. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { - t_validity.stop; - log("*** " & testcasename() & ": FAIL: Unexpected retransmission of DENM occured. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - t_validity.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVRP_BV_06 /** @@ -2769,61 +1106,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-08, ETSI EN 302 637-3, clause 6.1.1.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-08, ETSI EN 302 637-3, clause 6.1.1.2 */ testcase TC_DEN_EVRP_BV_08() runs on ItsDenm system ItsDenmSystem { - // Local constants - const ValidityDuration c_duration1 := 3 * c_duration_2sec; - const ValidityDuration c_duration2 := c_duration_10sec; - const TransmissionInterval c_interval1 := c_interval_1sec; - // Local variables - var template (value) SituationContainer v_situation := m_situation ( c_causeVehicleBreakdown, c_subCauseCode_Unavailable ); - var template (present) DenmInd v_expectedDenmInd := - mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId, -, -, c_duration2 ) ) ) ); - var ActionID v_actionId; - var DenmInd v_denmInd; - - // Preamble - f_prInitialState(); - f_utTriggerEvent ( m_utTriggerEvent ( v_situation, m_denmLocation_zeroDelta, c_duration2, c_duration1, c_interval1 ) ); - f_awaitDenMessage ( v_expectedDenmInd, v_denmInd ); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - f_utChangePseudonym ( m_utChangePseudonym ); - - tc_ac.start; - alt { - [] denmPort.receive ( v_expectedDenmInd ) -> value v_denmInd { - tc_ac.stop; - if ( v_denmInd.msgIn.denm.management.actionID.originatingStationID != v_actionId.originatingStationID ) { - log("*** " & testcasename() & ": PASS: Successfully received expected DENM - Pseudonym changed. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: received expected DENM - Pseudonym not changed. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } + f_DEN_EVRP_BV_08(); - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVRP_BV_08 /** @@ -2863,66 +1151,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-09, ETSI EN 302 637-3, clause 8.2.1.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-09, ETSI EN 302 637-3, clause 8.2.1.2 */ testcase TC_DEN_EVRP_BV_09() runs on ItsDenm system ItsDenmSystem { - // Local constants - const ValidityDuration c_duration1 := 3 * c_duration_2sec; - const ValidityDuration c_duration2 := c_duration_10sec; - const TransmissionInterval c_interval1 := c_interval_1sec; - const float c_lowerTransmissionInterval := int2float(c_interval1)*0.95; - const float c_upperTransmissionInterval := int2float(c_interval1)*1.05; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var template (present) DenmInd v_expectedDenmInd := - mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_duration2)))); - var ActionID v_actionId; - var DenmInd v_denmInd; - // Local timers - timer t_repetition; - // Test component configuration - f_cfUp(); + f_DEN_EVRP_BV_09(); - // Preamble - f_prInitialState(); - f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_duration2, c_duration1, c_interval1 ) ); - f_awaitDenMessage(v_expectedDenmInd, v_denmInd); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; - t_repetition.start(2.0 * int2float(c_interval1/1000)); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - alt { //FIXME rewrite TC - [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { - if (match(t_repetition.read*1000.0, (c_lowerTransmissionInterval..c_upperTransmissionInterval))) { - t_repetition.stop; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - t_repetition.stop; - log("*** " & testcasename() & ": FAIL: Received expected DENM, interval was not correct. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - t_repetition.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] t_repetition.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVRP_BV_09 /** @@ -2965,68 +1199,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-10, ETSI EN 302 637-3, clause 8.2.1.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-10, ETSI EN 302 637-3, clause 8.2.1.2 */ testcase TC_DEN_EVRP_BV_10() runs on ItsDenm system ItsDenmSystem { - // Local constants - const ValidityDuration c_duration1 := 3 * c_duration_2sec; - const ValidityDuration c_duration2 := c_duration_10sec; - const TransmissionInterval c_interval1 := c_interval_1sec; - const float c_lowerTransmissionInterval := int2float(c_interval1)*0.95; - const float c_upperTransmissionInterval := int2float(c_interval1)*1.05; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var template (present) DenmInd v_expected := mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_duration2 )))); - var ActionID v_actionId; - var DenmInd v_denmInd; - var TimestampIts v_referenceTime; - // Local timers - timer t_repetition; - // Test component configuration - f_cfUp(); + f_DEN_EVRP_BV_10(); - // Preamble - f_prInitialState(); - f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_duration2, c_duration1, c_interval1 ) ); - f_awaitDenMessage ( v_expected, v_denmInd ); - t_repetition.start(2.0 * int2float(c_interval1/1000)); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - v_referenceTime := v_denmInd.msgIn.denm.management.referenceTime; - v_expected.msgIn.denm.management.actionID := v_actionId; - v_expected.msgIn.denm.management.referenceTime := v_referenceTime; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - alt { //FIXME rewrite TC - [] denmPort.receive ( v_expected ) -> value v_denmInd { - if (match(t_repetition.read*1000.0, (c_lowerTransmissionInterval..c_upperTransmissionInterval))) { - t_repetition.stop; - log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - t_repetition.stop; - log("*** " & testcasename() & ": FAIL: Received expected DENM, interval was not correct. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - t_repetition.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] t_repetition.timeout { - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); - } // end TC_DEN_EVRP_BV_10 /** @@ -3059,84 +1237,77 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/EVRP/BV-11, ETSI EN 302 637-3, clause 8.2.1.5 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/EVRP/BV-11, ETSI EN 302 637-3, clause 8.2.1.5 */ testcase TC_DEN_EVRP_BV_11() runs on ItsDenm system ItsDenmSystem { - // Local constants - const ValidityDuration c_duration1 := c_defaultValidity + 100; - const ValidityDuration c_duration2 := c_defaultValidity; - const TransmissionInterval c_interval1 := c_interval_10sec; - const float c_diffValidity := int2float ( ( c_duration1 - c_duration2 ) ); - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var template (present) DenmInd v_expected := mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_duration2)))); - var ActionID v_actionId; - var DenmInd v_denmInd; - var TimestampIts v_referenceTime; - // Local timers - timer t_repetition; - timer t_default; - // Test component configuration - f_cfUp(); + f_DEN_EVRP_BV_11(); - // Preamble - f_prInitialState(); - f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, omit, c_duration1, c_interval1 ) ); - f_awaitDenMessage ( v_expected, v_denmInd ); - t_repetition.start(2.0 * int2float(c_interval1/1000)); - t_default.start ( int2float( c_duration1/1000 ) ); - v_actionId := v_denmInd.msgIn.denm.management.actionID; - v_expected.msgIn.denm.management.actionID := v_actionId; - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + } // end TC_DEN_EVRP_BV_11 - // Test Body - alt { - [] denmPort.receive ( v_expected ) -> value v_denmInd { - t_repetition.stop; - if ( t_default.read*1000.0 < c_diffValidity ) { - log("*** " & testcasename() & ": FAIL: DENM received after validity duration. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": INFO: DENM retransmission. ***"); - t_repetition.start(2.0 * int2float(c_interval1/1000)); - repeat; - } - } - [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { - t_repetition.stop; - log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] t_repetition.timeout { - if ( t_default.read*1000.0 < c_diffValidity ) { - t_default.stop; - log("*** " & testcasename() & ": PASS: Retransmission of DENM stopped. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - t_default.stop; - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - [] t_default.timeout { - t_repetition.stop; - log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } + } // end denMessageRepetition - // Postamble - f_poCancelEvent(e_iut, v_actionId); - f_cfDown(); + // 5.2.1.6 + group denMessageLowerLayerParameters { - } // end TC_DEN_EVRP_BV_11 + /** + * @desc Check that DENM is encapsulated in BTP type B packet + *
        
+           * PICS Selection: PICS_DENM_GENERATION 
+           * Initial conditions:
+           *  with {
+           *      the IUT being in the "initial state"
+           *  }
+           * Expected behaviour:
+           *  ensure that {
+           *      when {
+           *          a DENM is generated
+           *      }
+           *      then {
+           *          the IUT sends a DENM
+           *              encapsulated in a BTP-B packet
+           *      }
+           *  }
+           * 
+ * + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/PAR/BV-01, EN 302 637-3 clause 5.4.2.2 + */ + testcase TC_DEN_PAR_BV_01() runs on ItsDenm system ItsDenmSystem { - } // end denMessageRepetition + f_DEN_PAR_BV_01(); + } // end TC_DEN_PAR_BV_01 + + /** + * @desc Check that DENM is encapsulated in a GBC packet + *
        
+           * PICS Selection: PICS_DENM_GENERATION 
+           * Initial conditions:
+           *  with {
+           *      the IUT being in the "initial state"
+           *  }
+           * Expected behaviour:
+           *  ensure that {
+           *      when {
+           *          a DENM is generated
+           *      }
+           *      then {
+           *          the IUT sends a DENM
+           *              encapsulated in a GBC packet
+           *      }
+           *  }
+           * 
+ * + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/PAR/BV-02, EN 302 637-3 clause 5.4.2.2 + */ + testcase TC_DEN_PAR_BV_02() runs on ItsDenm system ItsDenmSystem { + + f_DEN_PAR_BV_02(); + + } // end TC_DEN_PAR_BV_02 + + } // end denMessageLowerLayerParameters + } // end denMessageTransmission // 5.2.2 @@ -3169,54 +1340,11 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-01, ETSI EN 302 637-3, clause 8.4.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BV-01, ETSI EN 302 637-3, clause 8.4.2 */ testcase TC_DEN_MSRV_BV_01() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - var integer i; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId - ), - v_situation, - m_denmLocation_zeroDelta - ) - ); - - f_sleep(PX_TAC); - for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utEvents)) { - log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); + f_DEN_MSRV_BV_01(); } // end TC_DEN_MSRV_BV_01 @@ -3252,72 +1380,11 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-02, ETSI EN 302 637-3, clause 8.4.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BV-02, ETSI EN 302 637-3, clause 8.4.2 */ testcase TC_DEN_MSRV_BV_02() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem); - var TimestampIts v_referenceTime2; - var ActionID v_actionId; - var integer i; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId - ), - v_situation1, - m_denmLocation_zeroDelta - ) - ); - - f_sleep(1.0); - v_referenceTime2 := f_getCurrentTime(); - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - v_actionId, - -, -, -, - v_referenceTime2 - ), - v_situation2, - m_denmLocation_zeroDelta - ) - ); - - f_sleep(PX_TAC); - for(i:=0; i < lengthof(vc_utEvents) - and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID) - and vc_utEvents[i].denMsg.denm.management.referenceTime != v_referenceTime2; i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utEvents)) { - log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); + f_DEN_MSRV_BV_02(); } // end TC_DEN_MSRV_BV_02 @@ -3347,58 +1414,14 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-03, ETSI EN 302 637-3, clause 8.3.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BO-03, ETSI EN 302 637-3, clause 8.3.2 */ - testcase TC_DEN_MSRV_BV_03() runs on ItsDenm system ItsDenmSystem { - - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - var integer i; + testcase TC_DEN_MSRV_BO_03() runs on ItsDenm system ItsDenmSystem { - // Test control + f_DEN_MSRV_BO_03(); - // Test component configuration - f_cfUp(); + } // end TC_DEN_MSRV_BO_03 - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId, - - - ), - v_situation, - m_denmLocation_zeroDelta - ) - ); - - f_sleep(PX_TNOAC); - for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utEvents)) { - log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); - - } // end TC_DEN_MSRV_BV_03 - /** * @desc Check that receiving ITS-S discards termination DENM if it concerns an unknown ActionID (other actionID) *
@@ -3424,60 +1447,14 @@ module ItsDenm_TestCases {
          *  }
          * 
* - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-04, ETSI EN 302 637-3, clause 8.3.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BO-04, ETSI EN 302 637-3, clause 8.3.2 */ - testcase TC_DEN_MSRV_BV_04() runs on ItsDenm system ItsDenmSystem { - - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId, v_actionIdIut; - var integer i; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + testcase TC_DEN_MSRV_BO_04() runs on ItsDenm system ItsDenmSystem { - // Test Body - v_actionIdIut := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_actionId( - f_increaseSequenceNumber(v_actionId.sequenceNumber) - ) - ), - v_situation, - m_denmLocation_zeroDelta - ) - ); + f_DEN_MSRV_BO_04(); - f_sleep(PX_TNOAC); - for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utEvents)) { - log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } + } // end TC_DEN_MSRV_BO_04 - // Postamble - f_poCancelEvent(e_iut, v_actionIdIut); - f_cfDown(); - - } // end TC_DEN_MSRV_BV_04 - /** * @desc Check that receiving ITS-S discards DENM if referenceTime is lower than highest value received for this ActionID *
@@ -3509,76 +1486,14 @@ module ItsDenm_TestCases {
          *  }
          * 
* - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-05, ETSI EN 302 637-3, clause 8.3.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BO-05, ETSI EN 302 637-3, clause 8.3.2 */ - testcase TC_DEN_MSRV_BV_05() runs on ItsDenm system ItsDenmSystem { - - // Local variables - var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem); - var TimestampIts v_referenceTime1 := f_getCurrentTime(); - var TimestampIts v_referenceTime2 := v_referenceTime1 - 1000; - var ActionID v_actionId; - var integer i; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration + testcase TC_DEN_MSRV_BO_05() runs on ItsDenm system ItsDenmSystem { - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + f_DEN_MSRV_BO_05(); - // Test Body - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId, - -, -, -, v_referenceTime1 - ), - v_situation1, - m_denmLocation_zeroDelta - ) - ); + } // end TC_DEN_MSRV_BO_05 - f_sleep(1.0); - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - v_actionId, - -, -, -, - v_referenceTime2 - ), - v_situation2, - m_denmLocation_zeroDelta - ) - ); - - f_sleep(PX_TNOAC); - for(i:=0; i < lengthof(vc_utEvents) - and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID) - and vc_utEvents[i].denMsg.denm.management.referenceTime != v_referenceTime2; i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utEvents)) { - log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); - - } // end TC_DEN_MSRV_BV_05 - /** * @desc Check that receiving ITS-S discards DENM if detectionTime is smaller than highest value received for this ActionID * @@ -3615,81 +1530,14 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-06, ETSI EN 302 637-3, clause 8.3.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BO-06, ETSI EN 302 637-3, clause 8.3.2 */ - testcase TC_DEN_MSRV_BV_06() runs on ItsDenm system ItsDenmSystem { - - // Local variables - var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem); - var template (value) DecentralizedEnvironmentalNotificationMessage v_denm; - var TimestampIts v_detectionTime1 := f_getCurrentTime(); - var TimestampIts v_detectionTime2 := v_detectionTime1 - 1000; - var TimestampIts v_referenceTime1 := v_detectionTime1; - var ActionID v_actionId; - var integer i; + testcase TC_DEN_MSRV_BO_06() runs on ItsDenm system ItsDenmSystem { - // Test control + f_DEN_MSRV_BO_06(); - // Test component configuration - f_cfUp(); + } // end TC_DEN_MSRV_BO_06 - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_denm := m_denm( - m_denmMgmtCon( - m_tsActionId, - -, - , -, - v_detectionTime1, - v_referenceTime1 - ), - v_situation1, - m_denmLocation_zeroDelta - ); - v_actionId := f_sendDenMessage(v_denm); - - f_sleep(1.0); - v_detectionTime2 := valueof(v_denm.management.detectionTime) - 1000; - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - v_actionId, - -, - ,-, - v_detectionTime2, - v_referenceTime1 - ), - v_situation2, - m_denmLocation_zeroDelta - ) - ); - - f_sleep(PX_TNOAC); - for(i:=0; i < lengthof(vc_utEvents) - and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID) - and vc_utEvents[i].denMsg.denm.management.detectionTime != v_detectionTime2; i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utEvents)) { - log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); - - } // end TC_DEN_MSRV_BV_06 - /** * @desc Check that receiving ITS-S transmits DENM to application if it concerns a known ActionID and referenceTime * is equal to highest received value and detectionTime is more recent @@ -3725,78 +1573,11 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-07, ETSI EN 302 637-3, clause 8.3.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BV-07, ETSI EN 302 637-3, clause 8.3.2 */ testcase TC_DEN_MSRV_BV_07() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem); - var template (value) DecentralizedEnvironmentalNotificationMessage v_denm; - var TimestampIts v_detectionTime2 := f_getCurrentTime(); - var TimestampIts v_detectionTime1 :=v_detectionTime2 - 1000; - var TimestampIts v_referenceTime1 := v_detectionTime2; - var ActionID v_actionId; - var integer i; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_denm := m_denm( - m_denmMgmtCon( - m_tsActionId, - -, - , -, - v_detectionTime1, - v_referenceTime1 - ), - v_situation1, - m_denmLocation_zeroDelta - ); - v_actionId := f_sendDenMessage(v_denm); - - f_sleep(1.0); - v_detectionTime2 := valueof(v_denm.management.detectionTime) + 1000; - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - v_actionId, - -, - , -, - v_detectionTime2, - v_referenceTime1 - ), - v_situation2, - m_denmLocation_zeroDelta - ) - ); - - f_sleep(PX_TAC); - for(i:=0; i < lengthof(vc_utEvents) - and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID) - and vc_utEvents[i].denMsg.denm.management.detectionTime != v_detectionTime2; i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utEvents)) { - log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); + f_DEN_MSRV_BV_07(); } // end TC_DEN_MSRV_BV_07 @@ -3834,50 +1615,11 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/MSRV/BV-10, ETSI EN 302 637-3, clause B.40 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/MSRV/BV-10, ETSI EN 302 637-3, clause B.40 */ testcase TC_DEN_MSRV_BV_10() runs on ItsDenm system ItsDenmSystem { - //Local constants - - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - - // Test component configuration - f_cfUp(); - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_sendDenMessage ( - m_denm ( m_denmMgmtCon ( m_tsActionId), v_situation, m_denmLocation_zeroDelta, m_alacarteConImpactReduction ) ); - - tc_ac.start; - alt { - [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId ( f_getTsStationId() ) ), v_situation, mw_anyDenmLocation, - mw_alacarteConImpactReduction ) ) ) ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: DENM with correct alacarte container ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId ( f_getTsStationId() ) ) ) ) ) ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: DENM with incorrect containers ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: DENM not rreceived ***"); - f_clientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); + f_DEN_MSRV_BV_10(); } // end TC_DEN_MSRV_BV_10 @@ -3916,80 +1658,11 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-01, ETSI EN 302 637-3, clause 8.2.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-01, ETSI EN 302 637-3, clause 8.2.2 */ testcase TC_DEN_KAFW_BV_01() runs on ItsDenm system ItsDenmSystem { - //Local constants - const TransmissionInterval c_transmissionInterval := c_interval_10sec; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - // Local timers - timer t_forwarding := 2.0 * int2float(c_transmissionInterval) / 1000.0; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId, - -, - c_transmissionInterval * 3, - c_transmissionInterval - ), - v_situation, - m_denmLocation_zeroDelta - ) - ); - - t_forwarding.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon(v_actionId) - ) - ) - ) - ) { - if(t_forwarding.running) { - t_forwarding.stop; - log("*** " & testcasename() & ": FAIL: IUT re-forwarded the packet too early ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - else { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: DENM re-forwarded ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_forwarding.timeout { - tc_ac.start; - log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: DENM was not forwarded ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); + f_DEN_KAFW_BV_01(); } // end TC_DEN_KAFW_BV_01 @@ -4033,111 +1706,11 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-02, ETSI EN 302 637-3, clause 8.2.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-02, ETSI EN 302 637-3, clause 8.2.2 */ testcase TC_DEN_KAFW_BV_02() runs on ItsDenm system ItsDenmSystem { - //Local constants - const TransmissionInterval c_transmissionInterval := c_interval_10sec; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var TimestampIts v_referenceTime1 := f_getCurrentTime(); - var TimestampIts v_referenceTime2 := v_referenceTime1 - 1000; - var ActionID v_actionId; - // Local timers - timer t_forwarding := 2.0 * int2float(c_transmissionInterval) /1000.0; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId, - -, - c_transmissionInterval * 3, - c_transmissionInterval, - v_referenceTime1 - ), - v_situation, - m_denmLocation_zeroDelta - ) - ); - - t_forwarding.start; - f_sleep(5.0); - - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId, - -, - c_transmissionInterval * 3, - c_transmissionInterval, - v_referenceTime2 - ), - v_situation, - m_denmLocation_zeroDelta - ) - ); - - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon(v_actionId, v_referenceTime1) - ) - ) - ) - ) { - if(t_forwarding.running) { - t_forwarding.stop; - log("*** TC_DEN_KAFW_BV_02: INFO: IUT re-forwarded the packet too early ***"); - } - else { - tc_ac.stop; - log("*** TC_DEN_KAFW_BV_02: PASS: DENM re-forwarded ***"); - } - f_clientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon(v_actionId) - ) - ) - ) - ) { - tc_ac.stop; - t_forwarding.stop; - log("*** " & testcasename() & ": FAIL: IUT re-forwarded wrong version of DENM ***"); - } - [] t_forwarding.timeout { - tc_ac.start; - log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: DENM was not forwarded ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); + f_DEN_KAFW_BV_02(); } // end TC_DEN_KAFW_BV_02 @@ -4168,84 +1741,14 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-03, ETSI EN 302 637-3, clause 8.2.1.4 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/TI-03, ETSI EN 302 637-3, clause 8.2.1.4 */ - testcase TC_DEN_KAFW_BV_03() runs on ItsDenm system ItsDenmSystem { - - //Local constants - const TransmissionInterval c_transmissionInterval := c_interval_10sec; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - // Local timers - timer t_forwardingMin := 2.0 * int2float(c_transmissionInterval) / 1000.0; - timer t_forwardingMax := 2.0 * int2float(c_transmissionInterval) / 1000.0 + 0.15; - - // Test control + testcase TC_DEN_KAFW_TI_03() runs on ItsDenm system ItsDenmSystem { - // Test component configuration - f_cfUp(); + f_DEN_KAFW_TI_03(); - // Test adapter configuration + } // end TC_DEN_KAFW_TI_03 - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId, - -, - c_transmissionInterval * 3, - c_transmissionInterval - ), - v_situation, - m_denmLocation_zeroDelta - ) - ); - - t_forwardingMin.start; - t_forwardingMax.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon(v_actionId) - ) - ) - ) - ) { - t_forwardingMax.stop; - if(t_forwardingMin.running) { - t_forwardingMin.stop; - log("*** " & testcasename() & ": FAIL: IUT re-forwarded the packet too early ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: DENM re-forwarded correctly ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_forwardingMin.timeout { - log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***"); - repeat; - } - [] t_forwardingMax.timeout { - log("*** " & testcasename() & ": FAIL: DENM was not forwarded on time ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); - - } // end TC_DEN_KAFW_BV_03 - /** * @desc Check that Forwarding ITS-S replaces the ITS PDU header of forwarded DENMs *
@@ -4279,81 +1782,11 @@ module ItsDenm_TestCases {
          *  }
          * 
* - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-04, ETSI EN 302 637-3, clause 8.2.1.6 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-04, ETSI EN 302 637-3, clause 8.2.1.6 */ testcase TC_DEN_KAFW_BV_04() runs on ItsDenm system ItsDenmSystem { - //Local constants - const TransmissionInterval c_transmissionInterval := c_interval_10sec; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId, - -, - c_transmissionInterval * 3, - c_transmissionInterval - ), - v_situation, - m_denmLocation_zeroDelta - ) - ); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon(v_actionId) - ), - f_getIutStationId() - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct stationID ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon(v_actionId) - ), - mw_anyStationId - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect stationID ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); - f_clientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); + f_DEN_KAFW_BV_04(); } // end TC_DEN_KAFW_BV_04 @@ -4389,79 +1822,11 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-05, ETSI EN 302 637-3, clause 8.2.1.1 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-05, ETSI EN 302 637-3, clause 8.2.1.1 */ testcase TC_DEN_KAFW_BV_05() runs on ItsDenm system ItsDenmSystem { - //Local constants - const TransmissionInterval c_transmissionInterval := c_interval_10sec; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId, - -, - c_transmissionInterval * 3, - c_transmissionInterval - ), - v_situation, - m_denmLocation_zeroDelta - ) - ); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon(v_actionId) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct actionID ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon(mw_anyActionId) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect actionID ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); - f_clientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); + f_DEN_KAFW_BV_05(); } // end TC_DEN_KAFW_BV_05 @@ -4500,81 +1865,11 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-06, ETSI EN 302 637-3, clause 8.2.1.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-06, ETSI EN 302 637-3, clause 8.2.1.2 */ testcase TC_DEN_KAFW_BV_06() runs on ItsDenm system ItsDenmSystem { - //Local constants - const TransmissionInterval c_transmissionInterval := c_interval_10sec; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var TimestampIts v_referenceTime1 := f_getCurrentTime(); - var ActionID v_actionId; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId, - -, - c_transmissionInterval * 3, - c_transmissionInterval, - v_referenceTime1 - ), - v_situation, - m_denmLocation_zeroDelta - ) - ); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon(v_actionId, v_referenceTime1) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct referenceTime ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon(v_actionId) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect referenceTime ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); - f_clientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); + f_DEN_KAFW_BV_06(); } // end TC_DEN_KAFW_BV_06 @@ -4613,83 +1908,11 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-07, ETSI EN 302 637-3, clause 8.2.1.3 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-07, ETSI EN 302 637-3, clause 8.2.1.3 */ testcase TC_DEN_KAFW_BV_07() runs on ItsDenm system ItsDenmSystem { - //Local constants - const TransmissionInterval c_transmissionInterval := c_interval_10sec; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId, - -, - c_transmissionInterval * 3, - c_transmissionInterval - ), - v_situation, - m_denmLocation_zeroDelta - ) - ); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon( - v_actionId - ) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct isNegation ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon( - v_actionId - ) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect isNegation ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); - f_clientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); + f_DEN_KAFW_BV_07(); } // end TC_DEN_KAFW_BV_07 @@ -4736,83 +1959,11 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-08, ETSI EN 302 637-3, clause 8.2.1.6 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-08, ETSI EN 302 637-3, clause 8.2.1.6 */ testcase TC_DEN_KAFW_BV_08() runs on ItsDenm system ItsDenmSystem { - //Local constants - const TransmissionInterval c_transmissionInterval := c_interval_10sec; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId, - -, - c_transmissionInterval * 3, - c_transmissionInterval - ), - v_situation, - m_denmLocation_zeroDelta, - m_alacarteConLaneCount - ) - ); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon(v_actionId), - v_situation, - m_denmLocation_zeroDelta, - m_alacarteConLaneCount - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct containers ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon(v_actionId) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect containers ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); - f_clientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); + f_DEN_KAFW_BV_08(); } // end TC_DEN_KAFW_BV_08 @@ -4847,87 +1998,11 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-09, ETSI EN 302 637-3, clause 8.2.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-09, ETSI EN 302 637-3, clause 8.2.2 */ testcase TC_DEN_KAFW_BV_09() runs on ItsDenm system ItsDenmSystem { - //Local constants - const TransmissionInterval c_transmissionInterval := c_interval_10sec; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - // Local timers - timer t_validity := int2float(c_transmissionInterval * 3) / 1000.0; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId, - -, - c_transmissionInterval * 3, - c_transmissionInterval - ), - v_situation, - m_denmLocation_zeroDelta - ) - ); - - t_validity.start; - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon(v_actionId) - ) - ) - ) - ) { - tc_ac.stop; - if(t_validity.running) { - log("*** " & testcasename() & ": INFO: DENM re-forwarded during validity period ***"); - tc_ac.start; - repeat; - } - else { - log("*** " & testcasename() & ": FAIL: DENM re-forwarded after validity expiration ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - } - [] tc_ac.timeout { - if(t_validity.running) { - log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); - f_clientSyncAndVerdict(c_tbDone, e_timeout); - } - else { - log("*** " & testcasename() & ": PASS: DENM not reforwarded after validity expiration ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - } - - [] t_validity.timeout { - log("*** " & testcasename() & ": INFO: End of validity period ***"); - repeat; - } - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); + f_DEN_KAFW_BV_09(); } // end TC_DEN_KAFW_BV_09 @@ -4960,82 +2035,11 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-10, ETSI EN 302 637-3, clause 8.2.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-10, ETSI EN 302 637-3, clause 8.2.2 */ testcase TC_DEN_KAFW_BV_10() runs on ItsDenm system ItsDenmSystem { - //Local constants - const TransmissionInterval c_transmissionInterval := c_interval_10sec; - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; - var boolean v_positionChanged := false; - - // Test control - - // Test component configuration - f_cfUp(); - - // Test adapter configuration - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_sendDenMessage( - m_denm( - m_denmMgmtCon( - m_tsActionId, - -, - c_transmissionInterval * 5, - c_transmissionInterval - ), - v_situation, - m_denmLocation_zeroDelta - ) - ); - - tc_ac.start; - alt { - [] denmPort.receive( - mw_denmInd( - mw_denmPdu( - mw_denm( - mw_denmMgmtCon(v_actionId) - ) - ) - ) - ) { - tc_ac.stop; - if(v_positionChanged == false) { - log("*** " & testcasename() & ": INFO: DENM re-forwarded. Changing position ***"); - f_utChangePosition(m_utChangePosition(1000, 0)); - v_positionChanged := true; - tc_ac.start; - repeat; - } - else { - log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect containers ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - } - [] tc_ac.timeout { - if(v_positionChanged == false) { - log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); - f_clientSyncAndVerdict(c_tbDone, e_timeout); - } - else { - log("*** " & testcasename() & ": PASS: DENM stopped re-forwarding DENM ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - } - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); + f_DEN_KAFW_BV_10(); } // end TC_DEN_KAFW_BV_10 @@ -5061,42 +2065,12 @@ module ItsDenm_TestCases { * } * * - * @version 1.2.1 - * @see ETSI TS 102 869-2 v1.2.1 TP/DEN/KAFW/BV-10, ETSI EN 302 637-3, clause 8.2.2 + * @see ETSI TS 102 869-2 v1.4.1 TP/DEN/KAFW/BV-10, ETSI EN 302 637-3, clause 8.2.2 */ testcase TC_DEN_KAFW_BV_11() runs on ItsDenm system ItsDenmSystem { - // Local variables - var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); - var ActionID v_actionId; + f_DEN_KAFW_BV_11(); - // Test component configuration - f_cfUp(); - - // Preamble - f_prInitialState(); - f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); - - // Test Body - v_actionId := f_sendDenMessage( m_denm ( m_denmMgmtCon ( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) ); - - tc_ac.start; - alt { - [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( v_actionId ) ) ) ) ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: IUT reconstructs and sends the DENM associated with ACTION_ID ***"); - f_clientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": PASS: IUT does not reconstruct and send the DENM associated with ACTION_ID1 ***"); - f_clientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poCancelEvent(e_ets, v_actionId); - f_cfDown(); - } // end TC_DEN_KAFW_BV_11 } // end denKeepAliveForwarding diff --git a/ttcn/AtsDENM/ItsDenm_TestControl.ttcn b/ttcn/AtsDENM/ItsDenm_TestControl.ttcn index 4857cfc0a70b4955f8eb569b0b04e8885f1120fe..6cd502e839d19c1c47ca33617521a7d16e83fa1d 100644 --- a/ttcn/AtsDENM/ItsDenm_TestControl.ttcn +++ b/ttcn/AtsDENM/ItsDenm_TestControl.ttcn @@ -10,58 +10,94 @@ module ItsDenm_TestControl { // ATS DENM import from ItsDenm_TestCases {testcase all}; + // LibIts + import from LibItsDenm_Pics all; + // Test Execution control { - execute(TC_DEN_MSGF_BV_01()); - execute(TC_DEN_MSGF_BV_02()); + if(PICS_DENM_GENERATION) { + execute(TC_DEN_MSGF_BV_01()); + execute(TC_DEN_MSGF_BV_02()); + + execute(TC_DEN_EVGN_BV_01()); + execute(TC_DEN_EVGN_BV_02()); + execute(TC_DEN_EVGN_BV_03()); + execute(TC_DEN_EVGN_BV_04()); + execute(TC_DEN_EVGN_BV_05()); + execute(TC_DEN_EVGN_BV_07()); + execute(TC_DEN_EVGN_BV_08()); + execute(TC_DEN_EVGN_BV_10()); + } + + if(PICS_DENM_UPDATE) { + execute(TC_DEN_EVUP_BV_01()); + execute(TC_DEN_EVUP_BV_02()); + execute(TC_DEN_EVUP_BV_03()); + execute(TC_DEN_EVUP_BO_04()); + } - execute(TC_DEN_EVGN_BV_01()); - execute(TC_DEN_EVGN_BV_02()); - execute(TC_DEN_EVGN_BV_03()); - execute(TC_DEN_EVGN_BV_04()); - execute(TC_DEN_EVGN_BV_05()); - execute(TC_DEN_EVGN_BV_07()); - execute(TC_DEN_EVGN_BV_08()); + if(PICS_DENM_CANCELLATION) { + execute(TC_DEN_EVTR_BV_01()); + execute(TC_DEN_EVTR_BV_04()); + execute(TC_DEN_EVTR_BV_08()); + } - execute(TC_DEN_EVUP_BV_01()); - execute(TC_DEN_EVUP_BV_02()); - execute(TC_DEN_EVUP_BV_03()); - execute(TC_DEN_EVUP_BV_04()); + if(PICS_DENM_NEGATION) { + execute(TC_DEN_EVTR_BV_02()); + execute(TC_DEN_EVTR_BV_03()); + execute(TC_DEN_EVTR_BV_05()); + } - execute(TC_DEN_EVTR_BV_01()); - execute(TC_DEN_EVTR_BV_02()); - execute(TC_DEN_EVTR_BV_03()); - execute(TC_DEN_EVTR_BV_04()); - execute(TC_DEN_EVTR_BV_05()); - execute(TC_DEN_EVTR_BV_06()); - execute(TC_DEN_EVTR_BV_07()); + if(PICS_DENM_NEGATION or PICS_DENM_CANCELLATION) { + execute(TC_DEN_EVTR_BO_06()); + execute(TC_DEN_EVTR_BO_07()); + } - execute(TC_DEN_EVRP_BV_01()); - execute(TC_DEN_EVRP_BV_02()); - execute(TC_DEN_EVRP_BV_03()); - execute(TC_DEN_EVRP_BV_04()); - execute(TC_DEN_EVRP_BV_05()); - execute(TC_DEN_EVRP_BV_06()); + if(PICS_DENM_REPETITION) { + execute(TC_DEN_EVRP_TI_01()); + execute(TC_DEN_EVRP_BV_02()); + execute(TC_DEN_EVRP_BV_03()); + execute(TC_DEN_EVRP_BV_04()); + execute(TC_DEN_EVRP_BV_05()); + execute(TC_DEN_EVRP_BV_06()); + execute(TC_DEN_EVRP_BV_08()); + execute(TC_DEN_EVRP_BV_09()); + execute(TC_DEN_EVRP_BV_10()); + execute(TC_DEN_EVRP_BV_11()); + } + + if(PICS_DENM_GENERATION) { + execute(TC_DEN_PAR_BV_01()); + execute(TC_DEN_PAR_BV_02()); + } - execute(TC_DEN_MSRV_BV_01()); - execute(TC_DEN_MSRV_BV_02()); - execute(TC_DEN_MSRV_BV_03()); - execute(TC_DEN_MSRV_BV_04()); - execute(TC_DEN_MSRV_BV_05()); - execute(TC_DEN_MSRV_BV_06()); - execute(TC_DEN_MSRV_BV_07()); + if(PICS_DENM_RECEPTION) { + execute(TC_DEN_MSRV_BV_01()); + execute(TC_DEN_MSRV_BV_02()); + execute(TC_DEN_MSRV_BO_03()); + execute(TC_DEN_MSRV_BO_04()); + execute(TC_DEN_MSRV_BO_05()); + execute(TC_DEN_MSRV_BO_06()); + execute(TC_DEN_MSRV_BV_07()); + + if(PICS_IMPACT_REDUCTION) { + execute(TC_DEN_MSRV_BV_10()); + } + } - execute(TC_DEN_KAFW_BV_01()); - execute(TC_DEN_KAFW_BV_02()); - execute(TC_DEN_KAFW_BV_03()); - execute(TC_DEN_KAFW_BV_04()); - execute(TC_DEN_KAFW_BV_05()); - execute(TC_DEN_KAFW_BV_06()); - execute(TC_DEN_KAFW_BV_07()); - execute(TC_DEN_KAFW_BV_08()); - execute(TC_DEN_KAFW_BV_09()); - execute(TC_DEN_KAFW_BV_10()); + if(PICS_DENM_KAF) { + execute(TC_DEN_KAFW_BV_01()); + execute(TC_DEN_KAFW_BV_02()); + execute(TC_DEN_KAFW_TI_03()); + execute(TC_DEN_KAFW_BV_04()); + execute(TC_DEN_KAFW_BV_05()); + execute(TC_DEN_KAFW_BV_06()); + execute(TC_DEN_KAFW_BV_07()); + execute(TC_DEN_KAFW_BV_08()); + execute(TC_DEN_KAFW_BV_09()); + execute(TC_DEN_KAFW_BV_10()); + } } } // end ItsDenm_TestControl \ No newline at end of file diff --git a/ttcn/AtsDENM/ItsDenm_TpFunctions.ttcn b/ttcn/AtsDENM/ItsDenm_TpFunctions.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..cdb07303254ca14eb7d49d58a3986c727e6c7664 --- /dev/null +++ b/ttcn/AtsDENM/ItsDenm_TpFunctions.ttcn @@ -0,0 +1,3787 @@ +/** + * @author ETSI / STF484 + * @version $URL$ + * $Id$ + * @desc DENM TP functions + * + */ +module ItsDenm_TpFunctions { + + // LibCommon + import from LibCommon_Sync all; + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_BasicTypesAndValues all; + + // LibIts + import from LibItsCommon_Functions all; + import from LibItsCommon_TypesAndValues all; + import from LibItsDenm_TestSystem all; + import from LibItsDenm_Functions all; + import from LibItsDenm_Templates all; + import from LibItsDenm_TypesAndValues all; + import from LibItsDenm_Pics all; + import from DENM_PDU_Descriptions language "ASN.1:1997" all; + import from ITS_Container language "ASN.1:1997" all; + + // 5.2.1 + group denMessageTransmission { + + // 5.2.1.1 + group denMessageFormat { + + /** + * @desc TP Function for TC_DEN_MSGF_BV_01 + */ + function f_DEN_MSGF_BV_01() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + + // Test control + if (not PICS_DENM_GENERATION) { + log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm, + mw_anyStationId, + c_protocolVersionDenm, + c_messageId + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Successfully received DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect header information. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_MSGF_BV_01 + + /** + * @desc TP Function for TC_DEN_MSGF_BV_02 + */ + function f_DEN_MSGF_BV_02() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + + // Test control + if (not PICS_DENM_GENERATION) { + log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_anyDenmMgmtCon, + -, + mw_denmLocationWithTrace({ ?, * }) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Successfully received DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect location container information. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_MSGF_BV_02 + + } // end denMessageFormat + + // 5.2.1.2 + group denEventGeneration { + + /** + * @desc TP Function for TC_DEN_EVGN_BV_01 + */ + function f_DEN_EVGN_BV_01() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + + // Test control + if (not PICS_DENM_GENERATION) { + log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_anyDenmPdu( + mw_itsPduHeader, + mw_denm (mw_anyDenmMgmtCon) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Successfully received DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received a DENM with incorrect header and management information. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVGN_BV_01 + + /** + * @desc TP Function for TC_DEN_EVGN_BV_02 + */ + function f_DEN_EVGN_BV_02() runs on ItsDenm { + + // Local variables + var template (value) SituationContainerList v_situations := { + m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), + m_situation(c_causeAccident, c_subCauseCode_Unavailable), + m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), + m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) + }; + var boolean v_success := true; + var ActionIDList v_actionIds; + var DenmInd v_denmInd; + var integer i; + + // Test control + if (not PICS_DENM_GENERATION) { + log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) { + f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta)); + f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); + v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID; + } + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta)); + f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); + v_actionIds[lengthof(v_actionIds) - 1] := v_denmInd.msgIn.denm.management.actionID; + + //check the action id + for (i := 0; i < lengthof(v_actionIds) - 1; i:=i + 1) { + if (v_actionIds[lengthof(v_actionIds) - 1].sequenceNumber == v_actionIds[i].sequenceNumber) { + v_success := false; + } + } + if (v_success==true) { + log("*** " & testcasename() & ": PASS: actionID field indicating unused value. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: actionID field indicating used value. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + // Postamble + for (i := 0; i < lengthof(v_actionIds); i:=i + 1) { + f_poCancelEvent(e_iut, v_actionIds[i]); + } + f_cfDown(); + + } // end TC_DEN_EVGN_BV_02 + + /** + * @desc TP Function for TC_DEN_EVGN_BV_03 + */ + function f_DEN_EVGN_BV_03() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + var DenmInd v_denmInd; + + // Test control + if (not PICS_DENM_GENERATION) { + log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtConWithActionID( + mw_actionId(f_getIutStationId()) + ) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVGN_BV_03 + + /** + * @desc TP Function for TC_DEN_EVGN_BV_04 + */ + function f_DEN_EVGN_BV_04() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + var DenmInd v_denmInd; + + // Test control + if (not PICS_DENM_GENERATION) { + log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_anyDenmMgmtCon, + v_situation + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVGN_BV_04 + + /** + * @desc TP Function for TC_DEN_EVGN_BV_05 + */ + function f_DEN_EVGN_BV_05() runs on ItsDenm { + + // Local variables + var template (value) SituationContainerList v_situations := { + m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), + m_situation(c_causeAccident, c_subCauseCode_Unavailable), + m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), + m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) + }; + var ActionIDList v_actionIds; + var DenmInd v_denmInd; + var integer i; + var TimestampIts v_timestampIts; + + // Test control + if (not PICS_DENM_GENERATION) { + log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + v_timestampIts := f_getCurrentTime(); + for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) { + f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta)); + f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); + v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID; + } + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta)); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtConWithReferenceTime( + mw_timestampIts_withDelta(v_timestampIts) + ) + ) + ) + ) + ) -> value v_denmInd { + tc_ac.stop; + v_actionIds[lengthof(v_actionIds)] := v_denmInd.msgIn.denm.management.actionID; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + for (i := 0; i < lengthof(v_actionIds); i:=i + 1) { + f_poCancelEvent(e_iut, v_actionIds[i]); + } + f_cfDown(); + + } // end TC_DEN_EVGN_BV_05 + + /** + * @desc TP Function for TC_DEN_EVGN_BV_07 + */ + function f_DEN_EVGN_BV_07() runs on ItsDenm { + + // Local variables + var template (value) SituationContainerList v_situations := { + m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), + m_situation(c_causeAccident, c_subCauseCode_Unavailable), + m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), + m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) + }; + var SequenceNumber v_sequenceNumber; + var ActionID v_actionId; + var DenmInd v_denmInd; + var integer i; + + // Test control + if (not PICS_DENM_GENERATION) { + log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + for (i := 0; i < lengthof(v_situations) - 1; i:=i + 1) { + f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta)); + f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); + f_poCancelEvent(e_iut, v_denmInd.msgIn.denm.management.actionID); + } + //save the last sequence number + v_sequenceNumber := v_denmInd.msgIn.denm.management.actionID.sequenceNumber; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_utTriggerEvent(m_utTriggerEvent(v_situations[lengthof(v_situations) - 1], m_denmLocation_zeroDelta)); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtConWithActionID( + mw_actionId(-, f_increaseSequenceNumber(v_sequenceNumber)) + ) + ) + ) + ) + ) -> value v_denmInd { + tc_ac.stop; + v_actionId := v_denmInd.msgIn.denm.management.actionID; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVGN_BV_07 + + /** + * @desc TP Function for TC_DEN_EVGN_BV_08 + */ + function f_DEN_EVGN_BV_08() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var SequenceNumber v_firstSequenceNumber; + var DenmInd v_denmInd; + var integer i; + + // Test control + if (not PICS_DENM_GENERATION) { + log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); + v_firstSequenceNumber := v_denmInd.msgIn.denm.management.actionID.sequenceNumber; + for (i := 1; i < 65535; i := i + 1) { + f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); + f_poCancelEvent(e_iut, v_denmInd.msgIn.denm.management.actionID); + } + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtConWithActionID( + mw_actionId(-, f_increaseSequenceNumber(v_firstSequenceNumber)) + ) + ) + ) + ) + ) -> value v_denmInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, m_actionId(v_firstSequenceNumber)); + f_poCancelEvent(e_iut, m_actionId(f_increaseSequenceNumber(v_firstSequenceNumber))); + f_cfDown(); + + } // end TC_DEN_EVGN_BV_08 + + /** + * @desc TP Function for TC_DEN_EVGN_BV_10 + */ + function f_DEN_EVGN_BV_10() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation ( c_causeVehicleBreakdown, c_subCauseCode_Unavailable ); + var StationID v_stationId; + var DenmInd v_denmInd; + + // Test control + if (not PICS_DENM_GENERATION) { + log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_stationId := f_getIutStationId ( ); + f_utChangePseudonym ( m_utChangePseudonym ); + f_utTriggerEvent ( m_utTriggerEvent ( v_situation, m_denmLocation_zeroDelta ) ); + + tc_ac.start; + alt { + [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_anyDenmMgmtCon ) ) ) ) -> value v_denmInd { + tc_ac.stop; + if ( v_denmInd.msgIn.denm.management.actionID.originatingStationID != v_stationId ) { + log("*** " & testcasename() & ": PASS: Successfully received expected DENM - Pseudonym changed. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: received expected DENM - Pseudonym not changed. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_cfDown(); + + } // end TC_DEN_EVGN_BV_10 + + } // end denEventGeneration + + // 5.2.1.3 + group denEventUpdate { + + /** + * @desc TP Function for TC_DEN_EVUP_BV_02 + */ + function f_DEN_EVUP_BV_01() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + var DenmInd v_denmInd; + + // Test control + if (not PICS_DENM_UPDATE) { + log("*** " & testcasename() & ": PICS_DENM_UPDATE required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; + f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation)); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_anyDenmPdu( + mw_itsPduHeader, + mw_denm (mw_anyDenmMgmtCon) + ) + ) + ) -> value v_denmInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVUP_BV_01 + + /** + * @desc TP Function for TC_DEN_EVUP_BV_02 + */ + function f_DEN_EVUP_BV_02() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + var DenmInd v_denmInd; + + // Test control + if (not PICS_DENM_UPDATE) { + log("*** " & testcasename() & ": PICS_DENM_UPDATE required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; + f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation)); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_anyDenmPdu( + mw_itsPduHeader, + mw_denm ( + mw_denmMgmtConWithActionID( + v_actionId + ) + ) + ) + ) + ) -> value v_denmInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVUP_BV_02 + + /** + * @desc TP Function for TC_DEN_EVUP_BV_03 + */ + function f_DEN_EVUP_BV_03() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var TimestampIts v_referenceTime1 , v_timestampIts , v_msgtimestamp; + var Int16 v_diff; + var ActionID v_actionId; + var DenmInd v_denmInd; + + // Test control + if (not PICS_DENM_UPDATE) { + log("*** " & testcasename() & ": PICS_DENM_UPDATE required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + v_referenceTime1 := v_denmInd.msgIn.denm.management.referenceTime; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; + f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation)); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_anyDenmPdu( + mw_itsPduHeader, + mw_denm ( + mw_denmMgmtCon( + v_actionId + ) + ) + ) + ) + ) -> value v_denmInd { + tc_ac.stop; + v_timestampIts := f_getCurrentTime(); + v_msgtimestamp := v_denmInd.msgIn.denm.management.referenceTime; + if ( ( ( v_timestampIts + v_diff ) > v_msgtimestamp ) and ( v_msgtimestamp > v_referenceTime1 ) ) { + log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: ReferenceTime not updated correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVUP_BV_03 + + /** + * @desc TP Function for TC_DEN_EVUP_BO_04 + */ + function f_DEN_EVUP_BO_04() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + var DenmInd v_denmInd; + + // Test control + if (not PICS_DENM_UPDATE) { + log("*** " & testcasename() & ": PICS_DENM_UPDATE required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; + f_utUpdateEvent(m_utUpdateEvent(m_actionId(f_increaseSequenceNumber(v_actionId.sequenceNumber), f_getIutStationId()), v_situation)); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_anyDenmPdu( + mw_itsPduHeader, + mw_denm ( + mw_denmMgmtCon( + m_actionId( + f_increaseSequenceNumber(v_actionId.sequenceNumber), + f_getIutStationId() + ) + ) + ) + ) + ) + ) -> value v_denmInd { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received updated DENM for the actionId which is not in originator ITS-S message table. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": PASS: No DENM was sent. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVUP_BO_04 + + } // end denEventUpdate + + // 5.2.1.4 + group denEventTermination { + + /** + * @desc TP Function for TC_DEN_EVTR_BV_01 + */ + function f_DEN_EVTR_BV_01() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + var DenmInd v_denmInd; + + // Test control + if (not PICS_DENM_CANCELLATION) { + log("*** " & testcasename() & ": PICS_DENM_CANCELLATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta, c_duration_10sec)); + f_awaitDenMessage ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_anyActionId, -, -, -, c_duration_2sec ) ) ) ) , v_denmInd ); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_utTerminateEvent(m_utEventCancellation(v_actionId)); + + tc_ac.start; + alt { + [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( + mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, -, isCancellation ))))) -> value v_denmInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_cfDown(); + + } // end TC_DEN_EVTR_BV_01 + + /** + * @desc TP Function for TC_DEN_EVTR_BV_02 + */ + function f_DEN_EVTR_BV_02() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + var DenmInd v_denmInd; + + // Test control + if (not PICS_DENM_NEGATION) { + log("*** " & testcasename() & ": PICS_DENM_NEGATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) ); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_utTerminateEvent(m_utEventCancellation(v_actionId)); + + tc_ac.start; + alt { + [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( + mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, -, isNegation ))))) -> value v_denmInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_cfDown(); + + } // end TC_DEN_EVTR_BV_02 + + /** + * @desc TP Function for TC_DEN_EVTR_BV_03 + */ + function f_DEN_EVTR_BV_03() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var TimestampIts v_referenceTime1 := f_getCurrentTime(); + var TimestampIts v_referenceTime2; + var ActionID v_actionId; + var DenmInd v_denmInd; + + // Test control + if (not PICS_DENM_NEGATION) { + log("*** " & testcasename() & ": PICS_DENM_NEGATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( m_tsActionId, -, -, -, v_referenceTime1 ), v_situation, m_denmLocation_zeroDelta ) ); + + v_referenceTime2 := f_getCurrentTime(); + v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; + v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( m_tsActionId, -, -, -, v_referenceTime2 ), v_situation, m_denmLocation_zeroDelta ) ); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_utTerminateEvent(m_utEventCancellation(v_actionId)); + + tc_ac.start; + alt { + [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( + mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, v_referenceTime2, isNegation ))))) -> value v_denmInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_cfDown(); + + } // end TC_DEN_EVTR_BV_03 + + /** + * @desc TP Function for TC_DEN_EVTR_BV_04 + */ + function f_DEN_EVTR_BV_04() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + var DenmInd v_denmInd; + + // Test control + if (not PICS_DENM_CANCELLATION) { + log("*** " & testcasename() & ": PICS_DENM_CANCELLATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta, c_duration_10sec)); + f_awaitDenMessage( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_anyActionId ) ) ) ), v_denmInd ); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_utTerminateEvent(m_utEventCancellation(v_actionId)); + + tc_ac.start; + alt { + [] denmPort.receive ( + mw_denmInd ( + mw_denmPdu ( + mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, -, isCancellation ), omit, omit, omit ) ) ) ) -> value v_denmInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_cfDown(); + + } // end TC_DEN_EVTR_BV_04 + + /** + * @desc TP Function for TC_DEN_EVTR_BV_05 + */ + function f_DEN_EVTR_BV_05() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + var DenmInd v_denmInd; + + // Test control + if (not PICS_DENM_NEGATION) { + log("*** " & testcasename() & ": PICS_DENM_NEGATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) ); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_utTerminateEvent(m_utEventCancellation(v_actionId)); + + tc_ac.start; + alt { + [] denmPort.receive ( + mw_denmInd ( + mw_denmPdu ( + mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, -, isNegation ), omit, omit, omit ) ) ) ) -> value v_denmInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_cfDown(); + + } // end TC_DEN_EVTR_BV_05 + + /** + * @desc TP Function for TC_DEN_EVTR_BO_06 + */ + function f_DEN_EVTR_BO_06() runs on ItsDenm { + + // Local variables + var template (value) SituationContainerList v_situations := { + m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), + m_situation(c_causeAccident, c_subCauseCode_Unavailable), + m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), + m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) + }; + var ActionID v_unknownActionId; + var ActionIDList v_actionIds; + var DenmInd v_denmInd; + var integer i; + + // Test control + if (not PICS_DENM_NEGATION and not PICS_DENM_CANCELLATION) { + log("*** " & testcasename() & ": PICS_DENM_NEGATION OR PICS_DENM_CANCELLATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + for (i := 0; i < lengthof(v_situations); i:=i + 1) { + f_utTriggerEvent(m_utTriggerEvent(v_situations[i], m_denmLocation_zeroDelta)); + f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); + v_actionIds[i] := v_denmInd.msgIn.denm.management.actionID; + } + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_unknownActionId := valueof(m_actionId( + f_increaseSequenceNumber( + v_actionIds[lengthof(v_actionIds)].sequenceNumber + ), + f_getIutStationId() + )); + f_utTerminateEvent(m_utEventCancellation(v_unknownActionId)); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_anyDenmPdu( + mw_itsPduHeader, + mw_denm ( + mw_denmMgmtCon(v_unknownActionId) + ) + ) + ) + ) -> value v_denmInd { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received termination DENM for the unknown actionId. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": PASS: No termination DENM was sent. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + for (i := 0; i < lengthof(v_situations); i:=i + 1) { + f_poCancelEvent(e_iut, v_actionIds[i]); + } + f_cfDown(); + + } // end TC_DEN_EVTR_BO_06 + + /** + * @desc TP Function for TC_DEN_EVTR_BO_07 + */ + function f_DEN_EVTR_BO_07() runs on ItsDenm { + + // Local constants + const SequenceNumber v_initialSequenceNumber := 0; + // Local variables + var template (value) SituationContainerList v_situations := { + m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable), + m_situation(c_causeAccident, c_subCauseCode_Unavailable), + m_situation(c_causeRoadworks, c_subCauseCode_Unavailable), + m_situation(c_causeSlowVehicle, c_subCauseCode_Unavailable) + }; + var SequenceNumber v_sequenceNumber := v_initialSequenceNumber; + var ActionID v_unknownActionId; + var ActionIDList v_actionIds; + var DenmInd v_denmInd; + var integer i; + + // Test control + if (not PICS_DENM_NEGATION and not PICS_DENM_CANCELLATION) { + log("*** " & testcasename() & ": PICS_DENM_NEGATION OR PICS_DENM_CANCELLATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + for (i := 0; i < lengthof(v_situations); i:=i + 1) { + v_sequenceNumber := f_increaseSequenceNumber(v_sequenceNumber); + v_actionIds[i] := f_sendDenMessage( m_denm( m_denmMgmtCon( m_tsActionId(v_sequenceNumber) ), v_situations[i], m_denmLocation_zeroDelta ) ); + } + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_unknownActionId := valueof(m_actionId( + f_increaseSequenceNumber( + v_actionIds[lengthof(v_actionIds)].sequenceNumber + ), + f_getTsStationId() + )); + f_utTerminateEvent(m_utEventCancellation(v_unknownActionId)); + + tc_ac.start; + alt { + [] denmPort.receive( mw_denmInd( mw_anyDenmPdu( mw_itsPduHeader, mw_denm ( mw_denmMgmtCon(v_unknownActionId) ) ) ) ) -> value v_denmInd { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received termination DENM for the unknown actionId. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": PASS: No termination DENM was sent. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + for (i := 0; i < lengthof(v_situations); i:=i + 1) { + f_poCancelEvent(e_ets, v_actionIds[i]); + } + f_cfDown(); + + } // end TC_DEN_EVTR_BV_07 + + /** + * @desc TP Function for TC_DEN_EVTR_BV_08 + */ + function f_DEN_EVTR_BV_08() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var TimestampIts v_referenceTime1 , v_timestampIts , v_msgtimestamp; + var Int16 v_diff; + var ActionID v_actionId; + var DenmInd v_denmInd; + + // Test control + if (not PICS_DENM_CANCELLATION) { + log("*** " & testcasename() & ": PICS_DENM_CANCELLATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + f_awaitDenMessage(mw_denmInd(mw_anyDenmPdu), v_denmInd); + v_timestampIts := f_getCurrentTime(); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + v_referenceTime1 := v_denmInd.msgIn.denm.management.referenceTime; + v_diff := v_referenceTime1 - v_timestampIts; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_utTerminateEvent ( m_utEventCancellation ( v_actionId ) ); + + tc_ac.start; + alt { + [] denmPort.receive ( + mw_denmInd ( mw_denmPdu ( mw_denm ( m_denmMgmtConTermination ( v_actionId, -, -, -, -, -, isCancellation ) ) ) ) ) -> value v_denmInd { + tc_ac.stop; + v_timestampIts := f_getCurrentTime(); + v_msgtimestamp := v_denmInd.msgIn.denm.management.referenceTime; + if ( ( ( v_timestampIts + v_diff ) > v_msgtimestamp ) and ( v_msgtimestamp > v_referenceTime1 ) ) { + log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: ReferenceTime not updated correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVTR_BV_08 + + } // end denEventTermination + + // 5.2.1.5 + group denMessageRepetition { + + /** + * @desc TP Function for TC_DEN_EVRP_TI_01 + */ + function f_DEN_EVRP_TI_01() runs on ItsDenm { + + // Local constants + const TransmissionInterval c_repetitionInterval := c_interval_1sec; // INTERVAL_1 + const ValidityDuration c_validityDuration := c_duration_10sec; // DURATION_2 + const ValidityDuration c_repetitionDuration := c_validityDuration; // DURATION_1 + const float c_lowerRepetitionInterval := int2float(c_repetitionInterval)*0.95; + const float c_upperRepetitionInterval := int2float(c_repetitionInterval)*1.05; + // Local variables + var template (value) SituationContainer v_situation := m_situation ( c_causeVehicleBreakdown, c_subCauseCode_Unavailable ); + var template (present) DenmInd v_expectedDenmInd := + mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId, -, -, c_validityDuration ) ) ) ); + var ActionID v_actionId; + var DenmInd v_denmInd; + // Local timers + timer t_repetition; + + // Test control + if (not PICS_DENM_REPETITION) { + log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_utTriggerEvent ( m_utTriggerEvent ( v_situation, m_denmLocation_zeroDelta, c_validityDuration, c_repetitionDuration, c_repetitionInterval ) ); + f_awaitDenMessage(v_expectedDenmInd, v_denmInd); + t_repetition.start(2.0 * int2float(c_repetitionInterval/1000)); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + alt { + [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { + if (match(t_repetition.read*1000.0, (c_lowerRepetitionInterval..c_upperRepetitionInterval))) { + t_repetition.stop; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + t_repetition.stop; + log("*** " & testcasename() & ": FAIL: Received expected DENM, interval was not correct. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + t_repetition.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] t_repetition.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVRP_TI_01 + + /** + * @desc TP Function for TC_DEN_EVRP_BV_02 + */ + function f_DEN_EVRP_BV_02() runs on ItsDenm { + + // Local constants + const ValidityDuration c_validityDuration := c_duration_10sec; + const TransmissionInterval c_repetitionInterval := c_interval_5sec; + const ValidityDuration c_repetitionDuration := c_validityDuration; + const float c_lowerRepetitionInterval := int2float(c_repetitionInterval)*0.95; + const float c_upperRepetitionInterval := int2float(c_repetitionInterval)*1.05; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var template (present) DenmInd v_expectedDenmInd := + mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_validityDuration)))); + var ActionID v_actionId; + var DenmInd v_denmInd; + // Local timers + timer t_repetition; + + // Test control + if (not PICS_DENM_REPETITION) { + log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_validityDuration, c_repetitionDuration, c_repetitionInterval ) ); + f_awaitDenMessage(v_expectedDenmInd, v_denmInd); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; + //update event after 1 second + tc_noac.start(1.0); + tc_noac.timeout; + v_situation.eventType.subCauseCode := c_vehicleBreakDownSubCauseCode_engineProblem; + f_utUpdateEvent(m_utUpdateEvent(v_actionId, v_situation)); + v_expectedDenmInd.msgIn.denm.situation := v_situation; + f_awaitDenMessage(v_expectedDenmInd, v_denmInd); + t_repetition.start(2.0 * int2float(c_repetitionInterval/1000)); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + alt { + [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { + if (match(t_repetition.read*1000.0, (c_lowerRepetitionInterval..c_upperRepetitionInterval))) { + t_repetition.stop; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + t_repetition.stop; + log("*** " & testcasename() & ": FAIL: Received expected DENM, interval was not correct. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + t_repetition.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] t_repetition.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVRP_BV_02 + + /** + * @desc TP Function for TC_DEN_EVRP_BV_03 + */ + function f_DEN_EVRP_BV_03() runs on ItsDenm { + + // Local constants + const ValidityDuration c_validityDuration := c_duration_10sec; + const TransmissionInterval c_repetitionInterval := c_interval_4sec; + const ValidityDuration c_repetitionDuration := c_validityDuration; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var template (present) DenmInd v_expectedDenmInd := + mw_denmInd(mw_denmPdu(mw_denm(mw_denmMgmtCon(mw_actionId, -, -, c_validityDuration)))); + var ActionID v_actionId; + var DenmInd v_denmInd; + var integer i; + // Local timers + timer t_validity; + + // Test control + if (not PICS_DENM_REPETITION) { + log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_utTriggerEvent(m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_validityDuration, c_repetitionDuration, c_repetitionInterval )); + f_awaitDenMessage(v_expectedDenmInd, v_denmInd); + t_validity.start(1.5 * int2float(c_validityDuration)); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; + //await retransmitted DENM message based on the repetition interval in between the validity duration + for (i:=0; i<(c_validityDuration/(c_repetitionInterval/1000)); i:=i+1) { + f_awaitDenMessage(v_expectedDenmInd, v_denmInd); + } + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + alt { + [] t_validity.timeout { + log("*** " & testcasename() & ": PASS: Retransmission of DENM stopped successfully. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(v_expectedDenmInd) { + t_validity.stop; + log("*** " & testcasename() & ": FAIL: Retransmission of DENM was not stopped. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + t_validity.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVRP_BV_03 + + /** + * @desc TP Function for TC_DEN_EVRP_BV_04 + */ + function f_DEN_EVRP_BV_04() runs on ItsDenm { + + // Local constants + const ValidityDuration c_validityDuration := c_duration_10sec; + const TransmissionInterval c_repetitionInterval := c_interval_2sec; + const ValidityDuration c_repetitionDuration := c_duration_5sec; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var template (present) DenmInd v_expectedDenmInd := mw_denmInd(mw_denmPdu(mw_denm(mw_denmMgmtCon(mw_actionId, -, -, c_validityDuration)))); + var ActionID v_actionId; + var DenmInd v_denmInd; + var integer i; + // Local timers + timer t_repetition; + + // Test control + if (not PICS_DENM_REPETITION) { + log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta, c_validityDuration, c_repetitionDuration, c_repetitionInterval )); + f_awaitDenMessage(v_expectedDenmInd, v_denmInd); + t_repetition.start(1.5 * int2float(c_repetitionDuration)); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; + //await retransmitted DENM message based on the repetition interval in between the repetition duration + for (i:=0; i<(c_repetitionDuration/(c_repetitionInterval/1000)); i:=i+1) { + f_awaitDenMessage(v_expectedDenmInd, v_denmInd); + } + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + alt { + [] t_repetition.timeout { + log("*** " & testcasename() & ": PASS: Retransmission of DENM stopped successfully. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { + t_repetition.stop; + log("*** " & testcasename() & ": FAIL: Retransmission of DENM was not stopped. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + t_repetition.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVRP_BV_04 + + /** + * @desc TP Function for TC_DEN_EVRP_BV_05 + */ + function f_DEN_EVRP_BV_05() runs on ItsDenm { + + // Local constants + const ValidityDuration c_validityDuration := c_duration_10sec; + const ValidityDuration c_repetitionDuration := c_validityDuration; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var template (present) DenmInd v_expectedDenmInd := mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon( + mw_actionId, + -, + -, + -, + c_validityDuration + ) + ) + ) + ); + var ActionID v_actionId; + var DenmInd v_denmInd; + var integer i; + // Local timers + timer t_validity; + + // Test control + if (not PICS_DENM_REPETITION) { + log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_utTriggerEvent( + m_utTriggerEvent( + v_situation, + m_denmLocation_zeroDelta, + c_validityDuration, + c_repetitionDuration, + omit //no repetitionInterval + ) + ); + f_awaitDenMessage(v_expectedDenmInd, v_denmInd); + t_validity.start(1.5 * int2float(c_validityDuration)); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + alt { + [] t_validity.timeout { + log("*** " & testcasename() & ": PASS: No retransmission of DENM occured as expected. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { + t_validity.stop; + log("*** " & testcasename() & ": FAIL: Unexpected retransmission of DENM occured. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + t_validity.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVRP_BV_05 + + /** + * @desc TP Function for TC_DEN_EVRP_BV_06 + */ + function f_DEN_EVRP_BV_06() runs on ItsDenm { + + // Local constants + const ValidityDuration c_validityDuration := c_duration_10sec; + const TransmissionInterval c_repetitionInterval := c_interval_2sec; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var template (present) DenmInd v_expectedDenmInd := mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon( + mw_actionId, + -, + -, + c_validityDuration + ) + ) + ) + ); + var ActionID v_actionId; + var DenmInd v_denmInd; + var integer i; + // Local timers + timer t_validity; + + // Test control + if (not PICS_DENM_REPETITION) { + log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_utTriggerEvent( + m_utTriggerEvent( + v_situation, + m_denmLocation_zeroDelta, + c_validityDuration, + omit, //no repetitionDuration + c_repetitionInterval + ) + ); + f_awaitDenMessage(v_expectedDenmInd, v_denmInd); + t_validity.start(1.5 * int2float(c_validityDuration)); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + alt { + [] t_validity.timeout { + log("*** " & testcasename() & ": PASS: No retransmission of DENM occured as expected. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { + t_validity.stop; + log("*** " & testcasename() & ": FAIL: Unexpected retransmission of DENM occured. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + t_validity.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVRP_BV_06 + + /** + * @desc TP Function for TC_DEN_EVRP_BV_08 + */ + function f_DEN_EVRP_BV_08() runs on ItsDenm { + + // Local constants + const ValidityDuration c_duration1 := 3 * c_duration_2sec; + const ValidityDuration c_duration2 := c_duration_10sec; + const TransmissionInterval c_interval1 := c_interval_1sec; + // Local variables + var template (value) SituationContainer v_situation := m_situation ( c_causeVehicleBreakdown, c_subCauseCode_Unavailable ); + var template (present) DenmInd v_expectedDenmInd := + mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId, -, -, c_duration2 ) ) ) ); + var ActionID v_actionId; + var DenmInd v_denmInd; + + // Test control + if (not PICS_DENM_REPETITION) { + log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Preamble + f_prInitialState(); + f_utTriggerEvent ( m_utTriggerEvent ( v_situation, m_denmLocation_zeroDelta, c_duration2, c_duration1, c_interval1 ) ); + f_awaitDenMessage ( v_expectedDenmInd, v_denmInd ); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + f_utChangePseudonym ( m_utChangePseudonym ); + + tc_ac.start; + alt { + [] denmPort.receive ( v_expectedDenmInd ) -> value v_denmInd { + tc_ac.stop; + if ( v_denmInd.msgIn.denm.management.actionID.originatingStationID != v_actionId.originatingStationID ) { + log("*** " & testcasename() & ": PASS: Successfully received expected DENM - Pseudonym changed. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: received expected DENM - Pseudonym not changed. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVRP_BV_08 + + /** + * @desc TP Function for TC_DEN_EVRP_BV_09 + */ + function f_DEN_EVRP_BV_09() runs on ItsDenm { + // Local constants + const ValidityDuration c_duration1 := 3 * c_duration_2sec; + const ValidityDuration c_duration2 := c_duration_10sec; + const TransmissionInterval c_interval1 := c_interval_1sec; + const float c_lowerTransmissionInterval := int2float(c_interval1)*0.95; + const float c_upperTransmissionInterval := int2float(c_interval1)*1.05; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var template (present) DenmInd v_expectedDenmInd := + mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_duration2)))); + var ActionID v_actionId; + var DenmInd v_denmInd; + // Local timers + timer t_repetition; + + // Test control + if (not PICS_DENM_REPETITION) { + log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Preamble + f_prInitialState(); + f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_duration2, c_duration1, c_interval1 ) ); + f_awaitDenMessage(v_expectedDenmInd, v_denmInd); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + v_expectedDenmInd.msgIn.denm.management.actionID := v_actionId; + t_repetition.start(2.0 * int2float(c_interval1/1000)); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + alt { + [] denmPort.receive(v_expectedDenmInd) -> value v_denmInd { + t_repetition.stop; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + t_repetition.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] t_repetition.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVRP_BV_09 + + /** + * @desc TP Function for TC_DEN_EVRP_BV_10 + */ + function f_DEN_EVRP_BV_10() runs on ItsDenm { + // Local constants + const ValidityDuration c_duration1 := 3 * c_duration_2sec; + const ValidityDuration c_duration2 := c_duration_10sec; + const TransmissionInterval c_interval1 := c_interval_1sec; + const float c_lowerTransmissionInterval := int2float(c_interval1)*0.95; + const float c_upperTransmissionInterval := int2float(c_interval1)*1.05; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var template (present) DenmInd v_expected := mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_duration2 )))); + var ActionID v_actionId; + var DenmInd v_denmInd; + var TimestampIts v_referenceTime; + // Local timers + timer t_repetition; + + // Test control + if (not PICS_DENM_REPETITION) { + log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Preamble + f_prInitialState(); + f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, c_duration2, c_duration1, c_interval1 ) ); + f_awaitDenMessage ( v_expected, v_denmInd ); + t_repetition.start(2.0 * int2float(c_interval1/1000)); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + v_referenceTime := v_denmInd.msgIn.denm.management.referenceTime; + v_expected.msgIn.denm.management.actionID := v_actionId; + v_expected.msgIn.denm.management.referenceTime := v_referenceTime; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + alt { + [] denmPort.receive ( v_expected ) -> value v_denmInd { + t_repetition.stop; + log("*** " & testcasename() & ": PASS: Successfully received expected DENM in the expected interval. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + t_repetition.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] t_repetition.timeout { + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVRP_BV_10 + + /** + * @desc TP Function for TC_DEN_EVRP_BV_11 + */ + function f_DEN_EVRP_BV_11() runs on ItsDenm { + // Local constants + const ValidityDuration c_duration1 := c_defaultValidity + 100; + const ValidityDuration c_duration2 := c_defaultValidity; + const TransmissionInterval c_interval1 := c_interval_10sec; + const float c_diffValidity := int2float ( ( c_duration1 - c_duration2 ) ); + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var template (present) DenmInd v_expected := mw_denmInd(mw_denmPdu(mw_denm( mw_denmMgmtCon( mw_actionId, -, -, c_duration2)))); + var ActionID v_actionId; + var DenmInd v_denmInd; + var TimestampIts v_referenceTime; + // Local timers + timer t_repetition; + timer t_default; + + // Test control + if (not PICS_DENM_REPETITION) { + log("*** " & testcasename() & ": PICS_DENM_REPETITION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Preamble + f_prInitialState(); + f_utTriggerEvent( m_utTriggerEvent( v_situation, m_denmLocation_zeroDelta, omit, c_duration1, c_interval1 ) ); + f_awaitDenMessage ( v_expected, v_denmInd ); + t_repetition.start(2.0 * int2float(c_interval1/1000)); + t_default.start ( int2float( c_duration1/1000 ) ); + v_actionId := v_denmInd.msgIn.denm.management.actionID; + v_expected.msgIn.denm.management.actionID := v_actionId; + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + alt { + [] denmPort.receive ( v_expected ) -> value v_denmInd { + t_repetition.stop; + if ( t_default.read*1000.0 < c_diffValidity ) { + log("*** " & testcasename() & ": FAIL: DENM received after validity duration. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": INFO: DENM retransmission. ***"); + t_repetition.start(2.0 * int2float(c_interval1/1000)); + repeat; + } + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + t_repetition.stop; + log("*** " & testcasename() & ": FAIL: Received an unexpected DENM. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] t_repetition.timeout { + if ( t_default.read*1000.0 < c_diffValidity ) { + t_default.stop; + log("*** " & testcasename() & ": PASS: Retransmission of DENM stopped. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + t_default.stop; + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + [] t_default.timeout { + t_repetition.stop; + log("*** " & testcasename() & ": INCONC: Timeout while awaiting the reception of a message. ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_EVRP_BV_11 + + } // end denMessageRepetition + + group denMessageLowerLayerParameters { + + /** + * @desc TP Function for TC_DEN_PAR_BV_01 + */ + function f_DEN_PAR_BV_01() runs on ItsDenm { + + // Local variables + const UInt8 c_gnNhBtpB := 2; + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + + // Test control + if (not PICS_DENM_GENERATION) { + log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + + tc_ac.start; + alt { + [] denmPort.receive(mw_denmIndWithGnParameters(mw_anyDenmPdu, c_gnNhBtpB)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Expected DENM message encapsultated in BTP-B packet received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmIndWithGnParameters(mw_anyDenmPdu, omit)) { + tc_ac.stop; + log("*** " & testcasename() & ": INCONC: no GN NH information in DenmInd ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Expected DENM message received, but not encapsulated in BTP-B packet ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: DENM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_PAR_BV_01 + + /** + * @desc TP Function for TC_DEN_PAR_BV_02 + */ + function f_DEN_PAR_BV_02() runs on ItsDenm { + + // Local variables + const UInt8 c_gnHtGbc := 4; + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + + // Test control + if (not PICS_DENM_GENERATION) { + log("*** " & testcasename() & ": PICS_DENM_GENERATION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + + tc_ac.start; + alt { + [] denmPort.receive(mw_denmIndWithGnParameters(mw_anyDenmPdu, -, c_gnHtGbc)) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Expected DENM message encapsulated in GBC packet received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive(mw_denmIndWithGnParameters(mw_anyDenmPdu, -, omit)) { + tc_ac.stop; + log("*** " & testcasename() & ": INCONC: no GN HT information in DenmInd ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + [] denmPort.receive(mw_denmInd(mw_anyDenmPdu)) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Expected DENM message received, but not encapsulated in GBC packet ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: DENM message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_iut, v_actionId); + f_cfDown(); + + } // end TC_DEN_PAR_BV_02 + + } // end denMessageLowerLayerParameters + + } // end denMessageTransmission + + // 5.2.2 + group denMessageReception { + + /** + * @desc TP Function for TC_DEN_MSRV_BV_01 + */ + function f_DEN_MSRV_BV_01() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + var integer i; + + // Test control + if (not PICS_DENM_RECEPTION) { + log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_tsActionId + ), + v_situation, + m_denmLocation_zeroDelta + ) + ); + + f_sleep(PX_TAC); + for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utEvents)) { + log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_MSRV_BV_01 + + /** + * @desc TP Function for TC_DEN_MSRV_BV_02 + */ + function f_DEN_MSRV_BV_02() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem); + var TimestampIts v_referenceTime2; + var ActionID v_actionId; + var integer i; + + // Test control + if (not PICS_DENM_RECEPTION) { + log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_tsActionId + ), + v_situation1, + m_denmLocation_zeroDelta + ) + ); + + f_sleep(1.0); + v_referenceTime2 := f_getCurrentTime(); + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + v_actionId, + -, -, -, v_referenceTime2 + ), + v_situation2, + m_denmLocation_zeroDelta + ) + ); + + f_sleep(PX_TAC); + for(i:=0; i < lengthof(vc_utEvents) + and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID) + and vc_utEvents[i].denMsg.denm.management.referenceTime != v_referenceTime2; i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utEvents)) { + log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_MSRV_BV_02 + + /** + * @desc TP Function for TC_DEN_MSRV_BO_03 + */ + function f_DEN_MSRV_BO_03() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + var integer i; + + // Test control + if (not PICS_DENM_RECEPTION) { + log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_tsActionId, + - + ), + v_situation, + m_denmLocation_zeroDelta + ) + ); + + f_sleep(PX_TNOAC); + for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utEvents)) { + log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_MSRV_BO_03 + + /** + * @desc TP Function for TC_DEN_MSRV_BO_04 + */ + function f_DEN_MSRV_BO_04() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId, v_actionIdIut; + var integer i; + + // Test control + if (not PICS_DENM_RECEPTION) { + log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + v_actionId := f_utTriggerEvent(m_utTriggerEvent(v_situation, m_denmLocation_zeroDelta)); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionIdIut := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_actionId( + f_increaseSequenceNumber(v_actionId.sequenceNumber) + ) + ), + v_situation, + m_denmLocation_zeroDelta + ) + ); + + f_sleep(PX_TNOAC); + for(i:=0; i < lengthof(vc_utEvents) and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utEvents)) { + log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + + // Postamble + f_poCancelEvent(e_iut, v_actionIdIut); + f_cfDown(); + + } // end TC_DEN_MSRV_BO_04 + + /** + * @desc TP Function for TC_DEN_MSRV_BO_05 + */ + function f_DEN_MSRV_BO_05() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem); + var TimestampIts v_referenceTime1 := f_getCurrentTime(); + var TimestampIts v_referenceTime2 := v_referenceTime1 - 1000; + var ActionID v_actionId; + var integer i; + + // Test control + if (not PICS_DENM_RECEPTION) { + log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_tsActionId, + -, -, -, v_referenceTime1 + ), + v_situation1, + m_denmLocation_zeroDelta + ) + ); + + f_sleep(1.0); + v_actionId := f_sendDenMessage ( m_denm ( m_denmMgmtCon ( v_actionId, -, -, -, v_referenceTime2 ), v_situation2, m_denmLocation_zeroDelta ) ); + + f_sleep(PX_TNOAC); + for(i:=0; i < lengthof(vc_utEvents) + and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID) + and vc_utEvents[i].denMsg.denm.management.referenceTime != v_referenceTime2; i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utEvents)) { + log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_MSRV_BO_05 + + /** + * @desc TP Function for TC_DEN_MSRV_BO_06 + */ + function f_DEN_MSRV_BO_06() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem); + var template (value) DecentralizedEnvironmentalNotificationMessage v_denm; + var TimestampIts v_detectionTime1 := f_getCurrentTime(); + var TimestampIts v_detectionTime2 := v_detectionTime1 - 1000; + var TimestampIts v_referenceTime1 := v_detectionTime1; + var ActionID v_actionId; + var integer i; + + // Test control + if (not PICS_DENM_RECEPTION) { + log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_denm := m_denm( + m_denmMgmtCon( + m_tsActionId, + -, - , -, + v_detectionTime1, + v_referenceTime1 + ), + v_situation1, + m_denmLocation_zeroDelta + ); + v_actionId := f_sendDenMessage(v_denm); + + f_sleep(1.0); + v_detectionTime2 := valueof(v_denm.management.detectionTime) - 1000; + v_actionId := f_sendDenMessage ( + m_denm ( m_denmMgmtCon ( v_actionId, -, - , -, v_detectionTime2, v_referenceTime1 ), v_situation2, m_denmLocation_zeroDelta ) ); + f_sleep(PX_TNOAC); + for(i:=0; i < lengthof(vc_utEvents) + and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID) + and vc_utEvents[i].denMsg.denm.management.detectionTime != v_detectionTime2; i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utEvents)) { + log("*** " & testcasename() & ": FAIL: DENM was transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: DENM was not transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_MSRV_BO_06 + + /** + * @desc TP Function for TC_DEN_MSRV_BV_07 + */ + function f_DEN_MSRV_BV_07() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation1 := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var template (value) SituationContainer v_situation2 := m_situation(c_causeVehicleBreakdown, c_vehicleBreakDownSubCauseCode_engineProblem); + var template (value) DecentralizedEnvironmentalNotificationMessage v_denm; + var TimestampIts v_detectionTime2 := f_getCurrentTime(); + var TimestampIts v_detectionTime1 :=v_detectionTime2 - 1000; + var TimestampIts v_referenceTime1 := v_detectionTime2; + var ActionID v_actionId; + var integer i; + + // Test control + if (not PICS_DENM_RECEPTION) { + log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_denm := m_denm( + m_denmMgmtCon( + m_tsActionId, + -, - , -, + v_detectionTime1, + v_referenceTime1 + ), + v_situation1, + m_denmLocation_zeroDelta + ); + v_actionId := f_sendDenMessage(v_denm); + + f_sleep(1.0); + v_detectionTime2 := valueof(v_denm.management.detectionTime) + 1000; + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + v_actionId, + -, - , -, + v_detectionTime2, + v_referenceTime1 + ), + v_situation2, + m_denmLocation_zeroDelta + ) + ); + + f_sleep(PX_TAC); + for(i:=0; i < lengthof(vc_utEvents) + and not match(v_actionId, vc_utEvents[i].denMsg.denm.management.actionID) + and vc_utEvents[i].denMsg.denm.management.detectionTime != v_detectionTime2; i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utEvents)) { + log("*** " & testcasename() & ": PASS: DENM was transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: DENM was not transmitted to upper layer ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_MSRV_BV_07 + + /** + * @desc TP Function for TC_DEN_MSRV_BV_10 + */ + function f_DEN_MSRV_BV_10() runs on ItsDenm { + + //Local constants + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + + // Test control + if (not PICS_DENM_RECEPTION) { + log("*** " & testcasename() & ": PICS_DENM_RECEPTION required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage ( + m_denm ( m_denmMgmtCon ( m_tsActionId), v_situation, m_denmLocation_zeroDelta, m_alacarteConImpactReduction ) ); + + tc_ac.start; + alt { + [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId ( f_getTsStationId() ) ), v_situation, mw_anyDenmLocation, + mw_alacarteConImpactReduction ) ) ) ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: DENM with correct alacarte container ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( mw_actionId ( f_getTsStationId() ) ) ) ) ) ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: DENM with incorrect containers ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: DENM not rreceived ***"); + f_clientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_MSRV_BV_10 + + } // end denMessageReception + + // 5.2.3 + group denKeepAliveForwarding { + + /** + * @desc TP Function for TC_DEN_KAFW_BV_01 + */ + function f_DEN_KAFW_BV_01() runs on ItsDenm { + + //Local constants + const TransmissionInterval c_transmissionInterval := c_interval_10sec; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + // Local timers + timer t_forwarding := 2.0 * int2float(c_transmissionInterval) / 1000.0; + + // Test control + if (not PICS_DENM_KAF) { + log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_tsActionId, + -, + c_transmissionInterval * 3, + c_transmissionInterval + ), + v_situation, + m_denmLocation_zeroDelta + ) + ); + + t_forwarding.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon(v_actionId) + ) + ) + ) + ) { + if(t_forwarding.running) { + t_forwarding.stop; + log("*** " & testcasename() & ": FAIL: IUT re-forwarded the packet too early ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + else { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: DENM re-forwarded ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_forwarding.timeout { + tc_ac.start; + log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: DENM was not forwarded ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_KAFW_BV_01 + + /** + * @desc TP Function for TC_DEN_KAFW_BV_02 + */ + function f_DEN_KAFW_BV_02() runs on ItsDenm { + + //Local constants + const TransmissionInterval c_transmissionInterval := c_interval_10sec; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var TimestampIts v_referenceTime1 := f_getCurrentTime(); + var TimestampIts v_referenceTime2 := v_referenceTime1 - 1000; + var ActionID v_actionId; + // Local timers + timer t_forwarding := 2.0 * int2float(c_transmissionInterval) /1000.0; + + // Test control + if (not PICS_DENM_KAF) { + log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_tsActionId, + -, + c_transmissionInterval * 3, + c_transmissionInterval, + v_referenceTime1 + ), + v_situation, + m_denmLocation_zeroDelta + ) + ); + + t_forwarding.start; + f_sleep(5.0); + + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_tsActionId, + -, + c_transmissionInterval * 3, + c_transmissionInterval, + v_referenceTime2 + ), + v_situation, + m_denmLocation_zeroDelta + ) + ); + + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon(v_actionId, v_referenceTime1) + ) + ) + ) + ) { + if(t_forwarding.running) { + t_forwarding.stop; + log("*** TC_DEN_KAFW_BV_02: INFO: IUT re-forwarded the packet too early ***"); + } + else { + tc_ac.stop; + log("*** TC_DEN_KAFW_BV_02: PASS: DENM re-forwarded ***"); + } + f_clientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon(v_actionId) + ) + ) + ) + ) { + tc_ac.stop; + t_forwarding.stop; + log("*** " & testcasename() & ": FAIL: IUT re-forwarded wrong version of DENM ***"); + } + [] t_forwarding.timeout { + tc_ac.start; + log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***"); + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: DENM was not forwarded ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_KAFW_BV_02 + + /** + * @desc TP Function for TC_DEN_KAFW_TI_03 + */ + function f_DEN_KAFW_TI_03() runs on ItsDenm { + + //Local constants + const TransmissionInterval c_transmissionInterval := c_interval_10sec; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + // Local timers + timer t_forwardingMin := 2.0 * int2float(c_transmissionInterval) / 1000.0; + timer t_forwardingMax := 2.0 * int2float(c_transmissionInterval) / 1000.0 + 0.15; + + // Test control + if (not PICS_DENM_KAF) { + log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_tsActionId, + -, + c_transmissionInterval * 3, + c_transmissionInterval + ), + v_situation, + m_denmLocation_zeroDelta + ) + ); + + t_forwardingMin.start; + t_forwardingMax.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon(v_actionId) + ) + ) + ) + ) { + t_forwardingMax.stop; + if(t_forwardingMin.running) { + t_forwardingMin.stop; + log("*** " & testcasename() & ": FAIL: IUT re-forwarded the packet too early ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: DENM re-forwarded correctly ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_forwardingMin.timeout { + log("*** " & testcasename() & ": INFO: Ready for receiving re-forwarded DENM ***"); + repeat; + } + [] t_forwardingMax.timeout { + log("*** " & testcasename() & ": FAIL: DENM was not forwarded on time ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_KAFW_TI_03 + + /** + * @desc TP Function for TC_DEN_KAFW_BV_04 + */ + function f_DEN_KAFW_BV_04() runs on ItsDenm { + + //Local constants + const TransmissionInterval c_transmissionInterval := c_interval_10sec; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + + // Test control + if (not PICS_DENM_KAF) { + log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_tsActionId, + -, + c_transmissionInterval * 3, + c_transmissionInterval + ), + v_situation, + m_denmLocation_zeroDelta + ) + ); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon(v_actionId) + ), + f_getIutStationId() + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct stationID ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon(v_actionId) + ), + mw_anyStationId + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect stationID ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); + f_clientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_KAFW_BV_04 + + /** + * @desc TP Function for TC_DEN_KAFW_BV_05 + */ + function f_DEN_KAFW_BV_05() runs on ItsDenm { + + //Local constants + const TransmissionInterval c_transmissionInterval := c_interval_10sec; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + + // Test control + if (not PICS_DENM_KAF) { + log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_tsActionId, + -, + c_transmissionInterval * 3, + c_transmissionInterval + ), + v_situation, + m_denmLocation_zeroDelta + ) + ); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon(v_actionId) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct actionID ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon(mw_anyActionId) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect actionID ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); + f_clientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_KAFW_BV_05 + + /** + * @desc TP Function for TC_DEN_KAFW_BV_06 + */ + function f_DEN_KAFW_BV_06() runs on ItsDenm { + + //Local constants + const TransmissionInterval c_transmissionInterval := c_interval_10sec; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var TimestampIts v_referenceTime1 := f_getCurrentTime(); + var ActionID v_actionId; + + // Test control + if (not PICS_DENM_KAF) { + log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_tsActionId, + -, + c_transmissionInterval * 3, + c_transmissionInterval, + v_referenceTime1 + ), + v_situation, + m_denmLocation_zeroDelta + ) + ); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon(v_actionId, v_referenceTime1) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct referenceTime ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon(v_actionId) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect referenceTime ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); + f_clientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_KAFW_BV_06 + + /** + * @desc TP Function for TC_DEN_KAFW_BV_07 + */ + function f_DEN_KAFW_BV_07() runs on ItsDenm { + + //Local constants + const TransmissionInterval c_transmissionInterval := c_interval_10sec; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + + // Test control + if (not PICS_DENM_KAF) { + log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_tsActionId, + -, + c_transmissionInterval * 3, + c_transmissionInterval + ), + v_situation, + m_denmLocation_zeroDelta + ) + ); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon ( v_actionId, - ) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct isNegation ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon ( v_actionId, - ) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect isNegation ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); + f_clientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_KAFW_BV_07 + + /** + * @desc TP Function for TC_DEN_KAFW_BV_08 + */ + function f_DEN_KAFW_BV_08() runs on ItsDenm { + + //Local constants + const TransmissionInterval c_transmissionInterval := c_interval_10sec; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + + // Test control + if (not PICS_DENM_KAF) { + log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_tsActionId, + -, + c_transmissionInterval * 3, + c_transmissionInterval + ), + v_situation, + m_denmLocation_zeroDelta, + m_alacarteConLaneCount + ) + ); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon(v_actionId), + v_situation, + m_denmLocation_zeroDelta, + m_alacarteConLaneCount + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: DENM re-forwarded with correct containers ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon(v_actionId) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect containers ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); + f_clientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_KAFW_BV_08 + + /** + * @desc TP Function for TC_DEN_KAFW_BV_09 + */ + function f_DEN_KAFW_BV_09() runs on ItsDenm { + + //Local constants + const TransmissionInterval c_transmissionInterval := c_interval_10sec; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + // Local timers + timer t_validity := int2float(c_transmissionInterval * 3) / 1000.0; + + // Test control + if (not PICS_DENM_KAF) { + log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_tsActionId, + -, + c_transmissionInterval * 3, + c_transmissionInterval + ), + v_situation, + m_denmLocation_zeroDelta + ) + ); + + t_validity.start; + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon(v_actionId) + ) + ) + ) + ) { + tc_ac.stop; + if(t_validity.running) { + log("*** " & testcasename() & ": INFO: DENM re-forwarded during validity period ***"); + tc_ac.start; + repeat; + } + else { + log("*** " & testcasename() & ": FAIL: DENM re-forwarded after validity expiration ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + } + [] tc_ac.timeout { + if(t_validity.running) { + log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); + f_clientSyncAndVerdict(c_tbDone, e_timeout); + } + else { + log("*** " & testcasename() & ": PASS: DENM not reforwarded after validity expiration ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + } + + [] t_validity.timeout { + log("*** " & testcasename() & ": INFO: End of validity period ***"); + repeat; + } + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_KAFW_BV_09 + + /** + * @desc TP Function for TC_DEN_KAFW_BV_10 + */ + function f_DEN_KAFW_BV_10() runs on ItsDenm { + + //Local constants + const TransmissionInterval c_transmissionInterval := c_interval_10sec; + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + var boolean v_positionChanged := false; + + // Test control + if (not PICS_DENM_KAF) { + log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Test adapter configuration + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage( + m_denm( + m_denmMgmtCon( + m_tsActionId, + -, + c_transmissionInterval * 5, + c_transmissionInterval + ), + v_situation, + m_denmLocation_zeroDelta + ) + ); + + tc_ac.start; + alt { + [] denmPort.receive( + mw_denmInd( + mw_denmPdu( + mw_denm( + mw_denmMgmtCon(v_actionId) + ) + ) + ) + ) { + tc_ac.stop; + if(v_positionChanged == false) { + log("*** " & testcasename() & ": INFO: DENM re-forwarded. Changing position ***"); + f_utChangePosition(m_utChangePosition(1000, 0)); + v_positionChanged := true; + tc_ac.start; + repeat; + } + else { + log("*** " & testcasename() & ": FAIL: DENM re-forwarded with incorrect containers ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + } + [] tc_ac.timeout { + if(v_positionChanged == false) { + log("*** " & testcasename() & ": INCONC: DENM was not forwarded ***"); + f_clientSyncAndVerdict(c_tbDone, e_timeout); + } + else { + log("*** " & testcasename() & ": PASS: DENM stopped re-forwarding DENM ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + } + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_KAFW_BV_10 + + /** + * @desc TP Function for TC_DEN_KAFW_BV_11 + */ + function f_DEN_KAFW_BV_11() runs on ItsDenm { + + // Local variables + var template (value) SituationContainer v_situation := m_situation(c_causeVehicleBreakdown, c_subCauseCode_Unavailable); + var ActionID v_actionId; + + // Test control + if (not PICS_DENM_KAF) { + log("*** " & testcasename() & ": PICS_DENM_KAF required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cfUp(); + + // Preamble + f_prInitialState(); + f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); + + // Test Body + v_actionId := f_sendDenMessage( m_denm ( m_denmMgmtCon ( m_tsActionId ), v_situation, m_denmLocation_zeroDelta ) ); + + tc_ac.start; + alt { + [] denmPort.receive ( mw_denmInd ( mw_denmPdu ( mw_denm ( mw_denmMgmtCon ( v_actionId ) ) ) ) ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: IUT reconstructs and sends the DENM associated with ACTION_ID ***"); + f_clientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": PASS: IUT does not reconstruct and send the DENM associated with ACTION_ID1 ***"); + f_clientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poCancelEvent(e_ets, v_actionId); + f_cfDown(); + + } // end TC_DEN_KAFW_BV_11 + + } // end denKeepAliveForwarding + +} // end ItsDenm_TpFunctions diff --git a/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestCases.ttcn b/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestCases.ttcn index 89136851473b03b11ae478b13d9b5978cf970c4d..45c01f925c981a64c40754cb6df6046220c1a4b9 100644 --- a/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestCases.ttcn +++ b/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestCases.ttcn @@ -2,25 +2,17 @@ * @author ETSI / STF405 / STF449 * @version $URL$ * $Id$ - * @desc GeoNetworking Testcases (TP version: 0.0.11) + * @desc GeoNetworking Testcases * */ module ItsGeoNetworking_TestCases { - // Libcommon - import from LibCommon_BasicTypesAndValues all; - import from LibCommon_Time all; - import from LibCommon_VerdictControl all; - import from LibCommon_Sync all; - // LibIts - import from LibItsCommon_Functions all; import from LibItsGeoNetworking_TestSystem all; - import from LibItsGeoNetworking_Functions all; - import from LibItsGeoNetworking_Templates all; - import from LibItsGeoNetworking_TypesAndValues all; - import from LibItsGeoNetworking_Pics all; - + + // Its + import from ItsGeoNetworking_TpFunctions all; + // 6.2.1 group geoFormatingAndDataValidity { @@ -28,142 +20,70 @@ module ItsGeoNetworking_TestCases { group geoFdvBasicHeader { /** - * @desc Testing defined values of default Gn parameters in the basic header - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state"
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT is requested to send a GeoUnicast packet
-             *      }
-             *      then {
-             *          the IUT sends a GeoUnicast packet
-             *              containing a correctly formatted Basic Header
-             *                  containing version field
-             *                      set to itsGnProtocolVersion MIB parameter
-             *                  containing RHL field
-             *                      set to itsGnDefaultHopLimit MIB parameter
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BAH/BV/01 - * @reference EN 302 636-4-1 [1], clauses 9.3.2 , 8.6.2 and Annex G - */ + * @desc Check defined values of default Gn parameters in the basic header + *
+            * Pics Selection: PICS_GN_BASIC_HEADER
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state"
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet
+            *      }
+            *      then {
+            *          the IUT sends a GUC packet
+            *              containing a correctly formatted Basic Header
+            *                  containing version field
+            *                      set to itsGnProtocolVersion MIB parameter
+            *                  containing RHL field
+            *                      set to itsGnDefaultHopLimit MIB parameter
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BAH/BV-01 + * @reference EN 302 636-4-1 [1], clauses 9.3.2 , 8.6.2 and Annex G + */ testcase TC_GEONW_FDV_BAH_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(vc_componentName); - - // 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(?, ?), -, f_getDefaultHopLimit()))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Basic Header correctly formatted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - + + f_GEONW_FDV_BAH_BV_01(); + } // end TC_GEONW_FDV_BAH_BV_01 /** - * @desc Testing discard of packet having incorrect version - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state"
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT receives the SHB packet from ItsNodeB
-             *              containing a correctly formatted Basic Header
-             *                  containing version field
-             *                      set to value not equal to itsGnProtocolVersion MIB parameter
-             *      }
-             *      then {
-             *          the IUT discards the received SHB packet
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BAH/BV/02 - * @reference EN 302 636-4-1 [1], clauses 9.3.3 - */ - testcase TC_GEONW_FDV_BAH_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu(m_geoNwShbPacket(v_longPosVectorNodeB)); - v_gnPacket.basicHeader.version := valueof(v_gnPacket.basicHeader.version) + 1; - - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - f_sleep(PX_TAC); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: GN was discarded and not transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // end TC_GEONW_FDV_BAH_BV_02 + * @desc Check discard of packet having incorrect version + *
+            * Pics Selection: PICS_GN_BASIC_HEADER
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state"
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives the SHB packet from ItsNodeB
+            *              containing a correctly formatted Basic Header
+            *                  containing version field
+            *                      set to value not equal to itsGnProtocolVersion MIB parameter
+            *      }
+            *      then {
+            *          the IUT discards the received SHB packet
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BAH/BI-02 + * @reference EN 302 636-4-1 [1], clauses 9.3.3 + */ + testcase TC_GEONW_FDV_BAH_BI_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_FDV_BAH_BI_02(); + + } // end TC_GEONW_FDV_BAH_BI_02 } // end geoFdvBasicHeader @@ -171,405 +91,152 @@ module ItsGeoNetworking_TestCases { group geoFdvCommonHeader { /** - * @desc Common GeoNetworking header validity test (PL field) - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state"
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT generates a Beacon message
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking message
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '1' (BEACON)
-             *                  containing HST field
-             *                      set to '0' (UNSPECIFIED)
-             *                  containing PL field
-             *                      set to '0'
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/COH/BV/01 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.6 and 9.3.6 - */ + * @desc Common GeoNetworking header validity test (PL field) + *
+            * Pics Selection: PICS_GN_COMMON_HEADER
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state"
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT generates a Beacon message
+            *      }
+            *      then {
+            *          the IUT sends a GeoNetworking message
+            *              containing a correctly formatted Common Header
+            *                  containing HT field
+            *                      set to '1' (BEACON)
+            *                  containing HST field
+            *                      set to '0' (UNSPECIFIED)
+            *                  containing PL field
+            *                      set to '0'
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/COH/BV-01 + * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.6 and 9.3.6 + */ testcase TC_GEONW_FDV_COH_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(?)))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Common Header correclty formatted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - f_acTriggerEvent(m_stopPassBeaconing); - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_FDV_COH_BV_01(); } // end TC_GEONW_FDV_COH_BV_01 /** - * @desc Common GeoNetworking header validity test (PL field) - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state"
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT is requested to send a SHB packet
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '5' (TSB)
-             *                  containing HST field
-             *                      set to '0' (SINGLE_HOP)
-             *                  containing MHL field
-             *                      set to '1'
-             *                  containing PL field
-             *                      set to the length of the included payload
-             *              containing a payload
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/COH/BV/02 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.4, 9.3.4 and 9.3.10 - */ + * @desc Common GeoNetworking header validity test (PL field) + *
+            * Pics Selection: PICS_GN_COMMON_HEADER
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state"
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a SHB packet
+            *      }
+            *      then {
+            *          the IUT sends a GeoNetworking packet
+            *              containing a correctly formatted Common Header
+            *                  containing HT field
+            *                      set to '5' (TSB)
+            *                  containing HST field
+            *                      set to '0' (SINGLE_HOP)
+            *                  containing MHL field
+            *                      set to '1'
+            *                  containing PL field
+            *                      set to the length of the included payload
+            *              containing a payload
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/COH/BV-02 + * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.4, 9.3.4 and 9.3.10 + */ testcase TC_GEONW_FDV_COH_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var GeoNetworkingInd v_geoNwInd; - var octetstring v_payload := char2oct("PAYLOAD"); - - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateShbMessageWithPayload(v_payload)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwShbPacket))) -> value v_geoNwInd { - tc_ac.stop; - if(ispresent(v_geoNwInd.msgIn.gnPacket.packet.payload)) { - if(v_geoNwInd.msgIn.gnPacket.packet.commonHeader.plLength == lengthof(v_geoNwInd.msgIn.gnPacket.packet.payload.rawPayload)) { - log("*** " & testcasename() & ": PASS: PL field correctly indicates payload size ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: PL does correctly not indicate payload size (" - & int2str(v_geoNwInd.msgIn.gnPacket.packet.commonHeader.plLength) - & " != " - & int2str(lengthof(v_geoNwInd.msgIn.gnPacket.packet.payload.rawPayload)) - & ")***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - else { - if(v_geoNwInd.msgIn.gnPacket.packet.commonHeader.plLength == 0) { - log("*** " & testcasename() & ": PASS: PL field correctly indicates empty payload ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: PL does not indicate empty payload ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_FDV_COH_BV_02(); } // end TC_GEONW_FDV_COH_BV_02 /** - * @desc Testing defined values of default Gn parameters in the common header - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *       the IUT being in the "initial state"
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT is requested to send a GeoUnicast packet
-             *      }
-             *      then {
-             *          the IUT sends a GeoUnicast packet
-             *              containing a correctly formatted Common Header
-             *                  containing Flags field
-             *                      indicating value equalling the itsGnIsMobile MIB parameter
-             *                  containing MHL field
-             *                      set to itsGnDefaultHopLimit MIB parameter
-             *     }
-             *  }
-             * 
- * - * @version 0.0.11 - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/COH/BV/03 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.8.2, 9.3.4 and Annex G - */ + * @desc Check defined values of default Gn parameters in the common header + *
+            * Pics Selection: PICS_GN_COMMON_HEADER
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *       the IUT being in the "initial state"
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GBC packet
+            *      }
+            *      then {
+            *          the IUT sends a GBC packet
+            *              containing a correctly formatted Common Header
+            *                  containing Flags field
+            *                      indicating value equalling the itsGnIsMobile MIB parameter
+            *                  containing MHL field
+            *                      set to itsGnDefaultHopLimit MIB parameter
+            *     }
+            *  }
+            * 
+ * + * @version 0.0.11 + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/COH/BV-03 + * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.8.2, 9.3.4 and Annex G + */ testcase TC_GEONW_FDV_COH_BV_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeB; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(vc_componentName); - - // 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_geoNwUnicastPacketWithHlAndFlags(?, ?, f_getDefaultHopLimit(), f_isMobile())))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Correct GeoNetworking Common Header received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] a_receiveAnyGeoUnicast() { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Incorrect GeoNetworking Common Header received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_FDV_COH_BV_03(); } // end TC_GEONW_FDV_COH_BV_03 - group GEONW_FDV_COH_BV_04 { - - /** - * @desc Test that a received TSB packet is discarded if received with RHL > MHL - *
-                 * Pics Selection: none
-                 * 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 MHL1
-                 *              containing Common Header
-                 *                  containing MHL field
-                 *                      indicating MHL1
-                 *      }
-                 *      then {
-                 *          the IUT discards the TSB packet
-                 *     }
-                 *  }
-                 * 
- * - * @version 0.0.11 - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/COH/BV/04 - * @reference EN 302 636-4-1 [1], clauses 9.3.5 - */ - testcase TC_GEONW_FDV_COH_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_FDV_COH_BV_04_nodeB()); - v_nodeD.start(f_GEONW_FDV_COH_BV_04_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end TC_GEONW_FDV_COH_BV_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_FDV_COH_BV_04) - */ - function f_GEONW_FDV_COH_BV_04_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var UInt8 v_hopLimit := f_getDefaultHopLimit(); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeB, - v_hopLimit-1 - ), - -, - v_hopLimit - ) - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: TSB packet was not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: TSB was correctly discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_FDV_COH_BV_04_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_FDV_COH_BV_04) - */ - function f_GEONW_FDV_COH_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 { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: TSB packet was not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: TSB was correctly discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_FDV_COH_BV_04_nodeD - - } // end GEONW_FDV_COH_BV_04 + /** + * @desc Check that a received TSB packet is discarded if received with RHL > MHL + *
+            * Pics Selection: PICS_GN_COMMON_HEADER
+            * 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 MHL1
+            *              containing Common Header
+            *                  containing MHL field
+            *                      indicating MHL1
+            *      }
+            *      then {
+            *          the IUT discards the TSB packet
+            *     }
+            *  }
+            * 
+ * + * @version 0.0.11 + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/COH/BO-04 + * @reference EN 302 636-4-1 [1], clauses 9.3.5 + */ + testcase TC_GEONW_FDV_COH_BO_04() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_FDV_COH_BO_04(); + + } // end TC_GEONW_FDV_COH_BV_04 } // end geoFdvCommonHeader @@ -577,269 +244,140 @@ module ItsGeoNetworking_TestCases { group geoFdvBeacon { /** - * @desc Beacon header validity test - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state"
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT generates a Beacon packet
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '1' (BEACON)
-             *                  containing HST field
-             *                      set to '0' (UNSPECIFIED)
-             *                  containing NH field
-             *                      set to '0' (UNSPECIFIED)
-             *              containing Extended Header
-             *                  containing SOPV
-             *                      indicating LPV of the IUT
-             *      }
-             *    }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BEA/BV/01 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.8.6 and 9.3.6 - */ + * @desc Beacon header validity test + *
+            * Pics Selection: PICS_GN_BEACON_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state"
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT generates a Beacon packet
+            *      }
+            *      then {
+            *          the IUT sends a GeoNetworking packet
+            *              containing a correctly formatted Common Header
+            *                  containing HT field
+            *                      set to '1' (BEACON)
+            *                  containing HST field
+            *                      set to '0' (UNSPECIFIED)
+            *                  containing NH field
+            *                      set to '0' (UNSPECIFIED)
+            *              containing Extended Header
+            *                  containing SOPV
+            *                      indicating LPV of the IUT
+            *      }
+            *    }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BEA/BV-01 + * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.8.6 and 9.3.6 + */ testcase TC_GEONW_FDV_BEA_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(mw_longPosVectorPosition(v_longPosVectorIut), e_any)))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Common Header correclty formatted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - + + f_GEONW_FDV_BEA_BV_01(); + } // end TC_GEONW_FDV_BEA_BV_01 /** - * @desc GeoNetworking address validity test - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *    the IUT being in the "initial state"
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT generates a Beacon packet
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing SOPV field
-             *                  containing GN_ADDR field
-             *                      containing ST field
-             *                          indicating the ITS Station type
-             *                      containing SCC field
-             *                          indicating the ITS Station country code
-             *      }
-             *  }
-             *  NOTE: Correct Source GeoNetworking address value: itsGnLocalGnAddr MIB parameter value.
-             *  
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BEA/BV/02 - * @reference EN 302 636-4-1 [1], clauses 6.3 and 8.8.6.2 - */ + * @desc GeoNetworking address validity test + *
+            * Pics Selection: PICS_GN_BEACON_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *    the IUT being in the "initial state"
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT generates a Beacon packet
+            *      }
+            *      then {
+            *          the IUT sends a GeoNetworking packet
+            *              containing SOPV field
+            *                  containing GN_ADDR field
+            *                      containing ST field
+            *                          indicating the ITS Station type
+            *                      containing SCC field
+            *                          indicating the ITS Station country code
+            *      }
+            *  }
+            *  NOTE: Correct Source GeoNetworking address value: itsGnLocalGnAddr MIB parameter value.
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BEA/BV-02 + * @reference EN 302 636-4-1 [1], clauses 6.3 and 8.8.6.2 + */ testcase TC_GEONW_FDV_BEA_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket( - mw_longPosVectorAny(f_getIutGnLocalAddress()))))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GN address correctly received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_FDV_BEA_BV_02(); } // end TC_GEONW_FDV_BEA_BV_02 /** - * @desc Local Position Vector validity test, involving comparison against sensor input data - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state"
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT generates a Beacon packet
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correct SOPV field
-             *                  indicating the latest position of the IUT
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BEA/BV/03 - * @reference EN 302 636-4-1 [1], clauses 8.5.2.2 and 8.8.6.2 - */ + * @desc Local Position Vector validity test, involving comparison against sensor input data + *
+            * Pics Selection: PICS_GN_BEACON_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state"
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT generates a Beacon packet
+            *      }
+            *      then {
+            *          the IUT sends a GeoNetworking packet
+            *              containing a correct SOPV field
+            *                  indicating the latest position of the IUT
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BEA/BV-03 + * @reference EN 302 636-4-1 [1], clauses 8.5.2.2 and 8.8.6.2 + */ testcase TC_GEONW_FDV_BEA_BV_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Position equaling GN-MNGT primitive value received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_FDV_BEA_BV_03(); } // end TC_GEONW_FDV_BEA_BV_03 /** - * @desc Local Position Vector validity test, involving timestamp comparison against sensor input data - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state"
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT generates a Beacon packet
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correct SOPV field
-             *                  indicating the timestamp value corresponding to the sensor acquisition time of position data
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BEA/BV/04 - * @reference EN 302 636-4-1 [1], clauses 8.5.2.2 and 8.8.6.2 - */ + * @desc Local Position Vector validity test, involving timestamp comparison against sensor input data + *
+            * Pics Selection: PICS_GN_BEACON_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state"
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT generates a Beacon packet
+            *      }
+            *      then {
+            *          the IUT sends a GeoNetworking packet
+            *              containing a correct SOPV field
+            *                  indicating the timestamp value corresponding to the sensor acquisition time of position data
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/BEA/BV-04 + * @reference EN 302 636-4-1 [1], clauses 8.5.2.2 and 8.8.6.2 + */ testcase TC_GEONW_FDV_BEA_BV_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Timestamp equaling GN-MNGT primitive value received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_FDV_BEA_BV_04(); } // end TC_GEONW_FDV_BEA_BV_04 @@ -849,91 +387,42 @@ module ItsGeoNetworking_TestCases { group geoFdvGeoUnicast { /** - * @desc GeoUnicast header validity - *
-             * Pics Selection: none
-             * 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 GeoUnicast packet to ItsNodeB
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '2' (GEOUNICAST)
-             *                  containing HST field
-             *                      set to '0' (UNSPECIFIED)
-             *              containing GeoUnicast Extended Header
-             *                  containing DEPV field
-             *                      indicating position of the ItsNodeB
-             *                  containing SOPV field
-             *                      indicating position of the IUT
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/GUC/BV/01 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.8.2.2 and 9.3.8 - */ + * @desc GUC header validity + *
+            * Pics Selection: PICS_GN_GUC_SRC
+            * 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 HST field
+            *                      set to '0' (UNSPECIFIED)
+            *              containing GUC Extended Header
+            *                  containing DEPV field
+            *                      indicating position of the ItsNodeB
+            *                  containing SOPV field
+            *                      indicating position of the IUT
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/GUC/BV-01 + * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.8.2.2 and 9.3.8 + */ testcase TC_GEONW_FDV_GUC_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - v_longPosVectorIut := f_getPosition(c_compIut); - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacketWithSourcePv( - mw_shortPosVectorPosition_withDelta(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), // DEPV - ?, // sequence number - mw_longPosVectorPosition_withDelta(v_longPosVectorIut) //SOPV - ) - ) - ) - ) { - tc_ac.stop; - - log("*** " & testcasename() & ": PASS: Fields of the received GeoUnicast message correctly set ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: GeoUnicast message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_FDV_GUC_BV_01(); } // end TC_GEONW_FDV_GUC_BV_01 @@ -943,88 +432,38 @@ module ItsGeoNetworking_TestCases { group geoFdvGeoBroadcast { /** - * @desc GeoBroadcast header validity - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from the ItsNodeB
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT is requested to send a GeoBroadcast packet
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '4' (GEOBROADCAST)
-             *              containing GeoBroadcast Extended Header
-             *                  containing SOPV field
-             *                      indicating position of the IUT
-             *       }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/GBC/BV/01 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.5.2 and 9.3.11 - */ + * @desc GBC header validity + *
+            * Pics Selection: PICS_GN_GBC_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having received Beacon information from the ItsNodeB
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GBC packet
+            *      }
+            *      then {
+            *          the IUT sends a GeoNetworking packet
+            *              containing a correctly formatted Common Header
+            *                  containing HT field
+            *                      set to '4' (GEOBROADCAST)
+            *              containing GBC Extended Header
+            *                  containing SOPV field
+            *                      indicating position of the IUT
+            *       }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/GBC/BV-01 + * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.5.2 and 9.3.11 + */ testcase TC_GEONW_FDV_GBC_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - var octetstring v_payload := char2oct("PAYLOAD"); - - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - v_longPosVectorIut := f_getPosition(c_compIut); - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoBroadcastMessageWithPayload(f_getArea(c_area1), v_payload)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - f_receiveGeoNetMessageWithPayload( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwBroadcastPacket( - mw_longPosVectorPosition_withDelta(v_longPosVectorIut), // SOPV - ? // sequence number - ) - ) - ), - ? - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Fields of the received GeoBroadcast message correctly set ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_FDV_GBC_BV_01(); } // end TC_GEONW_FDV_GBC_BV_01 @@ -1034,86 +473,38 @@ module ItsGeoNetworking_TestCases { group geoFdvGeoAnycast { /** - * @desc GeoAnycast header validity - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from the ItsNodeB
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT is requested to send a GeoAnycast packet
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '3' (GEOANYCAST)
-             *              containing GeoAnycast Extended Header
-             *                  containing SOPV field
-             *                      indicating position of IUT
-             *       }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/GAC/BV/01 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.5.2 and 9.3.12 - */ + * @desc GAC header validity + *
+            * Pics Selection: PICS_GN_GAC_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having received Beacon information from the ItsNodeB
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GAC packet
+            *      }
+            *      then {
+            *          the IUT sends a GeoNetworking packet
+            *              containing a correctly formatted Common Header
+            *                  containing HT field
+            *                      set to '3' (GEOANYCAST)
+            *              containing GAC Extended Header
+            *                  containing SOPV field
+            *                      indicating position of IUT
+            *       }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/GAC/BV-01 + * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.5.2 and 9.3.12 + */ testcase TC_GEONW_FDV_GAC_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorIut; - var octetstring v_payload := char2oct("PAYLOAD"); - - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_longPosVectorIut := f_getPosition(c_compIut); - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoAnycastMessageWithPayload(f_getArea(c_area1), v_payload)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - f_receiveGeoNetMessageWithPayload( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwAnycastPacket( - mw_longPosVectorPosition_withDelta(v_longPosVectorIut), // SOPV - ? // sequence number - ) - ) - ), - ? - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Fields of the received GeoAnycast message correctly set ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: GeoAnycast message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_FDV_GAC_BV_01(); } // end TC_GEONW_FDV_GAC_BV_01 @@ -1123,86 +514,42 @@ module ItsGeoNetworking_TestCases { group geoFdvSingleHopBroadcast { /** - * @desc SHB header validity - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from the ItsNodeB
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT is requested to send a SHB packet
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '5' (TSB)
-             *                  containing HST field
-             *                      set to '0' (SINGLE_HOP)
-             *                  containing MHL field
-             *                      set to '1'
-             *              containing Extended Header
-             *                  containing SOPV
-             *                      indicating LPV of the IUT
-             *       }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/SHB/BV/01 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 9.3.4, 8.8.4.2 and 9.3.10 - */ + * @desc SHB header validity + *
+            * Pics Selection: PICS_GN_SHB_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having received Beacon information from the ItsNodeB
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a SHB packet
+            *      }
+            *      then {
+            *          the IUT sends a GeoNetworking packet
+            *              containing a correctly formatted Common Header
+            *                  containing HT field
+            *                      set to '5' (TSB)
+            *                  containing HST field
+            *                      set to '0' (SINGLE_HOP)
+            *                  containing MHL field
+            *                      set to '1'
+            *              containing Extended Header
+            *                  containing SOPV
+            *                      indicating LPV of the IUT
+            *       }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/SHB/BV-01 + * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 9.3.4, 8.8.4.2 and 9.3.10 + */ testcase TC_GEONW_FDV_SHB_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_longPosVectorIut := f_getPosition(c_compIut); - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateShbMessage) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacket( - mw_longPosVectorPosition_withDelta(v_longPosVectorIut), // SOPV - 1 //MHL - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Fields of the received SHB message correctly set ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: SHB message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_FDV_SHB_BV_01(); } // end TC_GEONW_FDV_SHB_BV_01 @@ -1212,84 +559,40 @@ module ItsGeoNetworking_TestCases { group geoFdvTopologicallyScopedBroadcast { /** - * @desc TSB header validity - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from the ItsNodeB
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT is requested to send a TSB packet
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '5' (TSB)
-             *                  containing HST field
-             *                      set to '1' (MULTI_HOP)
-             *              containing TSB Extended Header
-             *                  containing SOPV field
-             *                      indicating position of the IUT
-             *       }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/TSB/BV/01 - * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.3.2 and 9.3.9 - */ + * @desc TSB header validity + *
+            * Pics Selection: PICS_GN_TSB_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having received Beacon information from the ItsNodeB
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a TSB packet
+            *      }
+            *      then {
+            *          the IUT sends a GeoNetworking packet
+            *              containing a correctly formatted Common Header
+            *                  containing HT field
+            *                      set to '5' (TSB)
+            *                  containing HST field
+            *                      set to '1' (MULTI_HOP)
+            *              containing TSB Extended Header
+            *                  containing SOPV field
+            *                      indicating position of the IUT
+            *       }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/FDV/TSB/BV-01 + * @reference EN 302 636-4-1 [1], clauses 8.7.2, 8.7.4, 8.8.3.2 and 9.3.9 + */ testcase TC_GEONW_FDV_TSB_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_longPosVectorIut := f_getPosition(c_compIut); - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateTsbMessage) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, // sequence number - mw_longPosVectorPosition_withDelta(v_longPosVectorIut) // SOPV - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: message received with correct common and extended headers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: TSB message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_FDV_TSB_BV_01(); } // end TC_GEONW_FDV_TSB_BV_01 @@ -1304,1425 +607,861 @@ module ItsGeoNetworking_TestCases { group geoLocationTable { /** - * @desc Test of adding new entries into location table from Beacon header - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacon information from the ItsNodeB and
-             *      the lifetime of the ItsNodeB Location Table entry not being expired
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT is requested to send a GeoUnicast packet to ItsNodeB
-             *      }
-             *      then {
-             *          the IUT does not send a GeoNetworking packet
-             *              containing a LS_REQUEST
-             *                  containing Request field
-             *                      containing GN_ADDR
-             *                          containing M_ID
-             *                              indicating ItsNodeB
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '2' (GEOUNICAST)
-             *              containing GeoUnicast Extended Header
-             *                  containing DEPV field
-             *                      indicating same position as the SOPV value of the Beacon information received from ItsNodeB
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/01 - * @reference EN 302 636-4-1 [1], clauses 9.3.10.3, 9.3.6.2 and 9.3.8.2 - */ + * @desc Check insertion of new entries into location table from Beacon header + *
+            * Pics Selection: PICS_GN_GUC_SRC AND PICS_GN_BEACON_DST
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having received Beacon information from the ItsNodeB and
+            *      the lifetime of the ItsNodeB Location Table entry not being expired
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeB
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST
+            *                  containing Request field
+            *                      containing GN_ADDR
+            *                          containing M_ID
+            *                              indicating ItsNodeB
+            *          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 from ItsNodeB
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV-01 + * @reference EN 302 636-4-1 [1], clauses 9.3.10.3, 9.3.6.2 and 9.3.8.2 + */ testcase TC_GEONW_PON_LOT_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeB; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoUnicast packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] a_receiveAnyLsRequest() { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": TIMEOUT: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_PON_LOT_BV_01(); } // end TC_GEONW_PON_LOT_BV_01 /** - * @desc Test of adding new entries into location table from LS Reply data - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having been requested to send a first GeoUnicast packet to ItsNodeA and
-             *      the IUT having sent a LS_REQUEST packet
-             *          containing Request field
-             *              containing GN_ADDR
-             *                  containing M_ID
-             *                      indicating ItsNodeA
-             *      the IUT having received a LS_REPLY packet from ItsNodeA
-             *          containing SOPV field and
-             *      the IUT having sent the GeoUnicast packet to ItsNodeA and
-             *      the lifetime of the ItsNodeA Location Table entry not being expired
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT is requested to send a second GeoUnicast packet to ItsNodeA
-             *      }
-             *      then {
-             *          the IUT does not send a GeoNetworking packet
-             *              containing a LS_REQUEST
-             *                  containing Request field
-             *                      containing GN_ADDR
-             *                          containing M_ID
-             *                              indicating ItsNodeA
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '2' (GEOUNICAST)
-             *              containing GeoUnicast Extended Header
-             *                  containing DEPV field
-             *                      indicating same position as the SOPV value of the LS_REPLY packet received from ItsNodeA
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/02 - * @reference EN 302 636-4-1 [1], clauses 9.3.7.1.4, 9.3.7.1.2 and 9.3.8.2 - */ + * @desc Check insertion of new entries into location table from LS Reply data + *
+            * Pics Selection: PICS_GN_LS_REQ_SRC AND PICS_GN_LS_REP_DST
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having been requested to send a first GUC packet to ItsNodeA and
+            *      the IUT having sent a LS_REQUEST packet
+            *          containing Request field
+            *              containing GN_ADDR
+            *                  containing M_ID
+            *                      indicating ItsNodeA
+            *      the IUT having received a LS_REPLY packet from ItsNodeA
+            *          containing SOPV field and
+            *      the IUT having sent the GUC packet to ItsNodeA and
+            *      the lifetime of the ItsNodeA Location Table entry not being expired
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a second GUC packet to ItsNodeA
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST
+            *                  containing Request field
+            *                      containing GN_ADDR
+            *                          containing M_ID
+            *                              indicating ItsNodeA
+            *          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 LS_REPLY packet received from ItsNodeA
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV-02 + * @reference EN 302 636-4-1 [1], clauses 9.3.7.1.4, 9.3.7.1.2 and 9.3.8.2 + */ testcase TC_GEONW_PON_LOT_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - var GN_Address v_gnAddressNodeA; - var boolean v_lsRequestReceived := false; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - v_gnAddressNodeA := v_longPosVectorNodeA.gnAddr; - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequestAndReply( - ?, v_gnAddressNodeA.mid, - v_longPosVectorNodeA, v_longPosVectorNodeB - ) { - v_lsRequestReceived := true; - log("*** " & testcasename() & ": Pre-conditions: Received and answered Location Service Request ***"); - repeat; - } - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { - tc_ac.stop; - if(v_lsRequestReceived == true) { - log("*** " & testcasename() & ": Pre-conditions: First GeoUnicast message received correctly ***"); - } - else { - log("*** " & testcasename() & ": Pre-conditions: GeoUnicast packet received without LS Request ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Pre-conditions: Initial conditions not satisfied. ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_gnAddressNodeA.mid, v_longPosVectorIut) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Received second GeoUnicast packet without LS Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_PON_LOT_BV_02(); } // end TC_GEONW_PON_LOT_BV_02 - group GEONW_PON_LOT_BV_03 { - - /** - * @desc Test of adding new entries into location table from extended header processing - * (e.g. Unicast header) - *
-                 * Pics Selection: none
-                 * Config Id: CF01
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT having received a MESSAGE from ItsNodeA
-                 *  }
-                 *  MESSAGE: Beacon packet
-                 *
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
-                 *      }
-                 *      then {
-                 *          the IUT does not send a GeoNetworking packet
-                 *              containing a LS_REQUEST Extended Header
-                 *                  containing Request field
-                 *                      containing GN_ADDR
-                 *                          containing M_ID
-                 *                              indicating ItsNodeA
-                 *          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 of the MESSAGE received from ItsNodeA
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 - */ - testcase TC_GEONW_PON_LOT_BV_03_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwBeaconPacket( - v_longPosVectorNodeA - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); - - } // end TC_GEONW_PON_LOT_BV_03_01 - - /** - * @desc Test of adding new entries into location table from extended header processing - * (e.g. Unicast header) - *
-                 * Pics Selection: none
-                 * Config Id: CF01
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT having received a MESSAGE from ItsNodeA
-                 *  }
-                 *  MESSAGE: GUC packet
-                 *
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
-                 *      }
-                 *      then {
-                 *          the IUT does not send a GeoNetworking packet
-                 *              containing a LS_REQUEST Extended Header
-                 *                  containing Request field
-                 *                      containing GN_ADDR
-                 *                          containing M_ID
-                 *                              indicating ItsNodeA
-                 *          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 of the MESSAGE received from ItsNodeA
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 - */ - testcase TC_GEONW_PON_LOT_BV_03_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwUnicastPacket( - v_longPosVectorNodeA, - f_getIutShortPosVector(), - vc_localSeqNumber - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); - - } // end TC_GEONW_PON_LOT_BV_03_02 - - /** - * @desc Test of adding new entries into location table from extended header processing - * (e.g. Unicast header) - *
-                 * Pics Selection: none
-                 * Config Id: CF01
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT having received a MESSAGE from ItsNodeA
-                 *  }
-                 *  MESSAGE: GAC packet
-                 *
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
-                 *      }
-                 *      then {
-                 *          the IUT does not send a GeoNetworking packet
-                 *              containing a LS_REQUEST Extended Header
-                 *                  containing Request field
-                 *                      containing GN_ADDR
-                 *                          containing M_ID
-                 *                              indicating ItsNodeA
-                 *          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 of the MESSAGE received from ItsNodeA
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 - */ - testcase TC_GEONW_PON_LOT_BV_03_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwAnycastPacket( - v_longPosVectorNodeA, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area1) - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); - - } // end TC_GEONW_PON_LOT_BV_03_03 - - /** - * @desc Test of adding new entries into location table from extended header processing - * (e.g. Unicast header) - *
-                 * Pics Selection: none
-                 * Config Id: CF01
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT having received a MESSAGE from ItsNodeA
-                 *  }
-                 *  MESSAGE: GBC packet
-                 *
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
-                 *      }
-                 *      then {
-                 *          the IUT does not send a GeoNetworking packet
-                 *              containing a LS_REQUEST Extended Header
-                 *                  containing Request field
-                 *                      containing GN_ADDR
-                 *                          containing M_ID
-                 *                              indicating ItsNodeA
-                 *          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 of the MESSAGE received from ItsNodeA
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 - */ - testcase TC_GEONW_PON_LOT_BV_03_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwBroadcastPacket( - v_longPosVectorNodeA, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1) - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); - - } // end TC_GEONW_PON_LOT_BV_03_04 - - /** - * @desc Test of adding new entries into location table from extended header processing - * (e.g. Unicast header) - *
-                 * Pics Selection: none
-                 * Config Id: CF01
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT having received a MESSAGE from ItsNodeA
-                 *  }
-                 *  MESSAGE: TSB packet
-                 *
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
-                 *      }
-                 *      then {
-                 *          the IUT does not send a GeoNetworking packet
-                 *              containing a LS_REQUEST Extended Header
-                 *                  containing Request field
-                 *                      containing GN_ADDR
-                 *                          containing M_ID
-                 *                              indicating ItsNodeA
-                 *          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 of the MESSAGE received from ItsNodeA
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 - */ - testcase TC_GEONW_PON_LOT_BV_03_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeA - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); - - } // end TC_GEONW_PON_LOT_BV_03_05 - - /** - * @desc Test of adding new entries into location table from extended header processing - * (e.g. Unicast header) - *
-                 * Pics Selection: none
-                 * Config Id: CF01
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT having received a MESSAGE from ItsNodeA
-                 *  }
-                 *  MESSAGE: SHB packet
-                 *
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
-                 *      }
-                 *      then {
-                 *          the IUT does not send a GeoNetworking packet
-                 *              containing a LS_REQUEST Extended Header
-                 *                  containing Request field
-                 *                      containing GN_ADDR
-                 *                          containing M_ID
-                 *                              indicating ItsNodeA
-                 *          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 of the MESSAGE received from ItsNodeA
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 - */ - testcase TC_GEONW_PON_LOT_BV_03_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwShbPacket( - v_longPosVectorNodeA - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); - - } // end TC_GEONW_PON_LOT_BV_03_06 - - /** - * @desc Test of adding new entries into location table from extended header processing - * (e.g. Unicast header) - *
-                 * Pics Selection: none
-                 * Config Id: CF01
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT having received a MESSAGE from ItsNodeA
-                 *  }
-                 *  MESSAGE: LS Request packet
-                 *
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
-                 *      }
-                 *      then {
-                 *          the IUT does not send a GeoNetworking packet
-                 *              containing a LS_REQUEST Extended Header
-                 *                  containing Request field
-                 *                      containing GN_ADDR
-                 *                          containing M_ID
-                 *                              indicating ItsNodeA
-                 *          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 of the MESSAGE received from ItsNodeA
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 - */ - testcase TC_GEONW_PON_LOT_BV_03_07() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); - - activate(a_receiveAnyLsReply()); - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwLsRequestPacket( - v_longPosVectorNodeA, - vc_localSeqNumber, - f_getIutGnLocalAddress() - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); - - } // end TC_GEONW_PON_LOT_BV_03_07 - - /** - * @desc Test of adding new entries into location table from extended header processing - * (e.g. Unicast header) - *
-                 * Pics Selection: none
-                 * Config Id: CF01
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT having received a MESSAGE from ItsNodeA
-                 *  }
-                 *  MESSAGE: LS Reply packet
-                 *
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
-                 *      }
-                 *      then {
-                 *          the IUT does not send a GeoNetworking packet
-                 *              containing a LS_REQUEST Extended Header
-                 *                  containing Request field
-                 *                      containing GN_ADDR
-                 *                          containing M_ID
-                 *                              indicating ItsNodeA
-                 *          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 of the MESSAGE received from ItsNodeA
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/03 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 - */ - testcase TC_GEONW_PON_LOT_BV_03_08() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); - - f_TP_GEONW_PON_LOT_BV_03_pre_2( - m_geoNwLsReplyPacket( - v_longPosVectorNodeA, - f_getIutShortPosVector(), - vc_localSeqNumber - ) - ); - - f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); - - } // end TC_GEONW_PON_LOT_BV_03_08 + /** + * @desc Check insertion of new entries into location table from extended header processing (e.g. GUC header) + *
+            * Pics Selection: PICS_GN_BEACON_DST
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having received a MESSAGE from ItsNodeA
+            *  }
+            *  MESSAGE: Beacon packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeA
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST Extended Header
+            *                  containing Request field
+            *                      containing GN_ADDR
+            *                          containing M_ID
+            *                              indicating ItsNodeA
+            *          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 of the MESSAGE received from ItsNodeA
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV-03 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + */ + testcase TC_GEONW_PON_LOT_BV_03_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOT_BV_03_01(); + + } // end TC_GEONW_PON_LOT_BV_03_01 - /** - * @desc Function including first preamble part (TC_GEONW_PON_LOT_BV_03) - */ - function f_TP_GEONW_PON_LOT_BV_03_pre_1() runs on ItsGeoNetworking return LongPosVector { - - // Local variables - var LongPosVector v_longPosVectorNodeA; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Test adapter configuration - - // Preamble part I - f_prNeighbour(); - - return v_longPosVectorNodeA; - } // end f_TP_GEONW_PON_LOT_BV_03_pre_1 + /** + * @desc Check insertion of new entries into location table from extended header processing (e.g. GUC header) + *
+            * Pics Selection: PICS_GN_GUC_DST
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having received a MESSAGE from ItsNodeA
+            *  }
+            *  MESSAGE: GUC packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeA
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST Extended Header
+            *                  containing Request field
+            *                      containing GN_ADDR
+            *                          containing M_ID
+            *                              indicating ItsNodeA
+            *          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 of the MESSAGE received from ItsNodeA
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV-03 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + */ + testcase TC_GEONW_PON_LOT_BV_03_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOT_BV_03_02(); + + } // end TC_GEONW_PON_LOT_BV_03_02 - /** - * @desc Function including second preamble part (TC_GEONW_PON_LOT_BV_03) - */ - function f_TP_GEONW_PON_LOT_BV_03_pre_2(in template (value) GnNonSecuredPacket p_packet) runs on ItsGeoNetworking { - - //preamble part II - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(p_packet)) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } // end f_TP_GEONW_PON_LOT_BV_03_pre_2 - - /** - * @desc Function including test body and postamble part (TC_GEONW_PON_LOT_BV_03) - */ - function f_TP_GEONW_PON_LOT_BV_03_main(in template (value) LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(valueof(p_longPosVectorNodeA.gnAddr))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveAnyLsRequest() { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_longPosVectorNodeA)))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoUnicast packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // end f_TP_GEONW_PON_LOT_BV_03_main + /** + * @desc Check insertion of new entries into location table from extended header processing (e.g. GUC header) + *
+            * Pics Selection: PICS_GN_GAC_DST
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having received a MESSAGE from ItsNodeA
+            *  }
+            *  MESSAGE: GAC packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeA
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST Extended Header
+            *                  containing Request field
+            *                      containing GN_ADDR
+            *                          containing M_ID
+            *                              indicating ItsNodeA
+            *          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 of the MESSAGE received from ItsNodeA
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV-03 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + */ + testcase TC_GEONW_PON_LOT_BV_03_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOT_BV_03_03(); + + } // end TC_GEONW_PON_LOT_BV_03_03 - } //end GEONW_PON_LOT_BV_03 + /** + * @desc Check insertion of new entries into location table from extended header processing (e.g. GUC header) + *
+            * Pics Selection: PICS_GN_GBC_DST
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having received a MESSAGE from ItsNodeA
+            *  }
+            *  MESSAGE: GBC packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeA
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST Extended Header
+            *                  containing Request field
+            *                      containing GN_ADDR
+            *                          containing M_ID
+            *                              indicating ItsNodeA
+            *          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 of the MESSAGE received from ItsNodeA
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV-03 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + */ + testcase TC_GEONW_PON_LOT_BV_03_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOT_BV_03_04(); + + } // end TC_GEONW_PON_LOT_BV_03_04 + + /** + * @desc Check insertion of new entries into location table from extended header processing (e.g. GUC header) + *
+            * Pics Selection: PICS_GN_TSB_DST
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having received a MESSAGE from ItsNodeA
+            *  }
+            *  MESSAGE: TSB packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeA
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST Extended Header
+            *                  containing Request field
+            *                      containing GN_ADDR
+            *                          containing M_ID
+            *                              indicating ItsNodeA
+            *          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 of the MESSAGE received from ItsNodeA
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV-03 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + */ + testcase TC_GEONW_PON_LOT_BV_03_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOT_BV_03_05(); + + } // end TC_GEONW_PON_LOT_BV_03_05 + + /** + * @desc Check insertion of new entries into location table from extended header processing (e.g. GUC header) + *
+            * Pics Selection: PICS_GN_SHB_DST
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having received a MESSAGE from ItsNodeA
+            *  }
+            *  MESSAGE: SHB packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeA
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST Extended Header
+            *                  containing Request field
+            *                      containing GN_ADDR
+            *                          containing M_ID
+            *                              indicating ItsNodeA
+            *          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 of the MESSAGE received from ItsNodeA
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV-03 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + */ + testcase TC_GEONW_PON_LOT_BV_03_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOT_BV_03_06(); + + } // end TC_GEONW_PON_LOT_BV_03_06 + + /** + * @desc Check insertion of new entries into location table from extended header processing (e.g. GUC header) + *
+            * Pics Selection: PICS_GN_LS_REQ_DST
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having received a MESSAGE from ItsNodeA
+            *  }
+            *  MESSAGE: LS Request packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeA
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST Extended Header
+            *                  containing Request field
+            *                      containing GN_ADDR
+            *                          containing M_ID
+            *                              indicating ItsNodeA
+            *          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 of the MESSAGE received from ItsNodeA
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV-03 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + */ + testcase TC_GEONW_PON_LOT_BV_03_07() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOT_BV_03_07(); + + } // end TC_GEONW_PON_LOT_BV_03_07 + + /** + * @desc Check insertion of new entries into location table from extended header processing (e.g. GUC header) + *
+            * Pics Selection: PICS_GN_LS_REP_DST
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having received a MESSAGE from ItsNodeA
+            *  }
+            *  MESSAGE: LS Reply packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeA
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST Extended Header
+            *                  containing Request field
+            *                      containing GN_ADDR
+            *                          containing M_ID
+            *                              indicating ItsNodeA
+            *          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 of the MESSAGE received from ItsNodeA
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV-03 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.9.3, 9.3.10.3, 9.3.7.3 and 9.3.8.2 + */ + testcase TC_GEONW_PON_LOT_BV_03_08() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOT_BV_03_08(); + + } // end TC_GEONW_PON_LOT_BV_03_08 /** - * @desc Test of handling entries expiring from location table - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having received Beacons information from ItsNodeB and
-             *      the IUT not having received beacons from ItsNodeB for the duration of itsGnLifetimeLocTE parameter (20 sec)
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT is requested to send a GeoUnicast packet to ItsNodeB
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing a LS_REQUEST
-             *                  containing Request field
-             *                      indicating GN_ADDR of ItsNodeB
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV/04 - * @reference EN 302 636-4-1 [1], clauses 7.1.3, 9.3.8.2, 9.3.7.1.2 and Annex G - */ + * @desc Check location table entry expiration + *
+            * Pics Selection: PICS_GN_LS_REQ_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having received Beacons information from ItsNodeB and
+            *      the IUT not having received beacons from ItsNodeB for the duration of itsGnLifetimeLocTE parameter (20 sec)
+            *  }
+            * 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 LS_REQUEST
+            *                  containing Request field
+            *                      indicating GN_ADDR of ItsNodeB
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOT/BV-04 + * @reference EN 302 636-4-1 [1], clauses 7.1.3, 9.3.8.2, 9.3.7.1.2 and Annex G + */ testcase TC_GEONW_PON_LOT_BV_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prDefault(); // NodeB will send Beacon only once - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(m_geoNwBeaconPacket(f_getPosition(c_compNodeB)), -, c_hopLimit1))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(f_getLifetimeLocTableEntry()); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeB.gnAddr.mid, v_longPosVectorIut ) { - log("*** " & testcasename() & ": PASS: LS Request received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: LS Request not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cf01Down(); + f_GEONW_PON_LOT_BV_04(); } // end TC_GEONW_PON_LOT_BV_04 - group GEONW_PON_LOT_BV_05 { - - /** - * @desc Test of updating entries in location table with most up-to-date position data extracted - * from common header processing (including timestamp comparison before updating) - *
-                 * Pics Selection: none
-                 * 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 a MESSAGE from ItsNodeB,
-                 *          containing Extended Header
-                 *              containing SOPV field
-                 *                  indicating an older timestamp than the last Beacon packet and
-                 *                  indicating a different position than the position of the last Beacon packet
-                 *  }
-                 *  MESSAGE: GUC packet
-                 *
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeB
-                 *      }
-                 *      then {
-                 *          the IUT does not send a GeoNetworking packet
-                 *              containing a LS_REQUEST
-                 *                  containing Request field
-                 *                      indicating GN_ADDR of ItsNodeB
-                 *          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/LOT/BV/05 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 - */ - testcase TC_GEONW_PON_LOT_BV_05_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_obsoleteLongPosVectorNodeB; - - f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - f_TP_GEONW_PON_LOT_BV_05_pre_2( - m_geoNwUnicastPacket( - v_obsoleteLongPosVectorNodeB, - f_getIutShortPosVector(), - vc_localSeqNumber - ) - ); - - f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - } // end TC_GEONW_PON_LOT_BV_05_01 - - /** - * @desc Test of updating entries in location table with most up-to-date position data extracted - * from common header processing (including timestamp comparison before updating) - *
-                 * Pics Selection: none
-                 * 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 a MESSAGE from ItsNodeB,
-                 *          containing Extended Header
-                 *              containing SOPV field
-                 *                  indicating an older timestamp than the last Beacon packet and
-                 *                  indicating a different position than the position of the last Beacon packet
-                 *  }
-                 *  MESSAGE: GAC packet
-                 *
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeB
-                 *      }
-                 *      then {
-                 *          the IUT does not send a GeoNetworking packet
-                 *              containing a LS_REQUEST
-                 *                  containing Request field
-                 *                      indicating GN_ADDR of ItsNodeB
-                 *          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/LOT/BV/05 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 - */ - testcase TC_GEONW_PON_LOT_BV_05_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_obsoleteLongPosVectorNodeB; - - f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - f_TP_GEONW_PON_LOT_BV_05_pre_2( - m_geoNwAnycastPacket( - v_obsoleteLongPosVectorNodeB, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area1) - ) - ); - - f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - } // end TC_GEONW_PON_LOT_BV_05_02 - - /** - * @desc Test of updating entries in location table with most up-to-date position data extracted - * from common header processing (including timestamp comparison before updating) - *
-                 * Pics Selection: none
-                 * 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 a MESSAGE from ItsNodeB,
-                 *          containing Extended Header
-                 *              containing SOPV field
-                 *                  indicating an older timestamp than the last Beacon packet and
-                 *                  indicating a different position than the position of the last Beacon packet
-                 *  }
-                 *  MESSAGE: GBC packet
-                 *
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeB
-                 *      }
-                 *      then {
-                 *          the IUT does not send a GeoNetworking packet
-                 *              containing a LS_REQUEST
-                 *                  containing Request field
-                 *                      indicating GN_ADDR of ItsNodeB
-                 *          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/LOT/BV/05 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 - */ - testcase TC_GEONW_PON_LOT_BV_05_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_obsoleteLongPosVectorNodeB; - - f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - f_TP_GEONW_PON_LOT_BV_05_pre_2( - m_geoNwBroadcastPacket( - v_obsoleteLongPosVectorNodeB, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1) - ) - ); - - f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - } // end TC_GEONW_PON_LOT_BV_05_03 - - /** - * @desc Test of updating entries in location table with most up-to-date position data extracted - * from common header processing (including timestamp comparison before updating) - *
-                 * Pics Selection: none
-                 * 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 a MESSAGE from ItsNodeB,
-                 *          containing Extended Header
-                 *              containing SOPV field
-                 *                  indicating an older timestamp than the last Beacon packet and
-                 *                  indicating a different position than the position of the last Beacon packet
-                 *  }
-                 *  MESSAGE: TSB packet
-                 *
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeB
-                 *      }
-                 *      then {
-                 *          the IUT does not send a GeoNetworking packet
-                 *              containing a LS_REQUEST
-                 *                  containing Request field
-                 *                      indicating GN_ADDR of ItsNodeB
-                 *          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/LOT/BV/05 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 - */ - testcase TC_GEONW_PON_LOT_BV_05_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_obsoleteLongPosVectorNodeB; - - f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - f_TP_GEONW_PON_LOT_BV_05_pre_2( - m_geoNwTsbPacket( - vc_localSeqNumber, - v_obsoleteLongPosVectorNodeB - ) - ); - - f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - } // end TC_GEONW_PON_LOT_BV_05_04 - - /** - * @desc Test of updating entries in location table with most up-to-date position data extracted - * from common header processing (including timestamp comparison before updating) - *
-                 * Pics Selection: none
-                 * 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 a MESSAGE from ItsNodeB,
-                 *          containing Extended Header
-                 *              containing SOPV field
-                 *                  indicating an older timestamp than the last Beacon packet and
-                 *                  indicating a different position than the position of the last Beacon packet
-                 *  }
-                 *  MESSAGE: SHB packet
-                 *
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeB
-                 *      }
-                 *      then {
-                 *          the IUT does not send a GeoNetworking packet
-                 *              containing a LS_REQUEST
-                 *                  containing Request field
-                 *                      indicating GN_ADDR of ItsNodeB
-                 *          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/LOT/BV/05 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 - */ - testcase TC_GEONW_PON_LOT_BV_05_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_obsoleteLongPosVectorNodeB; - - f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - f_TP_GEONW_PON_LOT_BV_05_pre_2( - m_geoNwShbPacket( - v_obsoleteLongPosVectorNodeB - ) - ); - - f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - } // end TC_GEONW_PON_LOT_BV_05_05 - - /** - * @desc Test of updating entries in location table with most up-to-date position data extracted - * from common header processing (including timestamp comparison before updating) - *
-                 * Pics Selection: none
-                 * 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 a MESSAGE from ItsNodeB,
-                 *          containing Extended Header
-                 *              containing SOPV field
-                 *                  indicating an older timestamp than the last Beacon packet and
-                 *                  indicating a different position than the position of the last Beacon packet
-                 *  }
-                 *  MESSAGE: LS Request packet
-                 *
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeB
-                 *      }
-                 *      then {
-                 *          the IUT does not send a GeoNetworking packet
-                 *              containing a LS_REQUEST
-                 *                  containing Request field
-                 *                      indicating GN_ADDR of ItsNodeB
-                 *          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/LOT/BV/05 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 - */ - testcase TC_GEONW_PON_LOT_BV_05_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_obsoleteLongPosVectorNodeB; - - f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - activate(a_receiveAnyLsReply()); - - f_TP_GEONW_PON_LOT_BV_05_pre_2( - m_geoNwLsRequestPacket( - v_obsoleteLongPosVectorNodeB, - vc_localSeqNumber, - f_getIutGnLocalAddress() - ) - ); - - f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - } // end TC_GEONW_PON_LOT_BV_05_06 - - /** - * @desc Test of updating entries in location table with most up-to-date position data extracted - * from common header processing (including timestamp comparison before updating) - *
-                 * Pics Selection: none
-                 * 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 a MESSAGE from ItsNodeB,
-                 *          containing Extended Header
-                 *              containing SOPV field
-                 *                  indicating an older timestamp than the last Beacon packet and
-                 *                  indicating a different position than the position of the last Beacon packet
-                 *  }
-                 *  MESSAGE: LS Reply packet
-                 *
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a GeoUnicast packet to ItsNodeB
-                 *      }
-                 *      then {
-                 *          the IUT does not send a GeoNetworking packet
-                 *              containing a LS_REQUEST
-                 *                  containing Request field
-                 *                      indicating GN_ADDR of ItsNodeB
-                 *          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/LOT/BV/05 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 - */ - testcase TC_GEONW_PON_LOT_BV_05_07() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_obsoleteLongPosVectorNodeB; - - f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - f_TP_GEONW_PON_LOT_BV_05_pre_2( - m_geoNwLsReplyPacket( - v_obsoleteLongPosVectorNodeB, - f_getIutShortPosVector(), - vc_localSeqNumber - ) - ); - - f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); - - } // end TC_GEONW_PON_LOT_BV_05_07 + /** + * @desc Check update of entries in location table with most up-to-date position data extracted + * from common header processing (including timestamp comparison before updating) + *
+            * Pics Selection: PICS_GN_GUC_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 a MESSAGE from ItsNodeB,
+            *          containing Extended Header
+            *              containing SOPV field
+            *                  indicating an older timestamp than the last Beacon packet and
+            *                  indicating a different position than the position of the last Beacon packet
+            *  }
+            *  MESSAGE: GUC packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeB
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST
+            *                  containing Request field
+            *                      indicating GN_ADDR of ItsNodeB
+            *          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/LOT/BV-05 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 + */ + testcase TC_GEONW_PON_LOT_BV_05_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOT_BV_05_01(); + + } // end TC_GEONW_PON_LOT_BV_05_01 - /** - * @desc Function including first preamble part (TC_GEONW_PON_LOT_BV_05) - */ - function f_TP_GEONW_PON_LOT_BV_05_pre_1(out LongPosVector p_longPosVectorNodeB, out LongPosVector p_obsoleteLongPosVectorNodeB) runs on ItsGeoNetworking { - - // Local variables - - // Test control - - // Test component configuration - f_cf01Up(); - p_longPosVectorNodeB := f_getPosition(c_compNodeB); - p_obsoleteLongPosVectorNodeB := p_longPosVectorNodeB; - p_obsoleteLongPosVectorNodeB.timestamp := p_obsoleteLongPosVectorNodeB.timestamp - 1000; - p_obsoleteLongPosVectorNodeB.latitude := p_obsoleteLongPosVectorNodeB.latitude - 1; - - // Test adapter configuration - - // Preamble - f_prDefault(); - - // Act as a neighbor and send one beacon - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(m_geoNwBeaconPacket(f_getPosition(c_compNodeB)), -, c_hopLimit1))); - } // end f_TP_GEONW_PON_LOT_BV_05_pre_1 - - /** - * @desc Function including second preamble part (TC_GEONW_PON_LOT_BV_05) - */ - function f_TP_GEONW_PON_LOT_BV_05_pre_2(in template (value) GnNonSecuredPacket p_packet) runs on ItsGeoNetworking { - - //preamble part II - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(p_packet)) - ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } // end f_TP_GEONW_PON_LOT_BV_05_pre_2 - - /** - * @desc Function including test body and postamble part (TC_GEONW_PON_LOT_BV_05) - */ - function f_TP_GEONW_PON_LOT_BV_05_main(in template (value) LongPosVector p_longPosVectorNodeB, in template (value) LongPosVector p_obsoleteLongPosVectorNodeB) runs on ItsGeoNetworking { - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(valueof(p_longPosVectorNodeB.gnAddr)))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveAnyLsRequest() { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_obsoleteLongPosVectorNodeB)))) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: GeoUnicast received with obsolete Destination Position Vector ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_longPosVectorNodeB)))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoUnicast packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // end f_TP_GEONW_PON_LOT_BV_05_main + /** + * @desc Check update of entries in location table with most up-to-date position data extracted + * from common header processing (including timestamp comparison before updating) + *
+            * Pics Selection: PICS_GN_GAC_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 a MESSAGE from ItsNodeB,
+            *          containing Extended Header
+            *              containing SOPV field
+            *                  indicating an older timestamp than the last Beacon packet and
+            *                  indicating a different position than the position of the last Beacon packet
+            *  }
+            *  MESSAGE: GAC packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeB
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST
+            *                  containing Request field
+            *                      indicating GN_ADDR of ItsNodeB
+            *          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/LOT/BV-05 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 + */ + testcase TC_GEONW_PON_LOT_BV_05_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOT_BV_05_02(); + + } // end TC_GEONW_PON_LOT_BV_05_02 - } // end group GEONW_PON_LOT_BV_05 - + /** + * @desc Check update of entries in location table with most up-to-date position data extracted + * from common header processing (including timestamp comparison before updating) + *
+            * 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 and
+            *      the IUT having received a MESSAGE from ItsNodeB,
+            *          containing Extended Header
+            *              containing SOPV field
+            *                  indicating an older timestamp than the last Beacon packet and
+            *                  indicating a different position than the position of the last Beacon packet
+            *  }
+            *  MESSAGE: GBC packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeB
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST
+            *                  containing Request field
+            *                      indicating GN_ADDR of ItsNodeB
+            *          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/LOT/BV-05 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 + */ + testcase TC_GEONW_PON_LOT_BV_05_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOT_BV_05_03(); + + } // end TC_GEONW_PON_LOT_BV_05_03 + + /** + * @desc Check update of entries in location table with most up-to-date position data extracted + * from common header processing (including timestamp comparison before updating) + *
+            * 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 a MESSAGE from ItsNodeB,
+            *          containing Extended Header
+            *              containing SOPV field
+            *                  indicating an older timestamp than the last Beacon packet and
+            *                  indicating a different position than the position of the last Beacon packet
+            *  }
+            *  MESSAGE: TSB packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeB
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST
+            *                  containing Request field
+            *                      indicating GN_ADDR of ItsNodeB
+            *          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/LOT/BV-05 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 + */ + testcase TC_GEONW_PON_LOT_BV_05_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOT_BV_05_04(); + + } // end TC_GEONW_PON_LOT_BV_05_04 + + /** + * @desc Check update of entries in location table with most up-to-date position data extracted + * from common header processing (including timestamp comparison before updating) + *
+            * Pics Selection: PICS_GN_SHB_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 a MESSAGE from ItsNodeB,
+            *          containing Extended Header
+            *              containing SOPV field
+            *                  indicating an older timestamp than the last Beacon packet and
+            *                  indicating a different position than the position of the last Beacon packet
+            *  }
+            *  MESSAGE: SHB packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeB
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST
+            *                  containing Request field
+            *                      indicating GN_ADDR of ItsNodeB
+            *          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/LOT/BV-05 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 + */ + testcase TC_GEONW_PON_LOT_BV_05_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOT_BV_05_05(); + + } // end TC_GEONW_PON_LOT_BV_05_05 + + /** + * @desc Check update of entries in location table with most up-to-date position data extracted + * from common header processing (including timestamp comparison before updating) + *
+            * Pics Selection: PICS_GN_LS_REQ_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 a MESSAGE from ItsNodeB,
+            *          containing Extended Header
+            *              containing SOPV field
+            *                  indicating an older timestamp than the last Beacon packet and
+            *                  indicating a different position than the position of the last Beacon packet
+            *  }
+            *  MESSAGE: LS Request packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeB
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST
+            *                  containing Request field
+            *                      indicating GN_ADDR of ItsNodeB
+            *          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/LOT/BV-05 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 + */ + testcase TC_GEONW_PON_LOT_BV_05_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOT_BV_05_06(); + + } // end TC_GEONW_PON_LOT_BV_05_06 + + /** + * @desc Check update of entries in location table with most up-to-date position data extracted + * from common header processing (including timestamp comparison before updating) + *
+            * Pics Selection: PICS_GN_LS_REP_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 a MESSAGE from ItsNodeB,
+            *          containing Extended Header
+            *              containing SOPV field
+            *                  indicating an older timestamp than the last Beacon packet and
+            *                  indicating a different position than the position of the last Beacon packet
+            *  }
+            *  MESSAGE: LS Reply packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeB
+            *      }
+            *      then {
+            *          the IUT does not send a GeoNetworking packet
+            *              containing a LS_REQUEST
+            *                  containing Request field
+            *                      indicating GN_ADDR of ItsNodeB
+            *          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/LOT/BV-05 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.12.3, 9.3.11.3, 9.3.9.3, 9.3.7.3, 9.3.8.2 and Annex C2 + */ + testcase TC_GEONW_PON_LOT_BV_05_07() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOT_BV_05_07(); + + } // end TC_GEONW_PON_LOT_BV_05_07 + } // end geoLocationTable // 6.2.2.2 group geoLocalPositionVector { /** - * @desc Test of the updating of the Local position vector - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having changed its position
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT generates eventually a Beacon packet
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '1' (BEACON)
-             *                  containing HST field
-             *                      set to '0' (UNSPECIFIED)
-             *                  containing Extended Header
-             *                      containing SOPV field
-             *                          indicating the new position
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LPV/BV/01 - * @reference EN 302 636-4-1 [1], clauses 7.2.3, 9.2.2.2, 9.3.6.1 and Annex G - */ + * @desc Check update of the Local position vector + *
+            * Pics Selection: PICS_GN_BEACON_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having changed its position
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT generates eventually a Beacon packet
+            *      }
+            *      then {
+            *          the IUT sends a GeoNetworking packet
+            *              containing a correctly formatted Common Header
+            *                  containing HT field
+            *                      set to '1' (BEACON)
+            *                  containing HST field
+            *                      set to '0' (UNSPECIFIED)
+            *                  containing Extended Header
+            *                      containing SOPV field
+            *                          indicating the new position
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LPV/BV-01 + * @reference EN 302 636-4-1 [1], clauses 7.2.3, 9.2.2.2, 9.3.6.1 and Annex G + */ testcase TC_GEONW_PON_LPV_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorIut; - var template LongPosVector v_previouslongPosVectorIut; - var GeoNetworkingInd v_geoNwInd; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - v_previouslongPosVectorIut := v_longPosVectorIut; - v_previouslongPosVectorIut.timestamp := ?; - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( - mw_geoNwBeaconPacket( - mw_longPosVectorAny(v_longPosVectorIut.gnAddr) - ) - ))) -> value v_geoNwInd { - tc_ac.stop; - log("*** " & testcasename() & ": Pre-conditions: Beacon received ***"); - v_longPosVectorIut := v_geoNwInd.msgIn.gnPacket.packet.extendedHeader.beaconHeader.srcPosVector; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - f_utChangePosition(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - geoNetworkingPort.clear; - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( - mw_geoNwBeaconPacket( - mw_longPosVectorAny(v_longPosVectorIut.gnAddr) - ) - ))) -> value v_geoNwInd { - tc_ac.stop; - //check if the position vector has changed - if (match(v_geoNwInd.msgIn.gnPacket.packet.extendedHeader.beaconHeader.srcPosVector, v_previouslongPosVectorIut)) { - log("*** " & testcasename() & ": FAIL: Sender Postion Vector not correctly updated ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: Sender Postion Vector correctly updated ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - f_acTriggerEvent(m_stopPassBeaconing); - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_PON_LPV_BV_01(); } // end TC_GEONW_PON_LPV_BV_01 @@ -2732,198 +1471,78 @@ module ItsGeoNetworking_TestCases { group geoSequenceNumber { /** - * @desc Test of the initial sequence number assignment - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT not having sent any GUC and
-             *      the IUT having received Beacon information from ItsNodeB
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT is requested to send a GeoUnicast packet to ItsNodeB
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '2' (GEOUNICAST)
-             *                  containing HST field
-             *                      set to '0' (UNSPECIFIED)
-             *              containing GeoUnicast Extended Header
-             *                  containing SN field
-             *                      indicating value '0'
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/SQN/BV/01 - * @reference EN 302 636-4-1 [1], clauses 7.2.3, 9.3.8.2 - */ + * @desc Check initial sequence number assignment + *
+            * Pics Selection: PICS_GN_GBC_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having sent any GBC packet and
+            *      the IUT having received Beacon information from ItsNodeB
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GBC packet to AREA1
+            *      }
+            *      then {
+            *          the IUT sends a GeoNetworking packet
+            *              containing a correctly formatted Common Header
+            *                  containing HT field
+            *                      set to '4' (GEOBROADCAST)
+            *              containing GBC Extended Header
+            *                  containing SN field
+            *                      indicating value '0'
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/SQN/BV-01 + * @reference EN 302 636-4-1 [1], clauses 7.2.3, 9.3.8.2 + */ testcase TC_GEONW_PON_SQN_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeB; - var UInt16 v_expectedSequenceNumber := 0; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveGeoUnicast(mw_shortPosVectorPosition_anyPos(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), v_expectedSequenceNumber) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoUnicast packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] a_receiveGeoUnicast(mw_shortPosVectorPosition_anyPos(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), ?) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: GeoUnicast packet received with incorrect sequence number ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_PON_SQN_BV_01(); } // end TC_GEONW_PON_SQN_BV_01 /** - * @desc Test of the local sequence number incrementing - *
-             * Pics Selection: none
-             * 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 sent a GeoUnicast packet to the ItsNodeB
-             *          containing the Sequence Number field
-             *              indicating value SN1
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT is requested to send a GeoUnicast packet to ItsNodeB
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '2' (GEOUNICAST)
-             *              containing GeoUnicast Extended Header
-             *                  containing SN field
-             *                      indicating value SN1 + 1
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/SQN/BV/02 - * @reference EN 302 636-4-1 [1], clauses 7.2.3, 9.3.8.2 - */ + * @desc Check the local sequence number incrementation + *
+            * Pics Selection: PICS_GN_GBC_SRC
+            * 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 sent a GBC packet to AREA1
+            *          containing the Sequence Number field
+            *              indicating value SN1
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GBC packet to AREA1
+            *      }
+            *      then {
+            *          the IUT sends a GeoNetworking packet
+            *              containing a correctly formatted Common Header
+            *                  containing HT field
+            *                      set to '4' (GEOBROADCAST)
+            *              containing GBC Extended Header
+            *                  containing SN field
+            *                      indicating value SN1 + 1
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/SQN/BV-02 + * @reference EN 302 636-4-1 [1], clauses 7.2.3, 9.3.8.2 + */ testcase TC_GEONW_PON_SQN_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeB; - var UInt16 v_expectedSequenceNumber := 0; - var integer v_nbReceivedPackets := 0; - var GeoNetworkingInd v_geoNwInd; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_sleep(10.0); - // receive first packet - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), - ?)))) -> value v_geoNwInd { - tc_ac.stop; - log("*** " & testcasename() & ": Pre-conditions: First GeoUnicast packet received ***"); - v_expectedSequenceNumber := v_geoNwInd.msgIn.gnPacket.packet.extendedHeader.geoUnicastHeader.seqNumber + 1; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveGeoUnicast(mw_shortPosVectorPosition_anyPos(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), v_expectedSequenceNumber) { - tc_ac.stop; - v_nbReceivedPackets := v_nbReceivedPackets + 1; - if(v_nbReceivedPackets >= vc_multipleMessagesCount) { - log("*** " & testcasename() & ": PASS: GeoUnicast packets received with correct sequence numbers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - v_expectedSequenceNumber := v_expectedSequenceNumber + 1; - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - repeat; - } - } - [] a_receiveGeoUnicast(mw_shortPosVectorPosition_anyPos(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), ?) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: GeoUnicast packet received with incorrect sequence number ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_PON_SQN_BV_02(); } // end TC_GEONW_PON_SQN_BV_02 @@ -2933,1967 +1552,650 @@ module ItsGeoNetworking_TestCases { group geoLocationService { /** - * @desc Test of first LS invocation for unknown Destination nodes - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having no Location Table Entry for ItsNodeA
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '6' (LS)
-             *                  containing HST field
-             *                      set to '0' (LS_REQUEST)
-             *                  containing NH field
-             *                      set to '0' (UNSPECIFIED)
-             *              containing LS_REQUEST Extended Header
-             *                  containing Request field
-             *                      indicating GN_ADDR of ItsNodeA
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/01 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.2, 9.2.4, 6.3 and 9.3.7.1.2 - */ + * @desc Check first LS invocation for unknown Destination nodes + *
+            * Pics Selection: PICS_GN_LS_REQ_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having no Location Table Entry for ItsNodeA
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeA
+            *      }
+            *      then {
+            *          the IUT sends a GeoNetworking packet
+            *              containing a correctly formatted Common Header
+            *                  containing HT field
+            *                      set to '6' (LS)
+            *                  containing HST field
+            *                      set to '0' (LS_REQUEST)
+            *                  containing NH field
+            *                      set to '0' (UNSPECIFIED)
+            *              containing LS_REQUEST Extended Header
+            *                  containing Request field
+            *                      indicating GN_ADDR of ItsNodeA
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-01 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.2, 9.2.4, 6.3 and 9.3.7.1.2 + */ testcase TC_GEONW_PON_LOS_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorIut; - var GN_Address v_gnAddressNodeA; - - // Test control - - // Test component configuration - f_cf01Up(); - v_gnAddressNodeA := f_getPosition(c_compNodeA).gnAddr; - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_gnAddressNodeA)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveLsRequest( - ?, - v_gnAddressNodeA.mid, - v_longPosVectorIut - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: LS Request received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] a_receiveAnyLsRequest() { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: LS Request does not contain GN Address of nodeA ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_PON_LOS_BV_01(); } // end TC_GEONW_PON_LOS_BV_01 /** - * @desc Test of no LS invocation for unknown Destination nodes when LS procedure is already active - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having no Location Table Entry for ItsNodeA and
-             *      the IUT having been requested to send a first GeoUnicast packet to ItsNodeA and
-             *      the IUT having sent a GeoNetworking packet
-             *          containing a LS_REQUEST
-             *              containing Request field
-             *                  containing GN_ADDR
-             *                      containing M_ID
-             *                          indicating ItsNodeA
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *            the IUT is requested to send a new GeoUnicast packet to ItsNodeA
-             *      }
-             *      then {
-             *          IUT does not send a second LS_REQUEST packet (see note)
-             *      }
-             *  }
-             *  NOTE: at least not before the LS_REQUEST retransmission timer expires
-             *  
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/02 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.2, 9.2.4 and 9.3.7.1.2 - */ + * @desc Check absence of LS invocation for unknown Destination nodes when LS procedure is already active + *
+            * Pics Selection: PICS_GN_LS_REQ_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having no Location Table Entry for ItsNodeA and
+            *      the IUT having been requested to send a first GUC packet to ItsNodeA and
+            *      the IUT having sent a GeoNetworking packet
+            *          containing a LS_REQUEST
+            *              containing Request field
+            *                  containing GN_ADDR
+            *                      containing M_ID
+            *                          indicating ItsNodeA
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *            the IUT is requested to send a new GUC packet to ItsNodeA
+            *      }
+            *      then {
+            *          IUT does not send a second LS_REQUEST packet (see note)
+            *      }
+            *  }
+            *  NOTE: at least not before the LS_REQUEST retransmission timer expires
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-02 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.2, 9.2.4 and 9.3.7.1.2 + */ testcase TC_GEONW_PON_LOS_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorIut; - var GN_Address v_gnAddressNodeA; - - // Test control - - // Test component configuration - f_cf01Up(); - v_gnAddressNodeA := f_getPosition(c_compNodeA).gnAddr; - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_gnAddressNodeA)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_gnAddressNodeA.mid, v_longPosVectorIut) { - tc_ac.stop; - //start retransmission timer - tc_ac.start(f_getLsRetransmitTimer() - f_getDeltaTimer()); - } - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_gnAddressNodeA)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - - alt { - [] a_receiveLsRequest(?, v_gnAddressNodeA.mid, v_longPosVectorIut) { - tc_ac.stop; - log("*** " & testcasename() & ": Second LS_REQUEST received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": No second LS_REQUEST received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_PON_LOS_BV_02(); } // end TC_GEONW_PON_LOS_BV_02 /** - * @desc Test of packet buffering into LS buffer during Location service procedure, - * including handling of LT fields in the LT packet buffer - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having no Location Table Entry for ItsNodeA and
-             *      the IUT having been requested to send a GeoUnicast packet to ItsNodeA
-             *          containing TrafficClass.SCF set to 1 and
-             *      the IUT having sent a LS_REQUEST packet
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT receives the LS_REPLY packet from ItsNodeA
-             *      }
-             *      then {
-             *          the IUT sends the GeoUnicast packet addressed to ItsNodeA
-             *              containing GeoUnicast Extended Header
-             *                  containing LT field
-             *                      indicating value (default LT value – WaitingTime (see note))
-             *      }
-             *  }
-             *  NOTE: Waiting Time == time difference between LS_REQUEST sending and LS_REPLY reception.
-             *  
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/03 - * @reference EN 302 636-4-1 [1], clauses 7.4.3, 9.3.7.1.4, 9.3.8.2, 9.2.4 and 9.3.7.1.2 - */ + * @desc Check packet buffering into LS buffer during Location service procedure, + * including handling of LT fields in the LT packet buffer + *
+            * Pics Selection: PICS_GN_LS_REQ_SRC AND PICS_GN_LS_REP_DST
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having no Location Table Entry for ItsNodeA and
+            *      the IUT having been requested to send a GUC packet to ItsNodeA
+            *          containing TrafficClass.SCF set to 1 and
+            *      the IUT having sent a LS_REQUEST packet
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives the LS_REPLY packet from ItsNodeA
+            *      }
+            *      then {
+            *          the IUT sends the GUC packet addressed to ItsNodeA
+            *              containing GUC Extended Header
+            *                  containing LT field
+            *                      indicating value (default LT value – WaitingTime (see note))
+            *      }
+            *  }
+            *  NOTE: Waiting Time == time difference between LS_REQUEST sending and LS_REPLY reception.
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-03 + * @reference EN 302 636-4-1 [1], clauses 7.4.3, 9.3.7.1.4, 9.3.8.2, 9.2.4 and 9.3.7.1.2 + */ testcase TC_GEONW_PON_LOS_BV_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorIut; - var GeoNetworkingInd v_geoNetInd; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - } - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwLsReplyPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ) - ) - ); - - tc_ac.start; - alt { - - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ) - ) -> value v_geoNetInd { - tc_ac.stop; - //we only check that the lifetime is less than the default lifetime due to - //we do not know exactly the time passed at IUT - if (f_getLifetimeValue(v_geoNetInd.msgIn.basicHeader.lifeTime) - * Pics Selection: none - * Config Id: CF01 - * Initial conditions: - * with { - * the IUT being in the "initial state" and - * the IUT having no Location Table Entry for ItsNodeA and - * the IUT having been requested to send a GeoUnicast packet to ItsNodeA - * containing TrafficClass.SCF set to 1 - * containing LT field - * indicating value LT1 - * containing payload field - * indicating value PL1 and - * the IUT having sent a LS_REQUEST packet and - * the IUT having been requested to send a second GeoUnicast packet to ItsNodeA - * containing TrafficClass.SCF set to 1 - * containing LT field - * indicating LT2 - * containing payload field - * indicating value PL2 - * } - * Expected behaviour: - * ensure that { - * when { - * the IUT receives the LS_REPLY packet from ItsNodeA and - * before expiry of LT1 and LT2 - * } - * then { - * the IUT sends GeoUnicast packet addressed to ItsNodeA - * containing payload field - * indicating value PL1 and - * the IUT sends GeoUnicast packet addressed to ItsNodeA - * containing payload field - * indicating value PL2 - * } - * } - * - * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/04 - * @reference EN 302 636-4-1 [1], clauses 7.4.3, 9.3.8.2, 9.2.4 and 9.3.7.1.2 - */ + * @desc Check LS buffer characteristics: FIFO type + *
+            * Pics Selection: PICS_GN_LS_REQ_SRC AND PICS_GN_LS_REP_DST
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having no Location Table Entry for ItsNodeA and
+            *      the IUT having been requested to send a GUC packet to ItsNodeA
+            *          containing TrafficClass.SCF set to 1
+            *          containing LT field
+            *              indicating value LT1
+            *          containing payload field
+            *              indicating value PL1 and
+            *      the IUT having sent a LS_REQUEST packet and
+            *      the IUT having been requested to send a second GUC packet to ItsNodeA
+            *          containing TrafficClass.SCF set to 1
+            *          containing LT field
+            *              indicating LT2
+            *          containing payload field
+            *              indicating value PL2
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives the LS_REPLY packet from ItsNodeA and
+            *          before expiry of LT1 and LT2
+            *      }
+            *      then {
+            *          the IUT sends GUC packet addressed to ItsNodeA
+            *              containing payload field
+            *                  indicating value PL1 and
+            *          the IUT sends GUC packet addressed to ItsNodeA
+            *              containing payload field
+            *                  indicating value PL2
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-04 + * @reference EN 302 636-4-1 [1], clauses 7.4.3, 9.3.8.2, 9.2.4 and 9.3.7.1.2 + */ testcase TC_GEONW_PON_LOS_BV_04() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorIut; - var octetstring v_payload1 := char2oct("PAYLOAD_1"); - var octetstring v_payload2 := char2oct("PAYLOAD_2"); - var boolean v_msg1Received := false; - var boolean v_msg2Received := false; - var boolean v_firstLsRequestReceived := false; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithPayload(v_longPosVectorNodeA.gnAddr, v_payload1)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - if ( v_firstLsRequestReceived == true ) { - log("*** " & testcasename() & ": Second LsRequest received ***"); - tc_ac.stop; - f_sendGeoNetMessage ( m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu ( - m_geoNwLsReplyPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber ) ) ) ); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - else { - log("*** " & testcasename() & ": First LsRequest received ***"); - v_firstLsRequestReceived := true; - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithPayload(v_longPosVectorNodeA.gnAddr, v_payload2)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - repeat; - } - } - [] tc_ac.timeout{ - log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - f_receiveGeoNetMessageWithPayload( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ), - f_adaptPayload_mw(v_payload1) - ) - ) { - v_msg1Received := true; - if ( v_msg2Received ) { - log("*** " & testcasename() & ": FAIL: Messages received in incorrect order ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": First Message received ***"); - repeat; - } - } - [] geoNetworkingPort.receive( - f_receiveGeoNetMessageWithPayload( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ), - f_adaptPayload_mw(v_payload2) - ) - ) { - v_msg2Received := true; - if ( v_msg1Received ) { - log("*** " & testcasename() & ": PASS: Messages received in correct order ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": Second Message received ***"); - repeat; - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Expected messages not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_PON_LOS_BV_04(); } // end TC_GEONW_PON_LOS_BV_04 /** - * @desc Test of LS buffer characteristics: discarding upon LT expiration - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having no Location Table Entry for ItsNodeA and
-             *      the IUT having been requested to send multiple GeoUnicast packets to ItsNodeA
-             *          containing TrafficClass.SCF set to 1
-             *          containing LT field
-             *              indicating values LTx and
-             *      the IUT having sent a LS_REQUEST packet
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT receives the LS_REPLY packet from ItsNodeA after expiry of LTs
-             *      }
-             *      then {
-             *          the IUT does not send any packet to ItsNodeA
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/05 - * @reference EN 302 636-4-1 [1], clauses 7.4.3, 9.3.8.2, 9.2.4 and 9.3.7.1.2 - */ + * @desc Check LS buffer characteristics: discarding upon LT expiration + *
+            * Pics Selection: PICS_GN_LS_REQ_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having no Location Table Entry for ItsNodeA and
+            *      the IUT having been requested to send multiple GUC packets to ItsNodeA
+            *          containing TrafficClass.SCF set to 1
+            *          containing LT field
+            *              indicating values LTx and
+            *      the IUT having sent a LS_REQUEST packet
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives the LS_REPLY packet from ItsNodeA after expiry of LTs
+            *      }
+            *      then {
+            *          the IUT does not send any packet to ItsNodeA
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-05 + * @reference EN 302 636-4-1 [1], clauses 7.4.3, 9.3.8.2, 9.2.4 and 9.3.7.1.2 + */ testcase TC_GEONW_PON_LOS_BV_05() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorIut; - var octetstring v_payload1 := char2oct("PAYLOAD_1"); - var octetstring v_payload2 := char2oct("PAYLOAD_2"); - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithPayload(v_longPosVectorNodeA.gnAddr, v_payload1)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithPayload(v_longPosVectorNodeA.gnAddr, v_payload2)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - //start retransmission timer - tc_ac.start(f_getMaxPacketLifeTime() + f_getDeltaTimer()); - } - [] tc_ac.timeout{ - log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - // Awaiting expiration of LT - alt { - [] tc_ac.timeout { - // LT expired - } - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - // retransmitted LS_REQUEST - repeat; - } - } - - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwLsReplyPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ) - ) - ); - - // Check for messages send to Tester - tc_noac.start; - alt { - [] geoNetworkingPort.receive (mw_geoNwInd(mw_geoNwPdu(?))){ - tc_noac.stop; - log("*** " & testcasename() & ": Message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": No message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_PON_LOS_BV_05(); } // end TC_GEONW_PON_LOS_BV_05 /** - * @desc Test of LS Request retransmission if no answer is received - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having no Location Table Entry for ItsNodeA and
-             *      the IUT having been requested to send a GeoUnicast packet to ItsNodeA
-             *          containing TrafficClass.SCF set to 1
-             *          containing LT field
-             *              indicating value LT1 higher than itsGnLocationServiceTimer and
-             *      the IUT having sent a LS_REQUEST packet
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT does not receive LS_REPLY packet from ItsNodeA and
-             *          before expiration of LT1
-             *      }
-             *      then {
-             *          the IUT retransmits the LS_REQUEST packet
-             *              upon expiry of itsGnLocationServiceTimer
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/06 - * @reference EN 302 636-4-1 [1], clauses 9.3.7.1.3, 9.3.7.1.2 and 9.3.8.2 - */ - testcase TC_GEONW_PON_LOS_BV_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorIut; - var integer v_maxNbrRetrans := f_getLsMaxRetrans(); - var integer v_rtc := 0; - var boolean v_retransmitOk := false; - timer t_minRetrans := f_getLsRetransmitTimer() - f_getDeltaTimer(); - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithLifetime(v_longPosVectorNodeA.gnAddr, float2int(int2float(v_maxNbrRetrans + 2) * f_getLsRetransmitTimer() * 1000.0))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - //start retransmission timer - t_minRetrans.start; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - tc_ac.start; - alt { - [] t_minRetrans.timeout { - log("*** " & testcasename() & ": Ready for retransmission ***"); - v_retransmitOk := true; - repeat; - } - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - if(v_retransmitOk == true) { - log("*** " & testcasename() & ": LS_REQUEST correctly retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": LS_REQUEST retransmitted too early ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": No LS_REQUEST retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // end TC_GEONW_PON_LOS_BV_06 + * @desc Check LS Request retransmission if no answer is received + *
+            * Pics Selection: PICS_GN_LS_REQ_RETRANSMISSION
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having no Location Table Entry for ItsNodeA and
+            *      the IUT having been requested to send a GUC packet to ItsNodeA
+            *          containing TrafficClass.SCF set to 1
+            *          containing LT field
+            *              indicating value LT1 higher than itsGnLocationServiceTimer and
+            *      the IUT having sent a LS_REQUEST packet
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT does not receive LS_REPLY packet from ItsNodeA and
+            *          before expiration of LT1
+            *      }
+            *      then {
+            *          the IUT retransmits the LS_REQUEST packet
+            *              upon expiry of itsGnLocationServiceTimer
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-06 + * @reference EN 302 636-4-1 [1], clauses 9.3.7.1.3, 9.3.7.1.2 and 9.3.8.2 + */ + testcase TC_GEONW_PON_LOS_TI_06() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOS_TI_06(); + + } // end TC_GEONW_PON_LOS_TI_06 /** - * @desc Test of LS Request retransmission if no answer is received - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having no Location Table Entry for ItsNodeA and
-             *      the IUT having been requested to send a GeoUnicast packet to ItsNodeA
-             *          containing TrafficClass.SCF set to 1
-             *          containing LT field
-             *              indicating value LT1 higher than (itsGnLocationServiceTimer * itsGnLocationServiceMaxRetrans) and
-             *      the IUT having sent a LS_REQUEST packet
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT does not receive LS_REPLY packet from ItsNodeA and
-             *          before expiration of LT1
-             *      }
-             *      then {
-             *          the IUT retransmits the LS_REQUEST packet itsGnLocationServiceMaxRetrans times
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/07 - * @reference EN 302 636-4-1 [1], clauses 9.3.7.1.2, 9.3.7.1.3 and 9.3.8.2 - */ + * @desc Check LS Request retransmission if no answer is received + *
+            * Pics Selection: PICS_GN_LS_REQ_RETRANSMISSION
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having no Location Table Entry for ItsNodeA and
+            *      the IUT having been requested to send a GUC packet to ItsNodeA
+            *          containing TrafficClass.SCF set to 1
+            *          containing LT field
+            *              indicating value LT1 higher than (itsGnLocationServiceTimer * itsGnLocationServiceMaxRetrans) and
+            *      the IUT having sent a LS_REQUEST packet
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT does not receive LS_REPLY packet from ItsNodeA and
+            *          before expiration of LT1
+            *      }
+            *      then {
+            *          the IUT retransmits the LS_REQUEST packet itsGnLocationServiceMaxRetrans times
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-07 + * @reference EN 302 636-4-1 [1], clauses 9.3.7.1.2, 9.3.7.1.3 and 9.3.8.2 + */ testcase TC_GEONW_PON_LOS_BV_07() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorIut; - var integer v_maxNbrRetrans := f_getLsMaxRetrans(); - var integer v_nbLsReceived := 0; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithLifetime( - v_longPosVectorNodeA.gnAddr, - float2int(int2float(v_maxNbrRetrans + 2) * f_getLsRetransmitTimer() * 1000.0))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - v_nbLsReceived := v_nbLsReceived + 1; - if(v_nbLsReceived > v_maxNbrRetrans) { - //first LS request is not counted as a retransmission - log("*** " & testcasename() & ": LS_REQUEST retransmitted more than itsGnLocationServiceMaxRetrans times ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - tc_ac.start; - repeat; - } - } - [] tc_ac.timeout { - if(v_nbLsReceived == (v_maxNbrRetrans)) { - //first LS request is not counted as a retransmission - log("*** " & testcasename() & ": LS_REQUEST retransmitted itsGnLocationServiceMaxRetrans times ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": LS_REQUEST retransmitted less than itsGnLocationServiceMaxRetrans times ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_PON_LOS_BV_07(); } // end TC_GEONW_PON_LOS_BV_07 /** - * @desc Test of LS Reply generation by destination node - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state"
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT receives a LS_REQUEST packet
-             *          containing Request field
-             *              indicating the IUT's GN_ADDR
-             *      }
-             *      then {
-             *          the IUT replies with a LS_REPLY packet
-             *              containing Common Header
-             *                  containing NH field
-             *                      set to '0' (UNSPECIFIED)
-             *                  containing LS_REPLY Extended Header
-             *                      containing DEPV field
-             *                          indicating same position as the SOPV value of the received LS_REQUEST
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/08 - * @reference EN 302 636-4-1 [1], clauses 9.3.7.3 and 9.3.5 - */ + * @desc Check LS Reply generation by destination node + *
+            * Pics Selection: PICS_GN_LS_REQ_DST
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state"
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a LS_REQUEST packet
+            *          containing Request field
+            *              indicating the IUT's GN_ADDR
+            *      }
+            *      then {
+            *          the IUT replies with a LS_REPLY packet
+            *              containing Common Header
+            *                  containing NH field
+            *                      set to '0' (UNSPECIFIED)
+            *                  containing LS_REPLY Extended Header
+            *                      containing DEPV field
+            *                          indicating same position as the SOPV value of the received LS_REQUEST
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-08 + * @reference EN 302 636-4-1 [1], clauses 9.3.7.3 and 9.3.5 + */ testcase TC_GEONW_PON_LOS_BV_08() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorIut; - var GN_Address v_iutGnAddress; - var UInt16 v_seqNbr := vc_localSeqNumber; - var FncRetCode v_ret := e_error; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - v_iutGnAddress := f_getPosition(c_compIut).gnAddr; - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_ret := f_processLocationService(v_longPosVectorNodeA, v_seqNbr, v_iutGnAddress, v_longPosVectorIut); - if (v_ret == e_success) { - log("*** " & testcasename() & ": LS_REPLY packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": LS_REPLY packet not received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_PON_LOS_BV_08(); } // end TC_GEONW_PON_LOS_BV_08 - group GEONW_PON_LOS_BV_09 { - - /** - * @desc Test of no LS Reply generation for already answered LS Request packets - *
-                 * Pics Selection: none
-                 * Config Id: CF02
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT having received a LS_REQUEST packet generated by ItsNodeB from ItsNodeB
-                 *      the IUT having sent a LS_REPLY packet to ItsNodeB
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives the same LS_REQUEST packet from ItsNodeD
-                 *      }
-                 *      then {
-                 *          the IUT does not reply with a LS_REPLY packet
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/09 - * @reference EN 302 636-4-1 [1], clauses 9.3.7.3 and 9.3.5 - */ - testcase TC_GEONW_PON_LOS_BV_09() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_LOS_BV_09_nodeB()); - v_nodeD.start(f_GEONW_PON_LOS_BV_09_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end TC_GEONW_PON_LOS_BV_09 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_LOS_BV_09) - */ - function f_GEONW_PON_LOS_BV_09_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var FncRetCode v_ret := e_error; - - // Preamble - f_prNeighbour(); - v_ret := f_processLocationService( - v_longPosVectorNodeB, - vc_localSeqNumber, - v_longPosVectorIut.gnAddr, - v_longPosVectorIut); - if (v_ret == e_error) { - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - else { - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - // Test Body - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwLsReplyPacket( - mw_longPosVectorPosition_withDelta(v_longPosVectorIut), - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)) - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: LS_REQUEST has not been discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: LS_REQUEST discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_LOS_BV_09_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_LOS_BV_09) - */ - function f_GEONW_PON_LOS_BV_09_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GN_Address v_iutGnAddress := f_getPosition(c_compIut).gnAddr; - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwLsRequestPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - v_iutGnAddress - ) - ) - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwLsReplyPacket( - mw_longPosVectorPosition_withDelta(v_longPosVectorIut), - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)) - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: LS_REQUEST has not been discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: LS_REQUEST discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_LOS_BV_09_nodeD - - } // end GEONW_PON_LOS_BV_09 - - group GEONW_PON_LOS_BV_10 { - - /** - * @desc Test of LS Request forwarding - *
-                 * Pics Selection: none
-                 * 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 LS_REQUEST packet from ItsNodeC
-                 *              containing Basic Header
-                 *                  containing RHL field
-                 *                      indicating value greater than 1
-                 *              containing LS_REQUEST Extended Header
-                 *                  containing Request field
-                 *                      containing GN_ADDR
-                 *                          containing M_ID
-                 *                              indicating value differing from the M_ID part of the GN_ADDR of the IUT
-                 *      }
-                 *      then {
-                 *          the IUT re-broadcasts the received LS_REQUEST packet
-                 *              containing Basic Header
-                 *                  containing RHL field
-                 *                      indicating value decreased by 1
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/10 - * @reference EN 302 636-4-1 [1], clauses 9.3.7.2 - */ - testcase TC_GEONW_PON_LOS_BV_10() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_LOS_BV_10_nodeB()); - v_nodeC.start(f_GEONW_PON_LOS_BV_10_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_LOS_BV_10 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_LOS_BV_10) - */ - function f_GEONW_PON_LOS_BV_10_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwLsRequestPacket( - ?, - v_longPosVectorNodeB.gnAddr.mid - ), - -, - c_defaultHopLimit - 1 - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Re-broadcasted LS Request received with HL field decreased by 1 ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: LS Request was not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_LOS_BV_10_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_LOS_BV_10) - */ - function f_GEONW_PON_LOS_BV_10_nodeC() runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwLsRequestPacket( - f_getPosition(c_compNodeA), - vc_localSeqNumber, - f_getPosition(c_compNodeB).gnAddr - ), - -, - c_defaultHopLimit - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_LOS_BV_10_nodeC + /** + * @desc Check absence of LS Reply generation for already answered LS Request packets + *
+            * Pics Selection: PICS_GN_LS_REQ_DST
+            * Config Id: CF02
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having received a LS_REQUEST packet generated by ItsNodeB from ItsNodeB
+            *      the IUT having sent a LS_REPLY packet to ItsNodeB
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives the same LS_REQUEST packet from ItsNodeD
+            *      }
+            *      then {
+            *          the IUT does not reply with a LS_REPLY packet
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BO-09 + * @reference EN 302 636-4-1 [1], clauses 9.3.7.3 and 9.3.5 + */ + testcase TC_GEONW_PON_LOS_BO_09() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOS_BO_09(); + + } // end TC_GEONW_PON_LOS_BO_09 - } // end GEONW_PON_LOS_BV_10 - group GEONW_PON_LOS_BV_11 { - - /** - * @desc Test of LS Reply forwarding - *
-                 * Pics Selection: none
-                 * 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 LS_REPLY packet from ItsNodeC addressed to ItsNodeB
-                 *              containing Basic Header
-                 *                  containing RHL field
-                 *                      indicating value greater than 1
-                 *      }
-                 *      then {
-                 *          the IUT forwards the received LS_REPLY packet to ItsNodeB
-                 *              containing Basic Header
-                 *                  containing RHL field
-                 *                      indicating value decreased by 1
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/11 - * @reference EN 302 636-4-1 [1], clauses 9.3.7.2 - */ - testcase TC_GEONW_PON_LOS_BV_11() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_LOS_BV_11_nodeB()); - v_nodeC.start(f_GEONW_PON_LOS_BV_11_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_LOS_BV_11 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_LOS_BV_11) - */ - function f_GEONW_PON_LOS_BV_11_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwLsReplyPacket( - mw_longPosVectorPosition(v_longPosVectorNodeA), - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)) - ), - -, - c_defaultHopLimit - 1 - ) - ) - ) { - log("*** " & testcasename() & ": PASS: Forwarded LS Reply received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: LS Reply was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_LOS_BV_11_nodeB + /** + * @desc Check LS Request forwarding + *
+            * Pics Selection: PICS_GN_LS_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 LS_REQUEST packet from ItsNodeC
+            *              containing Basic Header
+            *                  containing RHL field
+            *                      indicating value greater than 1
+            *              containing LS_REQUEST Extended Header
+            *                  containing Request field
+            *                      containing GN_ADDR
+            *                          containing M_ID
+            *                              indicating value differing from the M_ID part of the GN_ADDR of the IUT
+            *      }
+            *      then {
+            *          the IUT re-broadcasts the received LS_REQUEST packet
+            *              containing Basic Header
+            *                  containing RHL field
+            *                      indicating value decreased by 1
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-10 + * @reference EN 302 636-4-1 [1], clauses 9.3.7.2 + */ + testcase TC_GEONW_PON_LOS_BV_10() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOS_BV_10(); + + } // end TC_GEONW_PON_LOS_BV_10 - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_LOS_BV_11) - */ - function f_GEONW_PON_LOS_BV_11_nodeC() runs on ItsGeoNetworking { - - // Local variables - - // Preamble - f_prNeighbour(); - - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwLsReplyPacket( - f_getPosition(c_compNodeA), - f_longPosVector2ShortPosVector(f_getPosition(c_compNodeB)), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_LOS_BV_11_nodeC + /** + * @desc Check LS Reply forwarding + *
+            * Pics Selection: PICS_GN_LS_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 LS_REPLY packet from ItsNodeC addressed to ItsNodeB
+            *              containing Basic Header
+            *                  containing RHL field
+            *                      indicating value greater than 1
+            *      }
+            *      then {
+            *          the IUT forwards the received LS_REPLY packet to ItsNodeB
+            *              containing Basic Header
+            *                  containing RHL field
+            *                      indicating value decreased by 1
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-11 + * @reference EN 302 636-4-1 [1], clauses 9.3.7.2 + */ + testcase TC_GEONW_PON_LOS_BV_11() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_LOS_BV_11(); + + } // end TC_GEONW_PON_LOS_BV_11 - } // end GEONW_PON_LOS_BV_11 - /** - * @desc Test flushing of the LS buffer, initiated by the processing of a common header from the target destination - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having no Location Table Entry for ItsNodeA and
-             *      the IUT having been requested to send a GeoUnicast packet ItsNodeA
-             *          containing LT field
-             *              indicating LT1 and
-             *      the IUT having sent a LS_REQUEST packet
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT receives a GeoUnicast packet addressed to it from ItsNodeA before expiry of LT1
-             *      }
-             *      then {
-             *          the IUT sends the waiting GeoUnicast packet to ItsNodeA
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/12 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.7.1.2 and 7.4.2 - */ + * @desc Check flushing of the LS buffer, initiated by the processing of a common header from the target destination + *
+            * Pics Selection: PICS_GN_LS_REQ_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having no Location Table Entry for ItsNodeA and
+            *      the IUT having been requested to send a GUC packet ItsNodeA
+            *          containing LT field
+            *              indicating LT1 and
+            *      the IUT having sent a LS_REQUEST packet
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a GUC packet addressed to it from ItsNodeA before expiry of LT1
+            *      }
+            *      then {
+            *          the IUT sends the waiting GUC packet to ItsNodeA
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-12 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.7.1.2 and 7.4.2 + */ testcase TC_GEONW_PON_LOS_BV_12() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorIut; - var UInt16 v_seqNbr := vc_localSeqNumber; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ) - ) - ); - - tc_ac.start; - alt { - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoUnicast packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_PON_LOS_BV_12(); } // end TC_GEONW_PON_LOS_BV_12 /** - * @desc Test of LS buffer characteristics: FIFO type and Lifetime - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having no Location Table Entry for ItsNodeA and
-             *      the IUT having been requested to send a GeoUnicast packet to ItsNodeA
-             *          containing TrafficClass.SCF set to 1
-             *          containing LT field
-             *              indicating value LT1
-             *          containing payload field
-             *              indicating value PL1 and
-             *      the IUT having sent a LS_REQUEST packet and
-             *      the IUT having been requested to send a second GeoUnicast packet to ItsNodeA
-             *          containing TrafficClass.SCF set to 1
-             *          containing LT field
-             *              indicating LT2 lower than LT1
-             *          containing payload field
-             *              indicating value PL2
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT receives the LS_REPLY packet from ItsNodeA
-             *              after expiry of LT2
-             *              before expiry of LT1
-             *      }
-             *      then {
-             *          the IUT sends GeoUnicast packet addressed to ItsNodeA
-             *              containing payload field
-             *                  indicating value PL1
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/13 - * @reference EN 302 636-4-1 [1], clauses 7.4.3, 9.3.7.1.2 - */ + * @desc Check LS buffer characteristics: FIFO type and Lifetime + *
+            * Pics Selection: PICS_GN_LS_REQ_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having no Location Table Entry for ItsNodeA and
+            *      the IUT having been requested to send a GUC packet to ItsNodeA
+            *          containing TrafficClass.SCF set to 1
+            *          containing LT field
+            *              indicating value LT1
+            *          containing payload field
+            *              indicating value PL1 and
+            *      the IUT having sent a LS_REQUEST packet and
+            *      the IUT having been requested to send a second GUC packet to ItsNodeA
+            *          containing TrafficClass.SCF set to 1
+            *          containing LT field
+            *              indicating LT2 lower than LT1
+            *          containing payload field
+            *              indicating value PL2
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives the LS_REPLY packet from ItsNodeA
+            *              after expiry of LT2
+            *              before expiry of LT1
+            *      }
+            *      then {
+            *          the IUT sends GUC packet addressed to ItsNodeA
+            *              containing payload field
+            *                  indicating value PL1
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-13 + * @reference EN 302 636-4-1 [1], clauses 7.4.3, 9.3.7.1.2 + */ testcase TC_GEONW_PON_LOS_BV_13() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorIut; - var integer v_lt1 := f_getLsMaxRetrans()*float2int(f_getLsRetransmitTimer()); - var integer v_lt2 := float2int(int2float(v_lt1)/2.0); - var octetstring v_payload1 := char2oct("PAYLOAD_1"); - var octetstring v_payload2 := char2oct("PAYLOAD_2"); - var boolean v_msg1Received := false; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithLifetimeWithPayload(v_longPosVectorNodeA.gnAddr, v_lt2*1000, v_payload2)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithLifetimeWithPayload(v_longPosVectorNodeA.gnAddr, v_lt1*1000, v_payload1)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - //Send LS-REPLY after LT2 expiry - f_sleepIgnoreDef(int2float(v_lt2)); - - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwLsReplyPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ) - ) - ); - - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - log("*** " & testcasename() & ": INFO: LS Request retransmission ignored ***"); - repeat; - } - [] geoNetworkingPort.receive( - f_receiveGeoNetMessageWithPayload( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ), - f_adaptPayload_mw(v_payload1) - ) - ) { - v_msg1Received := true; - repeat; - } - [] geoNetworkingPort.receive( - f_receiveGeoNetMessageWithPayload( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ), - f_adaptPayload_mw(v_payload2) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: message with elapsed lifetime received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - if(v_msg1Received == true) { - log("*** " & testcasename() & ": PASS: message with running lifetime received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: message with running lifetime not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - + + f_GEONW_PON_LOS_BV_13(); + } // end TC_GEONW_PON_LOS_BV_13 /** - * @desc Test that GeoNetworking packets in LS buffer are discarded when LS does not complete - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having no Location Table Entry for ItsNodeA and
-             *      the IUT having been requested to send a GeoUnicast packet to ItsNodeA
-             *          containing TrafficClass.SCF set to 1
-             *          containing LT field
-             *              indicating value LT1 higher than (itsGnLocationServiceTimer * itsGnLocationServiceMaxRetrans) and
-             *      the IUT having sent a LS_REQUEST packet itsGnLocationServiceMaxRetrans times
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT receives a GUC packet from ItsNodeA
-             *              before expiration of LT1
-             *      }
-             *      then {
-             *          the IUT does not send any packet to ItsNodeA (see note)
-             *      }
-             *  }
-             *  NOTE: Stored GeoUnicast packets have been discarded upon LS failure
-             *  
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/14 - * @reference EN 302 636-4-1 [1], clauses 7.4.3 - */ + * @desc Check that GeoNetworking packets in LS buffer are discarded when LS does not complete. + *
+            * Pics Selection: PICS_GN_LS_REQ_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having no Location Table Entry for ItsNodeA and
+            *      the IUT having been requested to send a GUC packet to ItsNodeA
+            *          containing TrafficClass.SCF set to 1
+            *          containing LT field
+            *              indicating value LT1 higher than (itsGnLocationServiceTimer * itsGnLocationServiceMaxRetrans) and
+            *      the IUT having sent a LS_REQUEST packet itsGnLocationServiceMaxRetrans times
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a GUC packet from ItsNodeA
+            *              before expiration of LT1
+            *      }
+            *      then {
+            *          the IUT does not send any packet to ItsNodeA (see note)
+            *      }
+            *  }
+            *  NOTE: Stored GUC packets have been discarded upon LS failure
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-14 + * @reference EN 302 636-4-1 [1], clauses 7.4.3 + */ testcase TC_GEONW_PON_LOS_BV_14() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorIut; - var integer v_maxNbrRetrans := f_getLsMaxRetrans(); - var integer v_nbLsReceived := 0; - var UInt16 v_LT1; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - v_LT1 := float2int(int2float(v_maxNbrRetrans + 2) * f_getLsRetransmitTimer() * 1000.0); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithLifetime(v_longPosVectorNodeA.gnAddr,v_LT1)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - - tc_wait.start(int2float(v_LT1)); - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - v_nbLsReceived := v_nbLsReceived + 1; - if(v_nbLsReceived > v_maxNbrRetrans) { - //first LS request is not counted as a retransmission - log("*** " & testcasename() & ": Pre-conditions: LS_REQUEST retransmitted more than itsGnLocationServiceMaxRetrans times ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - else { - tc_ac.start; - repeat; - } - } - [] tc_ac.timeout { - if(v_nbLsReceived == (v_maxNbrRetrans)) { - //first LS request is not counted as a retransmission - log("*** " & testcasename() & ": Pre-conditions: LS_REQUEST retransmitted itsGnLocationServiceMaxRetrans times ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - else { - log("*** " & testcasename() & ": Pre-conditions: LS_REQUEST retransmitted less than itsGnLocationServiceMaxRetrans times ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - } - } - - // Test Body - if (tc_wait.running) { - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ) - ) - ); - tc_wait.stop; - - tc_noac.start; - alt { - // no check for ItsNodeA address as no other trigger for messages exists - [] geoNetworkingPort.receive { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Unexpected message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message was sent ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - } - else { - log("*** " & testcasename() & ": FAIL: LT1 expired ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); - + + f_GEONW_PON_LOS_BV_14(); + } // end TC_GEONW_PON_LOS_BV_14 /** - * @desc Test flushing of the LS buffer, initiated by the processing of a common header from the target destination - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *  	the IUT being in the "initial state" and
-             *  	the IUT having no Location Table Entry for ItsNodeA and
-             *  	the IUT having been requested to send a GeoUnicast packet ItsNodeA
-             *  		containing LT field
-             *  			indicating LT1 and
-             *  	the IUT having sent a LS_REQUEST packet
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *  	when {
-             *  		the IUT receives a GeoUnicast packet addressed to ItsNodeB from ItsNodeA before expiry of LT1
-             *  	}
-             *  	then {
-             *  		the IUT sends the waiting GeoUnicast packet to ItsNodeA
-             *  	}
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/15 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.3, 9.3.7.1.2 and 7.4.2 - */ + * @desc Check flushing of the LS buffer, initiated by the processing of a common header from the target destination + *
+            * Pics Selection: PICS_GN_LS_REQ_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *  	the IUT being in the "initial state" and
+            *  	the IUT having no Location Table Entry for ItsNodeA and
+            *  	the IUT having been requested to send a GUC packet ItsNodeA
+            *  		containing LT field
+            *  			indicating LT1 and
+            *  	the IUT having sent a LS_REQUEST packet
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *  	when {
+            *  		the IUT receives a GUC packet addressed to ItsNodeB from ItsNodeA before expiry of LT1
+            *  	}
+            *  	then {
+            *  		the IUT sends the waiting GUC packet to ItsNodeA
+            *  	}
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-15 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.3, 9.3.7.1.2 and 7.4.2 + */ testcase TC_GEONW_PON_LOS_BV_15() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - var UInt16 v_seqNbr := vc_localSeqNumber; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorNodeB), - vc_localSeqNumber - ) - ) - ) - ); - - tc_ac.start; - alt { - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoUnicast packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_PON_LOS_BV_15(); } // end TC_GEONW_PON_LOS_BV_15 /** - * @desc Test of LS Request retransmission termination when indirect response is received - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *  	the IUT being in the "initial state" and
-             *  	the IUT having no Location Table Entry for ItsNodeA and
-             *  	the IUT having been requested to send a GeoUnicast packet to ItsNodeA
-             *  		containing TrafficClass.SCF set to 1
-             *  		containing LT field
-             *  			indicating value LT1 higher than (itsGnLocationServiceTimer * itsGnLocationServiceMaxRetrans) and
-             *  	the IUT having sent a LS_REQUEST packet
-             *  	the IUT having retransmitted the LS_REQUEST packet less than itsGnLocationServiceMaxRetrans
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *  	when {
-             *  		the IUT receives a GeoUnicast packet addressed to it from ItsNodeA before expiry of LT1
-             *  	}
-             *  	then {
-             *  		the IUT does not retransmits the LS_REQUEST packet
-             *  	}
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/16 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.7.1.2, 9.3.7.1.3 and 9.3.8.2 - */ + * @desc Check LS Request retransmission termination when indirect response is received + *
+            * Pics Selection: PICS_GN_LS_REQ_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *  	the IUT being in the "initial state" and
+            *  	the IUT having no Location Table Entry for ItsNodeA and
+            *  	the IUT having been requested to send a GUC packet to ItsNodeA
+            *  		containing TrafficClass.SCF set to 1
+            *  		containing LT field
+            *  			indicating value LT1 higher than (itsGnLocationServiceTimer * itsGnLocationServiceMaxRetrans) and
+            *  	the IUT having sent a LS_REQUEST packet
+            *  	the IUT having retransmitted the LS_REQUEST packet less than itsGnLocationServiceMaxRetrans
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *  	when {
+            *  		the IUT receives a GUC packet addressed to it from ItsNodeA before expiry of LT1
+            *  	}
+            *  	then {
+            *  		the IUT does not retransmits the LS_REQUEST packet
+            *  	}
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-16 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.4, 9.3.7.1.2, 9.3.7.1.3 and 9.3.8.2 + */ testcase TC_GEONW_PON_LOS_BV_16() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - var UInt16 v_seqNbr := vc_localSeqNumber; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ) - ) - ); - - tc_noac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: LS Request retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { - log("*** " & testcasename() & ": INFO: GeoUnicast packet received ***"); - repeat; - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: LS Request not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_PON_LOS_BV_16(); } // end TC_GEONW_PON_LOS_BV_16 /** - * @desc Test of LS Request retransmission termination when indirect response is received - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *  	the IUT being in the "initial state" and
-             *  	the IUT having no Location Table Entry for ItsNodeA and
-             *  	the IUT having been requested to send a GeoUnicast packet to ItsNodeA
-             *  		containing TrafficClass.SCF set to 1
-             *  		containing LT field
-             *  			indicating value LT1 higher than (itsGnLocationServiceTimer * itsGnLocationServiceMaxRetrans) and
-             *  	the IUT having sent a LS_REQUEST packet
-             *  	the IUT having retransmitted the LS_REQUEST packet less than itsGnLocationServiceMaxRetrans
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *  	when {
-             *  		the IUT receives a GeoUnicast packet addressed to ItsNodeB from ItsNodeA before expiry of LT1
-             *  	}
-             *  	then {
-             *  		the IUT does not retransmits the LS_REQUEST packet
-             *  	}
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV/17 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.3, 9.3.7.1.2, 9.3.7.1.3 and 9.3.8.2 - */ + * @desc Check LS Request retransmission termination when indirect response is received + *
+            * Pics Selection: PICS_GN_LS_REQ_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *  	the IUT being in the "initial state" and
+            *  	the IUT having no Location Table Entry for ItsNodeA and
+            *  	the IUT having been requested to send a GUC packet to ItsNodeA
+            *  		containing TrafficClass.SCF set to 1
+            *  		containing LT field
+            *  			indicating value LT1 higher than (itsGnLocationServiceTimer * itsGnLocationServiceMaxRetrans) and
+            *  	the IUT having sent a LS_REQUEST packet
+            *  	the IUT having retransmitted the LS_REQUEST packet less than itsGnLocationServiceMaxRetrans
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *  	when {
+            *  		the IUT receives a GUC packet addressed to ItsNodeB from ItsNodeA before expiry of LT1
+            *  	}
+            *  	then {
+            *  		the IUT does not retransmits the LS_REQUEST packet
+            *  	}
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/LOS/BV-17 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.3, 9.3.7.1.2, 9.3.7.1.3 and 9.3.8.2 + */ testcase TC_GEONW_PON_LOS_BV_17() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - var UInt16 v_seqNbr := vc_localSeqNumber; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorNodeB), - vc_localSeqNumber - ) - ) - ) - ); - - tc_noac.start; - alt { - [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: LS Request retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { - log("*** " & testcasename() & ": INFO: GeoUnicast packet received ***"); - repeat; - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: LS Request not retransmitted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_PON_LOS_BV_17(); } // end TC_GEONW_PON_LOS_BV_17 @@ -4902,14002 +2204,3553 @@ module ItsGeoNetworking_TestCases { // 6.2.2.5 group geoForwardingPacketBuffer { - group GEONW_PON_FPB_BV_01 { - - /** - * @desc Test of Source packet buffering into UC forwarding buffer for unreachable Unicast destinations - * (absence of a suitable next hop candidate) - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received any Beacon information from ItsNodeB and
-                 *      the IUT having a Location Table Entry for ItsNodeA (see note) and
-                 *      the IUT having been requested to send a GeoUnicast packet addressed to ItsNodeA
-                 *          containing TrafficClass.SCF set to 1
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a Beacon packet from ItsNodeB
-                 *      }
-                 *      then {
-                 *          the IUT selects the ItsNodeB as the next hop and
-                 *          the IUT sends the buffered GeoUnicast packet
-                 *      }
-                 *  }
-                 *  NOTE: Location Table Entry is created by sending any GeoNetworking packet, originated by ItsNodeA, from ItsNodeC to IUT
-                 *  
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/01 - * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3, 9.3.4.2 and 9.3.8.3 - */ - testcase TC_GEONW_PON_FPB_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_01_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_01_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_FPB_BV_01 + /** + * @desc Check Source packet buffering into UC forwarding buffer for unreachable Unicast destinations + * (absence of a suitable next hop candidate) + *
+            * Pics Selection: PICS_GN_GUC_SRC
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received any Beacon information from ItsNodeB and
+            *      the IUT having a Location Table Entry for ItsNodeA (see note) and
+            *      the IUT having been requested to send a GUC packet addressed to ItsNodeA
+            *          containing TrafficClass.SCF set to 1
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a Beacon packet from ItsNodeB
+            *      }
+            *      then {
+            *          the IUT selects the ItsNodeB as the next hop and
+            *          the IUT sends the buffered GUC packet
+            *      }
+            *  }
+            *  NOTE: Location Table Entry is created by sending any GeoNetworking packet, originated by ItsNodeA, from ItsNodeC to IUT
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-01 + * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3, 9.3.4.2 and 9.3.8.3 + */ + testcase TC_GEONW_PON_FPB_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_01(); + + } // end TC_GEONW_PON_FPB_BV_01 + + /** + * @desc Check Forwarder packet buffering into UC forwarding buffer for unreachable Unicast destinations + * (absence of a suitable next hop candidate) + *
+            * Pics Selection: PICS_GN_GUC_SRC
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received any Beacon information from ItsNodeB and
+            *      the IUT having received GUC packets addressed to ItsNodeA from ItsNodeC
+            *          containing TrafficClass.SCF set to 1
+            *          containing Basic Header
+            *              containing LT field
+            *                  indicating LT1
+            *              containing RHL field
+            *                  indicating value greater than 1
+            *          containing GUC Extended Header
+            *              containing SN field
+            *                  indicating value SN1
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a Beacon packet from ItsNodeB
+            *      }
+            *      then {
+            *          the IUT selects the ItsNodeB as the next hop and
+            *          the IUT forwards the buffered GUC packet
+            *              containing Basic Header
+            *                  containing RHL field
+            *                      indicating value decreased by 1
+            *              containing GUC Extended Header
+            *                  containing SN field
+            *                      indicating value SN1
+            *      }
+            *   }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-02 + * @reference EN 302 636-4-1 [1], clauses 9.3.8.3, 7.5.3, 9.3.6.3 + */ + testcase TC_GEONW_PON_FPB_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_02(); + + } // end TC_GEONW_PON_FPB_BV_02 + + /** + * @desc Check UC forwarding buffer characteristics: FIFO type + *
+            * Pics Selection: PICS_GN_GUC_SRC
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received any Beacon information from ItsNodeB and
+            *      the IUT having received a GUC (GEOUNI1) packet addressed to ItsNodeA from ItsNodeC
+            *          containing TrafficClass.SCF set to 1
+            *          containing Basic Header
+            *              containing LT field
+            *                  indicating value LT1 and
+            *              containing RHL field
+            *                  indicating value greater than 1
+            *          containing GUC Extended Header
+            *              containing SN field
+            *                  indicating value SN1
+            *      the IUT having received a second GUC (GEOUNI2) packet addressed to ItsNodeA from ItsNodeC
+            *          containing TrafficClass.SCF set to 1
+            *          containing Basic Header
+            *              containing LT field
+            *                  indicating LT2
+            *              containing RHL field
+            *                  indicating value greater than 1
+            *          containing GUC Extended Header
+            *              containing SN field
+            *                  indicating value SN2
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a Beacon packet from ItsNodeB
+            *          before expiry of LT1 and LT2
+            *      }
+            *      then {
+            *          the IUT selects ItsNodeB as the next hop and
+            *          the IUT forwards the GEOUNI1 buffered packet
+            *              containing GUC Extended Header
+            *                  containing SN field
+            *                      indicating value SN1
+            *          the IUT forwards the GEOUNI2 buffered packet
+            *              containing GUC Extended Header
+            *                  containing SN field
+            *                      indicating value SN2
+            *      }
+            *   }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-03 + * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.8.3 + */ + testcase TC_GEONW_PON_FPB_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_03(); + + } // end TC_GEONW_PON_FPB_BV_03 - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_01) - */ - function f_GEONW_PON_FPB_BV_01_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prDefault(); // NodeB is not yet a neighbour - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleepIgnoreDef(1.0); - f_startBeingNeighbour(); - - tc_ac.start; - alt { - [] a_receiveAnyLsRequest() { - tc_ac.stop; - log("*** " & testcasename() & ": INCONC: Received Location Service Request ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ?)))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: packet correctly forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_FPB_BV_01_nodeB + /** + * @desc Check UC forwarding buffer characteristics: discarding upon LT expiration + *
+            * Pics Selection: PICS_GN_GUC_SRC
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received any 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 LT field
+            *                  indicating LT1
+            *              containing RHL field
+            *                  indicating value greater than 1
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a Beacon packet from ItsNodeB
+            *          after expiry of LT1
+            *      }
+            *      then {
+            *          the IUT does not forward the buffered GUC packet addressed to ItsNodeA
+            *      }
+            *   }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-03 + * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.8.3 + */ + testcase TC_GEONW_PON_FPB_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_04(); + + } // end TC_GEONW_PON_FPB_BV_04 - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_01) - */ - function f_GEONW_PON_FPB_BV_01_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNeighbour(); - - // Make sure IUT has LocE for NodeA by sending unsolicited LS_REPLY - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu( - m_geoNwLsReplyPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ))); - - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - // /!\ This pre-condition has impact on test body - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GeoUnicast packet received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_FPB_BV_01_nodeC + /** + * @desc Check Source packet buffering into BC forwarding buffer for no GBCrecipients + *
+            * Pics Selection: PICS_GN_TSB_SRC
+            * Config Id: CF02
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received Beacon information from ItsNodeD and
+            *      the IUT not having received Beacon information from ItsNodeB and
+            *      the IUT having been requested to send a TSB packet
+            *          containing TrafficClass.SCF set to 1
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a Beacon packet from either ItsNodeB or ItsNodeD
+            *      }
+            *      then {
+            *          the IUT broadcasts the buffered TSB packet
+            *      }
+            *   }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-06 + * @reference EN 302 636-4-1 [1], clauses 9.3.5, 7.5.3, 9.3.6.3 and 9.3.11.2 + */ + testcase TC_GEONW_PON_FPB_BV_06() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_06(); + + } // end TC_GEONW_PON_FPB_BV_06 - } // end GEONW_PON_FPB_BV_01 - - group GEONW_PON_FPB_BV_02 { - - /** - * @desc Test of Forwarder packet buffering into UC forwarding buffer for unreachable Unicast destinations - * (absence of a suitable next hop candidate) - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received any Beacon information from ItsNodeB and
-                 *      the IUT having received GeoUnicast packets addressed to ItsNodeA from ItsNodeC
-                 *          containing TrafficClass.SCF set to 1
-                 *          containing Basic Header
-                 *              containing LT field
-                 *                  indicating LT1
-                 *              containing RHL field
-                 *                  indicating value greater than 1
-                 *          containing GUC Extended Header
-                 *              containing SN field
-                 *                  indicating value SN1
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a Beacon packet from ItsNodeB
-                 *      }
-                 *      then {
-                 *          the IUT selects the ItsNodeB as the next hop and
-                 *          the IUT forwards the buffered GeoUnicast packet
-                 *              containing Basic Header
-                 *                  containing RHL field
-                 *                      indicating value decreased by 1
-                 *              containing GUC Extended Header
-                 *                  containing SN field
-                 *                      indicating value SN1
-                 *      }
-                 *   }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/02 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.3, 7.5.3, 9.3.6.3 - */ - testcase TC_GEONW_PON_FPB_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - const UInt16 c_sequenceNumberC := f_getInitialSequenceNumber(); - - // Test control - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_02_nodeB(c_sequenceNumberC)); - v_nodeC.start(f_GEONW_PON_FPB_BV_02_nodeC(c_sequenceNumberC)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_FPB_BV_02 + /** + * @desc Check BC forwarding buffer characteristics: FIFO type + *
+            * Pics Selection: PICS_GN_TSB_SRC
+            * Config Id: CF02
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received Beacon information from ItsNodeD and
+            *      the IUT not having received Beacon information from ItsNodeB and
+            *      the IUT having been requested to send a TSB (TSB1) packet
+            *          containing TrafficClass.SCF set to 1
+            *          containing Basic Header
+            *              containing LT field
+            *                  indicating LT1
+            *          containing TSB Extended Header
+            *              containing SN field
+            *                  indicating value SN1
+            *      the IUT having been requested to send a TSB (TSB2) packet
+            *          containing TrafficClass.SCF set to 1
+            *          containing Basic Header
+            *              containing LT field
+            *                  indicating LT2
+            *          containing TSB Extended Header
+            *              containing SN field
+            *                  indicating value SN2
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a Beacon packet from either ItsNodeD or ItsNodeB
+            *          before expiry of LT1 and LT2
+            *      }
+            *      then {
+            *          the IUT broadcasts TSB1 packet
+            *              containing TSB Extended Header
+            *                  containing SN field
+            *                      indicating value SN1
+            *          the IUT broadcasts TSB2 packet
+            *              containing TSB Extended Header
+            *                  containing SN field
+            *                      indicating value SN2
+            *      }
+            *   }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-07 + * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.11.2 + */ + testcase TC_GEONW_PON_FPB_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_07(); + + } // end TC_GEONW_PON_FPB_BV_07 - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_02) - */ - function f_GEONW_PON_FPB_BV_02_nodeB(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prDefault(); // NodeB is not yet a neighbour - vc_localSeqNumber := p_sequenceNumberC; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(1.0); - f_startBeingNeighbour(); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - 1 - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Packet correctly forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); + /** + * @desc Check BC forwarding buffer characteristics: discarding upon LT expiration + *
+            * Pics Selection: PICS_GN_TSB_SRC
+            * Config Id: CF02
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received Beacon information from ItsNodeD and
+            *      the IUT not having received Beacon information from ItsNodeB and
+            *      the IUT having been requested to send a TSB (TSB1) packet
+            *          containing TrafficClass.SCF set to 1
+            *          containing Basic Header
+            *              containing LT field
+            *                  indicating LT1
+            *      the IUT having been requested to send a TSB (TSB2) packet
+            *          containing TrafficClass.SCF set to 1
+            *          containing Basic Header
+            *              containing LT field
+            *                  indicating LT2
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a Beacon packet from either ItsNodeB or ItsNodeD
+            *          after expiry of LT1 and LT2
+            *      }
+            *      then {
+            *          the IUT does not broadcast any of the buffered TSB1 and TSB2
+            *      }
+            *   }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-08 + * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.11.2 + */ + testcase TC_GEONW_PON_FPB_BV_08() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_08(); - } // end f_GEONW_PON_FPB_BV_02_nodeB + } // end TC_GEONW_PON_FPB_BV_08 + + /** + * @desc Check Source packet buffering into UC forwarding buffer for handling of LT fields in absence of a suitable next hop candidate + *
+            * Pics Selection: PICS_GN_GUC_SRC
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received any Beacon information from ItsNodeB and
+            *      the IUT having a Location Table Entry for ItsNodeA and
+            *      the IUT having been requested to send a GUC packet addressed to ItsNodeA
+            *          containing TrafficClass.SCF set to 1
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a Beacon packet from ItsNodeB
+            *      }
+            *      then {
+            *          the IUT selects the ItsNodeB as the next hop and
+            *          the IUT sends the buffered GUC packet
+            *              containing GUC Extended Header
+            *                  containing LT field
+            *                      indicating (default LT value – WaitingTime(see note))
+            *      }
+            *  }
+            *  NOTE: WaitingTime == time difference between Upper layer packet generation and the neighbour Beacon reception
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-09 + * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.8.2 + */ + testcase TC_GEONW_PON_FPB_BV_09() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_09(); + + } // end TC_GEONW_PON_FPB_BV_09 - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_02) - */ - function f_GEONW_PON_FPB_BV_02_nodeC(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - vc_localSeqNumber := p_sequenceNumberC; - - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeC, - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - ) - ) - ); - - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_FPB_BV_02_nodeC + /** + * @desc Check Source packet buffering into BC forwarding buffer for handling of LT fields for no recipients + *
+            * Pics Selection: PICS_GN_TSB_SRC
+            * Config Id: CF02
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received Beacon information from ItsNodeD and
+            *      the IUT not having received Beacon information from ItsNodeB and
+            *      the IUT having been requested to send a TSB packet
+            *          containing TrafficClass.SCF set to 1
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a Beacon packet from either ItsNodeB or ItsNodeD
+            *      }
+            *      then {
+            *          the IUT broadcasts the buffered TSB packet
+            *              containing TSB Extended Header
+            *                  containing LT field
+            *                      indicating (default LT value - WaitingTime (see note))
+            *      }
+            *  }
+            *  NOTE: WaitingTime == time difference between Upper layer packet generation and the neighbour Beacon reception
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-10 + * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.11.2 + */ + testcase TC_GEONW_PON_FPB_BV_10() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_10(); + + } // end TC_GEONW_PON_FPB_BV_10 - } // end GEONW_PON_FPB_BV_02 - - group GEONW_PON_FPB_BV_03 { - - /** - * @desc Test of UC forwarding buffer characteristics: FIFO type - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received any Beacon information from ItsNodeB and
-                 *      the IUT having received a GeoUnicast (GEOUNI1) packet addressed to ItsNodeA from ItsNodeC
-                 *          containing TrafficClass.SCF set to 1
-                 *          containing Basic Header
-                 *              containing LT field
-                 *                  indicating value LT1 and
-                 *              containing RHL field
-                 *                  indicating value greater than 1
-                 *          containing GUC Extended Header
-                 *              containing SN field
-                 *                  indicating value SN1
-                 *      the IUT having received a second GeoUnicast (GEOUNI2) packet addressed to ItsNodeA from ItsNodeC
-                 *          containing TrafficClass.SCF set to 1 
-                 *          containing Basic Header
-                 *              containing LT field
-                 *                  indicating LT2
-                 *              containing RHL field
-                 *                  indicating value greater than 1
-                 *          containing GUC Extended Header
-                 *              containing SN field
-                 *                  indicating value SN2
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a Beacon packet from ItsNodeB
-                 *          before expiry of LT1 and LT2
-                 *      }
-                 *      then {
-                 *          the IUT selects ItsNodeB as the next hop and
-                 *          the IUT forwards the GEOUNI1 buffered packet
-                 *              containing GUC Extended Header
-                 *                  containing SN field
-                 *                      indicating value SN1
-                 *          the IUT forwards the GEOUNI2 buffered packet
-                 *              containing GUC Extended Header
-                 *                  containing SN field
-                 *                      indicating value SN2
-                 *      }
-                 *   }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/03 - * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.8.3 - */ - testcase TC_GEONW_PON_FPB_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - const UInt16 c_sequenceNumberC := f_getInitialSequenceNumber(); - const integer c_messageCount := 2; - - // Test control - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_03_nodeB(c_sequenceNumberC, c_messageCount)); - v_nodeC.start(f_GEONW_PON_FPB_BV_03_nodeC(c_sequenceNumberC, c_messageCount)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_FPB_BV_03 + /** + * @desc Check immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled + *
+            * Pics Selection: PICS_GN_GUC_SRC
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received any Beacon information from ItsNodeB and
+            *      the IUT having a Location Table Entry for ItsNodeA (see note)
+            *  }
+            *
+            *  MESSAGE : GUC packet addressed to ItsNodeA
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a MESSAGE
+            *          containing TrafficClass.SCF set to 0
+            *      }
+            *      then {
+            *          the IUT broadcast the MESSAGE immediately
+            *      }
+            *  }
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-11-X + * @reference EN 302 636-4-1 [1], Annex D2 + */ + testcase TC_GEONW_PON_FPB_BV_11_01() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_11_01(); + + } // end TC_GEONW_PON_FPB_BV_11_01 + + /** + * @desc Check immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled + *
+            * Pics Selection: PICS_GN_GAC_SRC
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received any Beacon information from ItsNodeB and
+            *      the IUT having a Location Table Entry for ItsNodeA (see note)
+            *  }
+            *
+            *  MESSAGE : GAC packet
+            *                containing DestinationArea
+            *                    indicating AREA2
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a MESSAGE
+            *          containing TrafficClass.SCF set to 0
+            *      }
+            *      then {
+            *          the IUT broadcast the MESSAGE immediately
+            *      }
+            *  }
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-11-X + * @reference EN 302 636-4-1 [1], Annex D2 + */ + testcase TC_GEONW_PON_FPB_BV_11_02() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_11_02(); + + } // end TC_GEONW_PON_FPB_BV_11_02 - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_03) - */ - function f_GEONW_PON_FPB_BV_03_nodeB(in UInt16 p_sequenceNumberC, in integer p_messageCount) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GeoNetworkingInd v_geoNetInd; - var UInt16 v_expectedSequenceNumber := p_sequenceNumberC; - var integer v_nbReceivedPackets := 0; - - // Preamble - f_prDefault(); // NodeB is not yet a neighbour - vc_multipleMessagesCount := p_messageCount; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(1.0); - f_startBeingNeighbour(); - - tc_ac.start; - alt { - [] a_receiveGeoUnicast( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - v_expectedSequenceNumber) { - tc_ac.stop; - v_nbReceivedPackets := v_nbReceivedPackets + 1; - if(v_nbReceivedPackets >= vc_multipleMessagesCount) { - log("*** " & testcasename() & ": PASS: GeoUnicast packets received in correct order ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - v_expectedSequenceNumber := v_expectedSequenceNumber + 1; - tc_ac.start; - repeat; - } - } - [] a_receiveGeoUnicast( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ?) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: GeoUnicast packet received in incorrect order ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_FPB_BV_03_nodeB + /** + * @desc Check immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled + *
+            * Pics Selection: PICS_GN_GBC_SRC
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received any Beacon information from ItsNodeB and
+            *      the IUT having a Location Table Entry for ItsNodeA (see note)
+            *  }
+            *
+            *  MESSAGE : GBC packet
+            *                containing DestinationArea
+            *                    indicating AREA2
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a MESSAGE
+            *          containing TrafficClass.SCF set to 0
+            *      }
+            *      then {
+            *          the IUT broadcast the MESSAGE immediately
+            *      }
+            *  }
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-11-X + * @reference EN 302 636-4-1 [1], Annex D2 + */ + testcase TC_GEONW_PON_FPB_BV_11_03() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_11_03(); + + } // end TC_GEONW_PON_FPB_BV_11_03 - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_03) - */ - function f_GEONW_PON_FPB_BV_03_nodeC(in UInt16 p_sequenceNumberC, in integer p_messageCount) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var integer i := 0; - - // Preamble - f_prNeighbour(); - vc_localSeqNumber := p_sequenceNumberC; - vc_multipleMessagesCount := p_messageCount; - - for(i:=0; i < vc_multipleMessagesCount; i:=i+1) { - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeC, - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - vc_localSeqNumber - ) - ) - ) - ); - } - - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_FPB_BV_03_nodeC + /** + * @desc Check immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled + *
+            * Pics Selection: PICS_GN_TSB_SRC
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received any Beacon information from ItsNodeB and
+            *      the IUT having a Location Table Entry for ItsNodeA (see note)
+            *  }
+            *
+            *  MESSAGE : TSB packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a MESSAGE
+            *          containing TrafficClass.SCF set to 0
+            *      }
+            *      then {
+            *          the IUT broadcast the MESSAGE immediately
+            *      }
+            *  }
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-11-X + * @reference EN 302 636-4-1 [1], Annex D2 + */ + testcase TC_GEONW_PON_FPB_BV_11_04() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_11_04(); + + } // end TC_GEONW_PON_FPB_BV_11_04 + + /** + * @desc Check immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled + *
+            * Pics Selection: PICS_GN_SHB_SRC
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received any Beacon information from ItsNodeB and
+            *      the IUT having a Location Table Entry for ItsNodeA (see note)
+            *  }
+            *
+            *  MESSAGE : SHB packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a MESSAGE
+            *          containing TrafficClass.SCF set to 0
+            *      }
+            *      then {
+            *          the IUT broadcast the MESSAGE immediately
+            *      }
+            *  }
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-11-X + * @reference EN 302 636-4-1 [1], Annex D2 + */ + testcase TC_GEONW_PON_FPB_BV_11_05() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_11_05(); + + } // end TC_GEONW_PON_FPB_BV_11_05 - } // end GEONW_PON_FPB_BV_03 - - group GEONW_PON_FPB_BV_04 { - - /** - * @desc Test of UC forwarding buffer characteristics: discarding upon LT expiration - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received any Beacon information from ItsNodeB and
-                 *      the IUT having received a GeoUnicast packet addressed to ItsNodeA from ItsNodeC
-                 *          containing TrafficClass.SCF set to 1
-                 *          containing Basic Header
-                 *              containing LT field
-                 *                  indicating LT1
-                 *              containing RHL field
-                 *                  indicating value greater than 1
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a Beacon packet from ItsNodeB
-                 *          after expiry of LT1
-                 *      }
-                 *      then {
-                 *          the IUT does not forward the buffered GeoUnicast packet addressed to ItsNodeA
-                 *      }
-                 *   }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/03 - * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.8.3 - */ - testcase TC_GEONW_PON_FPB_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - const UInt6 c_packetLifetime := 10; // 10s - - // Test control - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_04_nodeB(c_packetLifetime)); - v_nodeC.start(f_GEONW_PON_FPB_BV_04_nodeC(c_packetLifetime)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_FPB_BV_04 + /** + * @desc Check immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled + *
+            * Pics Selection: PICS_GN_GUC_SRC
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received any Beacon information from ItsNodeB
+            *  }
+            *
+            *  MESSAGE : GUC packet addressed to ItsNodeA
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a MESSAGE
+            *          containing TrafficClass.SCF set to 0
+            *      }
+            *      then {
+            *          the IUT broadcast the MESSAGE immediately
+            *      }
+            *  }
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-12-X + * @reference EN 302 636-4-1 [1], Annex D2 + */ + testcase TC_GEONW_PON_FPB_BV_12_01() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_12_01(); + + } // end TC_GEONW_PON_FPB_BV_12_01 + + /** + * @desc Check immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled + *
+            * Pics Selection: PICS_GN_GAC_SRC
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received any Beacon information from ItsNodeB
+            *  }
+            *
+            *  MESSAGE : GAC packet
+            *                containing DestinationArea
+            *                    indicating AREA2
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a MESSAGE
+            *          containing TrafficClass.SCF set to 0
+            *      }
+            *      then {
+            *          the IUT broadcast the MESSAGE immediately
+            *      }
+            *  }
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-12-X + * @reference EN 302 636-4-1 [1], Annex D2 + */ + testcase TC_GEONW_PON_FPB_BV_12_02() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_12_02(); + + } // end TC_GEONW_PON_FPB_BV_12_02 - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_04) - */ - function f_GEONW_PON_FPB_BV_04_nodeB(in UInt6 p_packetLifetime) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GeoNetworkingInd v_geoNetInd; - var integer v_nbReceivedPackets := 0; - - // Preamble - f_prDefault(); // NodeB is not yet a neighbour - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(int2float(p_packetLifetime + 1)); - f_startBeingNeighbour(); - - tc_noac.start; - alt { - [] a_receiveGeoUnicast( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ?) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GeoUnicast packet received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_FPB_BV_04_nodeB + /** + * @desc Check immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled + *
+            * Pics Selection: PICS_GN_GBC_SRC
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received any Beacon information from ItsNodeB
+            *  }
+            *
+            *  MESSAGE : GBC packet
+            *                containing DestinationArea
+            *                    indicating AREA2
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a MESSAGE
+            *          containing TrafficClass.SCF set to 0
+            *      }
+            *      then {
+            *          the IUT broadcast the MESSAGE immediately
+            *      }
+            *  }
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-12-X + * @reference EN 302 636-4-1 [1], Annex D2 + */ + testcase TC_GEONW_PON_FPB_BV_12_03() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_12_03(); + + } // end TC_GEONW_PON_FPB_BV_12_03 - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_04) - */ - function f_GEONW_PON_FPB_BV_04_nodeC(in UInt6 p_packetLifetime) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNeighbour(); - - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwUnicastPacket( - v_longPosVectorNodeC, - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - vc_localSeqNumber - ), - m_lifetimeBase1s(p_packetLifetime), - c_defaultHopLimit - ) - ) - ); - - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_FPB_BV_04_nodeC + /** + * @desc Check immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled + *
+            * Pics Selection: PICS_GN_TSB_SRC
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT not having received any Beacon information from ItsNodeB
+            *  }
+            *
+            *  MESSAGE : TSB packet
+            *
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a MESSAGE
+            *          containing TrafficClass.SCF set to 0
+            *      }
+            *      then {
+            *          the IUT broadcast the MESSAGE immediately
+            *      }
+            *  }
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV-12-X + * @reference EN 302 636-4-1 [1], Annex D2 + */ + testcase TC_GEONW_PON_FPB_BV_12_04() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_FPB_BV_12_04(); + + } // end TC_GEONW_PON_FPB_BV_11_04 + + } // end geoForwardingPacketBuffer + + // 6.2.2.6 + group geoGeoNetworkingAddress { + + /** + * @desc Check the initial GeoNetworking address assignment by IUT with auto-address configuration + *
+            * Pics Selection: PICS_GN_ADDR_AUTO
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT's itsGnLocalAddrConfMethod MIB parameter is set to AUTO (0)
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT generates a Beacon packet
+            *      }
+            *      then {
+            *          the IUT sends a GeoNetworking message
+            *              containing a correctly formatted Common Header
+            *                  containing HT field
+            *                      set to '1' (BEACON)
+            *                  containing HST field
+            *                      set to '0' (UNSPECIFIED)
+            *              containing a Beacon Extender Header
+            *                  containing SOPV field
+            *                      containing GN_ADDR field
+            *                          indicating itsGnLocalGnAddr MIB parameter
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GNA/BV-01 + * @reference EN 302 636-4-1 [1], clauses 9.2.1.2 and 9.3.6.2 + */ + testcase TC_GEONW_PON_GNA_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - } // end GEONW_PON_FPB_BV_04 - - group GEONW_PON_FPB_BV_06 { - - /** - * @desc Test of Source packet buffering into BC forwarding buffer for no recipients - *
-                 * Pics Selection: none
-                 * Config Id: CF02
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received Beacon information from ItsNodeD and
-                 *      the IUT not having received Beacon information from ItsNodeB and
-                 *      the IUT having been requested to send a TSB packet
-                 *          containing TrafficClass.SCF set to 1
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a Beacon packet from either ItsNodeB or ItsNodeD
-                 *      }
-                 *      then {
-                 *          the IUT broadcasts the buffered TSB packet
-                 *      }
-                 *   }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/06 - * @reference EN 302 636-4-1 [1], clauses 9.3.5, 7.5.3, 9.3.6.3 and 9.3.11.2 - */ - testcase TC_GEONW_PON_FPB_BV_06() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_FPB_BV_06_nodeB()); - v_nodeD.start(f_GEONW_PON_FPB_BV_06_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end TC_GEONW_PON_FPB_BV_06 + f_GEONW_PON_GNA_BV_01(); - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_06) - */ - function f_GEONW_PON_FPB_BV_06_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GeoNetworkingInd v_geoNetInd; - - // Preamble - f_prDefault(); - if (not f_utTriggerEvent(m_generateTsbMessage)) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(1.0); - f_startBeingNeighbour(); - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, - mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) -> value v_geoNetInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoBroadcast packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_FPB_BV_06_nodeB + } // end TC_GEONW_PON_GNA_BV_01 + + /** + * @desc Check the proper functioning of duplicate address detection mechanism + *
+            * Pics Selection: PICS_GN_DAD
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having sent some Beacon messages
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a Beacon message
+            *              containing Beacon Extended Header
+            *                  containing SOPV field
+            *                      containing GN_ADDR field
+            *                          indicating same GN_ADDR as the GN_ADDR field in the last Beacon originated by the IUT
+            *      }
+            *      then {
+            *          the IUT sends subsequent Beacon messages
+            *              containing Beacon Extended Header
+            *                  containing SOPV field
+            *                      containing GN_ADDR field
+            *                          indicating different GN_ADDR as the previous used GN_ADDR
+            *      }
+            *   }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GNA/BV-02 + * @reference EN 302 636-4-1 [1], clauses 9.2.1.4 + */ + testcase TC_GEONW_PON_GNA_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_06) - */ - function f_GEONW_PON_FPB_BV_06_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GeoNetworkingInd v_geoNetInd; - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, - mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) -> value v_geoNetInd { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoBroadcast packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_06_nodeD + f_GEONW_PON_GNA_BV_02(); - } // end GEONW_PON_FPB_BV_06 + } // end TC_GEONW_PON_GNA_BV_02 - group GEONW_PON_FPB_BV_07 { - - /** - * @desc Test of BC forwarding buffer characteristics: FIFO type - *
-                 * Pics Selection: none
-                 * Config Id: CF02
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received Beacon information from ItsNodeD and
-                 *      the IUT not having received Beacon information from ItsNodeB and
-                 *      the IUT having been requested to send a TSB (TSB1) packet
-                 *          containing TrafficClass.SCF set to 1
-                 *          containing Basic Header
-                 *              containing LT field
-                 *                  indicating LT1
-                 *          containing TSB Extended Header
-                 *              containing SN field
-                 *                  indicating value SN1
-                 *      the IUT having been requested to send a TSB (TSB2) packet
-                 *          containing TrafficClass.SCF set to 1
-                 *          containing Basic Header
-                 *              containing LT field
-                 *                  indicating LT2
-                 *          containing TSB Extended Header
-                 *              containing SN field
-                 *                  indicating value SN2
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a Beacon packet from either ItsNodeD or ItsNodeB
-                 *          before expiry of LT1 and LT2
-                 *      }
-                 *      then {
-                 *          the IUT broadcasts TSB1 packet
-                 *              containing TSB Extended Header
-                 *                  containing SN field
-                 *                      indicating value SN1
-                 *          the IUT broadcasts TSB2 packet
-                 *              containing TSB Extended Header
-                 *                  containing SN field
-                 *                      indicating value SN2
-                 *      }
-                 *   }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/07 - * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.11.2 - */ - testcase TC_GEONW_PON_FPB_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - const integer v_messageCount := 2; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_FPB_BV_07_nodeB(v_messageCount)); - v_nodeD.start(f_GEONW_PON_FPB_BV_07_nodeD(v_messageCount)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end TC_GEONW_PON_FPB_BV_07 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_07) - */ - function f_GEONW_PON_FPB_BV_07_nodeB(in integer p_messageCount) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GeoNetworkingInd v_geoNetInd; - var template (present) UInt16 v_expectedSequenceNumber := ?; - var integer v_nbReceivedPackets := 0; - var integer i := 0; - - // Preamble - f_prDefault(); - vc_multipleMessagesCount := p_messageCount; - for(i:=0; i < vc_multipleMessagesCount; i:=i+1) { - if(not f_utTriggerEvent(m_generateTsbMessage)) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } + } // end geoGeoNetworkingAddress + + // 6.2.2.7 + group geoBeaconing { + + /** + * @desc Check that the IUT transmits Beacons at prescribed periodicity in the absence of other originated + * packets + *
+            * Pics Selection: PICS_GN_BEACON_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state"
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT generates Beacon packets
+            *      }
+            *      then {
+            *          the IUT sends each Beacon packet
+            *              after expiry of itsGnBeaconServiceRetransmitTimer
+            *              and before expiry of itsGnBeaconServiceRetransmitTimer + itsGnBeaconServiceMaxJitter
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BEA/TI-01 + * @reference EN 302 636-4-1 [1], clauses 9.3.6.2 + */ + testcase TC_GEONW_PON_BEA_TI_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_BEA_TI_01(); + + } // end TC_GEONW_PON_BEA_TI_01 + + /** + * @desc Check that the IUT resets its timer for next Beacon transmission when originating other packets + *
+            * Pics Selection: PICS_GN_BEACON_SRC
+            * 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 SHB packet
+            *      }
+            *      then {
+            *          the IUT broadcasts a SHB packet and
+            *          the IUT sends the next Beacon packet
+            *              after expiry of itsGnBeaconServiceRetransmitTimer
+            *              and before expiry of itsGnBeaconServiceRetransmitTimer + itsGnBeaconServiceMaxJitter
+            *      }
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BEA/TI-02 + * @reference EN 302 636-4-1 [1], clauses 9.2.3 and 9.3.10.2 + */ + testcase TC_GEONW_PON_BEA_TI_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + + f_GEONW_PON_BEA_TI_02(); + + } // end TC_GEONW_PON_BEA_TI_02 - tc_ac.start(1.0); - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, - mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { - tc_ac.stop; - log("*** " & testcasename() & ": INCONC: GeoBroadcast packet not buffered ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast packet buffered ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - } - - // Test Body - f_startBeingNeighbour(); - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket( - v_expectedSequenceNumber, - mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) -> value v_geoNetInd { - tc_ac.stop; - v_nbReceivedPackets := v_nbReceivedPackets + 1; - if(v_nbReceivedPackets >= vc_multipleMessagesCount) { - log("*** " & testcasename() & ": PASS: TSB packets received in correct order ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - v_expectedSequenceNumber := v_geoNetInd.msgIn.gnPacket.packet.extendedHeader.tsbHeader.seqNumber + 1; - tc_ac.start; - repeat; - } - } - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, - mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: TSB packet received in incorrect order ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_FPB_BV_07_nodeB + /** + * @desc Check that IUT sends a Beacon at startup + *
+            * Pics Selection: PICS_GN_BEACON_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *  	the IUT being switched off
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *  	when {
+            *  		the IUT is switched on
+            *  	}
+            *  	then {
+            *  		the IUT sends a Beacon packet immediately
+            *  	}
+            *  }
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BEA/BV-03 + * @reference EN 302 636-4-1 [1], clauses 9.2.3 and 9.3.10.2 + */ + testcase TC_GEONW_PON_BEA_BV_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_07) - */ - function f_GEONW_PON_FPB_BV_07_nodeD(in integer p_messageCount) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GeoNetworkingInd v_geoNetInd; - var template (present) UInt16 v_expectedSequenceNumber := ?; - var integer v_nbReceivedPackets := 0; - var integer i := 0; - - // Preamble - f_prDefault(); - vc_multipleMessagesCount := p_messageCount; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(v_expectedSequenceNumber, - mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) -> value v_geoNetInd { - tc_ac.stop; - v_nbReceivedPackets := v_nbReceivedPackets + 1; - if(v_nbReceivedPackets >= vc_multipleMessagesCount) { - log("*** " & testcasename() & ": PASS: TSB packets received in correct order ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - v_expectedSequenceNumber := v_geoNetInd.msgIn.gnPacket.packet.extendedHeader.tsbHeader.seqNumber + 1; - tc_ac.start; - repeat; - } - } - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, - mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: TSB packet received in incorrect order ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_07_nodeD + f_GEONW_PON_BEA_BV_03(); - } // end GEONW_PON_FPB_BV_07 + } // end TC_GEONW_PON_BEA_BV_03 - group GEONW_PON_FPB_BV_08 { - - /** - * @desc Test of BC forwarding buffer characteristics: discarding upon LT expiration - *
-                 * Pics Selection: none
-                 * Config Id: CF02
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received Beacon information from ItsNodeD and
-                 *      the IUT not having received Beacon information from ItsNodeB and
-                 *      the IUT having been requested to send a TSB (TSB1) packet
-                 *          containing TrafficClass.SCF set to 1
-                 *          containing Basic Header
-                 *              containing LT field
-                 *                  indicating LT1
-                 *      the IUT having been requested to send a TSB (TSB2) packet
-                 *          containing TrafficClass.SCF set to 1
-                 *          containing Basic Header
-                 *              containing LT field
-                 *                  indicating LT2
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a Beacon packet from either ItsNodeB or ItsNodeD
-                 *          after expiry of LT1 and LT2
-                 *      }
-                 *      then {
-                 *          the IUT does not broadcast any of the buffered TSB1 and TSB2
-                 *      }
-                 *   }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/08 - * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.11.2 - */ - testcase TC_GEONW_PON_FPB_BV_08() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_FPB_BV_08_nodeB()); - v_nodeD.start(f_GEONW_PON_FPB_BV_08_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end TC_GEONW_PON_FPB_BV_08 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_08) - */ - function f_GEONW_PON_FPB_BV_08_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GeoNetworkingInd v_geoNetInd; - - // Preamble - f_prDefault(); - if(not f_utTriggerEvent(m_generateTsbMessageWithLifetime(c_lifetime))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - if(not f_utTriggerEvent(m_generateTsbMessageWithLifetime(c_lifetime))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(int2float(c_defaultLifetime + 1)); - f_startBeingNeighbour(); - - tc_noac.start; - alt { - - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, - mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GeoBroadcast packet received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_FPB_BV_08_nodeB + } // end geoBeaconing + + // 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 { - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_08) - */ - function f_GEONW_PON_FPB_BV_08_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GeoNetworkingInd v_geoNetInd; - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(int2float(c_defaultLifetime + 1)); - f_startBeingNeighbour(); - - tc_noac.start; - alt { - - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, - mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GeoBroadcast packet received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: No message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_FPB_BV_08_nodeD + f_GEONW_PON_GUC_BV_01(); - } // end GEONW_PON_FPB_BV_08 - - group GEONW_PON_FPB_BV_09 { - - /** - * @desc Test of Source packet buffering into UC forwarding buffer for handling of LT fields in absence of - * a suitable next hop candidate - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received any Beacon information from ItsNodeB and
-                 *      the IUT having a Location Table Entry for ItsNodeA and
-                 *      the IUT having been requested to send a GeoUnicast packet addressed to ItsNodeA
-                 *          containing TrafficClass.SCF set to 1
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a Beacon packet from ItsNodeB
-                 *      }
-                 *      then {
-                 *          the IUT selects the ItsNodeB as the next hop and
-                 *          the IUT sends the buffered GeoUnicast packet
-                 *              containing GUC Extended Header
-                 *                  containing LT field
-                 *                      indicating (default LT value – WaitingTime(see note))
-                 *      }
-                 *  }
-                 *  NOTE: WaitingTime == time difference between Upper layer packet generation and the neighbour Beacon reception
-                 *  
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/09 - * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.8.2 - */ - testcase TC_GEONW_PON_FPB_BV_09() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_09_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_09_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_FPB_BV_09 + } // end TC_GEONW_PON_GUC_BV_01 - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_09) - */ - function f_GEONW_PON_FPB_BV_09_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var GeoNetworkingInd v_geoNetInd; - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(1.0); - f_startBeingNeighbour(); - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ?)))) -> value v_geoNetInd { - tc_ac.stop; - - //we only check that the lifetime is less than the default lifetime due to - //we do not know exactly the time passed at IUT - if (f_getLifetimeValue(v_geoNetInd.msgIn.basicHeader.lifeTime) < f_getMaxPacketLifeTime()) { - log("*** " & testcasename() & ": PASS: Lifetime was handled properly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: Lifetime was not handled properly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_FPB_BV_09_nodeB + /** + * @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 Behavior function for NodeC (TC_GEONW_PON_FPB_BV_09) - */ - function f_GEONW_PON_FPB_BV_09_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GeoNetworkingInd v_geoNetInd; - - // Preamble - f_prNeighbour(); - - // Make sure IUT has LocE for NodeA by sending unsolicited LS_REPLY - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu( - m_geoNwLsReplyPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ))); - - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_FPB_BV_09_nodeC - - } // end GEONW_PON_FPB_BV_09 - - group GEONW_PON_FPB_BV_10 { - - /** - * @desc Test of Source packet buffering into BC forwarding buffer for handling of LT fields for no - * recipients - *
-                 * Pics Selection: none
-                 * Config Id: CF02
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received Beacon information from ItsNodeD and
-                 *      the IUT not having received Beacon information from ItsNodeB and
-                 *      the IUT having been requested to send a TSB packet
-                 *          containing TrafficClass.SCF set to 1
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a Beacon packet from either ItsNodeB or ItsNodeD
-                 *      }
-                 *      then {
-                 *          the IUT broadcasts the buffered TSB packet
-                 *              containing TSB Extended Header
-                 *                  containing LT field
-                 *                      indicating (default LT value - WaitingTime (see note))
-                 *      }
-                 *  }
-                 *  NOTE: WaitingTime == time difference between Upper layer packet generation and the neighbour Beacon reception
-                 *  
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/10 - * @reference EN 302 636-4-1 [1], clauses 7.5.3, 9.3.6.3 and 9.3.11.2 - */ - testcase TC_GEONW_PON_FPB_BV_10() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_FPB_BV_10_nodeB()); - v_nodeD.start(f_GEONW_PON_FPB_BV_10_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end TC_GEONW_PON_FPB_BV_10 + /** + * @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 Behavior function for NodeB (TC_GEONW_PON_FPB_BV_10) - */ - function f_GEONW_PON_FPB_BV_10_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var GeoNetworkingInd v_geoNetInd; - - // Preamble - f_prDefault(); - if(not f_utTriggerEvent(m_generateTsbMessage)) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sleep(1.0); - f_startBeingNeighbour(); - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, - mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) -> value v_geoNetInd { - tc_ac.stop; - - //we only check that the lifetime is less than the default lifetime due to - //we do not know exactly the time passed at IUT - if (f_getLifetimeValue(v_geoNetInd.msgIn.basicHeader.lifeTime) < f_getMaxPacketLifeTime()) { - log("*** " & testcasename() & ": PASS: Lifetime was handled properly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: Lifetime was not handled properly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_FPB_BV_10_nodeB + /** + * @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 Behavior function for NodeD (TC_GEONW_PON_FPB_BV_10) - */ - function f_GEONW_PON_FPB_BV_10_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, - mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoBroadcast packet received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_10_nodeD + /** + * @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 GEONW_PON_FPB_BV_10 + } // end TC_GEONW_PON_GUC_BV_05 - group GEONW_PON_FPB_BV_11 { - - /** - * @desc Test of immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received any Beacon information from ItsNodeB and
-                 *      the IUT having a Location Table Entry for ItsNodeA (see note)
-                 *  }
-                 *  
-                 *  MESSAGE : GUC packet addressed to ItsNodeA
-                 *  
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a MESSAGE
-                 *          containing TrafficClass.SCF set to 0
-                 *      }
-                 *      then {
-                 *          the IUT broadcast the MESSAGE immediately
-                 *      }
-                 *  }
-                 *  
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/11-X - * @reference EN 302 636-4-1 [1], Annex D2 - */ - testcase TC_GEONW_PON_FPB_BV_11_01() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_11_01_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_11_01_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_FPB_BV_11_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_01) - */ - function f_GEONW_PON_FPB_BV_11_01_nodeB() runs on ItsGeoNetworking { - - // Local variablesa - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_11_01_nodeB + /** + * @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 Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_01) - */ - function f_GEONW_PON_FPB_BV_11_01_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - // Make sure IUT has LocE for NodeA by sending unsolicited LS_REPLY - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu( - m_geoNwLsReplyPacket( - v_longPosVectorNodeA, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ))); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if(not f_utTriggerEvent(m_generateGeoUnicastMessageWithTrafficClass( - v_longPosVectorNodeA.gnAddr, - valueof(m_trafficClass(e_scfDisabled))))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_11_01_nodeC - - /** - * @desc Test of immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received any Beacon information from ItsNodeB and
-                 *      the IUT having a Location Table Entry for ItsNodeA (see note)
-                 *  }
-                 *  
-                 *  MESSAGE : GAC packet
-                 *                containing GeoBroadcast DestinationArea
-                 *                    indicating AREA2
-                 *                    
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a MESSAGE
-                 *          containing TrafficClass.SCF set to 0
-                 *      }
-                 *      then {
-                 *          the IUT broadcast the MESSAGE immediately
-                 *      }
-                 *  }
-                 *  
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/11-X - * @reference EN 302 636-4-1 [1], Annex D2 - */ - testcase TC_GEONW_PON_FPB_BV_11_02() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_11_02_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_11_02_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_FPB_BV_11_02 + /** + * @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 Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_02) - */ - function f_GEONW_PON_FPB_BV_11_02_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwAnycastPacket( - mw_longPosVectorPosition_withDelta(v_longPosVectorIut), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_11_02_nodeB + /** + * @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 Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_02) - */ - function f_GEONW_PON_FPB_BV_11_02_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if(not f_utTriggerEvent(m_generateGeoAnycastMessageWithTrafficClass( - f_getArea(c_area2), - valueof(m_trafficClass(e_scfDisabled))))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwAnycastPacket( - mw_longPosVectorPosition_withDelta(v_longPosVectorIut), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_11_02_nodeC - - /** - * @desc Test of immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received any Beacon information from ItsNodeB and
-                 *      the IUT having a Location Table Entry for ItsNodeA (see note)
-                 *  }
-                 *  
-                 *  MESSAGE : GBC packet
-                 *                containing GeoBroadcast DestinationArea
-                 *                    indicating AREA2
-                 *                    
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a MESSAGE
-                 *          containing TrafficClass.SCF set to 0
-                 *      }
-                 *      then {
-                 *          the IUT broadcast the MESSAGE immediately
-                 *      }
-                 *  }
-                 *  
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/11-X - * @reference EN 302 636-4-1 [1], Annex D2 - */ - testcase TC_GEONW_PON_FPB_BV_11_03() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_11_03_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_11_03_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_FPB_BV_11_03 + /** + * @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 Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_03) - */ - function f_GEONW_PON_FPB_BV_11_03_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwBroadcastPacket( - mw_longPosVectorPosition_withDelta(v_longPosVectorIut), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_11_03_nodeB + /** + * @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 Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_03) - */ - function f_GEONW_PON_FPB_BV_11_03_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if(not f_utTriggerEvent(m_generateGeoBroadcastMessageWithTrafficClass( - f_getArea(c_area2), - valueof(m_trafficClass(e_scfDisabled))))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwBroadcastPacket( - mw_longPosVectorPosition_withDelta(v_longPosVectorIut), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_11_03_nodeC - - /** - * @desc Test of immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received any Beacon information from ItsNodeB and
-                 *      the IUT having a Location Table Entry for ItsNodeA (see note)
-                 *  }
-                 *  
-                 *  MESSAGE : TSB packet
-                 *  
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a MESSAGE
-                 *          containing TrafficClass.SCF set to 0
-                 *      }
-                 *      then {
-                 *          the IUT broadcast the MESSAGE immediately
-                 *      }
-                 *  }
-                 *  
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/11-X - * @reference EN 302 636-4-1 [1], Annex D2 - */ - testcase TC_GEONW_PON_FPB_BV_11_04() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_11_04_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_11_04_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_FPB_BV_11_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_04) - */ - function f_GEONW_PON_FPB_BV_11_04_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition_withDelta(v_longPosVectorIut) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_11_04_nodeB + /** + * @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 Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_04) - */ - function f_GEONW_PON_FPB_BV_11_04_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if(not f_utTriggerEvent(valueof(m_generateTsbMessageWithTrafficClass(valueof(m_trafficClass(e_scfDisabled)))))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition_withDelta(v_longPosVectorIut) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_11_04_nodeC - - /** - * @desc Test of immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received any Beacon information from ItsNodeB and
-                 *      the IUT having a Location Table Entry for ItsNodeA (see note)
-                 *  }
-                 *  
-                 *  MESSAGE : SHB packet
-                 *  
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT is requested to send a MESSAGE
-                 *          containing TrafficClass.SCF set to 0
-                 *      }
-                 *      then {
-                 *          the IUT broadcast the MESSAGE immediately
-                 *      }
-                 *  }
-                 *  
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/11-X - * @reference EN 302 636-4-1 [1], Annex D2 - */ - testcase TC_GEONW_PON_FPB_BV_11_05() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_11_05_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_11_05_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_FPB_BV_11_05 + /** + * @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 - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_05) - */ - function f_GEONW_PON_FPB_BV_11_05_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacket( - mw_longPosVectorPosition_withDelta(v_longPosVectorIut) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_11_05_nodeB + } // 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 Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_05) - */ - function f_GEONW_PON_FPB_BV_11_05_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if(not f_utTriggerEvent(valueof(m_generateShbMessageWithTrafficClass(valueof(m_trafficClass(e_scfDisabled)))))) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacket( - mw_longPosVectorPosition_withDelta(v_longPosVectorIut) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_11_05_nodeC + /** + * @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 - } // end GEONW_PON_FPB_BV_11 - - group GEONW_PON_FPB_BV_12 { - - /** - * @desc Test of immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received any Beacon information from ItsNodeB
-                 *  }
-                 *    
-                 *  MESSAGE : GUC packet addressed to ItsNodeA
-                 *  
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a MESSAGE
-                 *          containing TrafficClass.SCF set to 0
-                 *      }
-                 *      then {
-                 *          the IUT broadcast the MESSAGE immediately
-                 *      }
-                 *  }
-                 *    
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/12-X - * @reference EN 302 636-4-1 [1], Annex D2 - */ - testcase TC_GEONW_PON_FPB_BV_12_01() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_12_01_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_12_01_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_FPB_BV_12_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_01) - */ - function f_GEONW_PON_FPB_BV_12_01_nodeB() runs on ItsGeoNetworking { - - // Local variablesa - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_12_01_nodeB + /** + * @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 Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_01) - */ - function f_GEONW_PON_FPB_BV_12_01_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - - // 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(f_getPosition(c_compNodeA)), - vc_localSeqNumber, - -, - m_trafficClass(e_scfDisabled) - ), - -, - c_defaultHopLimit - ), - f_getIutMacAddress() - ) - ); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_12_01_nodeC - - /** - * @desc Test of immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received any Beacon information from ItsNodeB
-                 *  }
-                 *    
-                 *  MESSAGE : GAC packet
-                 *                containing GeoBroadcast DestinationArea
-                 *                    indicating AREA2
-                 *  
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a MESSAGE
-                 *          containing TrafficClass.SCF set to 0
-                 *      }
-                 *      then {
-                 *          the IUT broadcast the MESSAGE immediately
-                 *      }
-                 *  }
-                 *  
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/12-X - * @reference EN 302 636-4-1 [1], Annex D2 - */ - testcase TC_GEONW_PON_FPB_BV_12_02() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_12_02_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_12_02_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_FPB_BV_12_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_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 Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_02) - */ - function f_GEONW_PON_FPB_BV_12_02_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwAnycastPacket( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_11_02_nodeB + /** + * @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 Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_02) - */ - function f_GEONW_PON_FPB_BV_12_02_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwAnycastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area2), - -, - m_trafficClass(e_scfDisabled) - ) - ) - ) - ); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwAnycastPacket( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_12_02_nodeC - - /** - * @desc Test of immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received any Beacon information from ItsNodeB
-                 *  }
-                 *    
-                 *  MESSAGE : GBC packet
-                 *                containing GeoBroadcast DestinationArea
-                 *                    indicating AREA2
-                 * 
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a MESSAGE
-                 *          containing TrafficClass.SCF set to 0
-                 *      }
-                 *      then {
-                 *          the IUT broadcast the MESSAGE immediately
-                 *      }
-                 *  }
-                 *   
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/12-X - * @reference EN 302 636-4-1 [1], Annex D2 - */ - testcase TC_GEONW_PON_FPB_BV_12_03() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_12_03_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_12_03_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_FPB_BV_12_03 + /** + * @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 Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_03) - */ - function f_GEONW_PON_FPB_BV_12_03_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_12_03_nodeB + /** + * @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 Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_03) - */ - function f_GEONW_PON_FPB_BV_12_03_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2), - -, - m_trafficClass(e_scfDisabled) - ) - ) - ) - ); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwBroadcastPacket( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_11_03_nodeC - - /** - * @desc Test of immediate broadcasting in absence of a suitable next hop candidate when SCF is disabled - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT not having received any Beacon information from ItsNodeB
-                 *  }
-                 *    
-                 *  MESSAGE : TSB packet
-                 *    
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a MESSAGE
-                 *          containing TrafficClass.SCF set to 0
-                 *      }
-                 *      then {
-                 *          the IUT broadcast the MESSAGE immediately
-                 *      }
-                 *  }
-                 *  
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/FPB/BV/12-X - * @reference EN 302 636-4-1 [1], Annex D2 - */ - testcase TC_GEONW_PON_FPB_BV_12_04() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // Test component configuration - f_cf03Up(c_compNodeC); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_PON_FPB_BV_12_04_nodeB()); - v_nodeC.start(f_GEONW_PON_FPB_BV_12_04_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_FPB_BV_11_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_04) - */ - function f_GEONW_PON_FPB_BV_12_04_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeC) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_12_04_nodeB + /** + * @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 Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_04) - */ - function f_GEONW_PON_FPB_BV_12_04_nodeC() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeC, - c_defaultHopLimit, - m_trafficClass(e_scfDisabled) - ), - -, - c_defaultHopLimit - ) - ) - ); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeC) - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - - } // end f_GEONW_PON_FPB_BV_12_04_nodeC - - } // end GEONW_PON_FPB_BV_12 - - } // end geoForwardingPacketBuffer - - // 6.2.2.6 - group geoGeoNetworkingAddress { - /** - * @desc Test the initial GeoNetworking address assignment by IUT with auto-address configuration - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT's itsGnLocalAddrConfMethod MIB parameter is set to AUTO (0)
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT generates a Beacon packet
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking message
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '1' (BEACON)
-             *                  containing HST field
-             *                      set to '0' (UNSPECIFIED)
-             *              containing a Beacon Extender Header
-             *                  containing SOPV field
-             *                      containing GN_ADDR field
-             *                          indicating itsGnLocalGnAddr MIB parameter
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GNA/BV/01 - * @reference EN 302 636-4-1 [1], clauses 9.2.1.2 and 9.3.6.2 - */ - testcase TC_GEONW_PON_GNA_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + * @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 { - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - if(f_getIutGnLocalAddressConfigurationMethod() != e_initial) { - log("*** " & testcasename() & ": PICS_GN_LOCAL_ADDR_CONF_METHOD == e_initial required for executing the TC ***"); - setverdict(inconc); - stop; - } - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prDefault(); - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( - mw_geoNwBeaconPacket( - mw_longPosVectorAny(f_getIutGnLocalAddress()) // IUT's SOPV - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": GN address is correct ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( - mw_geoNwBeaconPacket( - ? // any SOPV - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": GN address is not correct ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cf01Down(); + f_GEONW_PON_GBC_BV_09(); - } // end TC_GEONW_PON_GNA_BV_01 + } // end TC_GEONW_PON_GBC_BV_09 /** - * @desc Test the proper functioning of duplicate address detection mechanism - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having sent some Beacon messages
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT receives a Beacon message
-             *              containing Beacon Extended Header
-             *                  containing SOPV field
-             *                      containing GN_ADDR field
-             *                          indicating same GN_ADDR as the GN_ADDR field in the last Beacon originated by the IUT
-             *      }
-             *      then {
-             *          the IUT sends subsequent Beacon messages
-             *              containing Beacon Extended Header
-             *                  containing SOPV field
-             *                      containing GN_ADDR field
-             *                          indicating different GN_ADDR as the previous used GN_ADDR
-             *      }
-             *   }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GNA/BV/02 - * @reference EN 302 636-4-1 [1], clauses 9.2.1.4 - */ - testcase TC_GEONW_PON_GNA_BV_02() runs on ItsGeoNetworking 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  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 { - // Local variables - var LongPosVector v_longPosVectorIut; - var LongPosVector v_longPosVectorNodeB; - var GeoNetworkingInd v_geoNetInd; - var GN_Address v_iutGnAddress := valueof(m_dummyGnAddr); - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prDefault(); - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( - mw_geoNwBeaconPacket( - ? // SO PV - )))) -> value v_geoNetInd { - v_iutGnAddress := valueof(v_geoNetInd.msgIn.gnPacket.packet.extendedHeader.beaconHeader.srcPosVector.gnAddr); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_longPosVectorNodeB.gnAddr := v_iutGnAddress; - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(m_geoNwBeaconPacket(v_longPosVectorNodeB), -, c_hopLimit1))); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( - mw_geoNwBeaconPacket( - mw_longPosVectorAny(v_iutGnAddress) // SO PV - )))) { - log("*** " & testcasename() & ": IUT is still using old GN address. Waiting... ***"); - repeat; - } - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( - mw_geoNwBeaconPacket( - ? // SO PV - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": IUT used new GN address ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Expected message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - // Postamble - f_poDefault(); - f_cf01Down(); + f_GEONW_PON_GBC_BV_11(); - } // end TC_GEONW_PON_GNA_BV_02 + } // end TC_GEONW_PON_GBC_BV_11 - } // end geoGeoNetworkingAddress + /** + * @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.7 - group geoBeaconing { + // 6.2.2.10 + group geoTopologicallyScopedBroadcast { /** - * @desc Test that the IUT transmits Beacons at prescribed periodicity in the absence of other originated - * packets - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state"
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT generates Beacon packets
-             *      }
-             *      then {
-             *          the IUT sends each Beacon packet
-             *              after expiry of itsGnBeaconServiceRetransmitTimer
-             *              and before expiry of itsGnBeaconServiceRetransmitTimer + itsGnBeaconServiceMaxJitter
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BEA/BV/01 - * @reference EN 302 636-4-1 [1], clauses 9.3.6.2 - */ - testcase TC_GEONW_PON_BEA_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorIut; - var boolean v_beaconReceived := false; - timer t_minRetransTimer := f_getBsRetransmitTimer(); - timer t_maxRetransTimer := f_getBsRetransmitTimer() + f_getBsMaxJitter(); - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - - t_maxRetransTimer.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(?)))) { - if (v_beaconReceived == false) { - v_beaconReceived := true; - t_minRetransTimer.start; - t_maxRetransTimer.start; - //after the first beacon received, check the retransmission - repeat; - } - if(t_minRetransTimer.running) { - log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too early) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": Beacon transmitted at prescribed periodicity ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_minRetransTimer.timeout { - log("*** " & testcasename() & ": Ready for retransmission ***"); - repeat; - } - [] t_maxRetransTimer.timeout { - log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too late) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - f_acTriggerEvent(m_stopPassBeaconing); - - // Postamble - f_poDefault(); - f_cf01Down(); - - } // end TC_GEONW_PON_BEA_BV_01 - + * @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 Test that the IUT resets its timer for next Beacon transmission when originating other packets - *
-             * Pics Selection: none
-             * 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 SHB packet
-             *      }
-             *      then {
-             *          the IUT broadcasts a SHB packet and
-             *          the IUT sends the next Beacon packet
-             *              after expiry of itsGnBeaconServiceRetransmitTimer
-             *              and before expiry of itsGnBeaconServiceRetransmitTimer + itsGnBeaconServiceMaxJitter
-             *      }
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BEA/BV/02 - * @reference EN 302 636-4-1 [1], clauses 9.2.3 and 9.3.10.2 - */ - testcase TC_GEONW_PON_BEA_BV_02() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - var boolean v_geoUnicastReceived := false; - var boolean v_readyForRetransmission := false; - timer t_minRetransTimer := f_getBsRetransmitTimer() - f_getDeltaTimer(); - timer t_maxRetransTimer := f_getBsRetransmitTimer() + f_getBsMaxJitter() + f_getDeltaTimer(); - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - if ( not f_utTriggerEvent(m_generateShbMessage) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwShbPacket))) { - tc_ac.stop; - t_minRetransTimer.start; - t_maxRetransTimer.start; - v_geoUnicastReceived := true; - repeat; - } - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket))) { - if(not(v_geoUnicastReceived)) { - repeat; - } - if(not(v_readyForRetransmission)) { - log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too early) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": Beacon transmitted at prescribed periodicity ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_minRetransTimer.timeout { - log("*** " & testcasename() & ": Ready for retransmission ***"); - v_readyForRetransmission := true; - repeat; - } - [] t_maxRetransTimer.timeout { - log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too late) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": GeoUnicast not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - f_acTriggerEvent(m_stopPassBeaconing); - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // end TC_GEONW_PON_BEA_BV_02 - + * @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 IUT sends a Beacon at startup - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *  	the IUT being switched off
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *  	when {
-             *  		the IUT is switched on
-             *  	}
-             *  	then {
-             *  		the IUT sends a Beacon packet immediately
-             *  	}
-             *  }
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BEA/BV/03 - * @reference EN 302 636-4-1 [1], clauses 9.2.3 and 9.3.10.2 - */ - testcase TC_GEONW_PON_BEA_BV_03() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { + * @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 - // Local variables - var LongPosVector v_longPosVectorIut; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorIut := f_getPosition(c_compIut); - - // Test adapter configuration - - // Preamble - f_prDefault(); - action("Please turn IUT OFF"); - f_sleep(PX_TWAIT); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); - geoNetworkingPort.clear; - - action("Please turn IUT ON"); - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(?)))) { - log("*** " & testcasename() & ": PASS: Initial Beacon received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Initial Beacon not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - f_acTriggerEvent(m_stopPassBeaconing); - - // Postamble - f_poDefault(); - f_cf01Down(); + /** + * @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 - } // end TC_GEONW_PON_BEA_BV_03 + /** + * @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 - } // end geoBeaconing + /** + * @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.8 - group geoGeoUnicast { + // 6.2.2.11 + group geoSingleHopBroadcast { /** - * @desc Test that the reception of a unicast packet over upper Gn SAP triggers the origination of a - * GeoUnicast packet - *
-             * Pics Selection: 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 GeoUnicast packet to ItsNodeB
-             *      }
-             *      then {
-             *          the IUT sends a GeoNetworking packet
-             *              containing a correctly formatted Common Header
-             *                  containing HT field
-             *                      set to '2' (GEOUNICAST)
-             *              containing GeoUnicast 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 { + * @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 - // Local variables - var LongPosVector v_longPosVectorNodeB; - - // Test control - 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)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": DEPV of the received GeoUnicast message correctly set ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - ?, - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": DEPV of the received GeoUnicast 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(); + /** + * @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 { - } // end TC_GEONW_PON_GUC_BV_01 + f_GEONW_PON_SHB_BV_02(); + + } // end TC_GEONW_PON_SHB_BV_02 - group GEONW_PON_GUC_BV_02 { - - /** - * @desc Test that a received GeoUnicast packet is routed to the correct next hop neighbour according - * to the greedy forwarding rules - *
-                 * Pics Selection:  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 GeoUnicast 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 GeoUnicast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - 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_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 TC_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 { - - // 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 GeoUnicast received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoUnicast was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // 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); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(f_getPosition(c_compNodeA)), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - ), - f_getIutMacAddress() - ) - ); - - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end 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); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BV_02_nodeD - - } // end GEONW_PON_GUC_BV_02 - - group GEONW_PON_GUC_BV_03 { - - /** - * @desc Test that the protocol header fields (RHL, PV) are correctly updated at each forwarding step - *
-                 * Pics Selection: none
-                 * 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 GeoUnicast packet (GEOUNI1) originated by ItsNodeA
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a GeoUnicast 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 GeoUnicast 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 GeoUnicast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // 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 TC_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 { - - // 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 GeoUnicast 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: GeoUnicast was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // 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 { - - // Local variables - var LongPosVector v_obsoleteLongPosVectorNodeA := f_getPosition(c_compNodeA); - - // Preamble - f_prNeighbour(); - v_obsoleteLongPosVectorNodeA.timestamp := v_obsoleteLongPosVectorNodeA.timestamp - 1000; - v_obsoleteLongPosVectorNodeA.latitude := v_obsoleteLongPosVectorNodeA.latitude - 1; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(v_obsoleteLongPosVectorNodeA), - vc_localSeqNumber, - c_defaultHopLimit - ), - -, - c_defaultHopLimit - ), - f_getIutMacAddress() - ) - ); - - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BV_03_nodeC - - } // end GEONW_PON_GUC_BV_03 - - group GEONW_PON_GUC_BV_04 { - - /** - * @desc Test that the RHL restriction is correctly handled at the forwarding step - *
-                 * Pics Selection: none
-                 * 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 GeoUnicast 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 GeoUnicast packet
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GUC/BV/04 - * @reference EN 302 636-4-1 [1], clauses 9.3.8.3 - */ - testcase TC_GEONW_PON_GUC_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // 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_04_nodeB()); - v_nodeC.start(f_GEONW_PON_GUC_BV_04_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_GUC_BV_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_BV_04) - */ - function f_GEONW_PON_GUC_BV_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: Forwarded GeoUnicast received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoUnicast was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BV_04_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_BV_04) - */ - function f_GEONW_PON_GUC_BV_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() - ) - ); - - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BV_04_nodeC - - } // end GEONW_PON_GUC_BV_04 - - /** - * @desc Test that a received GeoUnicast packet is passed over the Gn SAP to the correct upper - * protocol if the Destination address matches the IUT address - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *    the IUT being in the "initial state"
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT receives a GeoUnicast packet addressed to it
-             *      }
-             *      then {
-             *          the IUT passes the received GeoUnicast 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 { - - // Local variables - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeB), - f_getIutShortPosVector(), - vc_localSeqNumber - ) - ); - f_sendGeoNetMessage(m_geoNwReq_withLinkLayerDestination(v_gnPacket, f_getIutMacAddress())); - - f_sleep(PX_TAC); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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 TC_GEONW_PON_GUC_BV_05 - - group GEONW_PON_GUC_BV_06 { - - /** - * @desc Test that a received GeoUnicast packet is forwarded at the correct time according to the - * contention based forwarding rules - *
-                 * Pics Selection: 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 GeoUnicast 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 GeoUnicast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var integer v_distance := f_getCbfMaxCommunicationRange() - 10; - var LongPosVector v_longPosVectorIut, v_longPosVectorNodeA; - - // Test control - 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 TC_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 integer 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()) - ) * int2float(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 GeoUnicast 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: GeoUnicast was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // 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 - ), - -, - c_defaultHopLimit - ), - f_getIutMacAddress() - ) - ); - log("*** " & testcasename() & ": INFO: Message sent ***"); - f_selfOrClientSyncAndVerdict(c_msgSent, e_success); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Re-broadcasted GeoUnicast received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoUnicast was not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BV_06_nodeC - - } // end GEONW_PON_GUC_BV_06 - - group GEONW_PON_GUC_BV_07 { - - /** - * @desc Test that a received GeoUnicast packet forwarding is correctly handling the minimum delay - * value according to the contention based forwarding rules - *
-                 * Pics Selection: 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 GeoUnicast 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 GeoUnicast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var integer v_distance := f_getCbfMaxCommunicationRange() * 2; - var LongPosVector v_longPosVectorIut, v_longPosVectorNodeA; - - // Test control - 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 TC_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); - - // 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 GeoUnicast 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: GeoUnicast 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); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(p_longPosVectorNodeA), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - ), - f_getIutMacAddress() - ) - ); - log("*** " & testcasename() & ": INFO: Message sent ***"); - f_selfOrClientSyncAndVerdict(c_msgSent, e_success); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Forwarded GeoUnicast received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoUnicast was not forwarded ***"); - 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 Test that GeoUnicast packet forwarding correctly avoids packet duplication according to the - * contention based forwarding rules - *
-                 * Pics Selection: 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 GeoUnicast 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 GeoBroadcast packet from ItsNodeD
-                 *              before expiration of the CBF timer
-                 *      }
-                 *      then {
-                 *          the IUT does not re-broadcast the received GeoUnicast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var integer v_distance := f_getCbfMaxCommunicationRange() - 10; - var LongPosVector v_longPosVectorIut, v_longPosVectorNodeA; - - // Test control - 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 TC_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); - - // Test Body - f_sleepIgnoreDef(int2float(f_getGeoUnicastCbfMaxTime())/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 GeoUnicast received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoUnicast 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); - - // Test Body - //Note: Sending of the GeoUnicast 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 GeoUnicast received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoUnicast was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BV_08_nodeC - - } // end GEONW_PON_GUC_BV_08 - - group GEONW_PON_GUC_BV_10 { - - /** - * @desc Test that a received GeoUnicast packet is forwarded at the correct time according to the - * contention based forwarding rules when the sender is unknown - *
-                 * Pics Selection: 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 GeoUnicast 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 GeoUnicast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var integer v_distance := f_getCbfMaxCommunicationRange() - 10; - var LongPosVector v_longPosVectorIut, v_longPosVectorNodeA; - - // Test control - 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_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 TC_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)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Re-broadcasted GeoUnicast received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoUnicast was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BV_10_nodeB - - /** - * @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 - - // Preamble - f_prDefault(); - 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() - ) - ); - - 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)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: Re-broadcasted GeoUnicast received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoUnicast was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BV_10_nodeC - - } // end GEONW_PON_GUC_BV_10 - - group GEONW_PON_GUC_BV_11 { - - /** - * @desc Test that the reception of a unicast packet over upper Gn SAP triggers the origination of a GeoUnicast packet - *
-                 * Pics Selection: 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 GeoUnicast packet to ItsNodeB
-                 *  	}
-                 *  	then {
-                 *  		the IUT broadcasts a GeoNetworking packet
-                 *  			containing a correctly formatted Common Header
-                 *  				containing HT field
-                 *  					set to '2' (GEOUNICAST)
-                 *  			containing GeoUnicast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - 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 TC_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)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoUnicast received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoUnicast 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)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: broadcasted GeoUnicast received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoUnicast 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 - - group GEONW_PON_GUC_BV_12 { - - /** - * @desc Test that a received GUC packet is not triggering forwarding if received twice or more - *
-                 * Pics Selection: 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 GeoUnicast 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/BV/12 - * @reference EN 302 636-4-1 [1], clause 9.3.9.3 - */ - testcase TC_GEONW_PON_GUC_BV_12() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - 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_BV_12_nodeB()); - v_nodeC.start(f_GEONW_PON_GUC_BV_12_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_GUC_BV_12 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_BV_12) - */ - function f_GEONW_PON_GUC_BV_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)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": INFO: First GeoUnicast forwarded ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: First GeoUnicast was not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_withLinkLayerDestination( - m_geoNwPdu( - m_geoNwUnicastPacket( - f_getPosition(c_compNodeC), - f_longPosVector2ShortPosVector(v_longPosVectorNodeA), - vc_localSeqNumber - ), - -, - c_defaultHopLimit - 1 - ), - f_getIutMacAddress() - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Duplicate GeoUnicast was forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: Duplicate GeoUnicast not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BV_12_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_BV_12) - */ - function f_GEONW_PON_GUC_BV_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)), - ? - ) - ) - ) - ) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: Duplicate GeoUnicast was forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: Duplicate GeoUnicast not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GUC_BV_12_nodeC - - } // end GEONW_PON_GUC_BV_12 - - group GEONW_PON_GUC_BV_13 { - - /** - * @desc Test 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_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 GeoUnicast 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/BV/13 - * @reference EN 302 636-4-1 [1], clause 9.3.9.3 - */ - testcase TC_GEONW_PON_GUC_BV_13() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - 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_BV_13_nodeB()); - v_nodeC.start(f_GEONW_PON_GUC_BV_13_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_GUC_BV_13 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GUC_BV_13) - */ - function f_GEONW_PON_GUC_BV_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 - ); - - // Preamble - f_prNeighbour(); - f_sleep(PX_TAC); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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(); - - } // end f_GEONW_PON_GUC_BV_13_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GUC_BV_13) - */ - function f_GEONW_PON_GUC_BV_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_BV_13_nodeC - - } // end GEONW_PON_GUC_BV_13 - - } // end geoGeoUnicast - - // 6.2.2.9 - group geoGeoBroadcast { - - group GEONW_PON_GBC_BV_01 { - - /** - * @desc Test that the reception of a broadcast indication over upper Gn SAP triggers the origination of a - * GeoBroadcast packet's broadcasting if the IUT is within the Destination Area - *
-                 * Pics Selection: none
-                 * 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 GeoBroadcast packet
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GeoBroadcast DestinationArea
-                 *                  indicating AREA1
-                 *      }
-                 *      then {
-                 *          the IUT broadcasts immediately the GeoBroadcast packet
-                 *              containing GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_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 TC_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_withDelta(v_longPosVectorIut), - ?, - f_getGeoBroadcastArea(c_area1)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoBroadcast message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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_withDelta(v_longPosVectorIut), - ?, - f_getGeoBroadcastArea(c_area1)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoBroadcast message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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 Test that the reception of a broadcast indication over upper Gn SAP triggers the origination of a - * GeoBroadcast packet's line forwarding if the IUT is outside the Destination Area - *
-                 * Pics Selection: 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 GeoBroadcast packet
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GeoBroadcast DestinationArea
-                 *                  indicating AREA2
-                 *      }
-                 *      then {
-                 *          the IUT selects ItsNodeB as the next hop ITS station and
-                 *          the IUT sends the GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - 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 TC_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_withDelta(v_longPosVectorIut), - ?, - f_getGeoBroadcastArea(c_area2)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoBroadcast message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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_withDelta(v_longPosVectorIut), - ?, - f_getGeoBroadcastArea(c_area2)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: received GeoBroadcast message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast 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 Test that a received GeoBroadcast packet is triggering re-broadcasting if received for the first - * time within its destination area - *
-                 * Pics Selection: none
-                 * 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 GeoBroadcast packet
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GeoBroadcast DestinationArea
-                 *                  indicating AREA1
-                 *      }
-                 *      then {
-                 *          the IUT re-broadcasts immediately the GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - 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 TC_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: GeoBroadcast message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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: GeoBroadcast message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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_BV_04 { - - /** - * @desc Test that a received GeoBroadcast packet is not triggering re-broadcasting if received for - * the second or more time (duplicate packet detection) - *
-                 * Pics Selection:  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 GeoBroadcast 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 GeoBroadcast DestinationArea
-                 *                  indicating AREA1 and
-                 *      the IUT having re-broadcast the GeoBroadcast packet
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives the same GeoBroadcast 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 GeoBroadcast packet
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/BV/04 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.3, Annex A.2 - */ - testcase TC_GEONW_PON_GBC_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - 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_04_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_BV_04_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end TC_GEONW_PON_GBC_BV_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_04) - */ - function f_GEONW_PON_GBC_BV_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: GeoBroadcast message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: GeoBroadcast message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - tc_noac.start; - alt { - [] a_receiveGeoBroadcast( - ?, - ?) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GeoBroadcast message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast message not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GBC_BV_04_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_04) - */ - function f_GEONW_PON_GBC_BV_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: GeoBroadcast message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Pre-conditions: GeoBroadcast 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: GeoBroadcast message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast message not re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GBC_BV_04_nodeD - - } // end GEONW_PON_GBC_BV_04 - - group GEONW_PON_GBC_BV_05 { - - /** - * @desc Test that a received GeoBroadcast packet is triggering line forwarding if received out of its - * destination area for the first time from a known ITS-Station - *
-                 * Pics Selection: none
-                 * 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 GeoBroadcast packet generated by ItsNodeC
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GeoBroadcast DestinationArea
-                 *                  indicating AREA2
-                 *      }
-                 *      then {
-                 *          the IUT selects ItsNodeB as the next hop ITS station and
-                 *          the IUT forwards the GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - - // 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 TC_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: GeoBroadcast message correctly forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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: GeoBroadcast message not forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast 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_BV_06 { - - /** - * @desc Test that a received GeoBroadcast packet is not triggering line forwarding if received out of its - * destination area for the second or more time - *
-                 * Pics Selection: 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 GeoBroadcast 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 GeoBroadcast DestinationArea
-                 *                  indicating AREA2
-                 *      the IUT having forwarded the received GeoBroadcast packet
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives the same GeoBroadcast 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 GeoBroadcast packet
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/BV/06 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.3 - */ - testcase TC_GEONW_PON_GBC_BV_06() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - var UInt16 v_sequenceNumber := f_getInitialSequenceNumber(); - - // Test control - 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_BV_06_nodeB()); - v_nodeC.start(f_GEONW_PON_GBC_BV_06_nodeC(v_sequenceNumber)); - v_nodeD.start(f_GEONW_PON_GBC_BV_06_nodeD(v_sequenceNumber)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end TC_GEONW_PON_GBC_BV_06 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_06) - */ - function f_GEONW_PON_GBC_BV_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: GeoBroadcast message correctly forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: GeoBroadcast 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: GeoBroadcast message re-forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast message not re-forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GBC_BV_06_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_BV_06) - */ - function f_GEONW_PON_GBC_BV_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_BV_06_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_06) - */ - function f_GEONW_PON_GBC_BV_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: GeoBroadcast message not forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: Pre-conditions: GeoBroadcast 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: GeoBroadcast re-forwarded! (not to area center!) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GBC_BV_06_nodeD - - } // end GEONW_PON_GBC_BV_06 - - group GEONW_PON_GBC_BV_07 { - - /** - * @desc Test that the protocol header fields (RHL) are correctly updated during a GeoBroadcast re- - * broadcasting step - *
-                 * Pics Selection:  none
-                 * 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 GeoBroadcast 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 GeoBroadcast DestinationArea
-                 *                      indicating AREA1
-                 *      }
-                 *      then {
-                 *          the IUT re-broadcasts the GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_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 TC_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: GeoBroadcast message correctly re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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: GeoBroadcast message correctly re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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 Test that the RHL restriction is correctly handled at a GeoBroadcast re-broadcasting step - *
-                 * Pics Selection: none
-                 * 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 GeoBroadcast packet
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing Basic Header
-                 *                  containing RHL field
-                 *                      indicating 1
-                 *              containing GBC Extended Header
-                 *                  containing GeoBroadcast DestinationArea
-                 *                      indicating AREA1
-                 *      }
-                 *      then {
-                 *          the IUT does not re-broadcast the GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_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 TC_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: GeoBroadcast message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast 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: GeoBroadcast message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast 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 Test that a received GeoBroadcast packet is passed over the Gn SAP to the correct upper - * protocol if it is received for the first time within the GeoBroadcast destination area - *
-             * Pics Selection: none
-             * 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 GeoBroadcast packet
-             *              containing TrafficClass.SCF set to 1
-             *              containing GeoBroadcast DestinationArea
-             *                  indicating AREA1
-             *      }
-             *      then {
-             *          the IUT passes the received GeoBroadcast 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 { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1) - ) - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - f_sleep(PX_TAC); - - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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 TC_GEONW_PON_GBC_BV_09 - - group GEONW_PON_GBC_BV_10 { - - /** - * @desc Test that a received GeoBroadcast packet is not passed over the Gn SAP if it is received for the - * second or more time - *
-                 * Pics Selection: 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 GeoBroadcast 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 GeoBroadcast DestinationArea
-                 *                  indicating AREA1 and
-                 *      the IUT having passed the received GeoBroadcast packet to the correct Upper Layer protocol
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives the same GeoBroadcast 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 GeoBroadcast packet to any Upper Layer protocol
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/BV/10 - * @reference EN 302 636-4-1 [1], clauses 9.3.11.3 - */ - testcase TC_GEONW_PON_GBC_BV_10() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - 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_BV_10_nodeB()); - v_nodeD.start(f_GEONW_PON_GBC_BV_10_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end TC_GEONW_PON_GBC_BV_10 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_10) - */ - function f_GEONW_PON_GBC_BV_10_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var template (present) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Preamble - f_prNeighbour(); - v_gnPacket := m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area1) - ), - -, - c_defaultHopLimit - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_gnPacket))); - - // IUT should also rebroadcast the packet. Get ready - tc_ac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeB), - ?, - f_getGeoBroadcastArea(c_area1) - )))) { - tc_ac.stop; - log("*** " & testcasename() & ": INFO: GeoBroadcast message rebroadcasted ***"); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INFO: GeoBroadcast message not rebroadcasted ***"); - } - } - - f_sleep(PX_TAC); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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 - v_gnPacket.basicHeader.routerHopLimit := valueof(v_gnPacket.basicHeader.routerHopLimit) / 2; - f_sleep(PX_TAC); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); i:=i+1) { - // empty on purpose - } - if(i < 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_BV_10_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_10) - */ - function f_GEONW_PON_GBC_BV_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: GeoBroadcast message rebroadcasted ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INFO: Pre-conditions: GeoBroadcast 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_BV_10_nodeD - - } // end GEONW_PON_GBC_BV_10 - - /** - * @desc Test that a received GeoBroadcast packet is not passed over the Gn SAP if it is received for the - * first time outside the GeoBroadcast destination area - *
-             * Pics Selection: none
-             * 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 GeoBroadcast packet
-             *              containing TrafficClass.SCF set to 1
-             *              containing GeoBroadcast DestinationArea
-             *                  indicating AREA2
-             *      }
-             *      then {
-             *          the IUT does not pass the received GeoBroadcast 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 { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - - // 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); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); i:=i+1) { - // empty on purpose - } - if(i < 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 TC_GEONW_PON_GBC_BV_11 - - group GEONW_PON_GBC_BV_12 { - - /** - * @desc Test that the reception of a broadcast indication over upper Gn SAP triggers the origination of a - * Simple GeoBroadcast if this method is selected in the MIB - *
-                 * Pics Selection:  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 GeoBroadcast packet
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GeoBroadcast DestinationArea
-                 *                  indicating AREA1
-                 *      }
-                 *      then {
-                 *          the IUT broadcasts immediately the GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - 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 TC_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_withDelta(v_longPosVectorIut), - ?, - f_getGeoBroadcastArea(c_area1)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoBroadcast message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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_withDelta(v_longPosVectorIut), - ?, - f_getGeoBroadcastArea(c_area1)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoBroadcast message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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_BV_19 { - - /** - * @desc Test that a received GeoBroadcast packet is discarded when indicating a too big GeoArea - *
-                 * Pics Selection: none
-                 * 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 GeoBroadcast 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 GeoBroadcast packet
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GBC/BV/19 - * @reference EN 302 636-4-1 [1], Annex B.3 - */ - testcase TC_GEONW_PON_GBC_BV_19() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - var UInt16 v_distanceTooBig; - - // Test control - - // 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_BV_19_nodeB(v_distanceTooBig)); - v_nodeC.start(f_GEONW_PON_GBC_BV_19_nodeC(v_distanceTooBig)); - v_nodeD.start(f_GEONW_PON_GBC_BV_19_nodeD(v_distanceTooBig)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end TC_GEONW_PON_GBC_BV_19 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GBC_BV_19) - */ - function f_GEONW_PON_GBC_BV_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: GeoBroadcast message forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast message not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GBC_BV_19_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GBC_BV_19) - */ - function f_GEONW_PON_GBC_BV_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_BV_19_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GBC_BV_19) - */ - function f_GEONW_PON_GBC_BV_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: GeoBroadcast message forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast message not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GBC_BV_19_nodeD - - } // end GEONW_PON_GBC_BV_19 - - group GEONW_PON_GBC_BV_20 { - - /** - * @desc Test that a received GeoBroadcast packet is triggering rebroadcast if received out of its - * destination area for the first time from an unknown sender - *
-                 * Pics Selection: none
-                 * 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 GeoBroadcast packet generated by ItsNodeC from ItsNodeD
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GeoBroadcast DestinationArea
-                 *                  indicating AREA2
-                 *      }
-                 *      then {
-                 *          the IUT re-broadcasts the GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - - // 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 TC_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: GeoBroadcast message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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: GeoBroadcast message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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: GeoBroadcast message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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 Test that a received GeoBroadcast packet is triggering rebroadcast if received out of its - * destination area for the first time from a known sender with PAI=0 - *
-                 * Pics Selection: none
-                 * 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 GeoBroadcast packet generated by ItsNodeC from ItsNodeD
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GeoBroadcast DestinationArea
-                 *                  indicating AREA2
-                 *      }
-                 *      then {
-                 *          the IUT re-broadcasts the GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - - // 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 TC_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: GeoBroadcast message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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: GeoBroadcast message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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: GeoBroadcast message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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 Test that the reception of a TSB indication over upper Gn SAP triggers the origination of a TSB - * packet - *
-                 * Pics Selection: none
-                 * 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_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 TC_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 Test that a received TSB packet is triggering re-broadcasting if received for the first time - *
-                 * Pics Selection: none
-                 * 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_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 TC_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_BV_03 { - - /** - * @desc Test that a received TSB packet is not triggering re-broadcasting if received for the second or - * more time - *
-                 * Pics Selection: none
-                 * 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/BV/03 - * @reference EN 302 636-4-1 [1], clauses 9.3.9.3 - */ - testcase TC_GEONW_PON_TSB_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_TSB_BV_03_nodeB()); - v_nodeD.start(f_GEONW_PON_TSB_BV_03_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end TC_GEONW_PON_TSB_BV_03 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BV_03) - */ - function f_GEONW_PON_TSB_BV_03_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var template (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_BV_03_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BV_03) - */ - function f_GEONW_PON_TSB_BV_03_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - 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_BV_03_nodeD - - } // end GEONW_PON_TSB_BV_03 - - group GEONW_PON_TSB_BV_04 { - - /** - * @desc Test that the protocol header fields (RHL) are correctly updated during a TSB re- - * broadcasting step - *
-                 * Pics Selection: none
-                 * 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_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 TC_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_BV_05 { - - /** - * @desc Test that the RHL restriction is correctly handled at a TSB re-broadcasting step - *
-                 * Pics Selection: none
-                 * 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/BV/05 - * @reference EN 302 636-4-1 [1], clauses 9.3.9.3 - */ - testcase TC_GEONW_PON_TSB_BV_05() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_TSB_BV_05_nodeB()); - v_nodeD.start(f_GEONW_PON_TSB_BV_05_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end TC_GEONW_PON_TSB_BV_05 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BV_05) - */ - function f_GEONW_PON_TSB_BV_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_BV_05_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BV_05) - */ - function f_GEONW_PON_TSB_BV_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_BV_05_nodeD - - } // end GEONW_PON_TSB_BV_05 - - /** - * @desc Test 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: none
-             * 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 { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - - // 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); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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 TC_GEONW_PON_TSB_BV_06 - - group GEONW_PON_TSB_BV_07 { - - /** - * @desc Test that a received TSB packet is not passed over the Gn SAP if it is received for the second - * or more time - *
-                 * Pics Selection: none
-                 * 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/BV/07 - * @reference EN 302 636-4-1 [1], clauses 9.3.9.3 - */ - testcase TC_GEONW_PON_TSB_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // 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_BV_07_nodeB()); - v_nodeD.start(f_GEONW_PON_TSB_BV_07_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end TC_GEONW_PON_TSB_BV_07 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_TSB_BV_07) - */ - function f_GEONW_PON_TSB_BV_07_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Preamble - f_prNeighbour(); - v_gnPacket := m_geoNwPdu(m_geoNwTsbPacket( - vc_localSeqNumber, - v_longPosVectorNodeB - ), - -, - c_defaultHopLimit - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_gnPacket))); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacket( - ?, - mw_longPosVectorPosition(v_longPosVectorNodeB) - ) - ) - ) - ) { - tc_ac.stop; - - f_sleep(PX_TAC); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly rebroadcasted and passed to Upper Layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": INCONC: TSB was not transmitted to upper layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: TSB not rebroadcasted ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } - - // Test Body - f_sleep(PX_TAC); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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_BV_07_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_TSB_BV_07) - */ - function f_GEONW_PON_TSB_BV_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_BV_07_nodeD - - } // end GEONW_PON_TSB_BV_07 - - } // end geoTopologicallyScopedBroadcast - - // 6.2.2.11 - group geoSingleHopBroadcast { - - group GEONW_PON_SHB_BV_01 { - - /** - * @desc Test that the reception of a SHB indication over upper Gn SAP triggers the origination of a SHB - * packet - *
-                 * Pics Selection: none
-                 * 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_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 TC_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_withDelta(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_withDelta(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 Test 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: none
-             * 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 { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - - // 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); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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 TC_GEONW_PON_SHB_BV_02 - - } // end geoSingleHopBroadcast - - // 6.2.2.12 - group geoGeoAnycast { - - group GEONW_PON_GAC_BV_01 { - - /** - * @desc Test that the reception of an anycast indication over upper Gn SAP triggers the origination of a - * GeoAnycast packet's broadcasting if the IUT is within the Destination Area - *
-                 * Pics Selection: none
-                 * 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 GeoAnycast packet
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GeoBroadcast DestinationArea
-                 *                  indicating AREA1
-                 *      }
-                 *      then {
-                 *          the IUT broadcasts the GeoAnycast packet
-                 *              containing GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_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 TC_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_withDelta(v_longPosVectorIut), - ?, - f_getGeoAnycastArea(c_area1)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoAnycast message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoAnycast 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_withDelta(v_longPosVectorIut), - ?, - f_getGeoAnycastArea(c_area1)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoAnycast message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoAnycast 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 Test that the reception of an anycast indication over upper Gn SAP triggers the origination of a - * GeoAnycast packet's line forwarding if the IUT is outside the Destination Area - *
-                 * Pics Selection: 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 GeoAnycast packet
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GeoBroadcast DestinationArea
-                 *                  indicating AREA2
-                 *      }
-                 *      then {
-                 *          the IUT selects ItsNodeB as the next hop and
-                 *          the IUT sends the GeoAnycast packet (see note)
-                 *              containing GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - 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 TC_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_withDelta(v_longPosVectorIut), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoAnycast message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoAnycast 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_withDelta(v_longPosVectorIut), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: received GeoAnycast message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoAnycast 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 Test that a received GeoAnycast packet is not triggering forwarding or re-broadcasting if the IUT - * is within the Destination Area - *
-                 * Pics Selection: none
-                 * 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 GeoAnycast packet
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GeoBroadcast DestinationArea
-                 *                  indicating AREA1
-                 *      }
-                 *      then {
-                 *          IUT does not re-broadcast the received GeoAnycast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - - // Test component configuration - f_cf02Up(); - - // Preamble - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeD := f_getComponent(c_compNodeD); - v_nodeB.start(f_GEONW_PON_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 TC_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: GeoAnycast message re-forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoAnycast 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: GeoAnycast message re-forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoAnycast 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 Test that a received GeoAnycast packet is triggering line forwarding if received out of its - * destination area for the first time - *
-                 * Pics Selection: none
-                 * 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 GeoAnycast packet from ItsNodeC
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GeoAnycast DestinationArea
-                 *                  indicating AREA2
-                 *      }
-                 *      then {
-                 *          the IUT selects ItsNodeB as the next hop and
-                 *          the IUT forwards the GeoAnycast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - - // 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 TC_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: GeoAnycast message correctly forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoAnycast 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: GeoAnycast message not forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoAnycast 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_BV_05 { - - /** - * @desc Test that a received GeoAnycast packet is not triggering line forwarding if received out of its - * destination area for the second or more time - *
-                 * Pics Selection: none
-                 * 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 GeoAnycast 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 GeoBroadcast DestinationArea
-                 *                  indicating AREA2
-                 *      the IUT having forwarded the GeoAnycast packet
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives the same GeoAnycast 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 GeoAnycast packet
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/BV/05 - * @reference EN 302 636-4-1 [1], clauses 9.3.12.3 - */ - testcase TC_GEONW_PON_GAC_BV_05() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - var UInt16 v_sequenceNumber := f_getInitialSequenceNumber(); - - // Test control - - // 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_05_nodeB()); - v_nodeC.start(f_GEONW_PON_GAC_BV_05_nodeC(v_sequenceNumber)); - v_nodeD.start(f_GEONW_PON_GAC_BV_05_nodeD(v_sequenceNumber)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end TC_GEONW_PON_GAC_BV_05 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_BV_05) - */ - function f_GEONW_PON_GAC_BV_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: GeoAnycast message correctly forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Pre-conditions: GeoAnycast 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: GeoAnycast message re-forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoAnycast message not re-forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GAC_BV_05_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_BV_05) - */ - function f_GEONW_PON_GAC_BV_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: GeoAnycast re-forwarded! (not to area center!) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoAnycast message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GAC_BV_05_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_BV_05) - */ - function f_GEONW_PON_GAC_BV_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: GeoAnycast message not forwarded to area center ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: Pre-conditions: GeoAnycast 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: GeoAnycast re-forwarded! (not to area center!) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoAnycast message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GAC_BV_05_nodeD - - } // end GEONW_PON_GAC_BV_05 - - group GEONW_PON_GAC_BV_06 { - - /** - * @desc Test that the protocol header fields (RHL) are correctly updated during a GeoAnycast - * forwarding step - *
-                 * Pics Selection: none
-                 * 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 GeoAnycast 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 GeoBroadcast DestinationArea
-                 *                  indicating AREA2
-                 *      }
-                 *      then {
-                 *          the IUT selects the ItsNodeB as the next hop
-                 *          the IUT forwards the GeoAnycast packet
-                 *              containing Basic Header
-                 *                  containing RHL field
-                 *                      indicating value (HL1 - 1)
-                 *              containing Common Header
-                 *                  containing MHL field
-                 *                      indicating value MHL1
-                 *              containing GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // 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 TC_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: GeoAnycast message correctly forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoAnycast 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_BV_07 { - - /** - * @desc Test that the RHL restriction is correctly handled at a GeoAnycast forwarding step - *
-                 * Pics Selection: none
-                 * 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 GeoAnycast packet from ItsNodeC
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing Basic Header
-                 *                  containing RHL field
-                 *                      indicating 1
-                 *              containing GAC Extended Header
-                 *                  containing GeoBroadcast DestinationArea
-                 *                      indicating AREA2
-                 *      }
-                 *      then {
-                 *         the IUT does not forward the GeoAnycast packet
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/BV/07 - * @reference EN 302 636-4-1 [1], clauses 9.3.12.3 - */ - testcase TC_GEONW_PON_GAC_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - - // Test control - - // 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_07_nodeB()); - v_nodeC.start(f_GEONW_PON_GAC_BV_07_nodeC()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_PON_GAC_BV_07 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_BV_07) - */ - function f_GEONW_PON_GAC_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 { - [] a_receiveGeoAnycastWithArea( - mw_longPosVectorPosition(v_longPosVectorNodeC), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GeoAnycast message re-forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoAnycast message not re-forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GAC_BV_07_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_BV_07) - */ - function f_GEONW_PON_GAC_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_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_BV_07_nodeC - - } // end GEONW_PON_GAC_BV_07 - - /** - * @desc Test that a received GeoAnycast packet is passed over the Gn SAP to the correct upper - * protocol if it is received for the first time within the GeoAnycast destination area - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state"
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT receives a GeoAnycast packet from ItsNodeB
-             *              containing TrafficClass.SCF set to 1 
-             *              containing GeoBroadcast DestinationArea
-             *                  indicating AREA1
-             *      }
-             *      then {
-             *          the IUT passes the received GeoAnycast 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 { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - - // Test component configuration - f_cf01Up(); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - - // Test adapter configuration - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - v_gnPacket := m_geoNwPdu(m_geoNwAnycastPacket( - v_longPosVectorNodeB, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area1) - ) - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - f_sleep(PX_TAC); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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() & ": GeoAnycast packet passed to Upper Layer ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - f_cf01Down(); - - } // end TC_GEONW_PON_GAC_BV_08 - - group GEONW_PON_GAC_BV_09 { - - /** - * @desc Test that a received GeoAnycast packet is not passed over the Gn SAP if it is received for - * the second or more time - *
-                 * Pics Selection: none
-                 * Config Id: CF02
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT having received a GeoAnycast 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 GeoBroadcast DestinationArea
-                 *                  indicating AREA1 and
-                 *      the IUT having passed the received GeoAnycast packet to the correct Upper Layer protocol
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives the same GeoAnycast 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 GeoAnycast packet to any Upper Layer protocol
-                 *      }
-                 *  }
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/GAC/BV/09 - * @reference EN 302 636-4-1 [1], clauses 9.3.12.3 - */ - testcase TC_GEONW_PON_GAC_BV_09() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - var template (value) GeoNetworkingPdu v_gnPacket; - - // Test control - - // 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_BV_09_nodeB()); - v_nodeD.start(f_GEONW_PON_GAC_BV_09_nodeD()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf02Down(); - - } // end TC_GEONW_PON_GAC_BV_09 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_BV_09) - */ - function f_GEONW_PON_GAC_BV_09_nodeB() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Preamble - f_prNeighbour(); - - f_sleep(PX_TAC); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); i:=i+1) { - // empty on purpose - } - if(i < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); - 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 := m_geoNwPdu(m_geoNwAnycastPacket( - v_longPosVectorNodeD, - vc_localSeqNumber, - f_getGeoAnycastArea(c_area1) - ), - -, - c_defaultHopLimit / 2 - ); - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); - - f_sleep(PX_TAC); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); i:=i+1) { - // empty on purpose - } - if(i < 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_BV_09_nodeB - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_BV_09) - */ - function f_GEONW_PON_GAC_BV_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_BV_09_nodeD - - } // end GEONW_PON_GAC_BV_09 - - /** - * @desc Test that a received GeoAnycast packet is not passed over the Gn SAP if it is received for the - * first time outside the GeoAnycast destination area - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state"
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT receives a GeoAnycast packet from ItsNodeB
-             *              containing TrafficClass.SCF set to 1 
-             *              containing GeoBroadcast DestinationArea
-             *                  indicating AREA2
-             *      }
-             *      then {
-             *          the IUT does not pass the received GeoAnycast 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 { - - // Local variables - var LongPosVector v_longPosVectorNodeB; - var template (value) GeoNetworkingPdu v_gnPacket; - var integer i; - - // Test control - - // 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); - for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); i:=i+1) { - // empty on purpose - } - if(i < 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 TC_GEONW_PON_GAC_BV_10 - - group GEONW_PON_GAC_BV_11 { - - /** - * @desc Test that a received GeoAnycast packet is discarded when indicating a too big GeoArea - *
-                 * Pics Selection: none
-                 * 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/BV/11 - * @reference EN 302 636-4-1 [1], Annex B.3 - */ - testcase TC_GEONW_PON_GAC_BV_11() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - var UInt16 v_distanceTooBig; - - // Test control - - // 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_BV_11_nodeB(v_distanceTooBig)); - v_nodeC.start(f_GEONW_PON_GAC_BV_11_nodeC(v_distanceTooBig)); - v_nodeD.start(f_GEONW_PON_GAC_BV_11_nodeD(v_distanceTooBig)); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end TC_GEONW_PON_GAC_BV_11 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_GAC_BV_11) - */ - function f_GEONW_PON_GAC_BV_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: GeoAnycast message forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoAnycast message not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GAC_BV_11_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_GAC_BV_11) - */ - function f_GEONW_PON_GAC_BV_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_BV_11_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_GAC_BV_11) - */ - function f_GEONW_PON_GAC_BV_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: GeoAnycast message forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoAnycast message not forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_GAC_BV_11_nodeD - - } // end GEONW_PON_GAC_BV_11 - - group GEONW_PON_GAC_BV_13 { - - /** - * @desc Test that the reception of an anycast indication over upper Gn SAP triggers the origination of a - * GeoAnycast packet immediate broadcast if the IUT is outside the Destination Area - *
-                 * Pics Selection: 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 GeoAnycast packet
-                 *  			containing TrafficClass.SCF set to 1
-                 *  			containing GeoAnycast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - 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 TC_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_withDelta(v_longPosVectorIut), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: GeoAnycast message received correctly ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoAnycast 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_withDelta(v_longPosVectorIut), - ?, - f_getGeoAnycastArea(c_area2)) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: received GeoAnycast message ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoAnycast 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 Test that a received GeoBroadcast packet is discarded if received twice or more - *
-                 * Pics Selection: 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 GeoBroadcast DestinationArea
-                 *                  indicating AREA1
-                 *      the IUT having saved the packet into CBF buffer
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives the same GeoBroadcast packet from ItsNodeD
-                 *      }
-                 *      then {
-                 *          the IUT removes the GeoBroadcast packet from the CBF buffer
-                 *          the IUT discards the new received GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - var UInt16 v_sequenceNumberC := f_getInitialSequenceNumber(); - - // Test control - 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 TC_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: GeoBroadcast message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast 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: GeoBroadcast message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast 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: GeoBroadcast message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast 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 Test that a received GeoBroadcast packet is triggering contention if received for the first time from a known sender - * when inside of the destination area - *
-                 * Pics Selection: 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 GeoBroadcast packet from ItsNodeC
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GBC Extended Header
-                 *                  containing GeoBroadcast DestinationArea
-                 *                      indicating AREA1
-                 *      }
-                 *      then {
-                 *          the IUT saves the GeoBroadcast packet into the CBF buffer and
-                 *          the IUT starts the contention timer and
-                 *          the IUT re-broadcasts the received GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - 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 TC_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: GeoBroadcast message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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; - - 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: GeoBroadcast message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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: GeoBroadcast message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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 Test that a received GeoBroadcast 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_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 GeoBroadcast packet from ItsNodeC
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GBC Extended Header
-                 *                  containing GeoBroadcast DestinationArea
-                 *                      indicating AREA2
-                 *      }
-                 *      then {
-                 *          the IUT selects ItsNodeB as next hop ITS station and
-                 *          the IUT forwards the GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - 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 TC_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: GeoBroadcast correctly forwarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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 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_BV_04 { - - /** - * @desc Test that a received GeoBroadcast 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_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 GeoBroadcast packet from ItsNodeD
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GBC Extended Header
-                 *                  containing GeoBroadcast DestinationArea
-                 *                      indicating AREA2
-                 *      }
-                 *      then {
-                 *          the IUT discards the received GeoBroadcast packet
-                 *      }
-                 *  }
-                 *  
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/PON/BCA/BV/04 - * @reference EN 302 636-4-1 [1], Annex E.3 - */ - testcase TC_GEONW_PON_BCA_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - 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_04_nodeB()); - v_nodeC.start(f_GEONW_PON_BCA_BV_04_nodeC()); - v_nodeD.start(f_GEONW_PON_BCA_BV_04_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end TC_GEONW_PON_BCA_BV_04 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BCA_BV_04) - */ - function f_GEONW_PON_BCA_BV_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: GeoBroadcast received and not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast message discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BCA_BV_04_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_BCA_BV_04) - */ - function f_GEONW_PON_BCA_BV_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: GeoBroadcast received and not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast message discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BCA_BV_04_nodeC - - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_BCA_BV_04) - */ - function f_GEONW_PON_BCA_BV_04_nodeD() runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); - - // Preamble - f_prNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwBroadcastPacket( - v_longPosVectorNodeD, - vc_localSeqNumber, - f_getGeoBroadcastArea(c_area2) - ) - ) - ) - ); - - tc_noac.start; - alt { - [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { - tc_noac.stop; - log("*** " & testcasename() & ": FAIL: GeoBroadcast received and not discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": PASS: GeoBroadcast message discarded ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BCA_BV_04_nodeD - - } // end GEONW_PON_BCA_BV_04 - - group GEONW_PON_BCA_BV_05 { - - /** - * @desc Test that a received GeoBroadcast 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_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 GeoBroadcast packet generated by ItsNodeC from ItsNodeD
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GBC Extended Header
-                 *                  containing GeoBroadcast DestinationArea
-                 *                      indicating AREA1
-                 *      }
-                 *      then {
-                 *          the IUT saves the GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - 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 TC_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: GeoBroadcast message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast message not broadcasted ***"); - 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); - - // 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: GeoBroadcast message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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) - ) - ) - ) - ); - - 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: GeoBroadcast message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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 Test that a received GeoBroadcast 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_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 GeoBroadcast packet generated by ItsNodeC from ItsNodeD
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GBC Extended Header
-                 *                  containing GeoBroadcast DestinationArea
-                 *                      indicating AREA2
-                 *      }
-                 *      then {
-                 *          the IUT re-broadcasts the GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - 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 TC_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: GeoBroadcast broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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: GeoBroadcast message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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: GeoBroadcast message re-broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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 Test that a received GeoBroadcast 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_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 GeoBroadcast packet generated by ItsNodeC from ItsNodeD
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GBC Extended Header
-                 *                  containing GeoBroadcast DestinationArea
-                 *                      indicating AREA2
-                 *      }
-                 *      then {
-                 *          the IUT re-broadcasts the GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - 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 TC_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: GeoBroadcast broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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) - ) - ) - ) - ); - - 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: GeoBroadcast broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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: GeoBroadcast broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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 - - group GEONW_PON_BCA_BV_08 { - - /** - * @desc Test that a received GeoBroadcast 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_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 GeoBroadcast packet generated by ItsNodeC from ItsNodeD
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GBC Extended Header
-                 *                  containing GeoBroadcast DestinationArea
-                 *                      indicating AREA1
-                 *      }
-                 *      then {
-                 *          the IUT saves the GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - 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 TC_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: GeoBroadcast message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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: GeoBroadcast message broadcasted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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) - ) - ) - ) - ); - - 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: GeoBroadcast message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast 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 - - } // end geoGeoBroadcastCbfAlgorithm + } // end geoSingleHopBroadcast - // 6.2.2.13 - group geoGeoBroadcastAdvAlgorithm { - - group GEONW_PON_BAA_BV_01 { - - /** - * @desc Test that a received GeoBroadcast packet is discarded if received more than MAX_COUNTER - * times when IUT is inside of the destination area - *
-                 * Pics Selection: PICS_GN_GEOBROADCAST_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 GeoBroadcast packet GBC1 from ItsNodeF
-                 *          containing TrafficClass.SCF set to 1
-                 *          containing GBC Extended Header
-                 *              containing GeoBroadcast 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 GeoBroadcast packet GBC1
-                 *      }
-                 *      then {
-                 *          the IUT removes GBC1 from the CBF buffer
-                 *          the IUT discards the new received GeoBroadcast 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 - */ - testcase TC_GEONW_PON_BAA_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeF; - - // Test control - 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 TC_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 - - // 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_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, - 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 - - group GEONW_PON_BAA_BV_02 { - - /** - * @desc Test that a received GeoBroadcast packet is discarded if received more than 1 times when IUT - * is inside of the destination area and inside the sectorial area of the GeoBroadcast packet Sender - *
-                 * Pics Selection: PICS_GN_GEOBROADCAST_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 GeoBroadcast packet GBC1 from ItsNodeB
-                 *          containing TrafficClass.SCF set to 1
-                 *          containing GBC Extended Header
-                 *              containing GeoBroadcast DestinationArea
-                 *                  indicating AREA1
-                 *      the IUT having saved the packet into CBF buffer
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives the same GeoBroadcast 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 GeoBroadcast 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 - */ - testcase TC_GEONW_PON_BAA_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeE; - - // Test control - 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_02_nodeB()); - v_nodeE.start(f_GEONW_PON_BAA_BV_02_nodeE()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf05Down(); - - } // end TC_GEONW_PON_BAA_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_02) - */ - function f_GEONW_PON_BAA_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 - 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_02_nodeB - - /** - * @desc Behavior function for NodeE (TC_GEONW_PON_BAA_BV_02) - */ - function f_GEONW_PON_BAA_BV_02_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_BAA_BV_02_nodeE - - } // end GEONW_PON_BAA_BV_02 + // 6.2.2.12 + group geoGeoAnycast { - group GEONW_PON_BAA_BV_03 { - - /** - * @desc Test that a received GeoBroadcast 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 GeoBroadcast packet Sender (Angle_FSR > Angle_TH) - *
-                 * Pics Selection: PICS_GN_GEOBROADCAST_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 GeoBroadcast packet GBC1 from ItsNodeB
-                 *          containing TrafficClass.SCF set to 1
-                 *          containing GBC Extended Header
-                 *              containing GeoBroadcast DestinationArea
-                 *                  indicating AREA1
-                 *      the IUT having saved the packet into CBF buffer
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives the same GeoBroadcast packet GBC1 from ItsNodeF
-                 *          the IUT is outside the sectorial area of ItsNodeB
-                 *      }
-                 *      then {
-                 *          the IUT saves the GeoBroadcast packet GBC1 from ItsNodeF and
-                 *          the IUT starts the contention timer and
-                 *          the IUT re-broadcasts the received GeoBroadcast 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/BAA/BV/03 - * @reference EN 302 636-4-1 [1], Annex E.4 - */ - testcase TC_GEONW_PON_BAA_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeF; - - // Test control - 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_03_nodeB()); - v_nodeF.start(f_GEONW_PON_BAA_BV_03_nodeF()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf06Down(); - - } // end TC_GEONW_PON_BAA_BV_03 - - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_03) - */ - function f_GEONW_PON_BAA_BV_03_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: GeoBroadcast message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BAA_BV_03_nodeB - - /** - * @desc Behavior function for NodeF (TC_GEONW_PON_BAA_BV_03) - */ - function f_GEONW_PON_BAA_BV_03_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_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: GeoBroadcast message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BAA_BV_03_nodeF + /** + * @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 - } // end GEONW_PON_BAA_BV_03 - - group GEONW_PON_BAA_BV_04 { - - /** - * @desc Test that a received GeoBroadcast 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_GEOBROADCAST_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 GeoBroadcast packet from ItsNodeE
-                 *              addressed to IUT's link-layer address
-                 *              containing TrafficClass.SCF set to 1 
-                 *              containing GBC Extended Header
-                 *                  containing GeoBroadcast DestinationArea
-                 *                      indicating AREA1
-                 *      }
-                 *      then {
-                 *          the IUT selects ItsNodeB as the next hop ITS station and
-                 *          the IUT forwards the GeoBroadcast 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 - */ - testcase TC_GEONW_PON_BAA_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeE; - - // Test control - 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_04_nodeB()); - v_nodeE.start(f_GEONW_PON_BAA_BV_04_nodeE()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf05Down(); - - } // end TC_GEONW_PON_BAA_BV_04 + /** + * @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(); + + } // end TC_GEONW_PON_GAC_BV_02 - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_04) - */ - function f_GEONW_PON_BAA_BV_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_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_BAA_BV_04_nodeB + /** + * @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_GAC_BV_03 - /** - * @desc Behavior function for NodeE (TC_GEONW_PON_BAA_BV_04) - */ - function f_GEONW_PON_BAA_BV_04_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_04_nodeE + /** + * @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_GAC_BV_04 - } // end GEONW_PON_BAA_BV_04 - - group GEONW_PON_BAA_BV_05 { - - /** - * @desc Test that a received GeoBroadcast 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_GEOBROADCAST_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 GeoBroadcast packet from ItsNodeE addressed to IUT’s link-layer address
-                 *  			containing TrafficClass.SCF set to 1
-                 *  			containing GBC Extended Header
-                 *  				containing GeoBroadcast DestinationArea
-                 *  					indicating AREA1
-                 *  	}
-                 *  	then {
-                 *  		the IUT saves the GeoBroadcast packet into the CBF buffer and
-                 *  		the IUT starts the contention timer set to CBF_MAX and
-                 *  		the IUT re-broadcasts the received GeoBroadcast packet
-                 *  			upon expiry of the contention timer
-                 *  	}
-                 *  }
-                 * 
- * - * @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 - */ - testcase TC_GEONW_PON_BAA_BV_05() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeE; - - // Test control - 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_05_nodeB()); - v_nodeE.start(f_GEONW_PON_BAA_BV_05_nodeE()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf05Down(); - - } // end TC_GEONW_PON_BAA_BV_05 + /** + * @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_GAC_BO_05 - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_05) - */ - function f_GEONW_PON_BAA_BV_05_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_BAA_BV_05_nodeB + /** + * @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(); + + } // end TC_GEONW_PON_GAC_BV_06 - /** - * @desc Behavior function for NodeE (TC_GEONW_PON_BAA_BV_05) - */ - function f_GEONW_PON_BAA_BV_05_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_BAA_BV_05_nodeE - - } // end GEONW_PON_BAA_BV_05 - - group GEONW_PON_BAA_BV_06 { - - /** - * @desc Test that a received GeoBroadcast 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_GEOBROADCAST_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 GeoBroadcast packet from ItsNodeE
-                 *              addressed to broadcast link-layer address
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GBC Extended Header
-                 *                  containing GeoBroadcast DestinationArea
-                 *                      indicating AREA1
-                 *      }
-                 *      then {
-                 *          the IUT calculates and starts the contention timer and
-                 *          the IUT re-broadcasts the received GeoBroadcast packet
-                 *              upon expiry of the contention timer
-                 *      }
-                 *  }
-                 *  
-                 * 
- * - * @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 - */ - testcase TC_GEONW_PON_BAA_BV_06() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeE; - - // Test control - 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_06_nodeB()); - v_nodeE.start(f_GEONW_PON_BAA_BV_06_nodeE()); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf05Down(); - - } // end TC_GEONW_PON_BAA_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_GAC_BO_07 - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_06) - */ - function f_GEONW_PON_BAA_BV_06_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; - - // 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: GeoBroadcast 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_BAA_BV_06_nodeB + /** + * @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 { - /** - * @desc Behavior function for NodeE (TC_GEONW_PON_BAA_BV_06) - */ - function f_GEONW_PON_BAA_BV_06_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_getGeoBroadcastCbfMaxTime()) - + ( - int2float(f_getGeoBroadcastCbfMinTime() - f_getGeoBroadcastCbfMaxTime()) - / 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) - ) - ) - ) - ); - - 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: GeoBroadcast 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_BAA_BV_06_nodeE + f_GEONW_PON_GAC_BV_08(); - } // end GEONW_PON_BAA_BV_06 + } // end TC_GEONW_PON_GAC_BV_08 - group GEONW_PON_BAA_BV_07 { - - /** - * @desc Test that a received GeoBroadcast 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 - *
-                 * Pics Selection: 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 having received Beacon information from ItsNodeD
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a GeoBroadcast packet from ItsNodeC
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GBC Extended Header
-                 *                  containing GeoBroadcast DestinationArea
-                 *                      indicating AREA2
-                 *      }
-                 *      then {
-                 *          the IUT selects ItsNodeB as the next hop ITS station and
-                 *          the IUT forwards the GeoBroadcast packet
-                 *      }
-                 *  }
-                 *  
-                 * 
- * - * @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 - */ - testcase TC_GEONW_PON_BAA_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - 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_07_nodeB()); - v_nodeC.start(f_GEONW_PON_BAA_BV_07_nodeC()); - v_nodeD.start(f_GEONW_PON_BAA_BV_07_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end TC_GEONW_PON_BAA_BV_07 + /** + * @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(); + + } // end TC_GEONW_PON_GAC_BO_09 - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_07) - */ - function f_GEONW_PON_BAA_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_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); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BAA_BV_07_nodeB + /** + * @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 { - /** - * @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); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BAA_BV_07_nodeC + f_GEONW_PON_GAC_BV_10(); - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_BAA_BV_07) - */ - function f_GEONW_PON_BAA_BV_07_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 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_07_nodeD + } // end TC_GEONW_PON_GAC_BV_10 + + /** + * @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(); + + } // 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(); + + } // end TC_GEONW_PON_GAC_BV_13 - } // end GEONW_PON_BAA_BV_07 + } // end geoGeoAnycast + + // 6.2.2.13 + group geoGeoBroadcastCbfAlgorithm { - group GEONW_PON_BAA_BV_08 { - - /** - * @desc Test that a received GeoBroadcast 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 - *
-                 * Pics Selection: 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 having received Beacon information from ItsNodeD
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a GeoBroadcast packet from ItsNodeD
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GBC Extended Header
-                 *                  containing GeoBroadcast DestinationArea
-                 *                      indicating AREA2
-                 *      }
-                 *      then {
-                 *          the IUT discards the received GeoBroadcast packet
-                 *      }
-                 *  }
-                 *  
-                 * 
- * - * @see ETSI TS 102 871-2 v2.1.1 TP/GEONW/PON/BAA/BV/08 - * @reference EN 302 636-4-1 [1], Annex E.4 - */ - testcase TC_GEONW_PON_BAA_BV_08() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - 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_08_nodeB()); - v_nodeC.start(f_GEONW_PON_BAA_BV_08_nodeC()); - v_nodeD.start(f_GEONW_PON_BAA_BV_08_nodeD()); - - // Synchronization - f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf04Down(); - - } // end TC_GEONW_PON_BAA_BV_08 + /** + * @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/BO-01 + * @reference EN 302 636-4-1 [1], Annex E.3 + */ + testcase TC_GEONW_PON_BCA_BO_01() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_BCA_BO_01(); + + } // end TC_GEONW_PON_BCA_BO_01 - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_08) - */ - function f_GEONW_PON_BAA_BV_08_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_BAA_BV_08_nodeB + /** + * @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_BCA_BV_02 - /** - * @desc Behavior function for NodeC (TC_GEONW_PON_BAA_BV_08) - */ - function f_GEONW_PON_BAA_BV_08_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: 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_08_nodeC + /** + * @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_BCA_BV_03 - /** - * @desc Behavior function for NodeD (TC_GEONW_PON_BAA_BV_08) - */ - function f_GEONW_PON_BAA_BV_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) - ) - ) - ) - ); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BAA_BV_08_nodeD + /** + * @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_BCA_BO_04 - } // end GEONW_PON_BAA_BV_08 - - group GEONW_PON_BAA_BV_09 { - - /** - * @desc Test that a received GeoBroadcast 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_GEOBROADCAST_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 GeoBroadcast packet from ItsNodeE
-                 *              addressed to link-layer broadcast address
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GBC Extended Header
-                 *                  containing GeoBroadcast DestinationArea
-                 *                      indicating AREA1
-                 *      }
-                 *      then {
-                 *          the IUT saves the GeoBroadcast packet into the CBF buffer and
-                 *          the IUT starts the contention timer set to CBF_MAX and
-                 *          the IUT re-broadcasts the received GeoBroadcast packet
-                 *              upon expiry of the contention timer
-                 *      }
-                 *  }
-                 *  
-                 * 
- * - * @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 - */ - testcase TC_GEONW_PON_BAA_BV_09() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeE; - - // Test control - 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 TC_GEONW_PON_BAA_BV_09 + /** + * @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_BCA_BV_05 - /** - * @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; - - 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: GeoBroadcast 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_BAA_BV_06_nodeB + /** + * @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_BCA_BV_06 - /** - * @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 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: GeoBroadcast 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_BAA_BV_09_nodeE + /** + * @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_BCA_BV_07 - } // end GEONW_PON_BAA_BV_09 - - group GEONW_PON_BAA_BV_10 { - - /** - * @desc Test that a received GeoBroadcast 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_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 GeoBroadcast packet generated by ItsNodeC from ItsNodeD
-                 *              containing TrafficClass.SCF set to 1
-                 *              containing GBC Extended Header
-                 *                  containing GeoBroadcast DestinationArea
-                 *                      indicating AREA2
-                 *      }
-                 *      then {
-                 *          the IUT re-broadcasts the GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var ItsGeoNetworking v_nodeD; - - // Test control - 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 TC_GEONW_PON_BAA_BV_10 + /** + * @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_BCA_BV_08 - /** - * @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); - - // 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: 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_BAA_BV_10_nodeB + /** + * @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_GEOBROADCAST_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/BAA/BV-01 + * @reference EN 302 636-4-1 [1], Annex E.4 + */ + testcase TC_GEONW_PON_BAA_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_BAA_BV_01(); + + } // end TC_GEONW_PON_BAA_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); - - // Preamble - f_prNonNeighbour(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu(m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - 0, - 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: 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_BAA_BV_10_nodeC + /** + * @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_GEOBROADCAST_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/BAA/BV-02 + * @reference EN 302 636-4-1 [1], Annex E.4 + */ + 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 - /** - * @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); - - // 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); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BAA_BV_10_nodeD + /** + * @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_GEOBROADCAST_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/BAA/BV-03 + * @reference EN 302 636-4-1 [1], Annex E.4 + */ + testcase TC_GEONW_PON_BAA_BV_03() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_BAA_BV_03(); + + } // end TC_GEONW_PON_BAA_BV_03 - } // end GEONW_PON_BAA_BV_10 - - group GEONW_PON_BAA_BV_11 { - - /** - * @desc Test that a received GeoBroadcast packet is triggering contention if received more than 1 times when IUT - * is inside the destination area and outside the sectorial area of the GeoBroadcast packet Sender (Dist_R > Dist_F) - *
-                 * Pics Selection: 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 GeoBroadcast packet GBC1 from ItsNodeB
-                 *          containing TrafficClass.SCF set to 1
-                 *          containing GBC Extended Header
-                 *              containing GeoBroadcast DestinationArea
-                 *                  indicating AREA1
-                 *      the IUT having saved packet into the CBF buffer
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives the same GeoBroadcast packet GBC1 from ItsNodeD
-                 *          the IUT is outside the sectorial area of ItsNodeB
-                 *      }
-                 *      then {
-                 *          the IUT saves the GeoBroadcast packet into the CBF buffer and
-                 *          the IUT starts the contention timer and
-                 *          the IUT re-broadcasts the received GeoBroadcast 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 { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeD; - - // Test control - 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_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 TC_GEONW_PON_BAA_BV_11 + /** + * @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_GEOBROADCAST_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/BAA/BV-04 + * @reference EN 302 636-4-1 [1], Annex E.4 + */ + testcase TC_GEONW_PON_BAA_BV_04() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_BAA_BV_04(); + + } // end TC_GEONW_PON_BAA_BV_04 - /** - * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_11) - */ - function f_GEONW_PON_BAA_BV_11_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: GeoBroadcast message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BAA_BV_11_nodeB + /** + * @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_GEOBROADCAST_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/BAA/BV-05 + * @reference EN 302 636-4-1 [1], Annex E.4 + */ + testcase TC_GEONW_PON_BAA_BV_05() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_BAA_BV_05(); + + } // end TC_GEONW_PON_BAA_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); - - // 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: GeoBroadcast message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } - [] t_toCbf.timeout { - log("*** " & testcasename() & ": INFO: CBF timer elapsed ***"); - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: GeoBroadcast message not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_PON_BAA_BV_11_nodeD + /** + * @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_GEOBROADCAST_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/BAA/BV-06 + * @reference EN 302 636-4-1 [1], Annex E.4 + */ + testcase TC_GEONW_PON_BAA_BV_06() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_BAA_BV_06(); + + } // end TC_GEONW_PON_BAA_BV_06 + + /** + * @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 + *
+            * 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 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 GBC Extended Header
+            *                  containing DestinationArea
+            *                      indicating AREA2
+            *      }
+            *      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/BAA/BV-07 + * @reference EN 302 636-4-1 [1], Annex E.4 + */ + testcase TC_GEONW_PON_BAA_BV_07() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_BAA_BV_07(); + + } // end TC_GEONW_PON_BAA_BV_07 + + /** + * @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 + *
+            * 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 having received Beacon information from ItsNodeD
+            *  }
+            * 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
+            *      }
+            *      then {
+            *          the IUT discards the received GBC 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 + */ + testcase TC_GEONW_PON_BAA_BO_08() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_BAA_BO_08(); + + } // end TC_GEONW_PON_BAA_BO_08 + + /** + * @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_GEOBROADCAST_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/BAA/BV-09 + * @reference EN 302 636-4-1 [1], Annex E.4 + */ + testcase TC_GEONW_PON_BAA_BV_09() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_PON_BAA_BV_09(); + + } // end TC_GEONW_PON_BAA_BV_09 + + /** + * @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 { + + f_GEONW_PON_BAA_BV_10(); + + } // end TC_GEONW_PON_BAA_BV_10 + + /** + * @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 { + + f_GEONW_PON_BAA_BV_11(); + + } // end TC_GEONW_PON_BAA_BV_11 - } // end GEONW_PON_BAA_BV_11 - } // end geoGeoBroadcastCbfAlgorithm } // end geoProtocolOperation @@ -18909,166 +5762,45 @@ module ItsGeoNetworking_TestCases { group geoCapLocationService { /** - * @desc Test of LS buffer capacity according to its GnLocationServicePacketBufferSize parameter and - * the overflow handling procedure - *
-             * Pics Selection: none
-             * Config Id: CF01
-             * Initial conditions:
-             *  with {
-             *      the IUT being in the "initial state" and
-             *      the IUT having no Location Table Entry for ItsNodeA and
-             *      the IUT having received Beacon information from ItsNodeB and
-             *      the IUT having been requested to send multiple GeoUnicast packets to ItsNodeA
-             *          containing TrafficClass.SCF set to 1 and
-             *      the IUT having sent a LS_REQUEST packet and
-             *      the IUT not having received a LS_REPLY packet
-             *  }
-             * Expected behaviour:
-             *  ensure that {
-             *      when {
-             *          the IUT is requested to send a GeoUnicast packet to ItsNodeA
-             *              containing TrafficClass.SCF set to 1 and
-             *          the location service buffer capacity exceeded (see note 1)
-             *      }
-             *      then {
-             *          the IUT removes the older packet(s) in the location service buffer and,
-             *          the IUT inserts the new received packet at the end of the location service buffer (see note 2)
-             *      }
-             *  }
-             *  NOTE 1: The amount of stored data exceeds Location Service buffer capacity defined by the 
-             *          itsGnLocationServicePacketBufferSize MIB parameter
-             *  NOTE 2: Buffered packets will be delivered upon reception of LS_REPLY message
-             *  
-             * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/CAP/LOS/BV/01 - * @reference EN 302 636-4-1 [1], clauses 7.4.3 - */ + * @desc Test of LS buffer capacity according to its GnLocationServicePacketBufferSize parameter and + * the overflow handling procedure + *
+            * Pics Selection: PICS_GN_LS_REQ_SRC
+            * Config Id: CF01
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having no Location Table Entry for ItsNodeA and
+            *      the IUT having received Beacon information from ItsNodeB and
+            *      the IUT having been requested to send multiple GUC packets to ItsNodeA
+            *          containing TrafficClass.SCF set to 1 and
+            *      the IUT having sent a LS_REQUEST packet and
+            *      the IUT not having received a LS_REPLY packet
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT is requested to send a GUC packet to ItsNodeA
+            *              containing TrafficClass.SCF set to 1 and
+            *          the location service buffer capacity exceeded (see note 1)
+            *      }
+            *      then {
+            *          the IUT removes the older packet(s) in the location service buffer and,
+            *          the IUT inserts the new received packet at the end of the location service buffer (see note 2)
+            *      }
+            *  }
+            *  NOTE 1: The amount of stored data exceeds Location Service buffer capacity defined by the
+            *          itsGnLocationServicePacketBufferSize MIB parameter
+            *  NOTE 2: Buffered packets will be delivered upon reception of LS_REPLY message
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/CAP/LOS/BV-01 + * @reference EN 302 636-4-1 [1], clauses 7.4.3 + */ testcase TC_GEONW_CAP_LOS_BV_01() runs on ItsGeoNetworking system ItsGeoNetworkingSystem { - // Local variables - var LongPosVector v_longPosVectorNodeA; - var LongPosVector v_longPosVectorNodeB; - var LongPosVector v_longPosVectorIut; - var GeoNetworkingInd v_msg; - var integer v_packetSize := 0; - var integer v_index := 0; - var integer v_nbrOfPackets := 0; - - // Test control - - // Test component configuration - f_cf01Up(); - - // Test adapter configuration - - // Preamble - v_longPosVectorNodeA := f_getPosition(c_compNodeA); - v_longPosVectorNodeB := f_getPosition(c_compNodeB); - v_longPosVectorIut := f_getPosition(c_compIut); - f_prNeighbour(); - - // Trigger message to NodeB in order to get an estimation of packet size - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithPayload(v_longPosVectorNodeB.gnAddr, char2oct("PAYLOAD_" & oct2str(int2oct(0, 2))))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), - ? - ) - ) - ) - ) -> value v_msg { - var GeoNetworkingReq v_req; - tc_ac.stop; - //if we use directly v_msg(GeoNetworkingInd) for encvalue the encoder must also be able to provide - //encoding of "incoming messages"... - v_req.msgOut := v_msg.msgIn; - v_packetSize := lengthof(bit2oct(encvalue(v_req.msgOut))); - } - } - - // implicitely trigger LS_REQUEST - if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - tc_ac.start; - alt { - [] a_receiveLsRequest( - ?, - v_longPosVectorNodeA.gnAddr.mid, - v_longPosVectorIut - ) { - } - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - // Fill the LS buffer + one more message to remove an older message - v_nbrOfPackets := f_getLsPacketBufferSize() / v_packetSize + 1; - log("*** " & testcasename() & ": " & int2str(v_nbrOfPackets) & " ***"); - for (v_index:=1; v_index <= v_nbrOfPackets; v_index:=v_index+1) { - if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithPayload(v_longPosVectorNodeA.gnAddr, char2oct("PAYLOAD_" & oct2str(int2oct(v_index, 2))))) ) { - log("*** " & testcasename() & ": INCONC: Trigger failed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } - - f_sleepIgnoreDef(0.5); - f_sendGeoNetMessage( - m_geoNwReq_linkLayerBroadcast( - m_geoNwPdu( - m_geoNwLsReplyPacket( - v_longPosVectorNodeB, - f_longPosVector2ShortPosVector(v_longPosVectorIut), - vc_localSeqNumber - ) - ) - ) - ); - - // packet 1 shall be dropped - v_index := 2; - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - f_receiveGeoNetMessageWithPayload( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ), - f_adaptPayload_mw(char2oct("PAYLOAD_" & oct2str(int2oct(v_index, 2)))) - ) - ) { - if (v_index < v_nbrOfPackets) { - v_index := v_index + 1; - repeat; - } - tc_ac.stop; - log("*** " & testcasename() & ": Older message was removed, new message was inserted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": Expected amount of messages were not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poNeighbour(); - f_cf01Down(); + f_GEONW_CAP_LOS_BV_01(); } // end TC_GEONW_CAP_LOS_BV_01 @@ -19077,391 +5809,99 @@ module ItsGeoNetworking_TestCases { // 6.2.3.2 group geoCapForwardingPacketBuffer { - group GEONW_CAP_FPB_BV_01 { - - /** - * @desc Test of UC forwarding buffer capacity according to itsGnUcForwardingPacketBufferSize - * parameter and the overflow handling procedure - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT having no Location Table Entry for ItsNodeB and
-                 *      the IUT having received multiple GeoUnicast packets addressed to ItsNodeA from ItsNodeC
-                 *          containing TrafficClass.SCF set to 1
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a GeoUnicast packet addressed to ItsNodeA from ItsNodeC
-                 *              containing TrafficClass.SCF set to 1 
-                 *              containing Basic Header
-                 *                  containing RHL field
-                 *                      indicating HL1 higher than 1
-                 *          the UC forwarding packet buffer capacity exceeded (see note 1)
-                 *      }
-                 *      then {
-                 *          the IUT removes the older packet(s) in the UC forwarding packet buffer and,
-                 *          the IUT inserts the new received GeoUnicast packet at the end of the UC forwarding packet buffer (see note 2)
-                 *      }
-                 *  }
-                 *  NOTE 1: The amount of stored data exceeds UC forwarding packet capacity defined by the
-                 *          itsGnUcForwardingPacketBufferSize MIB parameter
-                 *  NOTE 2: Buffered packets will be delivered upon reception of Beacon message from ItsNodeB
-                 *  
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/CAP/FPB/BV/01 - * @reference EN 302 636-4-1 [1], clauses 7.5.3 - */ - testcase TC_GEONW_CAP_FPB_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var template (value) GeoNetworkingPdu v_geoNetworkingMsg; - var integer v_packetSize := 0; - var integer v_nbrOfPackets := 0; - var integer v_payloadSize := f_min(1400, f_getUcForwardingPacketBufferSize() / 10 ); - var octetstring v_payload; - const integer c_nbrOfDiscardedMessages := 1; - var UInt16 v_sequenceNumberC := f_getInitialSequenceNumber(); - - // Test control - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Prepare GeoUnicast message - v_payload := int2oct(0, v_payloadSize); - v_geoNetworkingMsg := m_geoNwPdu( - m_geoNwUnicastPacket( - m_dummyLongPosVector, - f_longPosVector2ShortPosVector(valueof(m_dummyLongPosVector)), - 0) - ); - v_geoNetworkingMsg.gnPacket.packet.payload := f_adaptPayload_m(v_payload); - v_packetSize := lengthof(bit2oct(encvalue(v_geoNetworkingMsg))); - - // Fill the UC forwarding buffer + c_nbrOfDiscardedMessages more message to remove older messages - v_nbrOfPackets := f_getUcForwardingPacketBufferSize() / v_packetSize + c_nbrOfDiscardedMessages + 1; - log("*** " & testcasename() & ": " & int2str(v_nbrOfPackets) & " ***"); - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_CAP_FPB_BV_01_nodeB(v_sequenceNumberC, v_nbrOfPackets, c_nbrOfDiscardedMessages)); - v_nodeC.start(f_GEONW_CAP_FPB_BV_01_nodeC(v_sequenceNumberC, v_nbrOfPackets, v_geoNetworkingMsg)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_CAP_FPB_BV_01 - - /** - * @desc Behavior function for NodeB (TC_GEONW_CAP_FPB_BV_01) - * @param p_sequenceNumberC Initial sequence number of NodeC - * @param p_nbrOfPackets Number of packets sent by other component - * @param p_nbrOfDiscardedMessages Number of packets that should be discarded - */ - function f_GEONW_CAP_FPB_BV_01_nodeB( - in UInt16 p_sequenceNumberC, - in integer p_nbrOfPackets, - in integer p_nbrOfDiscardedMessages - ) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var UInt16 v_expectedSeqNumber := p_sequenceNumberC + p_nbrOfDiscardedMessages + 1; - var integer v_nbReceivedMessages := 0; - - // Preamble - f_prDefault(); // NodeB is not yet a neighbour - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_startBeingNeighbour(); - - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - v_expectedSeqNumber - ) - ) - ) - ) { - v_nbReceivedMessages := v_nbReceivedMessages + 1; - v_expectedSeqNumber := v_expectedSeqNumber + 1; - repeat; // repeat in any case => IUT may send more messages ! - } - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwUnicastPacket( - mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), - ? - ) - ) - ) - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Unexpected message received (Bad sequence number) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - if(v_nbReceivedMessages == (p_nbrOfPackets - p_nbrOfDiscardedMessages)) { - log("*** " & testcasename() & ": PASS: Older messages wer removed, new messages were inserted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: Expected amount of messages were not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_CAP_FPB_BV_01_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_CAP_FPB_BV_01) - * @param p_sequenceNumberC Initial sequence number of NodeC - * @param p_nbrOfPackets Number of packets to be send - * @param p_geoNetworkingMsg Pdu to be sent (template) - */ - function f_GEONW_CAP_FPB_BV_01_nodeC( - in UInt16 p_sequenceNumberC, - in integer p_nbrOfPackets, - in template (value) GeoNetworkingPdu p_geoNetworkingMsg - ) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var integer i := 0; - - // Preamble - f_prNeighbour(); - vc_localSeqNumber := p_sequenceNumberC; - - p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoUnicastHeader.srcPosVector := v_longPosVectorNodeC; - p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoUnicastHeader.dstPosVector := f_longPosVector2ShortPosVector(v_longPosVectorNodeA); - for (i:=0; i < p_nbrOfPackets; i:=i+1) { - p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoUnicastHeader.seqNumber := vc_localSeqNumber; - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(p_geoNetworkingMsg)); - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_CAP_FPB_BV_01_nodeC + /** + * @desc Test of UC forwarding buffer capacity according to itsGnUcForwardingPacketBufferSize + * parameter and the overflow handling procedure + *
+            * Pics Selection: PICS_GN_GUC_FWD
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having no Location Table Entry for ItsNodeB and
+            *      the IUT having received multiple GUC packets addressed to ItsNodeA from ItsNodeC
+            *          containing TrafficClass.SCF set to 1
+            *  }
+            * 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 HL1 higher than 1
+            *          the UC forwarding packet buffer capacity exceeded (see note 1)
+            *      }
+            *      then {
+            *          the IUT removes the older packet(s) in the UC forwarding packet buffer and,
+            *          the IUT inserts the new received GUC packet at the end of the UC forwarding packet buffer (see note 2)
+            *      }
+            *  }
+            *  NOTE 1: The amount of stored data exceeds UC forwarding packet capacity defined by the
+            *          itsGnUcForwardingPacketBufferSize MIB parameter
+            *  NOTE 2: Buffered packets will be delivered upon reception of Beacon message from ItsNodeB
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/CAP/FPB/BV-01 + * @reference EN 302 636-4-1 [1], clauses 7.5.3 + */ + testcase TC_GEONW_CAP_FPB_BV_01() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_CAP_FPB_BV_01(); + + } // end TC_GEONW_CAP_FPB_BV_01 - } // end GEONW_CAP_FPB_BV_01 - - group GEONW_CAP_FPB_BV_02 { - - /** - * @desc Test of BC forwarding buffer capacity according to itsGnBcForwardingPacketBufferSize - * parameter and the overflow handling procedure - *
-                 * Pics Selection: none
-                 * Config Id: CF03
-                 * Initial conditions:
-                 *  with {
-                 *      the IUT being in the "initial state" and
-                 *      the IUT having no Location Table Entry for ItsNodeB
-                 *      the IUT having received multiple GeoBroadcast packets
-                 *          containing TrafficClass.SCF set to 1
-                 *          containing GBC Extended Header
-                 *              containing GeoBroadcast Destination Area
-                 *                  indicating AREA2
-                 *  }
-                 * Expected behaviour:
-                 *  ensure that {
-                 *      when {
-                 *          the IUT receives a GeoBroadcast packet
-                 *              containing TrafficClass.SCF set to 1 
-                 *              containing GBC Extended Header
-                 *                  containing GeoBroadcast Destination Area
-                 *                      indicating AREA2 and
-                 *          the BC forwarding packet buffer capacity exceeded (see note 1)
-                 *      }
-                 *      then {
-                 *          the IUT removes the older packet(s) in the BC forwarding packet buffer and,
-                 *          the IUT inserts the new received GeoBroadcast packet at the end of the BC forwarding packet buffer (see note 2)
-                 *      }
-                 *  }
-                 *  NOTE 1: The amount of stored data exceeds BC forwarding buffer capacity defined by the
-                 *          itsGnBcForwardingPacketBufferSize MIB parameter
-                 *  NOTE 2: Buffered packets will be delivered upon reception of Beacon message from ItsNodeB
-                 *  
-                 * 
- * - * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/CAP/FPB/BV/02 - * @reference EN 302 636-4-1 [1], clauses 7.5.3 - */ - testcase TC_GEONW_CAP_FPB_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { - - // Local variables - var ItsGeoNetworking v_nodeB; - var ItsGeoNetworking v_nodeC; - var template (value) GeoNetworkingPdu v_geoNetworkingMsg; - var integer v_packetSize := 0; - var integer v_nbrOfPackets := 0; - const integer c_nbrOfDiscardedMessages := 1; - var UInt16 v_sequenceNumberC := f_getInitialSequenceNumber(); - - // Test control - - // Test component configuration - f_cf03Up(); - - // Preamble - - // Prepare GeoUnicast message - v_geoNetworkingMsg := m_geoNwPdu(m_geoNwBroadcastPacket( - m_dummyLongPosVector, - 0, - m_dummyGeoBroadcastArea)); - v_packetSize := lengthof(bit2oct(encvalue(v_geoNetworkingMsg))); - - // Fill the BC forwarding buffer + c_nbrOfDiscardedMessages more message to remove older messages - v_nbrOfPackets := f_getBcForwardingPacketBufferSize() / v_packetSize + c_nbrOfDiscardedMessages; - - // Start components - v_nodeB := f_getComponent(c_compNodeB); - v_nodeC := f_getComponent(c_compNodeC); - v_nodeB.start(f_GEONW_CAP_FPB_BV_02_nodeB(v_sequenceNumberC, v_nbrOfPackets, c_nbrOfDiscardedMessages)); - v_nodeC.start(f_GEONW_CAP_FPB_BV_02_nodeC(v_sequenceNumberC, v_nbrOfPackets, v_geoNetworkingMsg)); - - // Synchronization - f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); - - // Cleanup - f_cf03Down(); - - } // end TC_GEONW_CAP_FPB_BV_02 - - /** - * @desc Behavior function for NodeB (TC_GEONW_CAP_FPB_BV_02) - * @param p_sequenceNumberC Initial sequence number of NodeC - * @param p_nbrOfPackets Number of packets sent by other component - * @param p_nbrOfDiscardedMessages Number of packets that should be discarded - */ - function f_GEONW_CAP_FPB_BV_02_nodeB( - in UInt16 p_sequenceNumberC, - in integer p_nbrOfPackets, - in integer p_nbrOfDiscardedMessages - ) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var UInt16 v_expectedSeqNumber := p_sequenceNumberC + p_nbrOfDiscardedMessages; - var integer v_nbReceivedMessages := 0; - - // Preamble - f_prDefault(); // NodeB is not yet a neighbour - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_startBeingNeighbour(); - - tc_ac.start; - alt { - [] a_receiveGeoBroadcast( - mw_longPosVectorPosition_withDelta(v_longPosVectorIut), - v_expectedSeqNumber - ) { - v_nbReceivedMessages := v_nbReceivedMessages + 1; - v_expectedSeqNumber := v_expectedSeqNumber + 1; - repeat; // repeat in any case => IUT may send more messages ! - } - [] a_receiveGeoBroadcast( - mw_longPosVectorPosition_withDelta(v_longPosVectorIut), - ? - ) { - tc_ac.stop; - log("*** " & testcasename() & ": FAIL: Unexpected message received (Bad sequence number) ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_ac.timeout { - if(v_nbReceivedMessages == (p_nbrOfPackets - p_nbrOfDiscardedMessages)) { - log("*** " & testcasename() & ": PASS: Older messages wer removed, new messages were inserted ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": FAIL: Expected amount of messages were not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - } - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_CAP_FPB_BV_02_nodeB - - /** - * @desc Behavior function for NodeC (TC_GEONW_CAP_FPB_BV_02) - * @param p_sequenceNumberC Initial sequence number of NodeC - * @param p_nbrOfPackets Number of packets to be send - * @param p_geoNetworkingMsg Pdu to be sent (template) - */ - function f_GEONW_CAP_FPB_BV_02_nodeC( - in UInt16 p_sequenceNumberC, - in integer p_nbrOfPackets, - in template (value) GeoNetworkingPdu p_geoNetworkingMsg - ) runs on ItsGeoNetworking { - - // Local variables - var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); - var integer i := 0; - - // Preamble - f_prNeighbour(); - vc_localSeqNumber := p_sequenceNumberC; - - p_geoNetworkingMsg.gnPacket.packet := m_geoNwBroadcastPacket( - v_longPosVectorNodeC, - 0, - f_getGeoBroadcastArea(c_area2) - ); - for (i:=0; i < p_nbrOfPackets; i:=i+1) { - p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoBroadcastHeader.seqNumber := vc_localSeqNumber; - f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(p_geoNetworkingMsg)); - } - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poNeighbour(); - - } // end f_GEONW_CAP_FPB_BV_02_nodeC + /** + * @desc Test of BC forwarding buffer capacity according to itsGnBcForwardingPacketBufferSize + * parameter and the overflow handling procedure + *
+            * Pics Selection: PICS_GN_GBC_FWD
+            * Config Id: CF03
+            * Initial conditions:
+            *  with {
+            *      the IUT being in the "initial state" and
+            *      the IUT having no Location Table Entry for ItsNodeB
+            *      the IUT having received multiple GBC packets
+            *          containing TrafficClass.SCF set to 1
+            *          containing GBC Extended Header
+            *              containing GBC Destination Area
+            *                  indicating AREA2
+            *  }
+            * Expected behaviour:
+            *  ensure that {
+            *      when {
+            *          the IUT receives a GBC packet
+            *              containing TrafficClass.SCF set to 1
+            *              containing GBC Extended Header
+            *                  containing GBC Destination Area
+            *                      indicating AREA2 and
+            *          the BC forwarding packet buffer capacity exceeded (see note 1)
+            *      }
+            *      then {
+            *          the IUT removes the older packet(s) in the BC forwarding packet buffer and,
+            *          the IUT inserts the new received GBC packet at the end of the BC forwarding packet buffer (see note 2)
+            *      }
+            *  }
+            *  NOTE 1: The amount of stored data exceeds BC forwarding buffer capacity defined by the
+            *          itsGnBcForwardingPacketBufferSize MIB parameter
+            *  NOTE 2: Buffered packets will be delivered upon reception of Beacon message from ItsNodeB
+            *
+            * 
+ * + * @see ETSI TS 102 871-2 v1.3.1 TP/GEONW/CAP/FPB/BV-02 + * @reference EN 302 636-4-1 [1], clauses 7.5.3 + */ + testcase TC_GEONW_CAP_FPB_BV_02() runs on ItsMtc system ItsGeoNetworkingSystem { + + f_GEONW_CAP_FPB_BV_02(); + + } // end TC_GEONW_CAP_FPB_BV_02 - } // end GEONW_CAP_FPB_BV_02 - } // end geoCapForwardingPacketBuffer } // end geoCapacities -} // end ItsGeoNetworking_TestCases \ No newline at end of file +} // end ItsGeoNetworking_TestCases + + \ No newline at end of file diff --git a/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestControl.ttcn b/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestControl.ttcn index c93d2c06f8b2e0fb3b1cab034ef4d44e14036f3e..fe5891d7a5338567df478a794f84454be6b7ff33 100644 --- a/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestControl.ttcn +++ b/ttcn/AtsGeoNetworking/ItsGeoNetworking_TestControl.ttcn @@ -17,202 +17,427 @@ module ItsGeoNetworking_TestControl { // Test Execution control { - execute(TC_GEONW_FDV_BAH_BV_01()); - execute(TC_GEONW_FDV_BAH_BV_02()); - - execute(TC_GEONW_FDV_COH_BV_01()); - execute(TC_GEONW_FDV_COH_BV_02()); - execute(TC_GEONW_FDV_COH_BV_03()); - execute(TC_GEONW_FDV_COH_BV_04()); - - execute(TC_GEONW_FDV_BEA_BV_01()); - execute(TC_GEONW_FDV_BEA_BV_02()); - execute(TC_GEONW_FDV_BEA_BV_03()); - execute(TC_GEONW_FDV_BEA_BV_04()); - - execute(TC_GEONW_FDV_GUC_BV_01()); - - execute(TC_GEONW_FDV_GBC_BV_01()); - - execute(TC_GEONW_FDV_GAC_BV_01()); - - execute(TC_GEONW_FDV_SHB_BV_01()); - - execute(TC_GEONW_FDV_TSB_BV_01()); - - execute(TC_GEONW_PON_LOT_BV_01()); - execute(TC_GEONW_PON_LOT_BV_02()); - execute(TC_GEONW_PON_LOT_BV_03_01()); - execute(TC_GEONW_PON_LOT_BV_03_02()); - execute(TC_GEONW_PON_LOT_BV_03_03()); - execute(TC_GEONW_PON_LOT_BV_03_04()); - execute(TC_GEONW_PON_LOT_BV_03_05()); - execute(TC_GEONW_PON_LOT_BV_03_06()); - execute(TC_GEONW_PON_LOT_BV_03_07()); - execute(TC_GEONW_PON_LOT_BV_03_08()); - execute(TC_GEONW_PON_LOT_BV_04()); - execute(TC_GEONW_PON_LOT_BV_05_01()); - execute(TC_GEONW_PON_LOT_BV_05_02()); - execute(TC_GEONW_PON_LOT_BV_05_03()); - execute(TC_GEONW_PON_LOT_BV_05_04()); - execute(TC_GEONW_PON_LOT_BV_05_05()); - execute(TC_GEONW_PON_LOT_BV_05_06()); - execute(TC_GEONW_PON_LOT_BV_05_07()); - - execute(TC_GEONW_PON_LPV_BV_01()); - - execute(TC_GEONW_PON_SQN_BV_01()); - execute(TC_GEONW_PON_SQN_BV_02()); - - execute(TC_GEONW_PON_LOS_BV_01()); - execute(TC_GEONW_PON_LOS_BV_02()); - execute(TC_GEONW_PON_LOS_BV_03()); - execute(TC_GEONW_PON_LOS_BV_04()); - execute(TC_GEONW_PON_LOS_BV_05()); - execute(TC_GEONW_PON_LOS_BV_06()); - execute(TC_GEONW_PON_LOS_BV_07()); - execute(TC_GEONW_PON_LOS_BV_08()); - execute(TC_GEONW_PON_LOS_BV_09()); + /* FDV */ + + if(PICS_GN_BASIC_HEADER) { + execute(TC_GEONW_FDV_BAH_BV_01()); + execute(TC_GEONW_FDV_BAH_BI_02()); + } + + if(PICS_GN_COMMON_HEADER) { + execute(TC_GEONW_FDV_COH_BV_01()); + execute(TC_GEONW_FDV_COH_BV_02()); + execute(TC_GEONW_FDV_COH_BV_03()); + execute(TC_GEONW_FDV_COH_BO_04()); + } + + if(PICS_GN_BEACON_SRC) { + execute(TC_GEONW_FDV_BEA_BV_01()); + execute(TC_GEONW_FDV_BEA_BV_02()); + execute(TC_GEONW_FDV_BEA_BV_03()); + execute(TC_GEONW_FDV_BEA_BV_04()); + } + + if(PICS_GN_GUC_SRC) { + execute(TC_GEONW_FDV_GUC_BV_01()); + } + + if(PICS_GN_GBC_SRC) { + execute(TC_GEONW_FDV_GBC_BV_01()); + } + + if(PICS_GN_GAC_SRC) { + execute(TC_GEONW_FDV_GAC_BV_01()); + } + + if(PICS_GN_SHB_SRC) { + execute(TC_GEONW_FDV_SHB_BV_01()); + } + + if(PICS_GN_TSB_SRC) { + execute(TC_GEONW_FDV_TSB_BV_01()); + } + + /* PON/LOT */ + + if(PICS_GN_GUC_SRC and PICS_GN_BEACON_DST) { + execute(TC_GEONW_PON_LOT_BV_01()); + } + + if(PICS_GN_LS_REQ_SRC and PICS_GN_LS_REP_DST) { + execute(TC_GEONW_PON_LOT_BV_02()); + } + + if(PICS_GN_BEACON_DST) { + execute(TC_GEONW_PON_LOT_BV_03_01()); + } + + if(PICS_GN_GUC_DST) { + execute(TC_GEONW_PON_LOT_BV_03_02()); + } + + if(PICS_GN_GAC_DST) { + execute(TC_GEONW_PON_LOT_BV_03_03()); + } + + if(PICS_GN_GBC_DST) { + execute(TC_GEONW_PON_LOT_BV_03_04()); + } + + if(PICS_GN_TSB_DST) { + execute(TC_GEONW_PON_LOT_BV_03_05()); + } + + if(PICS_GN_SHB_DST) { + execute(TC_GEONW_PON_LOT_BV_03_06()); + } + + if(PICS_GN_LS_REQ_DST) { + execute(TC_GEONW_PON_LOT_BV_03_07()); + } + + if(PICS_GN_LS_REP_DST) { + execute(TC_GEONW_PON_LOT_BV_03_08()); + } + + if(PICS_GN_LS_REQ_SRC) { + execute(TC_GEONW_PON_LOT_BV_04()); + } + + if(PICS_GN_GUC_DST) { + execute(TC_GEONW_PON_LOT_BV_05_01()); + } + + if(PICS_GN_GAC_DST) { + execute(TC_GEONW_PON_LOT_BV_05_02()); + } + + if(PICS_GN_GBC_DST) { + execute(TC_GEONW_PON_LOT_BV_05_03()); + } + + if(PICS_GN_TSB_DST) { + execute(TC_GEONW_PON_LOT_BV_05_04()); + } + + if(PICS_GN_SHB_DST) { + execute(TC_GEONW_PON_LOT_BV_05_05()); + } + + if(PICS_GN_LS_REQ_DST) { + execute(TC_GEONW_PON_LOT_BV_05_06()); + } + + if(PICS_GN_LS_REP_DST) { + execute(TC_GEONW_PON_LOT_BV_05_07()); + } + + /* PON/LPV */ + + if(PICS_GN_BEACON_SRC) { + execute(TC_GEONW_PON_LPV_BV_01()); + } + + /* PON/SQN */ + + if(PICS_GN_GBC_SRC) { + execute(TC_GEONW_PON_SQN_BV_01()); + execute(TC_GEONW_PON_SQN_BV_02()); + } + + /* PON/LOS */ + + if(PICS_GN_LS_REQ_SRC) { + execute(TC_GEONW_PON_LOS_BV_01()); + execute(TC_GEONW_PON_LOS_BV_02()); + if(PICS_GN_LS_REP_DST) { + execute(TC_GEONW_PON_LOS_BV_03()); + execute(TC_GEONW_PON_LOS_BV_04()); + } + execute(TC_GEONW_PON_LOS_BV_05()); + } + + if(PICS_GN_LS_REQ_RETRANSMISSION) { + execute(TC_GEONW_PON_LOS_TI_06()); + execute(TC_GEONW_PON_LOS_BV_07()); + } + + if(PICS_GN_LS_REQ_DST) { + execute(TC_GEONW_PON_LOS_BV_08()); + execute(TC_GEONW_PON_LOS_BO_09()); + } + + if(PICS_GN_LS_FWD) { execute(TC_GEONW_PON_LOS_BV_10()); execute(TC_GEONW_PON_LOS_BV_11()); - execute(TC_GEONW_PON_LOS_BV_12()); - execute(TC_GEONW_PON_LOS_BV_13()); - execute(TC_GEONW_PON_LOS_BV_14()); - execute(TC_GEONW_PON_LOS_BV_15()); - execute(TC_GEONW_PON_LOS_BV_16()); - execute(TC_GEONW_PON_LOS_BV_17()); - - execute(TC_GEONW_PON_FPB_BV_01()); - execute(TC_GEONW_PON_FPB_BV_02()); - execute(TC_GEONW_PON_FPB_BV_03()); - execute(TC_GEONW_PON_FPB_BV_04()); - execute(TC_GEONW_PON_FPB_BV_06()); - execute(TC_GEONW_PON_FPB_BV_07()); - execute(TC_GEONW_PON_FPB_BV_08()); - execute(TC_GEONW_PON_FPB_BV_09()); - execute(TC_GEONW_PON_FPB_BV_10()); - execute(TC_GEONW_PON_FPB_BV_11_01()); - execute(TC_GEONW_PON_FPB_BV_11_02()); - execute(TC_GEONW_PON_FPB_BV_11_03()); - execute(TC_GEONW_PON_FPB_BV_11_04()); - execute(TC_GEONW_PON_FPB_BV_11_05()); + } + + if(PICS_GN_LS_REQ_SRC) { + execute(TC_GEONW_PON_LOS_BV_12()); + execute(TC_GEONW_PON_LOS_BV_13()); + execute(TC_GEONW_PON_LOS_BV_14()); + execute(TC_GEONW_PON_LOS_BV_15()); + execute(TC_GEONW_PON_LOS_BV_16()); + execute(TC_GEONW_PON_LOS_BV_17()); + } + + /* PON/FPB */ + + if(PICS_GN_GUC_SRC) { + execute(TC_GEONW_PON_FPB_BV_01()); + execute(TC_GEONW_PON_FPB_BV_02()); + execute(TC_GEONW_PON_FPB_BV_03()); + execute(TC_GEONW_PON_FPB_BV_04()); + } + + if(PICS_GN_TSB_SRC) { + execute(TC_GEONW_PON_FPB_BV_06()); + execute(TC_GEONW_PON_FPB_BV_07()); + execute(TC_GEONW_PON_FPB_BV_08()); + } + + if(PICS_GN_GUC_SRC) { + execute(TC_GEONW_PON_FPB_BV_09()); + } + + if(PICS_GN_TSB_SRC) { + execute(TC_GEONW_PON_FPB_BV_10()); + } + + if(PICS_GN_GUC_SRC) { + execute(TC_GEONW_PON_FPB_BV_11_01()); + } + + if(PICS_GN_GAC_SRC) { + execute(TC_GEONW_PON_FPB_BV_11_02()); + } + + if(PICS_GN_GBC_SRC) { + execute(TC_GEONW_PON_FPB_BV_11_03()); + } + + if(PICS_GN_TSB_SRC) { + execute(TC_GEONW_PON_FPB_BV_11_04()); + } + + if(PICS_GN_SHB_SRC) { + execute(TC_GEONW_PON_FPB_BV_11_05()); + } + + if(PICS_GN_GUC_SRC) { execute(TC_GEONW_PON_FPB_BV_12_01()); + } + + if(PICS_GN_GAC_SRC) { execute(TC_GEONW_PON_FPB_BV_12_02()); + } + + if(PICS_GN_GBC_SRC) { execute(TC_GEONW_PON_FPB_BV_12_03()); + } + + if(PICS_GN_TSB_SRC) { execute(TC_GEONW_PON_FPB_BV_12_04()); + } + + /* PON/GNA */ + + if(PICS_GN_ADDR_AUTO) { + if (PICS_GN_LOCAL_ADDR_CONF_METHOD == e_auto) { + execute(TC_GEONW_PON_GNA_BV_01()); + } + } - if (PICS_GN_LOCAL_ADDR_CONF_METHOD == e_initial) { - execute(TC_GEONW_PON_GNA_BV_01()); + if(PICS_GN_DAD) { + execute(TC_GEONW_PON_GNA_BV_02()); } - execute(TC_GEONW_PON_GNA_BV_02()); - execute(TC_GEONW_PON_BEA_BV_01()); - execute(TC_GEONW_PON_BEA_BV_02()); - execute(TC_GEONW_PON_BEA_BV_03()); + /* PON/BEA */ - if ((PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == e_greedy) or (PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == e_unspecified)) { - execute(TC_GEONW_PON_GUC_BV_01()); - execute(TC_GEONW_PON_GUC_BV_02()); + if(PICS_GN_BEACON_SRC) { + execute(TC_GEONW_PON_BEA_TI_01()); + execute(TC_GEONW_PON_BEA_TI_02()); + execute(TC_GEONW_PON_BEA_BV_03()); } - execute(TC_GEONW_PON_GUC_BV_03()); - execute(TC_GEONW_PON_GUC_BV_04()); - execute(TC_GEONW_PON_GUC_BV_05()); - 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()); - execute(TC_GEONW_PON_GUC_BV_11()); + + /* 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_GEOUNICAST_FORWARDING_ALGORITHM == e_greedy) or (PICS_GN_GEOUNICAST_FORWARDING_ALGORITHM == e_unspecified)) { - execute(TC_GEONW_PON_GUC_BV_12()); - execute(TC_GEONW_PON_GUC_BV_13()); + + 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()); + + 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_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()); + } } - 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()); + /* 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_GEOBROADCAST_FORWARDING_ALGORITHM == e_simple) or (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_unspecified)) { - execute(TC_GEONW_PON_GBC_BV_03()); - execute(TC_GEONW_PON_GBC_BV_04()); + + 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()); + } + 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()); } - 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_BV_06()); + + 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/TSB */ + + if(PICS_GN_TSB_SRC) { + execute(TC_GEONW_PON_TSB_BV_01()); } - execute(TC_GEONW_PON_GBC_BV_07()); - execute(TC_GEONW_PON_GBC_BV_08()); - 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_BV_10()); - } - execute(TC_GEONW_PON_GBC_BV_11()); - if (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_cbf) { - execute(TC_GEONW_PON_GBC_BV_12()); - } - execute(TC_GEONW_PON_GBC_BV_19()); - execute(TC_GEONW_PON_GBC_BV_20()); - execute(TC_GEONW_PON_GBC_BV_21()); - - execute(TC_GEONW_PON_TSB_BV_01()); - execute(TC_GEONW_PON_TSB_BV_02()); - execute(TC_GEONW_PON_TSB_BV_03()); - execute(TC_GEONW_PON_TSB_BV_04()); - execute(TC_GEONW_PON_TSB_BV_05()); - execute(TC_GEONW_PON_TSB_BV_06()); - execute(TC_GEONW_PON_TSB_BV_07()); - - execute(TC_GEONW_PON_SHB_BV_01()); - execute(TC_GEONW_PON_SHB_BV_02()); - - 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()); - } - execute(TC_GEONW_PON_GAC_BV_03()); - execute(TC_GEONW_PON_GAC_BV_04()); - execute(TC_GEONW_PON_GAC_BV_05()); - execute(TC_GEONW_PON_GAC_BV_06()); - execute(TC_GEONW_PON_GAC_BV_07()); - execute(TC_GEONW_PON_GAC_BV_08()); - execute(TC_GEONW_PON_GAC_BV_09()); - execute(TC_GEONW_PON_GAC_BV_10()); - execute(TC_GEONW_PON_GAC_BV_11()); - if (PICS_GN_GEOBROADCAST_FORWARDING_ALGORITHM == e_cbf) { - execute(TC_GEONW_PON_GAC_BV_13()); - } - - 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_BV_04()); - execute(TC_GEONW_PON_BCA_BV_05()); - execute(TC_GEONW_PON_BCA_BV_06()); - execute(TC_GEONW_PON_BCA_BV_07()); - } - - 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_BV_08()); - execute(TC_GEONW_PON_BAA_BV_09()); - execute(TC_GEONW_PON_BAA_BV_10()); - execute(TC_GEONW_PON_BAA_BV_11()); - } - - execute(TC_GEONW_CAP_LOS_BV_01()); - - execute(TC_GEONW_CAP_FPB_BV_01()); - execute(TC_GEONW_CAP_FPB_BV_02()); + 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()); + } + + /* 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_BO_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()); + } + } + + /* CAP */ + + if(PICS_GN_LS_REQ_SRC) { + execute(TC_GEONW_CAP_LOS_BV_01()); + } + + if(PICS_GN_GUC_FWD) { + execute(TC_GEONW_CAP_FPB_BV_01()); + } + + if(PICS_GN_GBC_FWD) { + execute(TC_GEONW_CAP_FPB_BV_02()); + } } -} // end ItsGeoNetworking_TestControl \ No newline at end of file +} // end ItsGeoNetworking_TestControl diff --git a/ttcn/AtsGeoNetworking/ItsGeoNetworking_TpFunctions.ttcn b/ttcn/AtsGeoNetworking/ItsGeoNetworking_TpFunctions.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2a30c13bf84c5bafd4f5101cad2a656b50b6524a --- /dev/null +++ b/ttcn/AtsGeoNetworking/ItsGeoNetworking_TpFunctions.ttcn @@ -0,0 +1,15772 @@ +/** + * @author ETSI / STF405 / STF449 + * @version $URL$ + * $Id$ + * @desc GeoNetworking TP Functions + * + */ +module ItsGeoNetworking_TpFunctions { + + // Libcommon + import from LibCommon_BasicTypesAndValues all; + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibIts + import from LibItsCommon_Functions all; + import from LibItsGeoNetworking_TestSystem all; + import from LibItsGeoNetworking_Functions all; + import from LibItsGeoNetworking_Templates all; + import from LibItsGeoNetworking_TypesAndValues all; + import from LibItsGeoNetworking_Pics all; + + // 6.2.1 + group geoFormatingAndDataValidity { + + // 6.2.1.1 + group geoFdvBasicHeader { + + /** + * @desc TP Function for TC_GEONW_FDV_BAH_BV_01 + */ + function f_GEONW_FDV_BAH_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + + // Test control + if (not PICS_GN_BASIC_HEADER) { + log("*** " & testcasename() & ": PICS_GN_BASIC_HEADER required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(vc_componentName); + + // 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(?, ?), -, f_getDefaultHopLimit()))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Basic Header correctly formatted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_FDV_BAH_BV_01 + + /** + * @desc TP Function for TC_GEONW_FDV_BAH_BI_02 + */ + function f_GEONW_FDV_BAH_BI_02() runs on ItsGeoNetworking { + // Local variables + var LongPosVector v_longPosVectorNodeB; + var template (value) GeoNetworkingPdu v_gnPacket; + var integer i; + + // Test control + if (not PICS_GN_BASIC_HEADER) { + log("*** " & testcasename() & ": PICS_GN_BASIC_HEADER required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu(m_geoNwShbPacket(v_longPosVectorNodeB)); + v_gnPacket.basicHeader.version := valueof(v_gnPacket.basicHeader.version) + 1; + + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + f_sleep(PX_TAC); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": FAIL: GN was transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: GN was discarded and not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_FDV_BAH_BI_02 + + } // end geoFdvBasicHeader + + // 6.2.1.2 + group geoFdvCommonHeader { + + /** + * @desc TP Function for TC_GEONW_FDV_COH_BV_01 + */ + function f_GEONW_FDV_COH_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_COMMON_HEADER) { + log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(?)))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Common Header correclty formatted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + f_acTriggerEvent(m_stopPassBeaconing); + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_FDV_COH_BV_01 + + /** + * @desc TP Function for TC_GEONW_FDV_COH_BV_02 + */ + function f_GEONW_FDV_COH_BV_02() runs on ItsGeoNetworking { + + // Local variables + var GeoNetworkingInd v_geoNwInd; + var octetstring v_payload := char2oct("PAYLOAD"); + + // Test control + if (not PICS_GN_COMMON_HEADER) { + log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + if ( not f_utTriggerEvent(m_generateShbMessageWithPayload(v_payload)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwShbPacket))) -> value v_geoNwInd { + tc_ac.stop; + if(ispresent(v_geoNwInd.msgIn.gnPacket.packet.payload)) { + if(v_geoNwInd.msgIn.gnPacket.packet.commonHeader.plLength == lengthof(v_geoNwInd.msgIn.gnPacket.packet.payload.rawPayload)) { + log("*** " & testcasename() & ": PASS: PL field correctly indicates payload size ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: PL does correctly not indicate payload size (" + & int2str(v_geoNwInd.msgIn.gnPacket.packet.commonHeader.plLength) + & " != " + & int2str(lengthof(v_geoNwInd.msgIn.gnPacket.packet.payload.rawPayload)) + & ")***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + else { + if(v_geoNwInd.msgIn.gnPacket.packet.commonHeader.plLength == 0) { + log("*** " & testcasename() & ": PASS: PL field correctly indicates empty payload ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: PL does not indicate empty payload ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_FDV_COH_BV_02 + + /** + * @desc TP Function for TC_GEONW_FDV_COH_BV_03 + */ + function f_GEONW_FDV_COH_BV_03() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_COMMON_HEADER) { + log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if(not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1)))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + + [] mw_geoNwBroadcastPacketWithHlAndFlags(mw_longPosVectorPosition_withDelta(v_longPosVectorIut), ?, f_getDefaultHopLimit(), f_isMobile()) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Correct GeoNetworking Common Header received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] a_receiveGeoBroadcast(mw_longPosVectorPosition_withDelta(v_longPosVectorIut), ?) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Incorrect GeoNetworking Common Header received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_FDV_COH_BV_03 + + group GEONW_FDV_COH_BO_04 { + + /** + * @desc TP Function for TC_GEONW_FDV_COH_BO_04 + */ + function f_GEONW_FDV_COH_BO_04() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_COMMON_HEADER) { + log("*** " & testcasename() & ": PICS_GN_COMMON_HEADER required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_FDV_COH_BO_04_nodeB()); + v_nodeD.start(f_GEONW_FDV_COH_BO_04_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // end f_GEONW_FDV_COH_BV_04 + + /** + * @desc Behavior function for NodeB (TC_GEONW_FDV_COH_BV_04) + */ + function f_GEONW_FDV_COH_BO_04_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var UInt8 v_hopLimit := f_getDefaultHopLimit(); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeB, + v_hopLimit-1 + ), + -, + v_hopLimit + ) + ) + ); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: TSB packet was not discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: TSB was correctly discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_FDV_COH_BO_04_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_FDV_COH_BV_04) + */ + function f_GEONW_FDV_COH_BO_04_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeB) + ) + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: TSB packet was not discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: TSB was correctly discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_FDV_COH_BO_04_nodeD + + } // end GEONW_FDV_COH_BO_04 + + } // end geoFdvCommonHeader + + // 6.2.1.3 + group geoFdvBeacon { + + /** + * @desc TP Function for TC_GEONW_FDV_BEA_BV_01 + */ + function f_GEONW_FDV_BEA_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_BEACON_SRC) { + log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(mw_longPosVectorPosition(v_longPosVectorIut), e_any)))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Common Header correclty formatted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_FDV_BEA_BV_01 + + /** + * @desc TP Function for TC_GEONW_FDV_BEA_BV_02 + */ + function f_GEONW_FDV_BEA_BV_02() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_BEACON_SRC) { + log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket( + mw_longPosVectorAny(f_getIutGnLocalAddress()))))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GN address correctly received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_FDV_BEA_BV_02 + + /** + * @desc TP Function for TC_GEONW_FDV_BEA_BV_03 + */ + function f_GEONW_FDV_BEA_BV_03() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_BEACON_SRC) { + log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Position equaling GN-MNGT primitive value received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_FDV_BEA_BV_03 + + /** + * @desc TP Function for TC_GEONW_FDV_BEA_BV_04 + */ + function f_GEONW_FDV_BEA_BV_04() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_BEACON_SRC) { + log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Timestamp equaling GN-MNGT primitive value received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_FDV_BEA_BV_04 + + } // end geoFdvBeacon + + // 6.2.1.4 + group geoFdvGeoUnicast { + + /** + * @desc TP Function for TC_GEONW_FDV_GUC_BV_01 + */ + function f_GEONW_FDV_GUC_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + v_longPosVectorIut := f_getPosition(c_compIut); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacketWithSourcePv( + mw_shortPosVectorPosition_withDelta(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), // DEPV + ?, // sequence number + mw_longPosVectorPosition_withDelta(v_longPosVectorIut) //SOPV + ) + ) + ) + ) { + tc_ac.stop; + + log("*** " & testcasename() & ": PASS: Fields of the received GUC message correctly set ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: GUC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_FDV_GUC_BV_01 + + } // end geoFdvGeoUnicast + + // 6.2.1.5 + group geoFdvGeoBroadcast { + + /** + * @desc TP Function for TC_GEONW_FDV_GBC_BV_01 + */ + function f_GEONW_FDV_GBC_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + var octetstring v_payload := char2oct("PAYLOAD"); + + // Test control + if (not PICS_GN_GBC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + v_longPosVectorIut := f_getPosition(c_compIut); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoBroadcastMessageWithPayload(f_getArea(c_area1), v_payload)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + f_receiveGeoNetMessageWithPayload( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwBroadcastPacket( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), // SOPV + ? // sequence number + ) + ) + ), + ? + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Fields of the received GBC message correctly set ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_FDV_GBC_BV_01 + + } // end geoFdvGeoBroadcast + + // 6.2.1.6 + group geoFdvGeoAnycast { + + /** + * @desc TP Function for TC_GEONW_FDV_GAC_BV_01 + */ + function f_GEONW_FDV_GAC_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + var octetstring v_payload := char2oct("PAYLOAD"); + + // Test control + if (not PICS_GN_GAC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_longPosVectorIut := f_getPosition(c_compIut); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoAnycastMessageWithPayload(f_getArea(c_area1), v_payload)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + f_receiveGeoNetMessageWithPayload( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwAnycastPacket( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), // SOPV + ? // sequence number + ) + ) + ), + ? + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Fields of the received GAC message correctly set ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: GAC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_FDV_GAC_BV_01 + + } // end geoFdvGeoAnycast + + // 6.2.1.7 + group geoFdvSingleHopBroadcast { + + /** + * @desc TP Function for TC_GEONW_FDV_SHB_BV_01 + */ + function f_GEONW_FDV_SHB_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_SHB_SRC) { + log("*** " & testcasename() & ": PICS_GN_SHB_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_longPosVectorIut := f_getPosition(c_compIut); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateShbMessage) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwShbPacket( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), // SOPV + 1 //MHL + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Fields of the received SHB message correctly set ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: SHB message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_FDV_SHB_BV_01 + + } // end geoFdvSingleHopBroadcast + + // 6.2.1.8 + group geoFdvTopologicallyScopedBroadcast { + + /** + * @desc TP Function for TC_GEONW_FDV_TSB_BV_01 + */ + function f_GEONW_FDV_TSB_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_TSB_SRC) { + log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_longPosVectorIut := f_getPosition(c_compIut); + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateTsbMessage) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, // sequence number + mw_longPosVectorPosition_withDelta(v_longPosVectorIut) // SOPV + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: message received with correct common and extended headers ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: TSB message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_FDV_TSB_BV_01 + + } // end geoFdvTopologicallyScopedBroadcast + + } // end geoFormatingAndDataValidity + + // 6.2.2 + group geoProtocolOperation { + + // 6.2.2.1 + group geoLocationTable { + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_01 + */ + function f_GEONW_PON_LOT_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + + // Test control + if (not PICS_GN_GUC_SRC or not PICS_GN_BEACON_DST) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC and PICS_GN_BEACON_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GUC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] a_receiveAnyLsRequest() { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": TIMEOUT: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_LOT_BV_01 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_02 + */ + function f_GEONW_PON_LOT_BV_02() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + var GN_Address v_gnAddressNodeA; + var boolean v_lsRequestReceived := false; + + // Test control + if (not PICS_GN_LS_REQ_SRC or not PICS_GN_LS_REP_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC AND PICS_GN_LS_REP_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + v_gnAddressNodeA := v_longPosVectorNodeA.gnAddr; + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequestAndReply( + ?, v_gnAddressNodeA.mid, + v_longPosVectorNodeA, v_longPosVectorNodeB + ) { + v_lsRequestReceived := true; + log("*** " & testcasename() & ": Pre-conditions: Received and answered Location Service Request ***"); + repeat; + } + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { + tc_ac.stop; + if(v_lsRequestReceived == true) { + log("*** " & testcasename() & ": Pre-conditions: First GUC message received correctly ***"); + } + else { + log("*** " & testcasename() & ": Pre-conditions: GUC packet received without LS Request ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Pre-conditions: Initial conditions not satisfied. ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_gnAddressNodeA.mid, v_longPosVectorIut) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Received second GUC packet without LS Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_LOT_BV_02 + + group GEONW_PON_LOT_BV_03 { + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_01 + */ + function f_GEONW_PON_LOT_BV_03_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); + + // Test control + if (not PICS_GN_BEACON_DST) { + log("*** " & testcasename() & ": PICS_GN_BEACON_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwBeaconPacket( + v_longPosVectorNodeA + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); + + } // end f_GEONW_PON_LOT_BV_03_01 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_02 + */ + function f_GEONW_PON_LOT_BV_03_02() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); + + // Test control + if (not PICS_GN_GUC_DST) { + log("*** " & testcasename() & ": PICS_GN_GUC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwUnicastPacket( + v_longPosVectorNodeA, + f_getIutShortPosVector(), + vc_localSeqNumber + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); + + } // end f_GEONW_PON_LOT_BV_03_02 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_03 + */ + function f_GEONW_PON_LOT_BV_03_03() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); + + // Test control + if (not PICS_GN_GAC_DST) { + log("*** " & testcasename() & ": PICS_GN_GAC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwAnycastPacket( + v_longPosVectorNodeA, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area1) + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); + + } // end f_GEONW_PON_LOT_BV_03_03 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_04 + */ + function f_GEONW_PON_LOT_BV_03_04() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); + + // Test control + if (not PICS_GN_GBC_DST) { + log("*** " & testcasename() & ": PICS_GN_GBC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwBroadcastPacket( + v_longPosVectorNodeA, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1) + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); + + } // end f_GEONW_PON_LOT_BV_03_04 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_05 + */ + function f_GEONW_PON_LOT_BV_03_05() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); + + // Test control + if (not PICS_GN_TSB_DST) { + log("*** " & testcasename() & ": PICS_GN_TSB_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeA + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); + + } // end f_GEONW_PON_LOT_BV_03_05 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_06 + */ + function f_GEONW_PON_LOT_BV_03_06() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); + + // Test control + if (not PICS_GN_SHB_DST) { + log("*** " & testcasename() & ": PICS_GN_SHB_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwShbPacket( + v_longPosVectorNodeA + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); + + } // end f_GEONW_PON_LOT_BV_03_06 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_07 + */ + function f_GEONW_PON_LOT_BV_03_07() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); + + // Test control + if (not PICS_GN_LS_REQ_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + activate(a_receiveAnyLsReply()); + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwLsRequestPacket( + v_longPosVectorNodeA, + vc_localSeqNumber, + f_getIutGnLocalAddress() + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); + + } // end f_GEONW_PON_LOT_BV_03_07 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_03_08 + */ + function f_GEONW_PON_LOT_BV_03_08() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_TP_GEONW_PON_LOT_BV_03_pre_1(); + + // Test control + if (not PICS_GN_LS_REP_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REP_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_03_pre_2( + m_geoNwLsReplyPacket( + v_longPosVectorNodeA, + f_getIutShortPosVector(), + vc_localSeqNumber + ) + ); + + f_TP_GEONW_PON_LOT_BV_03_main(v_longPosVectorNodeA); + + } // end f_GEONW_PON_LOT_BV_03_08 + + /** + * @desc Function including first preamble part (TC_GEONW_PON_LOT_BV_03) + */ + function f_TP_GEONW_PON_LOT_BV_03_pre_1() runs on ItsGeoNetworking return LongPosVector { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + + // Test control + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Test adapter configuration + + // Preamble part I + f_prNeighbour(); + + return v_longPosVectorNodeA; + } // end f_TP_GEONW_PON_LOT_BV_03_pre_1 + + /** + * @desc Function including second preamble part (TC_GEONW_PON_LOT_BV_03) + */ + function f_TP_GEONW_PON_LOT_BV_03_pre_2(in template (value) GnNonSecuredPacket p_packet) runs on ItsGeoNetworking { + + //preamble part II + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(p_packet)) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } // end f_TP_GEONW_PON_LOT_BV_03_pre_2 + + /** + * @desc Function including test body and postamble part (TC_GEONW_PON_LOT_BV_03) + */ + function f_TP_GEONW_PON_LOT_BV_03_main(in template (value) LongPosVector p_longPosVectorNodeA) runs on ItsGeoNetworking { + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(valueof(p_longPosVectorNodeA.gnAddr))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveAnyLsRequest() { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_longPosVectorNodeA)))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GUC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_TP_GEONW_PON_LOT_BV_03_main + + } //end GEONW_PON_LOT_BV_03 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_04 + */ + function f_GEONW_PON_LOT_BV_04() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prDefault(); // NodeB will send Beacon only once + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(m_geoNwBeaconPacket(f_getPosition(c_compNodeB)), -, c_hopLimit1))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(f_getLifetimeLocTableEntry()); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeB.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeB.gnAddr.mid, v_longPosVectorIut ) { + log("*** " & testcasename() & ": PASS: LS Request received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: LS Request not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // end f_GEONW_PON_LOT_BV_04 + + group GEONW_PON_LOT_BV_05 { + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_05_01 + */ + function f_GEONW_PON_LOT_BV_05_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_obsoleteLongPosVectorNodeB; + + // Test control + if (not PICS_GN_GUC_DST) { + log("*** " & testcasename() & ": PICS_GN_GUC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + f_TP_GEONW_PON_LOT_BV_05_pre_2( + m_geoNwUnicastPacket( + v_obsoleteLongPosVectorNodeB, + f_getIutShortPosVector(), + vc_localSeqNumber + ) + ); + + f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + } // end f_GEONW_PON_LOT_BV_05_01 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_05_02 + */ + function f_GEONW_PON_LOT_BV_05_02() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_obsoleteLongPosVectorNodeB; + + // Test control + if (not PICS_GN_GAC_DST) { + log("*** " & testcasename() & ": PICS_GN_GAC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + f_TP_GEONW_PON_LOT_BV_05_pre_2( + m_geoNwAnycastPacket( + v_obsoleteLongPosVectorNodeB, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area1) + ) + ); + + f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + } // end f_GEONW_PON_LOT_BV_05_02 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_05_03 + */ + function f_GEONW_PON_LOT_BV_05_03() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_obsoleteLongPosVectorNodeB; + + // Test control + if (not PICS_GN_GBC_DST) { + log("*** " & testcasename() & ": PICS_GN_GBC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + f_TP_GEONW_PON_LOT_BV_05_pre_2( + m_geoNwBroadcastPacket( + v_obsoleteLongPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1) + ) + ); + + f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + } // end f_GEONW_PON_LOT_BV_05_03 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_05_04 + */ + function f_GEONW_PON_LOT_BV_05_04() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_obsoleteLongPosVectorNodeB; + + // Test control + if (not PICS_GN_TSB_DST) { + log("*** " & testcasename() & ": PICS_GN_TSB_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + f_TP_GEONW_PON_LOT_BV_05_pre_2( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_obsoleteLongPosVectorNodeB + ) + ); + + f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + } // end f_GEONW_PON_LOT_BV_05_04 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_05_05 + */ + function f_GEONW_PON_LOT_BV_05_05() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_obsoleteLongPosVectorNodeB; + + // Test control + if (not PICS_GN_SHB_DST) { + log("*** " & testcasename() & ": PICS_GN_SHB_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + f_TP_GEONW_PON_LOT_BV_05_pre_2( + m_geoNwShbPacket( + v_obsoleteLongPosVectorNodeB + ) + ); + + f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + } // end f_GEONW_PON_LOT_BV_05_05 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_05_06 + */ + function f_GEONW_PON_LOT_BV_05_06() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_obsoleteLongPosVectorNodeB; + + // Test control + if (not PICS_GN_LS_REQ_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + activate(a_receiveAnyLsReply()); + + f_TP_GEONW_PON_LOT_BV_05_pre_2( + m_geoNwLsRequestPacket( + v_obsoleteLongPosVectorNodeB, + vc_localSeqNumber, + f_getIutGnLocalAddress() + ) + ); + + f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + } // end f_GEONW_PON_LOT_BV_05_06 + + /** + * @desc TP Function for TC_GEONW_PON_LOT_BV_05_07 + */ + function f_GEONW_PON_LOT_BV_05_07() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_obsoleteLongPosVectorNodeB; + + // Test control + if (not PICS_GN_LS_REQ_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + f_TP_GEONW_PON_LOT_BV_05_pre_1(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + f_TP_GEONW_PON_LOT_BV_05_pre_2( + m_geoNwLsReplyPacket( + v_obsoleteLongPosVectorNodeB, + f_getIutShortPosVector(), + vc_localSeqNumber + ) + ); + + f_TP_GEONW_PON_LOT_BV_05_main(v_longPosVectorNodeB, v_obsoleteLongPosVectorNodeB); + + } // end f_GEONW_PON_LOT_BV_05_07 + + /** + * @desc Function including first preamble part (TC_GEONW_PON_LOT_BV_05) + */ + function f_TP_GEONW_PON_LOT_BV_05_pre_1(out LongPosVector p_longPosVectorNodeB, out LongPosVector p_obsoleteLongPosVectorNodeB) runs on ItsGeoNetworking { + + // Local variables + + // Test control + + // Test component configuration + f_cf01Up(); + p_longPosVectorNodeB := f_getPosition(c_compNodeB); + p_obsoleteLongPosVectorNodeB := p_longPosVectorNodeB; + p_obsoleteLongPosVectorNodeB.timestamp := p_obsoleteLongPosVectorNodeB.timestamp - 1000; + p_obsoleteLongPosVectorNodeB.latitude := p_obsoleteLongPosVectorNodeB.latitude - 1; + + // Test adapter configuration + + // Preamble + f_prDefault(); + + // Act as a neighbor and send one beacon + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(m_geoNwBeaconPacket(f_getPosition(c_compNodeB)), -, c_hopLimit1))); + } // end f_TP_GEONW_PON_LOT_BV_05_pre_1 + + /** + * @desc Function including second preamble part (TC_GEONW_PON_LOT_BV_05) + */ + function f_TP_GEONW_PON_LOT_BV_05_pre_2(in template (value) GnNonSecuredPacket p_packet) runs on ItsGeoNetworking { + + //preamble part II + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(p_packet)) + ); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } // end f_TP_GEONW_PON_LOT_BV_05_pre_2 + + /** + * @desc Function including test body and postamble part (TC_GEONW_PON_LOT_BV_05) + */ + function f_TP_GEONW_PON_LOT_BV_05_main(in template (value) LongPosVector p_longPosVectorNodeB, in template (value) LongPosVector p_obsoleteLongPosVectorNodeB) runs on ItsGeoNetworking { + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(valueof(p_longPosVectorNodeB.gnAddr)))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveAnyLsRequest() { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Received Location Service Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_obsoleteLongPosVectorNodeB)))) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: GUC received with obsolete Destination Position Vector ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(valueof(p_longPosVectorNodeB)))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GUC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // end f_TP_GEONW_PON_LOT_BV_05_main + + } // end group GEONW_PON_LOT_BV_05 + + } // end geoLocationTable + + // 6.2.2.2 + group geoLocalPositionVector { + + /** + * @desc TP Function for TC_GEONW_PON_LPV_BV_01 + */ + function f_GEONW_PON_LPV_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + var template LongPosVector v_previouslongPosVectorIut; + var GeoNetworkingInd v_geoNwInd; + + // Test control + if (not PICS_GN_BEACON_SRC) { + log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + v_previouslongPosVectorIut := v_longPosVectorIut; + v_previouslongPosVectorIut.timestamp := ?; + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( + mw_geoNwBeaconPacket( + mw_longPosVectorAny(v_longPosVectorIut.gnAddr) + ) + ))) -> value v_geoNwInd { + tc_ac.stop; + log("*** " & testcasename() & ": Pre-conditions: Beacon received ***"); + v_longPosVectorIut := v_geoNwInd.msgIn.gnPacket.packet.extendedHeader.beaconHeader.srcPosVector; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + f_utChangePosition(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + geoNetworkingPort.clear; + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( + mw_geoNwBeaconPacket( + mw_longPosVectorAny(v_longPosVectorIut.gnAddr) + ) + ))) -> value v_geoNwInd { + tc_ac.stop; + //check if the position vector has changed + if (match(v_geoNwInd.msgIn.gnPacket.packet.extendedHeader.beaconHeader.srcPosVector, v_previouslongPosVectorIut)) { + log("*** " & testcasename() & ": FAIL: Sender Postion Vector not correctly updated ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": PASS: Sender Postion Vector correctly updated ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + f_acTriggerEvent(m_stopPassBeaconing); + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_LPV_BV_01 + + } // end geoLocalPositionVector + + // 6.2.2.3 + group geoSequenceNumber { + + /** + * @desc TP Function for TC_GEONW_PON_SQN_BV_01 + */ + function f_GEONW_PON_SQN_BV_01() runs on ItsGeoNetworking { + + // Local variables + var UInt16 v_expectedSequenceNumber := 0; + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_GBC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveGeoBroadcast( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), + v_expectedSequenceNumber) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] a_receiveGeoBroadcast( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), + v_expectedSequenceNumber) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: GBC packet received with incorrect sequence number ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_SQN_BV_01 + + /** + * @desc TP Function for TC_GEONW_PON_SQN_BV_02 + */ + function f_GEONW_PON_SQN_BV_02() runs on ItsGeoNetworking { + + // Local variables + var UInt16 v_expectedSequenceNumber := 0; + var integer v_nbReceivedPackets := 0; + var GeoNetworkingInd v_geoNwInd; + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_GBC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_sleep(10.0); + // receive first packet + if ( not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacket( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), + ? + )))) -> value v_geoNwInd { + tc_ac.stop; + log("*** " & testcasename() & ": Pre-conditions: First GUC packet received ***"); + v_expectedSequenceNumber := v_geoNwInd.msgIn.gnPacket.packet.extendedHeader.geoBroadcastHeader.seqNumber + 1; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveGeoBroadcast( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), + v_expectedSequenceNumber) { + tc_ac.stop; + v_nbReceivedPackets := v_nbReceivedPackets + 1; + if(v_nbReceivedPackets >= vc_multipleMessagesCount) { + log("*** " & testcasename() & ": PASS: GBC packets received with correct sequence numbers ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + v_expectedSequenceNumber := v_expectedSequenceNumber + 1; + if ( not f_utTriggerEvent(m_generateGeoBroadcastMessage(f_getArea(c_area1))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + repeat; + } + } + [] a_receiveGeoBroadcast( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), + ?) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: GBC packet received with incorrect sequence number ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_SQN_BV_02 + + } // end geoSequenceNumber + + // 6.2.2.4 + group geoLocationService { + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_01 + */ + function f_GEONW_PON_LOS_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + var GN_Address v_gnAddressNodeA; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_gnAddressNodeA := f_getPosition(c_compNodeA).gnAddr; + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_gnAddressNodeA)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveLsRequest( + ?, + v_gnAddressNodeA.mid, + v_longPosVectorIut + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: LS Request received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] a_receiveAnyLsRequest() { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: LS Request does not contain GN Address of nodeA ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_LOS_BV_01 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_02 + */ + function f_GEONW_PON_LOS_BV_02() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + var GN_Address v_gnAddressNodeA; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_gnAddressNodeA := f_getPosition(c_compNodeA).gnAddr; + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_gnAddressNodeA)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_gnAddressNodeA.mid, v_longPosVectorIut) { + tc_ac.stop; + //start retransmission timer + tc_ac.start(f_getLsRetransmitTimer() - f_getDeltaTimer()); + } + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_gnAddressNodeA)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + + alt { + [] a_receiveLsRequest(?, v_gnAddressNodeA.mid, v_longPosVectorIut) { + tc_ac.stop; + log("*** " & testcasename() & ": Second LS_REQUEST received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": No second LS_REQUEST received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_LOS_BV_02 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_03 + */ + function f_GEONW_PON_LOS_BV_03() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorIut; + var GeoNetworkingInd v_geoNetInd; + + // Test control + if (not PICS_GN_LS_REQ_SRC or not PICS_GN_LS_REP_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC AND PICS_GN_LS_REP_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + } + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwLsReplyPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + ) + ) + ); + + tc_ac.start; + alt { + + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ) + ) -> value v_geoNetInd { + tc_ac.stop; + //we only check that the lifetime is less than the default lifetime due to + //we do not know exactly the time passed at IUT + if (f_getLifetimeValue(v_geoNetInd.msgIn.basicHeader.lifeTime) v_maxNbrRetrans) { + //first LS request is not counted as a retransmission + log("*** " & testcasename() & ": LS_REQUEST retransmitted more than itsGnLocationServiceMaxRetrans times ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + tc_ac.start; + repeat; + } + } + [] tc_ac.timeout { + if(v_nbLsReceived == (v_maxNbrRetrans)) { + //first LS request is not counted as a retransmission + log("*** " & testcasename() & ": LS_REQUEST retransmitted itsGnLocationServiceMaxRetrans times ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": LS_REQUEST retransmitted less than itsGnLocationServiceMaxRetrans times ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_LOS_BV_07 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_08 + */ + function f_GEONW_PON_LOS_BV_08() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorIut; + var GN_Address v_iutGnAddress; + var UInt16 v_seqNbr := vc_localSeqNumber; + var FncRetCode v_ret := e_error; + + // Test control + if (not PICS_GN_LS_REQ_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + v_iutGnAddress := f_getPosition(c_compIut).gnAddr; + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_ret := f_processLocationService(v_longPosVectorNodeA, v_seqNbr, v_iutGnAddress, v_longPosVectorIut); + if (v_ret == e_success) { + log("*** " & testcasename() & ": LS_REPLY packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": LS_REPLY packet not received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_LOS_BV_08 + + group GEONW_PON_LOS_BO_09 { + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BO_09 + */ + function f_GEONW_PON_LOS_BO_09() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + if (not PICS_GN_LS_REQ_DST) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf02Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_LOS_BO_09_nodeB()); + v_nodeD.start(f_GEONW_PON_LOS_BO_09_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // end f_GEONW_PON_LOS_BO_09 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_LOS_BO_09) + */ + function f_GEONW_PON_LOS_BO_09_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var FncRetCode v_ret := e_error; + + // Preamble + f_prNeighbour(); + v_ret := f_processLocationService( + v_longPosVectorNodeB, + vc_localSeqNumber, + v_longPosVectorIut.gnAddr, + v_longPosVectorIut); + if (v_ret == e_error) { + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + else { + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + + // Test Body + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwLsReplyPacket( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)) + ) + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: LS_REQUEST has not been discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: LS_REQUEST discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_LOS_BO_09_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_LOS_BO_09) + */ + function f_GEONW_PON_LOS_BO_09_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + var LongPosVector v_longPosVectorNodeD := f_getPosition(c_compNodeD); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GN_Address v_iutGnAddress := f_getPosition(c_compIut).gnAddr; + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwLsRequestPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + v_iutGnAddress + ) + ) + ) + ); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwLsReplyPacket( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)) + ) + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: LS_REQUEST has not been discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: LS_REQUEST discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_LOS_BO_09_nodeD + + } // end GEONW_PON_LOS_BO_09 + + group GEONW_PON_LOS_BV_10 { + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_10 + */ + function f_GEONW_PON_LOS_BV_10() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_LS_FWD) { + log("*** " & testcasename() & ": PICS_GN_LS_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_LOS_BV_10_nodeB()); + v_nodeC.start(f_GEONW_PON_LOS_BV_10_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_LOS_BV_10 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_LOS_BV_10) + */ + function f_GEONW_PON_LOS_BV_10_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwLsRequestPacket( + ?, + v_longPosVectorNodeB.gnAddr.mid + ), + -, + c_defaultHopLimit - 1 + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Re-broadcasted LS Request received with HL field decreased by 1 ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: LS Request was not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_LOS_BV_10_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_LOS_BV_10) + */ + function f_GEONW_PON_LOS_BV_10_nodeC() runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwLsRequestPacket( + f_getPosition(c_compNodeA), + vc_localSeqNumber, + f_getPosition(c_compNodeB).gnAddr + ), + -, + c_defaultHopLimit + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_LOS_BV_10_nodeC + + } // end GEONW_PON_LOS_BV_10 + + group GEONW_PON_LOS_BV_11 { + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_11 + */ + function f_GEONW_PON_LOS_BV_11() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_LS_FWD) { + log("*** " & testcasename() & ": PICS_GN_LS_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_LOS_BV_11_nodeB()); + v_nodeC.start(f_GEONW_PON_LOS_BV_11_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_LOS_BV_11 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_LOS_BV_11) + */ + function f_GEONW_PON_LOS_BV_11_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwLsReplyPacket( + mw_longPosVectorPosition(v_longPosVectorNodeA), + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)) + ), + -, + c_defaultHopLimit - 1 + ) + ) + ) { + log("*** " & testcasename() & ": PASS: Forwarded LS Reply received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: LS Reply was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_LOS_BV_11_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_LOS_BV_11) + */ + function f_GEONW_PON_LOS_BV_11_nodeC() runs on ItsGeoNetworking { + + // Local variables + + // Preamble + f_prNeighbour(); + + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwLsReplyPacket( + f_getPosition(c_compNodeA), + f_longPosVector2ShortPosVector(f_getPosition(c_compNodeB)), + vc_localSeqNumber + ), + -, + c_defaultHopLimit + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_LOS_BV_11_nodeC + + } // end GEONW_PON_LOS_BV_11 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_12 + */ + function f_GEONW_PON_LOS_BV_12() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorIut; + var UInt16 v_seqNbr := vc_localSeqNumber; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + ) + ) + ); + + tc_ac.start; + alt { + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GUC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_LOS_BV_12 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_13 + */ + function f_GEONW_PON_LOS_BV_13() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorIut; + var integer v_lt1 := f_getLsMaxRetrans()*float2int(f_getLsRetransmitTimer()); + var integer v_lt2 := float2int(int2float(v_lt1)/2.0); + var octetstring v_payload1 := char2oct("PAYLOAD_1"); + var octetstring v_payload2 := char2oct("PAYLOAD_2"); + var boolean v_msg1Received := false; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + + if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithLifetimeWithPayload(v_longPosVectorNodeA.gnAddr, v_lt2*1000, v_payload2)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithLifetimeWithPayload(v_longPosVectorNodeA.gnAddr, v_lt1*1000, v_payload1)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + //Send LS-REPLY after LT2 expiry + f_sleepIgnoreDef(int2float(v_lt2)); + + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwLsReplyPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + ) + ) + ); + + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + log("*** " & testcasename() & ": INFO: LS Request retransmission ignored ***"); + repeat; + } + [] geoNetworkingPort.receive( + f_receiveGeoNetMessageWithPayload( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ), + f_adaptPayload_mw(v_payload1) + ) + ) { + v_msg1Received := true; + repeat; + } + [] geoNetworkingPort.receive( + f_receiveGeoNetMessageWithPayload( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ), + f_adaptPayload_mw(v_payload2) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: message with elapsed lifetime received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + if(v_msg1Received == true) { + log("*** " & testcasename() & ": PASS: message with running lifetime received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: message with running lifetime not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_LOS_BV_13 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_13 + */ + function f_GEONW_PON_LOS_BV_14() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorIut; + var integer v_maxNbrRetrans := f_getLsMaxRetrans(); + var integer v_nbLsReceived := 0; + var UInt16 v_LT1; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + v_LT1 := float2int(int2float(v_maxNbrRetrans + 2) * f_getLsRetransmitTimer() * 1000.0); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithLifetime(v_longPosVectorNodeA.gnAddr,v_LT1)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + + tc_wait.start(int2float(v_LT1)); + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Pre-conditions: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + v_nbLsReceived := v_nbLsReceived + 1; + if(v_nbLsReceived > v_maxNbrRetrans) { + //first LS request is not counted as a retransmission + log("*** " & testcasename() & ": Pre-conditions: LS_REQUEST retransmitted more than itsGnLocationServiceMaxRetrans times ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + else { + tc_ac.start; + repeat; + } + } + [] tc_ac.timeout { + if(v_nbLsReceived == (v_maxNbrRetrans)) { + //first LS request is not counted as a retransmission + log("*** " & testcasename() & ": Pre-conditions: LS_REQUEST retransmitted itsGnLocationServiceMaxRetrans times ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + else { + log("*** " & testcasename() & ": Pre-conditions: LS_REQUEST retransmitted less than itsGnLocationServiceMaxRetrans times ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + } + } + + // Test Body + if (tc_wait.running) { + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + ) + ) + ); + tc_wait.stop; + + tc_noac.start; + alt { + // no check for ItsNodeA address as no other trigger for messages exists + [] geoNetworkingPort.receive { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: Unexpected message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: No message was sent ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + } + else { + log("*** " & testcasename() & ": FAIL: LT1 expired ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_LOS_BV_14 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_15 + */ + function f_GEONW_PON_LOS_BV_15() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + var UInt16 v_seqNbr := vc_localSeqNumber; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorNodeB), + vc_localSeqNumber + ) + ) + ) + ); + + tc_ac.start; + alt { + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GUC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_LOS_BV_15 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_16 + */ + function f_GEONW_PON_LOS_BV_16() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + var UInt16 v_seqNbr := vc_localSeqNumber; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + ) + ) + ); + + tc_noac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: LS Request retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { + log("*** " & testcasename() & ": INFO: GUC packet received ***"); + repeat; + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: LS Request not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_LOS_BV_16 + + /** + * @desc TP Function for TC_GEONW_PON_LOS_BV_17 + */ + function f_GEONW_PON_LOS_BV_17() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + var UInt16 v_seqNbr := vc_localSeqNumber; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_ac.stop; + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: LS Request not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorNodeB), + vc_localSeqNumber + ) + ) + ) + ); + + tc_noac.start; + alt { + [] a_receiveLsRequest(?, v_longPosVectorNodeA.gnAddr.mid, v_longPosVectorIut) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: LS Request retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] a_receiveGeoUnicastWithDestination(mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA))) { + log("*** " & testcasename() & ": INFO: GUC packet received ***"); + repeat; + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: LS Request not retransmitted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_LOS_BV_17 + + } // end geoLocationService + + // 6.2.2.5 + group geoForwardingPacketBuffer { + + group GEONW_PON_FPB_BV_01 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_01 + */ + function f_GEONW_PON_FPB_BV_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_01_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_01_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_FPB_BV_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_01) + */ + function f_GEONW_PON_FPB_BV_01_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prDefault(); // NodeB is not yet a neighbour + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleepIgnoreDef(1.0); + f_startBeingNeighbour(); + + tc_ac.start; + alt { + [] a_receiveAnyLsRequest() { + tc_ac.stop; + log("*** " & testcasename() & ": INCONC: Received Location Service Request ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ?)))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: packet correctly forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_FPB_BV_01_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_01) + */ + function f_GEONW_PON_FPB_BV_01_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNeighbour(); + + // Make sure IUT has LocE for NodeA by sending unsolicited LS_REPLY + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu( + m_geoNwLsReplyPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + ))); + + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + // /!\ This pre-condition has impact on test body + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GUC packet received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: No message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_FPB_BV_01_nodeC + + } // end GEONW_PON_FPB_BV_01 + + group GEONW_PON_FPB_BV_02 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_02 + */ + function f_GEONW_PON_FPB_BV_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + const UInt16 c_sequenceNumberC := f_getInitialSequenceNumber(); + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_02_nodeB(c_sequenceNumberC)); + v_nodeC.start(f_GEONW_PON_FPB_BV_02_nodeC(c_sequenceNumberC)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_FPB_BV_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_02) + */ + function f_GEONW_PON_FPB_BV_02_nodeB(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prDefault(); // NodeB is not yet a neighbour + vc_localSeqNumber := p_sequenceNumberC; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(1.0); + f_startBeingNeighbour(); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + vc_localSeqNumber + ), + -, + c_defaultHopLimit - 1 + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Packet correctly forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_FPB_BV_02_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_02) + */ + function f_GEONW_PON_FPB_BV_02_nodeC(in UInt16 p_sequenceNumberC) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + vc_localSeqNumber := p_sequenceNumberC; + + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeC, + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + vc_localSeqNumber + ), + -, + c_defaultHopLimit + ) + ) + ); + + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_FPB_BV_02_nodeC + + } // end GEONW_PON_FPB_BV_02 + + group GEONW_PON_FPB_BV_03 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_03 + */ + function f_GEONW_PON_FPB_BV_03() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + const UInt16 c_sequenceNumberC := f_getInitialSequenceNumber(); + const integer c_messageCount := 2; + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_03_nodeB(c_sequenceNumberC, c_messageCount)); + v_nodeC.start(f_GEONW_PON_FPB_BV_03_nodeC(c_sequenceNumberC, c_messageCount)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_FPB_BV_03 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_03) + */ + function f_GEONW_PON_FPB_BV_03_nodeB(in UInt16 p_sequenceNumberC, in integer p_messageCount) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GeoNetworkingInd v_geoNetInd; + var UInt16 v_expectedSequenceNumber := p_sequenceNumberC; + var integer v_nbReceivedPackets := 0; + + // Preamble + f_prDefault(); // NodeB is not yet a neighbour + vc_multipleMessagesCount := p_messageCount; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(1.0); + f_startBeingNeighbour(); + + tc_ac.start; + alt { + [] a_receiveGeoUnicast( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + v_expectedSequenceNumber) { + tc_ac.stop; + v_nbReceivedPackets := v_nbReceivedPackets + 1; + if(v_nbReceivedPackets >= vc_multipleMessagesCount) { + log("*** " & testcasename() & ": PASS: GUC packets received in correct order ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + v_expectedSequenceNumber := v_expectedSequenceNumber + 1; + tc_ac.start; + repeat; + } + } + [] a_receiveGeoUnicast( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ?) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: GUC packet received in incorrect order ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_FPB_BV_03_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_03) + */ + function f_GEONW_PON_FPB_BV_03_nodeC(in UInt16 p_sequenceNumberC, in integer p_messageCount) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var integer i := 0; + + // Preamble + f_prNeighbour(); + vc_localSeqNumber := p_sequenceNumberC; + vc_multipleMessagesCount := p_messageCount; + + for(i:=0; i < vc_multipleMessagesCount; i:=i+1) { + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeC, + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + vc_localSeqNumber + ) + ) + ) + ); + } + + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_FPB_BV_03_nodeC + + } // end GEONW_PON_FPB_BV_03 + + group GEONW_PON_FPB_BV_04 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_04 + */ + function f_GEONW_PON_FPB_BV_04() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + const UInt6 c_packetLifetime := 10; // 10s + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_04_nodeB(c_packetLifetime)); + v_nodeC.start(f_GEONW_PON_FPB_BV_04_nodeC(c_packetLifetime)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_FPB_BV_04 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_04) + */ + function f_GEONW_PON_FPB_BV_04_nodeB(in UInt6 p_packetLifetime) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GeoNetworkingInd v_geoNetInd; + var integer v_nbReceivedPackets := 0; + + // Preamble + f_prDefault(); // NodeB is not yet a neighbour + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(int2float(p_packetLifetime + 1)); + f_startBeingNeighbour(); + + tc_noac.start; + alt { + [] a_receiveGeoUnicast( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ?) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GUC packet received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: No message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_FPB_BV_04_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_04) + */ + function f_GEONW_PON_FPB_BV_04_nodeC(in UInt6 p_packetLifetime) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNeighbour(); + + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwUnicastPacket( + v_longPosVectorNodeC, + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + vc_localSeqNumber + ), + m_lifetimeBase1s(p_packetLifetime), + c_defaultHopLimit + ) + ) + ); + + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_FPB_BV_04_nodeC + + } // end GEONW_PON_FPB_BV_04 + + group GEONW_PON_FPB_BV_06 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_06 + */ + function f_GEONW_PON_FPB_BV_06() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + + // Test component configuration + f_cf02Up(); + + // Preamble + if (not PICS_GN_TSB_SRC) { + log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeD := f_getComponent(c_compNodeD); + v_nodeB.start(f_GEONW_PON_FPB_BV_06_nodeB()); + v_nodeD.start(f_GEONW_PON_FPB_BV_06_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // end f_GEONW_PON_FPB_BV_06 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_06) + */ + function f_GEONW_PON_FPB_BV_06_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GeoNetworkingInd v_geoNetInd; + + // Preamble + f_prDefault(); + if (not f_utTriggerEvent(m_generateTsbMessage)) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(1.0); + f_startBeingNeighbour(); + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, + mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) -> value v_geoNetInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_FPB_BV_06_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_06) + */ + function f_GEONW_PON_FPB_BV_06_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GeoNetworkingInd v_geoNetInd; + + // Preamble + f_prDefault(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, + mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) -> value v_geoNetInd { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_06_nodeD + + } // end GEONW_PON_FPB_BV_06 + + group GEONW_PON_FPB_BV_07 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_07 + */ + function f_GEONW_PON_FPB_BV_07() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + const integer v_messageCount := 2; + + // Test control + 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_FPB_BV_07_nodeB(v_messageCount)); + v_nodeD.start(f_GEONW_PON_FPB_BV_07_nodeD(v_messageCount)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // end f_GEONW_PON_FPB_BV_07 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_07) + */ + function f_GEONW_PON_FPB_BV_07_nodeB(in integer p_messageCount) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GeoNetworkingInd v_geoNetInd; + var template (present) UInt16 v_expectedSequenceNumber := ?; + var integer v_nbReceivedPackets := 0; + var integer i := 0; + + // Preamble + f_prDefault(); + vc_multipleMessagesCount := p_messageCount; + for(i:=0; i < vc_multipleMessagesCount; i:=i+1) { + if(not f_utTriggerEvent(m_generateTsbMessage)) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + tc_ac.start(1.0); + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, + mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { + tc_ac.stop; + log("*** " & testcasename() & ": INCONC: GBC packet not buffered ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": PASS: GBC packet buffered ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + } + + // Test Body + f_startBeingNeighbour(); + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket( + v_expectedSequenceNumber, + mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) -> value v_geoNetInd { + tc_ac.stop; + v_nbReceivedPackets := v_nbReceivedPackets + 1; + if(v_nbReceivedPackets >= vc_multipleMessagesCount) { + log("*** " & testcasename() & ": PASS: TSB packets received in correct order ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + v_expectedSequenceNumber := v_geoNetInd.msgIn.gnPacket.packet.extendedHeader.tsbHeader.seqNumber + 1; + tc_ac.start; + repeat; + } + } + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, + mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: TSB packet received in incorrect order ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_FPB_BV_07_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_07) + */ + function f_GEONW_PON_FPB_BV_07_nodeD(in integer p_messageCount) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GeoNetworkingInd v_geoNetInd; + var template (present) UInt16 v_expectedSequenceNumber := ?; + var integer v_nbReceivedPackets := 0; + var integer i := 0; + + // Preamble + f_prDefault(); + vc_multipleMessagesCount := p_messageCount; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(v_expectedSequenceNumber, + mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) -> value v_geoNetInd { + tc_ac.stop; + v_nbReceivedPackets := v_nbReceivedPackets + 1; + if(v_nbReceivedPackets >= vc_multipleMessagesCount) { + log("*** " & testcasename() & ": PASS: TSB packets received in correct order ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + v_expectedSequenceNumber := v_geoNetInd.msgIn.gnPacket.packet.extendedHeader.tsbHeader.seqNumber + 1; + tc_ac.start; + repeat; + } + } + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, + mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: TSB packet received in incorrect order ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_07_nodeD + + } // end GEONW_PON_FPB_BV_07 + + group GEONW_PON_FPB_BV_08 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_08 + */ + function f_GEONW_PON_FPB_BV_08() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + 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_FPB_BV_08_nodeB()); + v_nodeD.start(f_GEONW_PON_FPB_BV_08_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // end f_GEONW_PON_FPB_BV_08 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_08) + */ + function f_GEONW_PON_FPB_BV_08_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GeoNetworkingInd v_geoNetInd; + + // Preamble + f_prDefault(); + if(not f_utTriggerEvent(m_generateTsbMessageWithLifetime(c_lifetime))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + if(not f_utTriggerEvent(m_generateTsbMessageWithLifetime(c_lifetime))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(int2float(c_defaultLifetime + 1)); + f_startBeingNeighbour(); + + tc_noac.start; + alt { + + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, + mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC packet received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: No message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_FPB_BV_08_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_08) + */ + function f_GEONW_PON_FPB_BV_08_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GeoNetworkingInd v_geoNetInd; + + // Preamble + f_prDefault(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(int2float(c_defaultLifetime + 1)); + f_startBeingNeighbour(); + + tc_noac.start; + alt { + + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, + mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC packet received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: No message received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_FPB_BV_08_nodeD + + } // end GEONW_PON_FPB_BV_08 + + group GEONW_PON_FPB_BV_09 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_09 + */ + function f_GEONW_PON_FPB_BV_09() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_09_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_09_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_FPB_BV_09 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_09) + */ + function f_GEONW_PON_FPB_BV_09_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var GeoNetworkingInd v_geoNetInd; + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(1.0); + f_startBeingNeighbour(); + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ?)))) -> value v_geoNetInd { + tc_ac.stop; + + //we only check that the lifetime is less than the default lifetime due to + //we do not know exactly the time passed at IUT + if (f_getLifetimeValue(v_geoNetInd.msgIn.basicHeader.lifeTime) < f_getMaxPacketLifeTime()) { + log("*** " & testcasename() & ": PASS: Lifetime was handled properly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: Lifetime was not handled properly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_FPB_BV_09_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_09) + */ + function f_GEONW_PON_FPB_BV_09_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GeoNetworkingInd v_geoNetInd; + + // Preamble + f_prNeighbour(); + + // Make sure IUT has LocE for NodeA by sending unsolicited LS_REPLY + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu( + m_geoNwLsReplyPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + ))); + + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_FPB_BV_09_nodeC + + } // end GEONW_PON_FPB_BV_09 + + group GEONW_PON_FPB_BV_10 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_10 + */ + function f_GEONW_PON_FPB_BV_10() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeD; + + // Test control + 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_FPB_BV_10_nodeB()); + v_nodeD.start(f_GEONW_PON_FPB_BV_10_nodeD()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf02Down(); + + } // end f_GEONW_PON_FPB_BV_10 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_10) + */ + function f_GEONW_PON_FPB_BV_10_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var GeoNetworkingInd v_geoNetInd; + + // Preamble + f_prDefault(); + if(not f_utTriggerEvent(m_generateTsbMessage)) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sleep(1.0); + f_startBeingNeighbour(); + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, + mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) -> value v_geoNetInd { + tc_ac.stop; + + //we only check that the lifetime is less than the default lifetime due to + //we do not know exactly the time passed at IUT + if (f_getLifetimeValue(v_geoNetInd.msgIn.basicHeader.lifeTime) < f_getMaxPacketLifeTime()) { + log("*** " & testcasename() & ": PASS: Lifetime was handled properly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: Lifetime was not handled properly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_FPB_BV_10_nodeB + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_FPB_BV_10) + */ + function f_GEONW_PON_FPB_BV_10_nodeD() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prDefault(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwTsbPacket(?, + mw_longPosVectorPosition_withDelta(v_longPosVectorIut))))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GBC packet received correctly ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_10_nodeD + + } // end GEONW_PON_FPB_BV_10 + + group GEONW_PON_FPB_BV_11 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_11_01 + */ + function f_GEONW_PON_FPB_BV_11_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_11_01_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_11_01_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_FPB_BV_11_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_01) + */ + function f_GEONW_PON_FPB_BV_11_01_nodeB() runs on ItsGeoNetworking { + + // Local variablesa + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_11_01_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_01) + */ + function f_GEONW_PON_FPB_BV_11_01_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + // Make sure IUT has LocE for NodeA by sending unsolicited LS_REPLY + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu( + m_geoNwLsReplyPacket( + v_longPosVectorNodeA, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + ))); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if(not f_utTriggerEvent(m_generateGeoUnicastMessageWithTrafficClass( + v_longPosVectorNodeA.gnAddr, + valueof(m_trafficClass(e_scfDisabled))))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_11_01_nodeC + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_11_02 + */ + function f_GEONW_PON_FPB_BV_11_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GAC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_11_02_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_11_02_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_FPB_BV_11_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_02) + */ + function f_GEONW_PON_FPB_BV_11_02_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwAnycastPacket( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_11_02_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_02) + */ + function f_GEONW_PON_FPB_BV_11_02_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if(not f_utTriggerEvent(m_generateGeoAnycastMessageWithTrafficClass( + f_getArea(c_area2), + valueof(m_trafficClass(e_scfDisabled))))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwAnycastPacket( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_11_02_nodeC + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_11_03 + */ + function f_GEONW_PON_FPB_BV_11_03() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GBC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_11_03_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_11_03_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_FPB_BV_11_03 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_03) + */ + function f_GEONW_PON_FPB_BV_11_03_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwBroadcastPacket( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_11_03_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_03) + */ + function f_GEONW_PON_FPB_BV_11_03_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if(not f_utTriggerEvent(m_generateGeoBroadcastMessageWithTrafficClass( + f_getArea(c_area2), + valueof(m_trafficClass(e_scfDisabled))))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwBroadcastPacket( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_11_03_nodeC + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_11_04 + */ + function f_GEONW_PON_FPB_BV_11_04() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_TSB_SRC) { + log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_11_04_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_11_04_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_FPB_BV_11_04 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_04) + */ + function f_GEONW_PON_FPB_BV_11_04_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition_withDelta(v_longPosVectorIut) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_11_04_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_04) + */ + function f_GEONW_PON_FPB_BV_11_04_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if(not f_utTriggerEvent(valueof(m_generateTsbMessageWithTrafficClass(valueof(m_trafficClass(e_scfDisabled)))))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition_withDelta(v_longPosVectorIut) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_11_04_nodeC + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_11_05 + */ + function f_GEONW_PON_FPB_BV_11_05() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_TSB_SRC) { + log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_11_05_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_11_05_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_FPB_BV_11_05 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_11_05) + */ + function f_GEONW_PON_FPB_BV_11_05_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwShbPacket( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_11_05_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_11_05) + */ + function f_GEONW_PON_FPB_BV_11_05_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if(not f_utTriggerEvent(valueof(m_generateShbMessageWithTrafficClass(valueof(m_trafficClass(e_scfDisabled)))))) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwShbPacket( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_11_05_nodeC + + } // end GEONW_PON_FPB_BV_11 + + group GEONW_PON_FPB_BV_12 { + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_12_01 + */ + function f_GEONW_PON_FPB_BV_12_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GUC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GUC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_12_01_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_12_01_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_FPB_BV_12_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_01) + */ + function f_GEONW_PON_FPB_BV_12_01_nodeB() runs on ItsGeoNetworking { + + // Local variablesa + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_12_01_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_01) + */ + function f_GEONW_PON_FPB_BV_12_01_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + + // 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(f_getPosition(c_compNodeA)), + vc_localSeqNumber, + -, + m_trafficClass(e_scfDisabled) + ), + -, + c_defaultHopLimit + ), + f_getIutMacAddress() + ) + ); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_12_01_nodeC + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_12_02 + */ + function f_GEONW_PON_FPB_BV_12_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GAC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GAC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_12_02_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_12_02_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_FPB_BV_12_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_02) + */ + function f_GEONW_PON_FPB_BV_12_02_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwAnycastPacket( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_11_02_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_02) + */ + function f_GEONW_PON_FPB_BV_12_02_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwAnycastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area2), + -, + m_trafficClass(e_scfDisabled) + ) + ) + ) + ); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwAnycastPacket( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_12_02_nodeC + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_12_02 + */ + function f_GEONW_PON_FPB_BV_12_03() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_GBC_SRC) { + log("*** " & testcasename() & ": PICS_GN_GBC_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_12_03_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_12_03_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_FPB_BV_12_03 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_03) + */ + function f_GEONW_PON_FPB_BV_12_03_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_12_03_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_03) + */ + function f_GEONW_PON_FPB_BV_12_03_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area2), + -, + m_trafficClass(e_scfDisabled) + ) + ) + ) + ); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwBroadcastPacket( + mw_longPosVectorPosition(v_longPosVectorNodeC), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_11_03_nodeC + + /** + * @desc TP Function for TC_GEONW_PON_FPB_BV_12_04 + */ + function f_GEONW_PON_FPB_BV_12_04() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + + // Test control + if (not PICS_GN_TSB_SRC) { + log("*** " & testcasename() & ": PICS_GN_TSB_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(c_compNodeC); + + // Preamble + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_PON_FPB_BV_12_04_nodeB()); + v_nodeC.start(f_GEONW_PON_FPB_BV_12_04_nodeC()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_PON_FPB_BV_11_04 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_FPB_BV_12_04) + */ + function f_GEONW_PON_FPB_BV_12_04_nodeB() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeC) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_12_04_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_FPB_BV_12_04) + */ + function f_GEONW_PON_FPB_BV_12_04_nodeC() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwTsbPacket( + vc_localSeqNumber, + v_longPosVectorNodeC, + c_defaultHopLimit, + m_trafficClass(e_scfDisabled) + ), + -, + c_defaultHopLimit + ) + ) + ); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacket( + ?, + mw_longPosVectorPosition(v_longPosVectorNodeC) + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Pre-conditions: TSB not broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poDefault(); + + } // end f_GEONW_PON_FPB_BV_12_04_nodeC + + } // end GEONW_PON_FPB_BV_12 + + } // end geoForwardingPacketBuffer + + // 6.2.2.6 + group geoGeoNetworkingAddress { + + /** + * @desc TP Function for TC_GEONW_PON_GNA_BV_01 + */ + function f_GEONW_PON_GNA_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_ADDR_AUTO) { + log("*** " & testcasename() & ": PICS_GN_ADDR_AUTO required for executing the TC ***"); + setverdict(inconc); + stop; + } + + if(f_getIutGnLocalAddressConfigurationMethod() != e_auto) { + log("*** " & testcasename() & ": PICS_GN_LOCAL_ADDR_CONF_METHOD == e_auto required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prDefault(); + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( + mw_geoNwBeaconPacket( + mw_longPosVectorAny(f_getIutGnLocalAddress()) // IUT's SOPV + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": GN address is correct ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( + mw_geoNwBeaconPacket( + ? // any SOPV + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": GN address is not correct ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // end f_GEONW_PON_GNA_BV_01 + + /** + * @desc TP Function for TC_GEONW_PON_GNA_BV_01 + */ + function f_GEONW_PON_GNA_BV_02() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + var LongPosVector v_longPosVectorNodeB; + var GeoNetworkingInd v_geoNetInd; + var GN_Address v_iutGnAddress := valueof(m_dummyGnAddr); + + // Test control + if (not PICS_GN_DAD) { + log("*** " & testcasename() & ": PICS_GN_DAD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prDefault(); + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( + mw_geoNwBeaconPacket( + ? // SO PV + )))) -> value v_geoNetInd { + v_iutGnAddress := valueof(v_geoNetInd.msgIn.gnPacket.packet.extendedHeader.beaconHeader.srcPosVector.gnAddr); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_longPosVectorNodeB.gnAddr := v_iutGnAddress; + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(m_geoNwPdu(m_geoNwBeaconPacket(v_longPosVectorNodeB), -, c_hopLimit1))); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( + mw_geoNwBeaconPacket( + mw_longPosVectorAny(v_iutGnAddress) // SO PV + )))) { + log("*** " & testcasename() & ": IUT is still using old GN address. Waiting... ***"); + repeat; + } + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu( + mw_geoNwBeaconPacket( + ? // SO PV + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": IUT used new GN address ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // end f_GEONW_PON_GNA_BV_02 + + } // end geoGeoNetworkingAddress + + // 6.2.2.7 + group geoBeaconing { + + /** + * @desc TP Function for TC_GEONW_PON_BEA_TI_01 + */ + function f_GEONW_PON_BEA_TI_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + var boolean v_beaconReceived := false; + timer t_minRetransTimer := f_getBsRetransmitTimer(); + timer t_maxRetransTimer := f_getBsRetransmitTimer() + f_getBsMaxJitter(); + + // Test control + if (not PICS_GN_BEACON_SRC) { + log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prDefault(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + + t_maxRetransTimer.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(?)))) { + if (v_beaconReceived == false) { + v_beaconReceived := true; + t_minRetransTimer.start; + t_maxRetransTimer.start; + //after the first beacon received, check the retransmission + repeat; + } + if(t_minRetransTimer.running) { + log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too early) ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": Beacon transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_minRetransTimer.timeout { + log("*** " & testcasename() & ": Ready for retransmission ***"); + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too late) ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + f_acTriggerEvent(m_stopPassBeaconing); + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // end f_GEONW_PON_BEA_TI_01 + + /** + * @desc TP Function for TC_GEONW_PON_BEA_TI_02 + */ + function f_GEONW_PON_BEA_TI_02() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + var boolean v_geoUnicastReceived := false; + var boolean v_readyForRetransmission := false; + timer t_minRetransTimer := f_getBsRetransmitTimer() - f_getDeltaTimer(); + timer t_maxRetransTimer := f_getBsRetransmitTimer() + f_getBsMaxJitter() + f_getDeltaTimer(); + + // Test control + if (not PICS_GN_BEACON_SRC) { + log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + if ( not f_utTriggerEvent(m_generateShbMessage) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwShbPacket))) { + tc_ac.stop; + t_minRetransTimer.start; + t_maxRetransTimer.start; + v_geoUnicastReceived := true; + repeat; + } + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket))) { + if(not(v_geoUnicastReceived)) { + repeat; + } + if(not(v_readyForRetransmission)) { + log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too early) ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + else { + log("*** " & testcasename() & ": Beacon transmitted at prescribed periodicity ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + [] t_minRetransTimer.timeout { + log("*** " & testcasename() & ": Ready for retransmission ***"); + v_readyForRetransmission := true; + repeat; + } + [] t_maxRetransTimer.timeout { + log("*** " & testcasename() & ": Beacon not transmitted at prescribed periodicity (too late) ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": GUC not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + f_acTriggerEvent(m_stopPassBeaconing); + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_BEA_TI_02 + + /** + * @desc TP Function for TC_GEONW_PON_BEA_BV_03 + */ + function f_GEONW_PON_BEA_BV_03() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut; + + // Test control + if (not PICS_GN_BEACON_SRC) { + log("*** " & testcasename() & ": PICS_GN_BEACON_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorIut := f_getPosition(c_compIut); + + // Test adapter configuration + + // Preamble + f_prDefault(); + action("Please turn IUT OFF"); + f_sleep(PX_TWAIT); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); + geoNetworkingPort.clear; + + action("Please turn IUT ON"); + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBeaconPacket(?)))) { + log("*** " & testcasename() & ": PASS: Initial Beacon received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: Initial Beacon not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + f_acTriggerEvent(m_stopPassBeaconing); + + // Postamble + f_poDefault(); + f_cf01Down(); + + } // end f_GEONW_PON_BEA_BV_03 + + } // end geoBeaconing + + // 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)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": DEPV of the received GUC message correctly set ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + ?, + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": DEPV of the received GUC message incorrectly set ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Expected message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_PON_GUC_BV_01 + + group GEONW_PON_GUC_BV_02 { + + /** + * @desc TP Function for TC_GEONW_PON_GUC_BV_02 + */ + function f_GEONW_PON_GUC_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_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_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 { + + // 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_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); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(f_getPosition(c_compNodeA)), + vc_localSeqNumber + ), + -, + c_defaultHopLimit + ), + f_getIutMacAddress() + ) + ); + + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end 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); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_GUC_BV_02_nodeD + + } // end GEONW_PON_GUC_BV_02 + + group GEONW_PON_GUC_BV_03 { + + /** + * @desc TP Function for TC_GEONW_PON_GUC_BV_03 + */ + function f_GEONW_PON_GUC_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_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 { + + // 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 forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // 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 { + + // Local variables + var LongPosVector v_obsoleteLongPosVectorNodeA := f_getPosition(c_compNodeA); + + // Preamble + f_prNeighbour(); + v_obsoleteLongPosVectorNodeA.timestamp := v_obsoleteLongPosVectorNodeA.timestamp - 1000; + v_obsoleteLongPosVectorNodeA.latitude := v_obsoleteLongPosVectorNodeA.latitude - 1; + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(v_obsoleteLongPosVectorNodeA), + vc_localSeqNumber, + c_defaultHopLimit + ), + -, + c_defaultHopLimit + ), + f_getIutMacAddress() + ) + ); + + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end 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); + + // 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: 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_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 Body + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + vc_localSeqNumber + ), + -, + 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; + + // Test control + if (not PICS_GN_GUC_DST) { + log("*** " & testcasename() & ": PICS_GN_GUC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + f_prDefault(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeB), + f_getIutShortPosVector(), + vc_localSeqNumber + ) + ); + f_sendGeoNetMessage(m_geoNwReq_withLinkLayerDestination(v_gnPacket, f_getIutMacAddress())); + + f_sleep(PX_TAC); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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 integer v_distance := 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 integer 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()) + ) * int2float(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_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 + ), + -, + c_defaultHopLimit + ), + f_getIutMacAddress() + ) + ); + log("*** " & testcasename() & ": INFO: Message sent ***"); + f_selfOrClientSyncAndVerdict(c_msgSent, e_success); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Re-broadcasted GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not re-broadcasted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // end 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 integer v_distance := 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); + + // 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); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(p_longPosVectorNodeA), + vc_localSeqNumber + ), + -, + c_defaultHopLimit + ), + f_getIutMacAddress() + ) + ); + log("*** " & testcasename() & ": INFO: Message sent ***"); + f_selfOrClientSyncAndVerdict(c_msgSent, e_success); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(p_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: 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_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 integer v_distance := 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); + + // Test Body + f_sleepIgnoreDef(int2float(f_getGeoUnicastCbfMaxTime())/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_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); + + // 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_BV_08_nodeC + + } // end GEONW_PON_GUC_BV_08 + + group GEONW_PON_GUC_BV_10 { + + /** + * @desc TP Function for TC_GEONW_PON_GUC_BV_10 + */ + function f_GEONW_PON_GUC_BV_10() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var integer v_distance := 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_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)), + ? + ) + ) + ) + ) { + 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_BV_10_nodeB + + /** + * @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 + + // Preamble + f_prDefault(); + 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() + ) + ); + + 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)), + ? + ) + ) + ) + ) { + 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_BV_10_nodeC + + } // end GEONW_PON_GUC_BV_10 + + 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)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: GUC received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GUC was not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // end 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)), + ? + ) + ) + ) + ) { + 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 + + 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)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": INFO: First GUC forwarded ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: First GUC was not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_withLinkLayerDestination( + m_geoNwPdu( + m_geoNwUnicastPacket( + f_getPosition(c_compNodeC), + f_longPosVector2ShortPosVector(v_longPosVectorNodeA), + vc_localSeqNumber + ), + -, + c_defaultHopLimit - 1 + ), + f_getIutMacAddress() + ) + ); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: Duplicate GUC was forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: Duplicate GUC not forwarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // end 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)), + ? + ) + ) + ) + ) { + 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 + ); + + // Preamble + f_prNeighbour(); + f_sleep(PX_TAC); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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(); + + } // 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 + + } // end geoGeoUnicast + + // 6.2.2.9 + group geoGeoBroadcast { + + 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_withDelta(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_withDelta(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_withDelta(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_withDelta(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; + + // Test control + if (not PICS_GN_GBC_DST) { + log("*** " & testcasename() & ": PICS_GN_GBC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1) + ) + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + f_sleep(PX_TAC); + + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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; + + // Preamble + f_prNeighbour(); + v_gnPacket := m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area1) + ), + -, + c_defaultHopLimit + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(valueof(v_gnPacket))); + + // IUT should also rebroadcast the packet. Get ready + tc_ac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(mw_geoNwBroadcastPacketWithArea( + mw_longPosVectorPosition(v_longPosVectorNodeB), + ?, + f_getGeoBroadcastArea(c_area1) + )))) { + tc_ac.stop; + log("*** " & testcasename() & ": INFO: GBC message rebroadcasted ***"); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INFO: GBC message not rebroadcasted ***"); + } + } + + f_sleep(PX_TAC); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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 + v_gnPacket.basicHeader.routerHopLimit := valueof(v_gnPacket.basicHeader.routerHopLimit) / 2; + f_sleep(PX_TAC); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); i:=i+1) { + // empty on purpose + } + if(i < 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; + + // 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); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); i:=i+1) { + // empty on purpose + } + if(i < 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_withDelta(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_withDelta(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; + + // 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); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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; + + // 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); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: Pre-conditions: TSB correctly rebroadcasted and passed to Upper Layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": INCONC: TSB was not transmitted to upper layer ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Pre-conditions: TSB not rebroadcasted ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + } + + // Test Body + f_sleep(PX_TAC); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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_withDelta(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_withDelta(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; + + // 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); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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_withDelta(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_withDelta(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_withDelta(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_withDelta(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; + + // Test control + if (not PICS_GN_GAC_DST) { + log("*** " & testcasename() & ": PICS_GN_GAC_DST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + + // Test adapter configuration + + // Preamble + f_prNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + v_gnPacket := m_geoNwPdu(m_geoNwAnycastPacket( + v_longPosVectorNodeB, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area1) + ) + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + f_sleep(PX_TAC); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); 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; + + // Preamble + f_prNeighbour(); + + f_sleep(PX_TAC); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); i:=i+1) { + // empty on purpose + } + if(i < lengthof(vc_utInds)) { + log("*** " & testcasename() & ": PASS: GN was transmitted to upper layer ***"); + 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 := m_geoNwPdu(m_geoNwAnycastPacket( + v_longPosVectorNodeD, + vc_localSeqNumber, + f_getGeoAnycastArea(c_area1) + ), + -, + c_defaultHopLimit / 2 + ); + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(v_gnPacket)); + + f_sleep(PX_TAC); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); i:=i+1) { + // empty on purpose + } + if(i < 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; + + // 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); + for(i:=0; i < lengthof(vc_utInds) and not match(vc_utInds[i].rawPayload, v_gnPacket.gnPacket.packet.payload.rawPayload); i:=i+1) { + // empty on purpose + } + if(i < 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_withDelta(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_withDelta(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_BO_01 { + + /** + * @desc TP Function for TC_GEONW_PON_BCA_BO_01 + */ + function f_GEONW_PON_BCA_BO_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_BO_01_nodeB()); + v_nodeC.start(f_GEONW_PON_BCA_BO_01_nodeC(v_sequenceNumberC)); + v_nodeD.start(f_GEONW_PON_BCA_BO_01_nodeD(v_sequenceNumberC)); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // end f_GEONW_PON_BCA_BO_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_BCA_BO_01) + */ + function f_GEONW_PON_BCA_BO_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_BO_01_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_BCA_BO_01) + */ + function f_GEONW_PON_BCA_BO_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_BO_01_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_BCA_BO_01) + */ + function f_GEONW_PON_BCA_BO_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_BO_01_nodeD + + } // end GEONW_PON_BCA_BO_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; + + 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_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 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); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwBroadcastPacket( + v_longPosVectorNodeD, + vc_localSeqNumber, + f_getGeoBroadcastArea(c_area2) + ) + ) + ) + ); + + tc_noac.start; + alt { + [] geoNetworkingPort.receive(mw_geoNwInd(mw_geoNwPdu(?))) { + tc_noac.stop; + log("*** " & testcasename() & ": FAIL: GBC received and not discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_noac.timeout { + log("*** " & testcasename() & ": PASS: GBC message discarded ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } + + // Postamble + f_poNeighbour(); + + } // end 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 ***"); + 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_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); + + // 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_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) + ) + ) + ) + ); + + 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_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) + ) + ) + ) + ); + + 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 + + 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) + ) + ) + ) + ); + + 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_BCA_BV_08_nodeD + + } // end GEONW_PON_BCA_BV_08 + + } // 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 + + // 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_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, + 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 + + group GEONW_PON_BAA_BV_02 { + + /** + * @desc TP Function for TC_GEONW_PON_BAA_BV_02 + */ + function f_GEONW_PON_BAA_BV_02() 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_02_nodeB()); + v_nodeE.start(f_GEONW_PON_BAA_BV_02_nodeE()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf05Down(); + + } // end f_GEONW_PON_BAA_BV_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_02) + */ + function f_GEONW_PON_BAA_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 + 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_02_nodeB + + /** + * @desc Behavior function for NodeE (TC_GEONW_PON_BAA_BV_02) + */ + function f_GEONW_PON_BAA_BV_02_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_BAA_BV_02_nodeE + + } // end GEONW_PON_BAA_BV_02 + + group GEONW_PON_BAA_BV_03 { + + /** + * @desc TP Function for TC_GEONW_PON_BAA_BV_03 + */ + function f_GEONW_PON_BAA_BV_03() 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_03_nodeB()); + v_nodeF.start(f_GEONW_PON_BAA_BV_03_nodeF()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf06Down(); + + } // end f_GEONW_PON_BAA_BV_03 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_03) + */ + function f_GEONW_PON_BAA_BV_03_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_BAA_BV_03_nodeB + + /** + * @desc Behavior function for NodeF (TC_GEONW_PON_BAA_BV_03) + */ + function f_GEONW_PON_BAA_BV_03_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_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; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": FAIL: GBC message not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_BAA_BV_03_nodeF + + } // end GEONW_PON_BAA_BV_03 + + group GEONW_PON_BAA_BV_04 { + + /** + * @desc TP Function for TC_GEONW_PON_BAA_BV_04 + */ + function f_GEONW_PON_BAA_BV_04() 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_04_nodeB()); + v_nodeE.start(f_GEONW_PON_BAA_BV_04_nodeE()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf05Down(); + + } // end f_GEONW_PON_BAA_BV_04 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_04) + */ + function f_GEONW_PON_BAA_BV_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_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_BAA_BV_04_nodeB + + /** + * @desc Behavior function for NodeE (TC_GEONW_PON_BAA_BV_04) + */ + function f_GEONW_PON_BAA_BV_04_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_04_nodeE + + } // end GEONW_PON_BAA_BV_04 + + group GEONW_PON_BAA_BV_05 { + + /** + * @desc TP Function for TC_GEONW_PON_BAA_BV_05 + */ + function f_GEONW_PON_BAA_BV_05() 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_05_nodeB()); + v_nodeE.start(f_GEONW_PON_BAA_BV_05_nodeE()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf05Down(); + + } // end f_GEONW_PON_BAA_BV_05 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_05) + */ + function f_GEONW_PON_BAA_BV_05_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_BAA_BV_05_nodeB + + /** + * @desc Behavior function for NodeE (TC_GEONW_PON_BAA_BV_05) + */ + function f_GEONW_PON_BAA_BV_05_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_BAA_BV_05_nodeE + + } // end GEONW_PON_BAA_BV_05 + + group GEONW_PON_BAA_BV_06 { + + /** + * @desc TP Function for TC_GEONW_PON_BAA_BV_06 + */ + function f_GEONW_PON_BAA_BV_06() 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_06_nodeB()); + v_nodeE.start(f_GEONW_PON_BAA_BV_06_nodeE()); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf05Down(); + + } // end f_GEONW_PON_BAA_BV_06 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_06) + */ + function f_GEONW_PON_BAA_BV_06_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; + + // 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_BAA_BV_06_nodeB + + /** + * @desc Behavior function for NodeE (TC_GEONW_PON_BAA_BV_06) + */ + function f_GEONW_PON_BAA_BV_06_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_getGeoBroadcastCbfMaxTime()) + + ( + int2float(f_getGeoBroadcastCbfMinTime() - f_getGeoBroadcastCbfMaxTime()) + / 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) + ) + ) + ) + ); + + 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_BAA_BV_06_nodeE + + } // end GEONW_PON_BAA_BV_06 + + group GEONW_PON_BAA_BV_07 { + + /** + * @desc TP Function for TC_GEONW_PON_BAA_BV_07 + */ + function f_GEONW_PON_BAA_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_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_07_nodeB()); + v_nodeC.start(f_GEONW_PON_BAA_BV_07_nodeC()); + v_nodeD.start(f_GEONW_PON_BAA_BV_07_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // end f_GEONW_PON_BAA_BV_07 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BV_07) + */ + function f_GEONW_PON_BAA_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_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); + } + } + + // 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); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_BAA_BV_07_nodeC + + /** + * @desc Behavior function for NodeD (TC_GEONW_PON_BAA_BV_07) + */ + function f_GEONW_PON_BAA_BV_07_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 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_07_nodeD + + } // end GEONW_PON_BAA_BV_07 + + group GEONW_PON_BAA_BO_08 { + + /** + * @desc TP Function for TC_GEONW_PON_BAA_BO_08 + */ + function f_GEONW_PON_BAA_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 ***"); + 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_BO_08_nodeB()); + v_nodeC.start(f_GEONW_PON_BAA_BO_08_nodeC()); + v_nodeD.start(f_GEONW_PON_BAA_BO_08_nodeD()); + + // Synchronization + f_serverSync3ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf04Down(); + + } // end f_GEONW_PON_BAA_BO_08 + + /** + * @desc Behavior function for NodeB (TC_GEONW_PON_BAA_BO_08) + */ + function f_GEONW_PON_BAA_BO_08_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_BAA_BO_08_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_PON_BAA_BO_08) + */ + function f_GEONW_PON_BAA_BO_08_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: 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_BO_08_nodeC + + /** + * @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) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_BAA_BO_08_nodeD + + } // end GEONW_PON_BAA_BO_08 + + 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; + + 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_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 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_BAA_BV_09_nodeE + + } // end GEONW_PON_BAA_BV_09 + + 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); + + // 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: 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_BAA_BV_10_nodeB + + /** + * @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); + + // Preamble + f_prNonNeighbour(); + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu(m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + 0, + 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: 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_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); + + // 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); + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_PON_BAA_BV_10_nodeD + + } // end GEONW_PON_BAA_BV_10 + + group GEONW_PON_BAA_BV_11 { + + /** + * @desc TP Function for TC_GEONW_PON_BAA_BV_11 + */ + function f_GEONW_PON_BAA_BV_11() 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_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_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 { + + // 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_BAA_BV_11_nodeB + + /** + * @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); + + // 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_BAA_BV_11_nodeD + + } // end GEONW_PON_BAA_BV_11 + + } // end geoGeoBroadcastCbfAlgorithm + + } // end geoProtocolOperation + + // 6.2.3 Capacities + group geoCapacities { + + // 6.2.3.1 + group geoCapLocationService { + + /** + * @desc TP Function for TC_GEONW_CAP_LOS_BV_01 + */ + function f_GEONW_CAP_LOS_BV_01() runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA; + var LongPosVector v_longPosVectorNodeB; + var LongPosVector v_longPosVectorIut; + var GeoNetworkingInd v_msg; + var integer v_packetSize := 0; + var integer v_index := 0; + var integer v_nbrOfPackets := 0; + + // Test control + if (not PICS_GN_LS_REQ_SRC) { + log("*** " & testcasename() & ": PICS_GN_LS_REQ_SRC required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf01Up(); + + // Test adapter configuration + + // Preamble + v_longPosVectorNodeA := f_getPosition(c_compNodeA); + v_longPosVectorNodeB := f_getPosition(c_compNodeB); + v_longPosVectorIut := f_getPosition(c_compIut); + f_prNeighbour(); + + // Trigger message to NodeB in order to get an estimation of packet size + if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithPayload(v_longPosVectorNodeB.gnAddr, char2oct("PAYLOAD_" & oct2str(int2oct(0, 2))))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeB)), + ? + ) + ) + ) + ) -> value v_msg { + var GeoNetworkingReq v_req; + tc_ac.stop; + //if we use directly v_msg(GeoNetworkingInd) for encvalue the encoder must also be able to provide + //encoding of "incoming messages"... + v_req.msgOut := v_msg.msgIn; + v_packetSize := lengthof(bit2oct(encvalue(v_req.msgOut))); + } + } + + // implicitely trigger LS_REQUEST + if ( not f_utTriggerEvent(m_generateGeoUnicastMessage(v_longPosVectorNodeA.gnAddr)) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); + } + tc_ac.start; + alt { + [] a_receiveLsRequest( + ?, + v_longPosVectorNodeA.gnAddr.mid, + v_longPosVectorIut + ) { + } + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + // Fill the LS buffer + one more message to remove an older message + v_nbrOfPackets := f_getLsPacketBufferSize() / v_packetSize + 1; + log("*** " & testcasename() & ": " & int2str(v_nbrOfPackets) & " ***"); + for (v_index:=1; v_index <= v_nbrOfPackets; v_index:=v_index+1) { + if ( not f_utTriggerEvent(m_generateGeoUnicastMessageWithPayload(v_longPosVectorNodeA.gnAddr, char2oct("PAYLOAD_" & oct2str(int2oct(v_index, 2))))) ) { + log("*** " & testcasename() & ": INCONC: Trigger failed ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); + } + } + + f_sleepIgnoreDef(0.5); + f_sendGeoNetMessage( + m_geoNwReq_linkLayerBroadcast( + m_geoNwPdu( + m_geoNwLsReplyPacket( + v_longPosVectorNodeB, + f_longPosVector2ShortPosVector(v_longPosVectorIut), + vc_localSeqNumber + ) + ) + ) + ); + + // packet 1 shall be dropped + v_index := 2; + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + f_receiveGeoNetMessageWithPayload( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ), + f_adaptPayload_mw(char2oct("PAYLOAD_" & oct2str(int2oct(v_index, 2)))) + ) + ) { + if (v_index < v_nbrOfPackets) { + v_index := v_index + 1; + repeat; + } + tc_ac.stop; + log("*** " & testcasename() & ": Older message was removed, new message was inserted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": Expected amount of messages were not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + + // Postamble + f_poNeighbour(); + f_cf01Down(); + + } // end f_GEONW_CAP_LOS_BV_01 + + } // end geoCapLocationService + + // 6.2.3.2 + group geoCapForwardingPacketBuffer { + + group GEONW_CAP_FPB_BV_01 { + + /** + * @desc TP Function for TC_GEONW_CAP_LOS_BV_01 + */ + function f_GEONW_CAP_FPB_BV_01() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var template (value) GeoNetworkingPdu v_geoNetworkingMsg; + var integer v_packetSize := 0; + var integer v_nbrOfPackets := 0; + var integer v_payloadSize := f_min(1400, f_getUcForwardingPacketBufferSize() / 10 ); + var octetstring v_payload; + const integer c_nbrOfDiscardedMessages := 1; + var UInt16 v_sequenceNumberC := f_getInitialSequenceNumber(); + + // Test control + if (not PICS_GN_GUC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GUC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Prepare GUC message + v_payload := int2oct(0, v_payloadSize); + v_geoNetworkingMsg := m_geoNwPdu( + m_geoNwUnicastPacket( + m_dummyLongPosVector, + f_longPosVector2ShortPosVector(valueof(m_dummyLongPosVector)), + 0) + ); + v_geoNetworkingMsg.gnPacket.packet.payload := f_adaptPayload_m(v_payload); + v_packetSize := lengthof(bit2oct(encvalue(v_geoNetworkingMsg))); + + // Fill the UC forwarding buffer + c_nbrOfDiscardedMessages more message to remove older messages + v_nbrOfPackets := f_getUcForwardingPacketBufferSize() / v_packetSize + c_nbrOfDiscardedMessages + 1; + log("*** " & testcasename() & ": " & int2str(v_nbrOfPackets) & " ***"); + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_CAP_FPB_BV_01_nodeB(v_sequenceNumberC, v_nbrOfPackets, c_nbrOfDiscardedMessages)); + v_nodeC.start(f_GEONW_CAP_FPB_BV_01_nodeC(v_sequenceNumberC, v_nbrOfPackets, v_geoNetworkingMsg)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_CAP_FPB_BV_01 + + /** + * @desc Behavior function for NodeB (TC_GEONW_CAP_FPB_BV_01) + * @param p_sequenceNumberC Initial sequence number of NodeC + * @param p_nbrOfPackets Number of packets sent by other component + * @param p_nbrOfDiscardedMessages Number of packets that should be discarded + */ + function f_GEONW_CAP_FPB_BV_01_nodeB( + in UInt16 p_sequenceNumberC, + in integer p_nbrOfPackets, + in integer p_nbrOfDiscardedMessages + ) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var UInt16 v_expectedSeqNumber := p_sequenceNumberC + p_nbrOfDiscardedMessages + 1; + var integer v_nbReceivedMessages := 0; + + // Preamble + f_prDefault(); // NodeB is not yet a neighbour + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_startBeingNeighbour(); + + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + v_expectedSeqNumber + ) + ) + ) + ) { + v_nbReceivedMessages := v_nbReceivedMessages + 1; + v_expectedSeqNumber := v_expectedSeqNumber + 1; + repeat; // repeat in any case => IUT may send more messages ! + } + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwUnicastPacket( + mw_shortPosVectorPosition(f_longPosVector2ShortPosVector(v_longPosVectorNodeA)), + ? + ) + ) + ) + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Unexpected message received (Bad sequence number) ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + if(v_nbReceivedMessages == (p_nbrOfPackets - p_nbrOfDiscardedMessages)) { + log("*** " & testcasename() & ": PASS: Older messages wer removed, new messages were inserted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: Expected amount of messages were not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_CAP_FPB_BV_01_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_CAP_FPB_BV_01) + * @param p_sequenceNumberC Initial sequence number of NodeC + * @param p_nbrOfPackets Number of packets to be send + * @param p_geoNetworkingMsg Pdu to be sent (template) + */ + function f_GEONW_CAP_FPB_BV_01_nodeC( + in UInt16 p_sequenceNumberC, + in integer p_nbrOfPackets, + in template (value) GeoNetworkingPdu p_geoNetworkingMsg + ) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeA := f_getPosition(c_compNodeA); + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var integer i := 0; + + // Preamble + f_prNeighbour(); + vc_localSeqNumber := p_sequenceNumberC; + + p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoUnicastHeader.srcPosVector := v_longPosVectorNodeC; + p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoUnicastHeader.dstPosVector := f_longPosVector2ShortPosVector(v_longPosVectorNodeA); + for (i:=0; i < p_nbrOfPackets; i:=i+1) { + p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoUnicastHeader.seqNumber := vc_localSeqNumber; + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(p_geoNetworkingMsg)); + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_CAP_FPB_BV_01_nodeC + + } // end GEONW_CAP_FPB_BV_01 + + group GEONW_CAP_FPB_BV_02 { + + /** + * @desc TP Function for TC_GEONW_CAP_FPB_BV_02 + */ + function f_GEONW_CAP_FPB_BV_02() runs on ItsMtc { + + // Local variables + var ItsGeoNetworking v_nodeB; + var ItsGeoNetworking v_nodeC; + var template (value) GeoNetworkingPdu v_geoNetworkingMsg; + var integer v_packetSize := 0; + var integer v_nbrOfPackets := 0; + const integer c_nbrOfDiscardedMessages := 1; + var UInt16 v_sequenceNumberC := f_getInitialSequenceNumber(); + + // Test control + if (not PICS_GN_GBC_FWD) { + log("*** " & testcasename() & ": PICS_GN_GBC_FWD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf03Up(); + + // Preamble + + // Prepare GUC message + v_geoNetworkingMsg := m_geoNwPdu(m_geoNwBroadcastPacket( + m_dummyLongPosVector, + 0, + m_dummyGeoBroadcastArea)); + v_packetSize := lengthof(bit2oct(encvalue(v_geoNetworkingMsg))); + + // Fill the BC forwarding buffer + c_nbrOfDiscardedMessages more message to remove older messages + v_nbrOfPackets := f_getBcForwardingPacketBufferSize() / v_packetSize + c_nbrOfDiscardedMessages; + + // Start components + v_nodeB := f_getComponent(c_compNodeB); + v_nodeC := f_getComponent(c_compNodeC); + v_nodeB.start(f_GEONW_CAP_FPB_BV_02_nodeB(v_sequenceNumberC, v_nbrOfPackets, c_nbrOfDiscardedMessages)); + v_nodeC.start(f_GEONW_CAP_FPB_BV_02_nodeC(v_sequenceNumberC, v_nbrOfPackets, v_geoNetworkingMsg)); + + // Synchronization + f_serverSync2ClientsAndStop({c_prDone, c_tbDone}); + + // Cleanup + f_cf03Down(); + + } // end f_GEONW_CAP_FPB_BV_02 + + /** + * @desc Behavior function for NodeB (TC_GEONW_CAP_FPB_BV_02) + * @param p_sequenceNumberC Initial sequence number of NodeC + * @param p_nbrOfPackets Number of packets sent by other component + * @param p_nbrOfDiscardedMessages Number of packets that should be discarded + */ + function f_GEONW_CAP_FPB_BV_02_nodeB( + in UInt16 p_sequenceNumberC, + in integer p_nbrOfPackets, + in integer p_nbrOfDiscardedMessages + ) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorIut := f_getPosition(c_compIut); + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var UInt16 v_expectedSeqNumber := p_sequenceNumberC + p_nbrOfDiscardedMessages; + var integer v_nbReceivedMessages := 0; + + // Preamble + f_prDefault(); // NodeB is not yet a neighbour + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_startBeingNeighbour(); + + tc_ac.start; + alt { + [] a_receiveGeoBroadcast( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), + v_expectedSeqNumber + ) { + v_nbReceivedMessages := v_nbReceivedMessages + 1; + v_expectedSeqNumber := v_expectedSeqNumber + 1; + repeat; // repeat in any case => IUT may send more messages ! + } + [] a_receiveGeoBroadcast( + mw_longPosVectorPosition_withDelta(v_longPosVectorIut), + ? + ) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Unexpected message received (Bad sequence number) ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + [] tc_ac.timeout { + if(v_nbReceivedMessages == (p_nbrOfPackets - p_nbrOfDiscardedMessages)) { + log("*** " & testcasename() & ": PASS: Older messages wer removed, new messages were inserted ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + else { + log("*** " & testcasename() & ": FAIL: Expected amount of messages were not received ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_error); + } + } + } + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_CAP_FPB_BV_02_nodeB + + /** + * @desc Behavior function for NodeC (TC_GEONW_CAP_FPB_BV_02) + * @param p_sequenceNumberC Initial sequence number of NodeC + * @param p_nbrOfPackets Number of packets to be send + * @param p_geoNetworkingMsg Pdu to be sent (template) + */ + function f_GEONW_CAP_FPB_BV_02_nodeC( + in UInt16 p_sequenceNumberC, + in integer p_nbrOfPackets, + in template (value) GeoNetworkingPdu p_geoNetworkingMsg + ) runs on ItsGeoNetworking { + + // Local variables + var LongPosVector v_longPosVectorNodeC := f_getPosition(c_compNodeC); + var integer i := 0; + + // Preamble + f_prNeighbour(); + vc_localSeqNumber := p_sequenceNumberC; + + p_geoNetworkingMsg.gnPacket.packet := m_geoNwBroadcastPacket( + v_longPosVectorNodeC, + 0, + f_getGeoBroadcastArea(c_area2) + ); + for (i:=0; i < p_nbrOfPackets; i:=i+1) { + p_geoNetworkingMsg.gnPacket.packet.extendedHeader.geoBroadcastHeader.seqNumber := vc_localSeqNumber; + f_sendGeoNetMessage(m_geoNwReq_linkLayerBroadcast(p_geoNetworkingMsg)); + } + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + + // Postamble + f_poNeighbour(); + + } // end f_GEONW_CAP_FPB_BV_02_nodeC + + } // end GEONW_CAP_FPB_BV_02 + + } // end geoCapForwardingPacketBuffer + + } // end geoCapacities + +} // end ItsGeoNetworking_TpFunctions diff --git a/ttcn/AtsMapSpat/ItsMapSpat_TestCases.ttcn b/ttcn/AtsMapSpat/ItsMapSpat_TestCases.ttcn index 88460cc8803c06941c07ea3c590eb39e58b81ad4..95f07e585ae0cd9163e7be4861d3ad60398ec433 100644 --- a/ttcn/AtsMapSpat/ItsMapSpat_TestCases.ttcn +++ b/ttcn/AtsMapSpat/ItsMapSpat_TestCases.ttcn @@ -26,7 +26,7 @@ module ItsMapSpat_TestCases { import from ITS_Container language "ASN.1:1997" all; import from DSRC language "ASN.1:1997" all; - import from EU language "ASN.1:1997" all; + import from REG_D language "ASN.1:1997" all; group MapSpatMessageDissemination { @@ -53,7 +53,7 @@ module ItsMapSpat_TestCases { * * @version 0.0.1 * @see ETSI TS 103 191-2 v0.0.1 TP/MAP-SPAT/MSD/BV-01 - * @reference + * @reference SAE J2735 [1] Clause 7.34 */ testcase TC_MAP_SPAT_MSD_BV_01 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -112,9 +112,9 @@ module ItsMapSpat_TestCases { * } * * - * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-02 - * @reference + * @version 0.0.1 + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-02 + * @reference SAE J2735 [1] Clause 7.34 */ testcase TC_MAP_SPAT_MSD_BV_02 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -180,9 +180,9 @@ module ItsMapSpat_TestCases { * } * * - * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-03 - * @reference + * @version 0.0.1 + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-03 + * @reference SAE J2735 [1] Clause 7.92 */ testcase TC_MAP_SPAT_MSD_BV_03 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -261,9 +261,9 @@ module ItsMapSpat_TestCases { * } * * - * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-04 - * @reference + * @version 0.0.1 + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-04 + * @reference SAE J2735 [1] Clause 7.92 */ testcase TC_MAP_SPAT_MSD_BV_04 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -350,9 +350,9 @@ module ItsMapSpat_TestCases { * } * * - * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-05 - * @reference + * @version 0.0.1 + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-05 + * @reference SAE J2735 [1] Clause 7.92 */ testcase TC_MAP_SPAT_MSD_BV_05 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -435,9 +435,9 @@ module ItsMapSpat_TestCases { * } * * - * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-06 - * @reference + * @version 0.0.1 + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-06 + * @reference SAE J2735 [1] Clause 7.92 */ testcase TC_MAP_SPAT_MSD_BV_06 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -519,9 +519,9 @@ module ItsMapSpat_TestCases { * } * * - * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-07 - * @reference + * @version 0.0.1 + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-07 + * @reference SAE J2735 [1] Clause 7.92 */ testcase TC_MAP_SPAT_MSD_BV_07 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -567,9 +567,9 @@ module ItsMapSpat_TestCases { * } * * - * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-08 - * @reference + * @version 0.0.1 + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-08 + * @reference SAE J2735 [1] Clause 7.93 */ testcase TC_MAP_SPAT_MSD_BV_08 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -632,9 +632,9 @@ module ItsMapSpat_TestCases { * } * * - * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-09 - * @reference + * @version 0.0.1 + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-09 + * @reference SAE J2735 [1] Clause 7.83 */ testcase TC_MAP_SPAT_MSD_BV_09 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -696,9 +696,9 @@ module ItsMapSpat_TestCases { * } * * - * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-10 - * @reference + * @version 0.0.1 + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-10 + * @reference SAE J2735 [1] Clause 6.29 */ testcase TC_MAP_SPAT_MSD_BV_10 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -740,8 +740,8 @@ module ItsMapSpat_TestCases { tc_ac.stop; log("*** " & testcasename() & ": Successfully received SPAT message. ***"); for ( i := 0 ; i < lengthof ( v_intersections ) and not v_result ; i := i+1 ) { - for ( j := 0 ; j < lengthof ( v_spat.msgIn.msg.spat.intersections ) ; j := j+1 ) { - if ( v_intersections[ i ].id == v_spat.msgIn.msg.spat.intersections[ j ].id ) { + for ( j := 0 ; j < lengthof ( v_spat.msgIn.msg.spatData.intersections ) ; j := j+1 ) { + if ( v_intersections[ i ].id == v_spat.msgIn.msg.spatData.intersections[ j ].id ) { v_result := true; } } @@ -790,9 +790,9 @@ module ItsMapSpat_TestCases { * } * * - * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-11 - * @reference + * @version 0.0.1 + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-11 + * @reference SAE J2735 [1] Clause 10 */ testcase TC_MAP_SPAT_MSD_BV_11 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -849,9 +849,9 @@ module ItsMapSpat_TestCases { * } * * - * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-12 - * @reference + * @version 0.0.1 + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-12 + * @reference SAE J2735 [1] Clause 10 */ testcase TC_MAP_SPAT_MSD_BV_12 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -912,9 +912,9 @@ module ItsMapSpat_TestCases { * } * * - * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-13 - * @reference + * @version 0.0.1 + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-13 + * @reference SAE J2735 [1] Clause 12 */ testcase TC_MAP_SPAT_MSD_BV_13 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -978,9 +978,9 @@ module ItsMapSpat_TestCases { * } * * - * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-14 - * @reference + * @version 0.0.1 + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-14 + * @reference SAE J2735 [1] Clause 12 */ testcase TC_MAP_SPAT_MSD_BV_14 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -1047,9 +1047,9 @@ module ItsMapSpat_TestCases { * } * * - * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-15 - * @reference + * @version 0.0.1 + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-15 + * @reference No clause – Implicit to use in ITS */ testcase TC_MAP_SPAT_MSD_BV_15 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -1113,9 +1113,9 @@ module ItsMapSpat_TestCases { * } * * - * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-16 - * @reference + * @version 0.0.1 + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSD//BV-16 + * @reference No clause – Implicit to use in ITS */ testcase TC_MAP_SPAT_MSD_BV_16 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -1187,8 +1187,8 @@ module ItsMapSpat_TestCases { * * * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSP//BV-01 - * @reference + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSP//BV-01 + * @reference No clause – Implicit to use in ITS */ testcase TC_MAP_SPAT_MSP_BV_01 () runs on ItsMapSpat system ItsMapSpatSystem { @@ -1247,8 +1247,8 @@ module ItsMapSpat_TestCases { * * * @version 0.0.1 - * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSP//BV-02 - * @reference + * @see ETSI TS 103 191-2 V0.0.1 TP/MAP-SPAT/MSP//BV-02 + * @reference No clause – Implicit to use in ITS */ testcase TC_MAP_SPAT_MSP_BV_02 () runs on ItsMapSpat system ItsMapSpatSystem {