diff --git a/etc/AtsAutoInterop/AtsAutoInterop.cfg b/etc/AtsAutoInterop/AtsAutoInterop.cfg index f80fea5f132dab11dc09fc2342844545ce5d2dad..43cfd0f1fb05d7041909f5d8b4de213dc2ee71de 100644 --- a/etc/AtsAutoInterop/AtsAutoInterop.cfg +++ b/etc/AtsAutoInterop/AtsAutoInterop.cfg @@ -3,22 +3,25 @@ # This section shall contain the values of all parameters that are defined in your TTCN-3 modules. LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := { typeOfAddress := e_initial, - stationType := e_passengerCar, + stationType := e_unknown, stationCountryCode := 0, - mid := '92569202017a'O + mid := '4C5E0C14D2EA'O } +LibItsCommon_Pixits.PX_IUT_STATION_ID := 10143; -LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_any +LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB + +ItsAutoInterop_Pixits.PX_CAPTURE_MODE := "off-link" [LOGGING] # In this section you can specify the name of the log file and the classes of events # you want to log into the file or display on console (standard error). LogFile := "../logs/%e.%h-%r.%s" -FileMask := LOG_ALL | USER | DEBUG | MATCHING -ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING -#FileMask := ERROR | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP -#ConsoleMask := ERROR | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP +#FileMask := LOG_ALL | USER | DEBUG | MATCHING +#ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING +FileMask := ERROR | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP +ConsoleMask := ERROR | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP LogSourceInfo := Stack LogEntityName:= Yes LogEventTypes:= Yes @@ -26,150 +29,66 @@ LogEventTypes:= Yes [TESTPORT_PARAMETERS] # In this section you can specify parameters that are passed to Test Ports. +# CAM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc +# header_sub_type : sh (single hop) +# DENM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc # BTP Layer # type : btpA|btpB # destination port: dst_port # source port : src_port +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # GN Layer -# ll_address : GeoNetworking address of the TestSystem -# latitude : latitude of the TestSystem -# longitude : longitude of the TestSystem +# ll_address : GeoNetworking address of the Test System +# latitude : latitude of the Test System +# longitude : longitude of the Test System # beaconing : Set to 1 if GnLayer shall start beaconing # Beaconning timer expiry: expiry (ms) +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # Ethernet layer -# Source MAC address: mac_src -# Broadcast address : mac_bc -# Ethernet type : eth_type +# mac_src :Source MAC address +# mac_bc :Broadcast address +# eth_type : Ethernet type +# Commsignia layer +# mac_src : Device MAC address, used to discard packets +# To indicate no filering, use the value 000000000000 +# mac_bc : Broadcast address +# eth_type : Ethernet type, used to discard packets +# target_host : Device address +# target_port : Device port +# source_port : Test System port +# interface_id: Interface id, used to discard packets +# tx_power : TX power (dB) # UDP layer (IP/UDP based on Pcap) # dst_ip : destination IPv4 address (aa.bb.cc.dd) # dst_port: destination port # src_ip : source IPv4 address (aa.bb.cc.dd) # src_port: source port # Pcap layer -# Pcap filter: filter +# mac_src : Source MAC address, used to exclude from capture the acket sent by the Test System +# filter : Pcap filter (compliant with tcpdump syntax) # Online mode: -# Local NIC: nic -# If set, online mode is used +# nic: Local NIC +# If set, online mode is used # Offline mode (nic is present but not set): -# File to read : file -# Frame offset : frame_offset -# Time offset : time_offset -# Save sent packet: save_mode=[0|1] +# file : File to read +# frame_offset: Frame offset, used to skip packets with frame number < frame_offset +# time_offset : Time offset, used to skip packets with time offset < time_offset +# save_mode : 1 to save sent packet, 0 otherwise # Single GeoNetworking component port -system.geoNetworkingPort.params := "GN(ll_address=F8CAB8083918,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/ETH(mac_src=F8CAB8083918,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=BABEBABE0002,nic=,file=../../../testdata/test_1_beacon.pcap,filter=and ether proto 0x8947,frame_offset=0,save_mode=1)" -# Multiple GeoNetworking component port -Comp1.geoNetworkingPort.params := "GN(ll_address=F8CAB8083919,latitude=43551050,longitude=10298730,beaconing=1,expiry=1000,its_aid=141)/ETH(mac_src=F8CAB8083918,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=F8CAB8083919,nic=,file=../../../testdata/test_1_cam.pcap,filter=and ether proto 0x8947,frame_offset=0,save_mode=0)" -Comp2.geoNetworkingPort.params := "GN(ll_address=F8CAB808391A,latitude=43551050,longitude=10298730,beaconing=1,expiry=1000,its_aid=141)/ETH(mac_src=F8CAB8083918,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=F8CAB808391A,nic=,file=/home/ubuntu/tmp/test_1_cam.pcap,filter=and ether proto 0x8947,frame_offset=0,save_mode=0)" - -# BTP port -system.btpPort.params := "BTP(type=btpB,dst_port=2000,src_port=0)/GN(ll_address=F8CAB8083918,latitude=43551050,longitude=10298730,expiry=1000,its_aid=141)/ETH(mac_src=F8CAB8083918,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=F8CAB8083918,nic=,file=../../../testdata/test_1_cam.pcap,filter=and ether proto 0x8947,frame_offset=0)" - -# CAM port -system.camPort.params := "CAM/BTP(type=btpA,dst_port=2001,src_port=0)/GN(ll_address=F8CAB8083918,latitude=43551050,longitude=10298730,expiry=1000,its_aid=141)/ETH(mac_src=F8CAB8083918,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=F8CAB8083918,nic=,file=../../../testdata/test_1_cam.pcap,save_mode=1,filter=and ether proto 0x8947,frame_offset=0)" - -# DENM port -system.denmPort.params := "DENM/BTP(type=btpA,dst_port=2002,src_port=0)/GN(ll_address=F8CAB8083918,latitude=43551050,longitude=10298730,expiry=1000,its_aid=141)/ETH(mac_src=F8CAB8083918,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=F8CAB8083918,nic=,file=../../../testdata/test_1_denm.pcap,save_mode=1,filter=and ether proto 0x8947,frame_offset=0)" +NodeB.geoNetworkingPort.params := "GN(ll_address=04e548000001,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/COMMSIGNIA(mac_src=04e548000001,mac_bc=FFFFFFFFFFFF,eth_type=8947,target_host=10.200.1.101,target_port=7942,source_port=7943,its_aid=141,interface_id=2,tx_power=-32)/UDP(dst_ip=192.168.56.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=026f8338c1e5,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=04e548000001,file=/home/ubuntu/TriesAndDelete/etsi_its/testdata/TC_AUTO_IOT_DENM_RWW_BV_01.pcap,filter=and (udp port 30000 or udp port 7943))" +NodeC.geoNetworkingPort.params := "GN(ll_address=70b3d5791b48,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/COMMSIGNIA(mac_src=70b3d5791b48,mac_bc=FFFFFFFFFFFF,eth_type=8947,target_host=10.200.1.101,target_port=7942,source_port=7943,its_aid=141,interface_id=2,tx_power=-32)/UDP(dst_ip=192.168.56.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=026f8338c1e5,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=70b3d5791b48,file=/home/ubuntu/TriesAndDelete/etsi_its/testdata/TC_AUTO_IOT_DENM_RWW_BV_01.pcap,filter=and (udp port 30000 or udp port 7943))" -# GeoNetworking UpperTester port based on UDP -system.utPort.params := "UT_GN/UDP(dst_ip=192.168.56.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=026f8338c1e5,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=0800275c4959,nic=enp0s8,filter=and udp port 12346)" +# UpperTester port based on UDP +system.utPort.params := "UT_GN/UDP(dst_ip=192.168.1.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=026f8338c1e5,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=0800275c4959,nic=enp0s8,filter=and udp port 12346)" [EXECUTE] -# GeoNetworking Req -#TestCodec_GeoNetworking.tc_GeoNetReq_AnycastPacket -#TestCodec_GeoNetworking.tc_GeoNetReq_BroadcastPacket -#TestCodec_GeoNetworking.tc_GeoNetReq_UnicastPacket -#TestCodec_GeoNetworking.tc_GeoNetReq_BeaconPacket -#TestCodec_GeoNetworking.tc_GeoNetReq_LsRequestPacket -#TestCodec_GeoNetworking.tc_GeoNetReq_LsReplyPacket -# GeoNetworking Ind -#TestCodec_GeoNetworking.tc_GeoNetInd_AnycastPacket -#TestCodec_GeoNetworking.tc_GeoNetInd_BroadcastPacket -#TestCodec_GeoNetworking.tc_GeoNetInd_ShbPacket -#TestCodec_GeoNetworking.tc_GeoNetInd_UnicastPacket -#TestCodec_GeoNetworking.tc_GeoNetInd_BeaconPacket -# GeoNetworking port tests -# To run the GeoNetworking port tests, use the offline mode and the test data provided. Use PcapLayer.save_mode to save sent packet into a file -#TestCodec_GeoNetworking.tc_GeoNet_Port -TestCodec_GeoNetworking.tc_GeoNet_Port_utPort -# GeoNetworking AC port -#TestCodec_GeoNetworking.tc_GeoNet_Port_acPort_lpv -#TestCodec_GeoNetworking.tc_GeoNet_acPort_getLongPositionVector_1 -#TestCodec_GeoNetworking.tc_GeoNet_acPort_getLongPositionVector_2 -#TestCodec_GeoNetworking.tc_GeoNet_Port_acPort_beaconing_1 -#TestCodec_GeoNetworking.tc_GeoNet_Port_acPort_beaconing_2 -#TestCodec_GeoNetworking.tc_GeoNet_Port_acPort_pass_beaconing_1 -#TestCodec_GeoNetworking.tc_GeoNet_Port_acPort_pass_beaconing_2 -#TestCodec_GeoNetworking.tc_GeoNet_MultiPort -# GeoNetworking UpperTester -#TestCodec_GeoNetworking.tc_GeoNet_UtGnInitialize -#TestCodec_GeoNetworking.tc_GeoNet_UtGnChangePosition -#TestCodec_GeoNetworking.tc_GeoNet_UtGnTrigger_GeoUnicast_1 -#TestCodec_GeoNetworking.tc_GeoNet_UtGnTrigger_GeoUnicast_2 -#TestCodec_GeoNetworking.tc_GeoNet_UtGnTrigger_GeoBroadcast_1 -#TestCodec_GeoNetworking.tc_GeoNet_UtGnTrigger_GeoBroadcast_2 -#TestCodec_GeoNetworking.tc_GeoNet_UtGnTrigger_GeoAnycast_1 -#TestCodec_GeoNetworking.tc_GeoNet_UtGnTrigger_GeoAnycast_2 -#TestCodec_GeoNetworking.tc_GeoNet_UtGnTrigger_Shb_1 -#TestCodec_GeoNetworking.tc_GeoNet_UtGnTrigger_Shb_2 -#TestCodec_GeoNetworking.tc_GeoNet_UtGnTrigger_Tsb_1 -#TestCodec_GeoNetworking.tc_GeoNet_UtGnTrigger_Tsb_2 - -# Btp PDU -#TestCodec_Btp.tc_Btp_A_Without_Payload -#TestCodec_Btp.tc_Btp_A -#TestCodec_Btp.tc_Btp_B -#TestCodec_Btp.tc_BtpReq_A -# Btp Port -#TestCodec_Btp.tc_Btp_Port - -# CAM PDU tests -#TestCodec_CAM.tc_CamReq -#TestCodec_CAM.tc_CamInd -# CAM port tests -# To run the CAM port tests, use the offline mode and the test data provided. Use PcapLayer.save_mode to save sent packet into a file -#TestCodec_CAM.tc_Cam_Port -# CAM UpperTester -#TestCodec_CAM.tc_Cam_UtCamInitialize -#TestCodec_CAM.tc_Cam_UtCamChangePosition -#TestCodec_CAM.tc_Cam_UtCamChangeCurvature -#TestCodec_CAM.tc_Cam_UtCamChangeSpeed -#TestCodec_CAM.tc_Cam_UtCamSetAccelerationControlStatus -#TestCodec_CAM.tc_Cam_UtCamSetExteriorLightsStatus_lowBeamHeadlightsOn -#TestCodec_CAM.tc_Cam_UtCamSetExteriorLightsStatus_leftTurnSignalOn -#TestCodec_CAM.tc_Cam_UtCamSetExteriorLightsStatus_daytimeRunningLightsOn -#TestCodec_CAM.tc_Cam_UtCamSetExteriorLightsStatus_parkingLightsOn -#TestCodec_CAM.tc_Cam_UtCamChangeHeading -#TestCodec_CAM.tc_Cam_UtCamSetDriveDirection -#TestCodec_CAM.tc_Cam_UtCamChangeYawRate -#TestCodec_CAM.tc_Cam_UtCamChangeYawRate_negative -#TestCodec_CAM.tc_Cam_UtCamSetStationType -#TestCodec_CAM.tc_Cam_UtCamSetVehicleRole -#TestCodec_CAM.tc_Cam_UtCamSetDangerousGoods -#TestCodec_CAM.tc_Cam_UtCamSetLightBarSirene -#TestCodec_CAM.tc_Cam_UtCamTriggerResult -#TestCodec_CAM.tc_Cam_UtCamEventInd_1 -#TestCodec_CAM.tc_Cam_UtCamEventInd_2 - -# DENM PDU -#TestCodec_DENM.tc_DenmReq -#TestCodec_DENM.tc_DenmInd -# CAM port tests -# To run the DENM port tests, use the offline mode and the test data provided. Use PcapLayer.save_mode to save sent packet into a file -#TestCodec_DENM.tc_Denm_Port -#TestCodec_DENM.tc_Denm_Port_utPort -# DENM UpperTester -#TestCodec_DENM.tc_Denm_UtDenmInitialize -#TestCodec_DENM.tc_Denm_UtDenmChangePosition -#TestCodec_DENM.tc_Denm_UtDenmChangePseudonym -#TestCodec_DENM.tc_Denm_UtDenmTrigger_1 -#TestCodec_DENM.tc_Denm_UtDenmTrigger_2 -#TestCodec_DENM.tc_Denm_UtDenmUpdate_1 -#TestCodec_DENM.tc_Denm_UtDenmUpdate_2 -#TestCodec_DENM.tc_Denm_UtDenmTriggerResult -#TestCodec_DENM.tc_Denm_UtDenmUpdateResult -#TestCodec_DENM.tc_Denm_UtDenmEventInd_1 -#TestCodec_DENM.tc_Denm_UtDenmEventInd_2 +ItsAutoInterop_TestCases.TC_AUTO_IOT_DENM_RWW_BV_01 [MAIN_CONTROLLER] # The options herein control the behavior of MC. diff --git a/etc/AtsAutoInterop/ItsAutoInterop_Pixits.ttcn b/etc/AtsAutoInterop/ItsAutoInterop_Pixits.ttcn deleted file mode 100644 index efafa1118317a5a6a8d272b07a805ec887c4615f..0000000000000000000000000000000000000000 --- a/etc/AtsAutoInterop/ItsAutoInterop_Pixits.ttcn +++ /dev/null @@ -1,103 +0,0 @@ -module ItsAutoInterop_Pixits { - - // Libcommon - import from LibCommon_BasicTypesAndValues all; - - // ItsInterop - import from ItsAutoInterop_TypesAndValues all; - - /** - * @desc - * Possible values: on-link or off-link - */ - modulepar charstring PX_CAPTURE_MODE := "on-link"; - - /** - * @desc The PCAP file name containing the ITS G5 captures - */ - modulepar charstring PX_PCAP_FILE_NAME := "g5capture.pcap"; - - /** - * @desc The PCAP filtering to apply - */ - modulepar charstring PX_PCAP_MIDs_FILTER := "00:00:00:00:00:01;00:00:00:00:00:02"; - - /** - * @desc The PCAP frame offsets to skip when starting to play the PCAP file - */ - modulepar UInt32 PX_PCAP_START_OFFSET := 0; - - /** - * EUTs descriptions - */ - modulepar EutDescriptions PX_EUT_DESC := { - { - '04e548000001'O, - 10171, - '04e548000001'O - }, // EUT_1 - { - '70b3d5791b48'O, - 10031, - '70b3d5791b48'O - }, // EUT_2 - { - '000000000003'O, - 333, - '000000000003'O - }, // EUT_3 - { - '000000000004'O, - 444, - '000000000004'O - } // EUT_4 - } - - /** - * @desc EUT1 identifier to refer to its @see EutDescriptions - */ - modulepar integer PX_EUT1_ID := 0; - - /** - * @desc EUT2 identifier to refer to its @see EutDescriptions - */ - modulepar integer PX_EUT2_ID := 1; - - /** - * @desc EUT3 identifier to refer to its @see EutDescriptions - */ - modulepar integer PX_EUT3_ID := 2; - - /** - * @desc EUT4 identifier to refer to its @see EutDescriptions - */ - modulepar integer PX_EUT4_ID := 3; - - /** - * @desc Pre-defined security distance - */ - modulepar float PX_PRE_DEFINED_SECURITY_DISTANCE := 0.0; - - /** - * @desc Pre-defined security distance for forward collision risk condition - */ - modulepar float PX_FORWARD_COLLISION_SECURITY_DISTANCE := 0.0; - - /** - * @desc Pre-defined security distance for forward collision risk condition - */ - modulepar float PX_LATERAL_COLLISION_SECURITY_DISTANCE := 0.0; - - /** - * @desc DENM cause variant - * @see Draft ETSI TS yyy xxx-2 V0.0.87 (2017-03) Table 4: Possible DENM cause values (ETSI EN 302 637-3 [5] Table 10: Cause description and cause code assignment for ETSI use case) - */ - modulepar integer PX_DENM_CAUSE_VA := 1; - - /** - * @desc DENM subcause variant - * @see Draft ETSI TS yyy xxx-2 V0.0.87 (2017-03) Table 5: Possible DENM sub-cause values (ETSI EN 302 637-3 [5] Table 10: Cause description and cause code assignment for ETSI use case) - */ - modulepar integer PX_DENM_SUBCAUSE_VA := 1; - -} // End of module ItsAutoInterop_Pixits diff --git a/etc/AtsAutoInterop/ItsAutoInterop_TestCases.ttcn b/etc/AtsAutoInterop/ItsAutoInterop_TestCases.ttcn deleted file mode 100644 index 7ca3ea8fcf0a275fe3f3e5c5957107d688792068..0000000000000000000000000000000000000000 --- a/etc/AtsAutoInterop/ItsAutoInterop_TestCases.ttcn +++ /dev/null @@ -1,3195 +0,0 @@ -module ItsAutoInterop_TestCases { - - // LibCommon - import from LibCommon_VerdictControl all; - import from LibCommon_Sync all; - import from LibCommon_BasicTypesAndValues all; - import from LibCommon_DataStrings all; - import from LibCommon_Time all; - - // LibIts - import from ITS_Container language "ASN.1:1997" all; - import from IEEE1609dot2BaseTypes language "ASN.1:1997" all; - import from IEEE1609dot2 language "ASN.1:1997" all; - import from EtsiTs103097Module language "ASN.1:1997" all; - - - // LibItsCommon - import from LibItsCommon_TestSystem all; - import from LibItsCommon_Functions all; - import from LibItsExternal_TypesAndValues all; - import from LibItsCommon_ASN1_NamedNumbers all; - - // LibItsGeoNetworking - import from LibItsGeoNetworking_TypesAndValues all; - import from LibItsGeoNetworking_Templates all; - import from LibItsGeoNetworking_Pixits all; - import from LibItsGeoNetworking_TestSystem all; - - // LibItsGeoNetworking - import from LibItsDenm_Templates all; - - // LibItsSecurity - import from LibItsSecurity_TypesAndValues all; - - // AtsInterop - import from ItsAutoInterop_TypesAndValues all; - import from ItsAutoInterop_Templates all; - import from ItsAutoInterop_Functions all; - import from ItsAutoInterop_Pics all; - import from ItsAutoInterop_Pixits all; - import from ItsAutoInterop_TestSystem all; - - /** - * @desc Verify complete forwarding message scenario (GREEDY, GREEDY, GREEDY) - *
-     * Pics Selection: 
-     * Config Id: CF-01
-     * Initial conditions:
-     *  with {
-     *      itsGnNonAreaForwardingAlgorithm of EUT1 set to GREEDY
-     *      itsGnNonAreaForwardingAlgorithm of EUT2 set to GREEDY
-     *      itsGnNonAreaForwardingAlgorithm of EUT3 set to GREEDY
-     *      itsGnNonAreaForwardingAlgorithm of EUT4 is SIMPLE
-     *  }
-     * Expected behaviour:
-     *  ensure that {
-     *      when {
-     *          EUT1 is requested to send DEN message
-     *              encapsulated in a GBC packet
-     *          containing Basic Header
-     *              containing RHL field
-     *                  indicating a value > 1
-     *          containing DestinationArea
-     *              indicating the TARGET_GEOAREA
-     *      }
-     *      then {
-     *          EUT1 sends a GBC packet
-     *              containing Basic Header
-     *                  containing RHL field
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *                  containing the DEN message
-     *              encapsulated in a LL packet
-     *                  containing a destination MAC address
-     *                      indicating the EUT2 address
-     *      }
-     *      when {
-     *          EUT2 receives the GBC packet from EUT1
-     *      }
-     *      then {
-     *          EUT2 sends a GBC packet
-     *              containing Basic Header
-     *                  containing RHL field
-     *                      indicating value decreased by 1
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *                  containing the DEN message
-     *              encapsulated in a LL packet
-     *                  containing a destination MAC address
-     *                      indicating the EUT4 address
-     *              and EUT3 does not receive the GBC packet from EUT1
-     *      }
-     *      when {
-     *          EUT4 receives the GBC packet from EUT2
-     *              containing Basic Header
-     *              containing RHL field
-     *                  indicating value decreased by 1
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *                  containing the DEN message
-     *      }
-     *      then {
-     *          EUT4 provides the DEN message to upper layers 
-     *          and EUT4 sends a GBC packet
-     *              containing Basic Header
-     *                  containing RHL field
-     *                      indicating value decreased by 1
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *              containing the DEN message
-     *              encapsulated in a LL packet 
-     *                  containing a destination MAC address
-     *                      indicating broadcast address
-     *      }
-     *      when {
-     *      EUT2 receives the GBC packet from EUT4
-     *      }
-     *      then {
-     *          EUT2 discards the GBC packet
-     *      }
-     *      when {
-     *          EUT3 receives the GBC packet from EUT4
-     *      }
-     *      then {
-     *          EUT3 discards the GBC packet
-     *      }
-     *  }
-     * 
- * - * @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-03) TD_AUTO_IOT_DENM_MFW_BV_01 - * @reference ETSI EN 302 636-4-1 Clauses D & E2 - */ - testcase TC_AUTO_IOT_DENM_MFW_BV_01() runs on ItsMtc system ItsAutoInteropGeoNetworkingSystem { - - // Local variables - var ItsAutoInteropGeonetworking v_eut1 := null; - var ItsAutoInteropGeonetworking v_eut2 := null; - var ItsAutoInteropGeonetworking v_eut3 := null; - var ItsAutoInteropGeonetworking v_eut4 := null; - - // 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_mtcCf01Up(v_eut1, v_eut2, v_eut3, v_eut4); - - // Preamble - - // Start components - v_eut1.start(f_TC_AUTO_IOT_DENM_MFW_BV_01_eut1(v_eut1, PX_EUT1_ID)); - v_eut2.start(f_TC_AUTO_IOT_DENM_MFW_BV_01_eut2(v_eut2, PX_EUT2_ID)); - v_eut3.start(f_TC_AUTO_IOT_DENM_MFW_BV_01_eut3(v_eut3, PX_EUT3_ID)); - v_eut4.start(f_TC_AUTO_IOT_DENM_MFW_BV_01_eut4(v_eut4, PX_EUT4_ID)); - - // Synchronization - f_serverSyncNClientsAndStop(4, {c_prDone, c_tbDone}); - - // Cleanup - f_mtcCf01Down(v_eut1, v_eut2, v_eut3, v_eut4); - - } // End of TC_AUTO_IOT_DENM_MFW_BV_01 - - group g_TC_AUTO_IOT_DENM_MFW_BV_01 { - - /** - * @desc Behavior function for EUT1 (TC_AUTO_IOT_DENM_MFW_BV_01) - */ - function f_TC_AUTO_IOT_DENM_MFW_BV_01_eut1( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - tc_ac.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT1 is requested to send DEN message - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - mw_longPosVector_targetArea( - PICS_TARGET_GEOAREA.latitude, - PICS_TARGET_GEOAREA.longitude - ), - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[p_eut_id].stationId - ))), - PX_EUT_DESC[PX_EUT2_ID].ll_mac_address - )) { // Receives the triggered DENM message - tc_ac.stop; - log("*** " & testcasename() & ": INFO: EUT1 sends a GBC packet ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: EUT1 does not send the requested DEN message ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } // End of 'alt' statement - - // Test Body - tc_wait.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT1 shall not receive any more DEN messages - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - ? // FIXME complement(PX_EUT_DESC[p_eut_id].stationId) - ))), - ? - )) { - tc_wait.stop; - log("*** " & testcasename() & ": FAIL: Unexpected DEN message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": PASS: Forwarding message scenario (GREEDY, GREEDY, GREEDY) succeed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } // End of 'alt' statement - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_MFW_BV_01_eut1 - - /** - * @desc Behavior function for EUT2 (TC_AUTO_IOT_DENM_MFW_BV_01) - */ - function f_TC_AUTO_IOT_DENM_MFW_BV_01_eut2( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var EutGeoNetworking v_eutGeoNw; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT2 receives the GBC packet from EUT1 - mw_eutGeoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - mw_longPosVector_targetArea( - PICS_TARGET_GEOAREA.latitude, - PICS_TARGET_GEOAREA.longitude - ), - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[PX_EUT1_ID].stationId - ))))) -> value v_eutGeoNw { - // Now, we have to check for EUT4 to broadcast the DENM message - repeat; - } - [] eutGeoNetworkingPort.receive( // EUT2 receives the GBC packet from EUT4 - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[PX_EUT4_ID].stationId - ))), - c_llBroadcast - )) -> value v_eutGeoNw { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: EUT2 receives the GBC packet from EUT4 ***"); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": FAIL: Forwarding message scenario (GREEDY, GREEDY, GREEDY) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } // End of 'alt' statement - // EUT2 discards the GBC packet - f_sleep(PX_TNOAC); - if(0 < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": INCONC: Forwarding message scenario (GREEDY, GREEDY, GREEDY) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: Forwarding message scenario (GREEDY, GREEDY, GREEDY) is succeed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_MFW_BV_01_eut2 - - /** - * @desc Behavior function for EUT3 (TC_AUTO_IOT_DENM_MFW_BV_01) - */ - function f_TC_AUTO_IOT_DENM_MFW_BV_01_eut3( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var EutGeoNetworking v_eutGeoNw; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT3 receives the GBC packet from EUT4 - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId - )), - ? - )) -> value v_eutGeoNw { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: EUT3 received DEN message from EUT ", v_eutGeoNw.msg.gnPacket.packet.extendedHeader.tsbHeader.srcPosVector.gnAddr.mid, " ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": FAIL: Forwarding message scenario (GREEDY, GREEDY, GREEDY) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } // End of 'alt' statement - // EUT3 discards the GBC packet - f_sleep(PX_TNOAC); - if(0 < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": INCONC: Forwarding message scenario (GREEDY, GREEDY, GREEDY) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: Forwarding message scenario (GREEDY, GREEDY, GREEDY) is succeed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_MFW_BV_01_eut3 - - /** - * @desc Behavior function for EUT4 (TC_AUTO_IOT_DENM_MFW_BV_01) - */ - function f_TC_AUTO_IOT_DENM_MFW_BV_01_eut4( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var EutGeoNetworking v_eutGeoNw; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT4 receives the GBC packet from EUT2 - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - mw_longPosVector_targetArea( - PICS_TARGET_GEOAREA.latitude, - PICS_TARGET_GEOAREA.longitude - ), - e_btpB, - mw_denm_stationId - )), - PX_EUT_DESC[p_eut_id].ll_mac_address - )) -> value v_eutGeoNw { // Receive a DEN message from EUT2 - tc_wait.stop; - // Now check that EUT4 brodcasts the DENM message - log("*** " & testcasename() & ": INFO: EUT4 receives the GBC packet from EUT2 ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": FAIL: Forwarding message scenario (GREEDY, GREEDY, GREEDY) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } // End of 'alt' statement - // EUT4 provides the DEN message to upper layers - f_sleep(PX_TNOAC); - if(0 < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": PASS: Forwarding message scenario (GREEDY, GREEDY, GREEDY) is succeed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": INCONC: EUT4 does not provide the DEN message to upper layers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_MFW_BV_01_eut4 - - } // End of group g_TC_AUTO_IOT_DENM_MFW_BV_01 - - /** - * @desc Verify complete forwarding message scenario (GREEDY, GREEDY, CBF) - *
-     * Pics Selection: 
-     * Config Id: CF-01
-     * Initial conditions:
-     *  with {
-     *      itsGnNonAreaForwardingAlgorithm of EUT1 set to GREEDY
-     *      itsGnNonAreaForwardingAlgorithm of EUT2 set to GREEDY
-     *      itsGnNonAreaForwardingAlgorithm of EUT3 set to CBF
-     *      itsGnNonAreaForwardingAlgorithm of EUT4 is SIMPLE
-     *  }
-     * Expected behaviour:
-     *  ensure that {
-     *      when {
-     *          EUT1 is requested to send DEN message
-     *              encapsulated in a GBC packet
-     *          containing Basic Header
-     *              containing RHL field
-     *                  indicating a value > 1
-     *          containing DestinationArea
-     *              indicating the TARGET_GEOAREA
-     *      }
-     *      then {
-     *          EUT1 sends a GBC packet
-     *              containing Basic Header
-     *                  containing RHL field
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *                  containing the DEN message
-     *              encapsulated in a LL packet
-     *                  containing a destination MAC address
-     *                      indicating the EUT2 address
-     *      }
-     *      when {
-     *          EUT2 receives the GBC packet from EUT1
-     *      }
-     *      then {
-     *          EUT2 sends a GBC packet
-     *              containing Basic Header
-     *                  containing RHL field
-     *                      indicating value decreased by 1
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *                  containing the DEN message
-     *              encapsulated in a LL packet
-     *                  containing a destination MAC address
-     *                      indicating the EUT4 address
-     *              and EUT3 does not receive the GBC packet from EUT1
-     *      }
-     *      when {
-     *          EUT4 receives the GBC packet from EUT2
-     *              containing Basic Header
-     *              containing RHL field
-     *                  indicating value decreased by 1
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *                  containing the DEN message
-     *      }
-     *      then {
-     *          EUT4 provides the DEN message to upper layers 
-     *          and EUT4 sends a GBC packet
-     *              containing Basic Header
-     *                  containing RHL field
-     *                      indicating value decreased by 1
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *              containing the DEN message
-     *              encapsulated in a LL packet 
-     *                  containing a destination MAC address
-     *                      indicating broadcast address
-     *      }
-     *      when {
-     *      EUT2 receives the GBC packet from EUT4
-     *      }
-     *      then {
-     *          EUT2 discards the GBC packet
-     *      }
-     *      when {
-     *          EUT3 receives the GBC packet from EUT4
-     *      }
-     *      then {
-     *          EUT3 discards the GBC packet
-     *      }
-     *  }
-     * 
- * - * @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-03) TD_AUTO_IOT_DENM_MFW_BV_02 - * @reference ETSI EN 302 636-4-1 Clauses D & E2 - */ - testcase TC_AUTO_IOT_DENM_MFW_BV_02() runs on ItsMtc system ItsAutoInteropGeoNetworkingSystem { - - // Local variables - var ItsAutoInteropGeonetworking v_eut1 := null; - var ItsAutoInteropGeonetworking v_eut2 := null; - var ItsAutoInteropGeonetworking v_eut3 := null; - var ItsAutoInteropGeonetworking v_eut4 := null; - - // 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_mtcCf01Up(v_eut1, v_eut2, v_eut3, v_eut4); - - // Preamble - - // Start components - v_eut1.start(f_TC_AUTO_IOT_DENM_MFW_BV_02_eut1(v_eut1, PX_EUT1_ID)); - v_eut2.start(f_TC_AUTO_IOT_DENM_MFW_BV_02_eut2(v_eut2, PX_EUT2_ID)); - v_eut3.start(f_TC_AUTO_IOT_DENM_MFW_BV_02_eut3(v_eut3, PX_EUT3_ID)); - v_eut4.start(f_TC_AUTO_IOT_DENM_MFW_BV_02_eut4(v_eut4, PX_EUT4_ID)); - - // Synchronization - f_serverSyncNClientsAndStop(4, {c_prDone, c_tbDone}); - - // Cleanup - f_mtcCf01Down(v_eut1, v_eut2, v_eut3, v_eut4); - - } // End of TC_AUTO_IOT_DENM_MFW_BV_02 - - group g_TC_AUTO_IOT_DENM_MFW_BV_02 { - - - - /** - * @desc Behavior function for EUT1 (TC_AUTO_IOT_DENM_MFW_BV_02) - */ - function f_TC_AUTO_IOT_DENM_MFW_BV_02_eut1( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - tc_ac.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT1 is requested to send DEN message - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - mw_longPosVector_targetArea( - PICS_TARGET_GEOAREA.latitude, - PICS_TARGET_GEOAREA.longitude - ), - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[p_eut_id].stationId - ))), - PX_EUT_DESC[PX_EUT2_ID].ll_mac_address - )) { // Receives the triggered DENM message - tc_ac.stop; - log("*** " & testcasename() & ": INFO: EUT1 sends a GBC packet ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: EUT1 does not send the requested DEN message ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } // End of 'alt' statement - - // Test Body - tc_wait.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT1 shall not receive any more DEN messages - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - ? // FIXME complement(PX_EUT_DESC[p_eut_id].stationId) - ))), - ? - )) { - tc_wait.stop; - log("*** " & testcasename() & ": FAIL: Unexpected DEN message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": PASS: Forwarding message scenario (GREEDY, GREEDY, CBF) succeed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } // End of 'alt' statement - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_MFW_BV_02_eut1 - - /** - * @desc Behavior function for EUT2 (TC_AUTO_IOT_DENM_MFW_BV_02) - */ - function f_TC_AUTO_IOT_DENM_MFW_BV_02_eut2( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var EutGeoNetworking v_eutGeoNw; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT2 receives the GBC packet from EUT1 - mw_eutGeoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - mw_longPosVector_targetArea( - PICS_TARGET_GEOAREA.latitude, - PICS_TARGET_GEOAREA.longitude - ), - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[PX_EUT1_ID].stationId - ))))) -> value v_eutGeoNw { - // Now, we have to check for EUT4 to broadcast the DENM message - repeat; - } - [] eutGeoNetworkingPort.receive( // EUT2 receives the GBC packet from EUT4 - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[PX_EUT4_ID].stationId - ))), - c_llBroadcast - )) -> value v_eutGeoNw { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: EUT2 receives the GBC packet from EUT4 ***"); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": FAIL: Forwarding message scenario (GREEDY, GREEDY, CBF) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } // End of 'alt' statement - // EUT2 discards the GBC packet - f_sleep(PX_TNOAC); - if(0 < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": INCONC: Forwarding message scenario (GREEDY, GREEDY, CBF) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: Forwarding message scenario (GREEDY, GREEDY, CBF) is succeed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_MFW_BV_02_eut2 - - /** - * @desc Behavior function for EUT3 (TC_AUTO_IOT_DENM_MFW_BV_02) - */ - function f_TC_AUTO_IOT_DENM_MFW_BV_02_eut3( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var EutGeoNetworking v_eutGeoNw; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT3 receives the GBC packet from EUT4 - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId - )), - ? - )) -> value v_eutGeoNw { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: EUT3 received DEN message from EUT ", v_eutGeoNw.msg.gnPacket.packet.extendedHeader.tsbHeader.srcPosVector.gnAddr.mid, " ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": FAIL: Forwarding message scenario (GREEDY, GREEDY, CBF) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } // End of 'alt' statement - // EUT3 discards the GBC packet - f_sleep(PX_TNOAC); - if(0 < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": INCONC: Forwarding message scenario (GREEDY, GREEDY, CBF) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: Forwarding message scenario (GREEDY, GREEDY, CBF) is succeed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_MFW_BV_02_eut3 - - /** - * @desc Behavior function for EUT4 (TC_AUTO_IOT_DENM_MFW_BV_02) - */ - function f_TC_AUTO_IOT_DENM_MFW_BV_02_eut4( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var EutGeoNetworking v_eutGeoNw; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT4 receives the GBC packet from EUT2 - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - mw_longPosVector_targetArea( - PICS_TARGET_GEOAREA.latitude, - PICS_TARGET_GEOAREA.longitude - ), - e_btpB, - mw_denm_stationId - )), - PX_EUT_DESC[p_eut_id].ll_mac_address - )) -> value v_eutGeoNw { // Receive a DEN message from EUT2 - tc_wait.stop; - // Now check that EUT4 brodcasts the DENM message - log("*** " & testcasename() & ": INFO: EUT4 receives the GBC packet from EUT2 ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": FAIL: Forwarding message scenario (GREEDY, GREEDY, GREEDY) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } // End of 'alt' statement - // EUT4 provides the DEN message to upper layers - f_sleep(PX_TNOAC); - if(0 < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": PASS: Forwarding message scenario (GREEDY, GREEDY, CBF) is succeed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": INCONC: EUT4 does not provide the DEN message to upper layers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_MFW_BV_02_eut4 - - } // End of group g_TC_AUTO_IOT_DENM_MFW_BV_02 - - /** - * @desc Verify complete forwarding message scenario (GREEDY, CBF, GREEDY) - *
-     * Pics Selection: 
-     * Config Id: CF-01
-     * Initial conditions:
-     *  with {
-     *      itsGnNonAreaForwardingAlgorithm of EUT1 set to GREEDY
-     *      itsGnNonAreaForwardingAlgorithm of EUT2 set to CBF
-     *      itsGnNonAreaForwardingAlgorithm of EUT3 set to GREEDY
-     *      itsGnNonAreaForwardingAlgorithm of EUT4 is SIMPLE
-     *  }
-     * Expected behaviour:
-     *  ensure that {
-     *      when {
-     *          EUT1 is requested to send DEN message
-     *              encapsulated in a GBC packet
-     *          containing Basic Header
-     *              containing RHL field
-     *                  indicating a value > 1
-     *          containing DestinationArea
-     *              indicating the TARGET_GEOAREA
-     *      }
-     *      then {
-     *          EUT1 sends a GBC packet
-     *              containing Basic Header
-     *                  containing RHL field
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *                  containing the DEN message
-     *              encapsulated in a LL packet
-     *                  containing a destination MAC address
-     *                      indicating the EUT2 address
-     *      }
-     *      when {
-     *          EUT2 receives the GBC packet from EUT1
-     *      }
-     *      then {
-     *          EUT2 sends a GBC packet
-     *              containing Basic Header
-     *                  containing RHL field
-     *                      indicating value decreased by 1
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *                  containing the DEN message
-     *              encapsulated in a LL packet
-     *                  containing a destination MAC address
-     *                      indicating broadcast address
-     *      }
-     *      when {
-     *          EUT1 receives the GBC packet from EUT2
-     *      }
-     *      then {
-     *          EUT1 discards the GBC packet
-     *      }
-     *      when {
-     *          EUT4 receives the GBC packet from EUT2
-     *              containing Basic Header
-     *              containing RHL field
-     *                  indicating value decreased by 1
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *                  containing the DEN message
-     *      }
-     *      then {
-     *          EUT4 provides the DEN message to upper layers 
-     *          and EUT4 sends a GBC packet
-     *              containing Basic Header
-     *                  containing RHL field
-     *                      indicating value decreased by 1
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *              containing the DEN message
-     *              encapsulated in a LL packet 
-     *                  containing a destination MAC address
-     *                      indicating broadcast address
-     *      }
-     *      when {
-     *          EUT3 received the GBC packet from EUT2
-     *              containing Basic Header
-     *              containing RHL field
-     *                  indicating value decreased by 1
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *                  containing the DEN message
-     *      }
-     *      then {
-     *          EUT3 sends a GBC packet
-     *              containing Basic Header
-     *                  containing RHL field
-     *                      indicating value decreased by 1
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *              containing the DEN message
-     *              encapsulated in a LL packet 
-     *                  containing a destination MAC address
-     *                      indicating EUT4 address
-     *      }
-     *      when {
-     *          EUT4 receives the GBC packet from EUT3
-     *      }
-     *      then {
-     *          EUT4 discards the GBC packet (duplicated)
-     *      }
-     *      when {
-     *          EUT3 receives the GBC packet from EUT4
-     *      }
-     *      then {
-     *          EUT3 discards the GBC packet
-     *      }
-     *      when {
-     *          EUT2 receives the GBC packet from EUT4
-     *      }
-     *      then {
-     *          EUT2 discards the GBC packet
-     *      }
-     *  }
-     * 
- * - * @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-03) TD_AUTO_IOT_DENM_MFW_BV_03 - * @reference ETSI EN 302 636-4-1 Clauses D & E2 - */ - testcase TC_AUTO_IOT_DENM_MFW_BV_03() runs on ItsMtc system ItsAutoInteropGeoNetworkingSystem { - - // Local variables - var ItsAutoInteropGeonetworking v_eut1 := null; - var ItsAutoInteropGeonetworking v_eut2 := null; - var ItsAutoInteropGeonetworking v_eut3 := null; - var ItsAutoInteropGeonetworking v_eut4 := null; - - // 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_mtcCf01Up(v_eut1, v_eut2, v_eut3, v_eut4); - - // Preamble - - // Start components - v_eut1.start(f_TC_AUTO_IOT_DENM_MFW_BV_03_eut1(v_eut1, PX_EUT1_ID)); - v_eut2.start(f_TC_AUTO_IOT_DENM_MFW_BV_03_eut2(v_eut2, PX_EUT2_ID)); - v_eut3.start(f_TC_AUTO_IOT_DENM_MFW_BV_03_eut3(v_eut3, PX_EUT3_ID)); - v_eut4.start(f_TC_AUTO_IOT_DENM_MFW_BV_03_eut4(v_eut4, PX_EUT4_ID)); - - // Synchronization - f_serverSyncNClientsAndStop(4, {c_prDone, c_tbDone}); - - // Cleanup - f_mtcCf01Down(v_eut1, v_eut2, v_eut3, v_eut4); - - } // End of TC_AUTO_IOT_DENM_MFW_BV_03 - - group g_TC_AUTO_IOT_DENM_MFW_BV_03 { - - /** - * @desc Behavior function for EUT1 (TC_AUTO_IOT_DENM_MFW_BV_03) - */ - function f_TC_AUTO_IOT_DENM_MFW_BV_03_eut1( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - tc_ac.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT1 is requested to send DEN message - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - mw_longPosVector_targetArea( - PICS_TARGET_GEOAREA.latitude, - PICS_TARGET_GEOAREA.longitude - ), - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[p_eut_id].stationId - ))), - PX_EUT_DESC[PX_EUT2_ID].ll_mac_address - )) { // Receives the triggered DENM message - tc_ac.stop; - log("*** " & testcasename() & ": INFO: EUT1 sends a GBC packet ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: EUT1 does not send the requested DEN message ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } // End of 'alt' statement - - // Test Body - tc_wait.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT1 receives the GBC packet from EUT2 - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - ? // FIXME complement(PX_EUT_DESC[p_eut_id].stationId) - ))), - c_llBroadcast - )) { - tc_wait.stop; - log("*** " & testcasename() & ": Info: EUT1 receives the GBC packet from EUT2 ***"); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INFO: Forwarding message scenario (GREEDY, CBF, GREEDY) succeed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } // End of 'alt' statement - // EUT1 discards the GBC packet - f_sleep(PX_TNOAC); - if(0 < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": INCONC: Forwarding message scenario (GREEDY, CBF, GREEDY) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: Forwarding message scenario (GREEDY, CBF, GREEDY) succeed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_MFW_BV_03_eut1 - - /** - * @desc Behavior function for EUT2 (TC_AUTO_IOT_DENM_MFW_BV_03) - */ - function f_TC_AUTO_IOT_DENM_MFW_BV_03_eut2( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var EutGeoNetworking v_eutGeoNw; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT2 receives the GBC packet from EUT1 - mw_eutGeoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - mw_longPosVector_targetArea( - PICS_TARGET_GEOAREA.latitude, - PICS_TARGET_GEOAREA.longitude - ), - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[PX_EUT1_ID].stationId - ))))) -> value v_eutGeoNw { - // Now, we have to check for EUT4 to broadcast the DENM message - repeat; - } - [] eutGeoNetworkingPort.receive( // EUT2 receives the GBC packet from EUT4 - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[PX_EUT4_ID].stationId - ))), - c_llBroadcast - )) -> value v_eutGeoNw { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: EUT2 receives the GBC packet from EUT4 ***"); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": FAIL: Forwarding message scenario (GREEDY, CBF, GREEDY) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } // End of 'alt' statement - // EUT2 discards the GBC packet - f_sleep(PX_TNOAC); - if(0 < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": INCONC: Forwarding message scenario (GREEDY, CBF, GREEDY) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: Forwarding message scenario (GREEDY, CBF, GREEDY) succeed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_MFW_BV_03_eut2 - - /** - * @desc Behavior function for EUT3 (TC_AUTO_IOT_DENM_MFW_BV_03) - */ - function f_TC_AUTO_IOT_DENM_MFW_BV_03_eut3( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var EutGeoNetworking v_eutGeoNw; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT3 receives the GBC packet from EUT2 - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - ? // FIXME complement(PX_EUT_DESC[p_eut_id].stationId) - ))), - c_llBroadcast - )) { - log("*** " & testcasename() & ": Info: EUT3 receives the GBC packet from EUT2 ***"); - repeat; - } - [] eutGeoNetworkingPort.receive( // EUT3 receives the GBC packet from EUT4 - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId - )), - ? - )) -> value v_eutGeoNw { - tc_wait.stop; - log("*** " & testcasename() & ": INFO: EUT3 received DEN message from EUT ", v_eutGeoNw.msg.gnPacket.packet.extendedHeader.tsbHeader.srcPosVector.gnAddr.mid, " ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": FAIL: Forwarding message scenario (GREEDY, CBF, GREEDY) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } // End of 'alt' statement - // EUT3 discards the GBC packet - f_sleep(PX_TNOAC); - if(0 < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": INCONC: Forwarding message scenario (GREEDY, CBF, GREEDY) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - else { - log("*** " & testcasename() & ": PASS: Forwarding message scenario (GREEDY, CBF, GREEDY) is succeed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_MFW_BV_03_eut3 - - /** - * @desc Behavior function for EUT4 (TC_AUTO_IOT_DENM_MFW_BV_03) - */ - function f_TC_AUTO_IOT_DENM_MFW_BV_03_eut4( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var EutGeoNetworking v_eutGeoNw; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT4 receives the GBC packet from EUT2 - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - mw_longPosVector_targetArea( - PICS_TARGET_GEOAREA.latitude, - PICS_TARGET_GEOAREA.longitude - ), - e_btpB, - mw_denm_stationId - )), - PX_EUT_DESC[p_eut_id].ll_mac_address - )) -> value v_eutGeoNw { // Receive a DEN message from EUT2 - tc_wait.stop; - // Now check that EUT4 brodcasts the DENM message - log("*** " & testcasename() & ": INFO: EUT4 receives the GBC packet from EUT2 ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": FAIL: Forwarding message scenario (GREEDY, CBF, GREEDY) is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } // End of 'alt' statement - // EUT4 provides the DEN message to upper layers - f_sleep(PX_TNOAC); - if(0 < lengthof(vc_utInds)) { - log("*** " & testcasename() & ": PASS: Forwarding message scenario (GREEDY, CBF, GREEDY) is succeed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - else { - log("*** " & testcasename() & ": INCONC: EUT4 does not provide the DEN message to upper layers ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_MFW_BV_03_eut4 - - } // End of group g_TC_AUTO_IOT_DENM_MFW_BV_03 - - /** - * @desc Verify complete Road Works Warning scenario - *
-     * Pics Selection: 
-     * Config Id: CF-02
-     * Initial conditions:
-     *  with {
-     *      EUT1 having sent Road Work Warning DEN messages D1 
-     *          containing a 'speedLimit'
-     *              indicating the value 30
-     *          containing a 'drivingLaneStatus'
-     *              indicating the value '0001'B
-     *          containing a 'trafficFlowRule'
-     *              indicating the value 'passToRight'
-     *      and EUT1 having sent a DEN message D2
-     *          containing a 'speedLimit'
-     *              indicating the value 30
-     *          containing a 'drivingLaneStatus'
-     *              indicating the value '0011'B
-     *          containing a 'trafficFlowRule
-     *              indicating the value 'passToRight'
-     *      and EUT1 having sent a DEN message D3
-     *          containing a 'speedLimit'
-     *              indicating the value 30
-     *          containing a 'drivingLaneStatus'
-     *              indicating the value '0101'B
-     *          containing a 'trafficFlowRule'
-     *              indicating the value 'passToLeft'
-     *      and EUT2 having received the DEN messages D1, D2 and D3
-     *  }
-     * Expected behaviour:
-     *  ensure that {
-     *      when {
-     *          EUT2 reaches the position POS0
-     *      }
-     *      then {
-     *          EUT2 already indicates the speed limit information
-     *      }
-     *      when {
-     *          EUT2 reaches the position POS1
-     *      }
-     *      then {
-     *          EUT2 still indicates the speed limit information 
-     *          and EUT2 already indicates the most outer lane closed
-     *          and EUT2 already indicates the hardshoulder opened
-     *      }
-     *      when {
-     *          EUT2 reaches the position POS2
-     *      }
-     *      then {
-     *          EUT2 still indicates the speed limit information 
-     *          and EUT2 already indicates the two most outer lanes closed
-     *          and EUT2 already indicates the hardshoulder opened
-     *      }
-     *      when {
-     *          EUT2 reaches the position POS3
-     *      }
-     *      then {
-     *          EUT2 still indicates the speed limit information 
-     *          and EUT2 already indicates the most right lane closed
-     *          and EUT2 already indicates the hardshoulder closed
-     *      }
-     *      when {
-     *          EUT2 reaches the position POS4
-     *      }
-     *      then {
-     *          EUT2 stops indicating the speed limit information 
-     *          and EUT2 stops indicating the lanes status
-     *      }
-     *  }
-     * 
- * - * @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-03) TD_AUTO_IOT_DENM_RWW_BV_01 - * @reference ETSI EN 302 637-3 [5] - */ - testcase TC_AUTO_IOT_DENM_RWW_BV_01() runs on ItsMtc system ItsAutoInteropGeoNetworkingSystem { - - // Local variables - var ItsAutoInteropGeonetworking v_eut1 := null; - var ItsAutoInteropGeonetworking v_eut2 := null; - - // 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_mtcCf02Up(v_eut1, v_eut2); - - // Preamble - - // Start components - v_eut1.start(f_TC_AUTO_IOT_DENM_RWW_BV_01_eut1(v_eut1, PX_EUT1_ID)); - v_eut2.start(f_TC_AUTO_IOT_DENM_RWW_BV_01_eut2(v_eut2, PX_EUT2_ID)); - - // Synchronization - f_serverSyncNClientsAndStop(2, {c_prDone, c_tbDone}); - - // Cleanup - f_mtcCf02Down(v_eut1, v_eut2); - - } // End of TC_AUTO_IOT_DENM_RWW_BV_01 - - group g_TC_AUTO_IOT_DENM_RWW_BV_01 { - - /** - * @desc Behavior function for EUT1 (TC_AUTO_IOT_DENM_RWW_BV_01) - */ - function f_TC_AUTO_IOT_DENM_RWW_BV_01_eut1( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var GeoNetworkingInd v_gnInd; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - // Nothing to do - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[p_eut_id].stationId, - mw_denm( - mw_denmMgmtCon_with_relevances( - ?, - LibItsCommon_ASN1_NamedNumbers.StationType_roadSideUnit_, - -, - -, - -, - -, - -, - - - ), - mw_situation( - LibItsCommon_ASN1_NamedNumbers.CauseCodeType_roadworks_, - ? - ))))))) -> value v_gnInd { // Receive a DEN message - tc_ac.stop; - // Re-send DEN message to the other EUTs - eutGeoNetworkingPort.send( - m_forward_geoNetworkingInd( - v_gnInd - )); - tc_ac.start; - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": PASS: Test done ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } // End of 'alt' statement - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_RWW_BV_01_eut1 - - /** - * @desc Behavior function for EUT2 (TC_AUTO_IOT_DENM_RWW_BV_01) - */ - function f_TC_AUTO_IOT_DENM_RWW_BV_01_eut2( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var EutGeoNetworking v_eutGeoNw; - var HmiSignageEventInd v_hmiSignageEventInd; - var integer v_counter; // DEN message counter - var ThreeDLocation v_nextPosition2reach := PICS_POS0; // The different position to reach - var float v_distance; // The vehicle position calculated using GN messages - var integer v_isOnPosition := -1; // Set to unknown position - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - // Wait for EUT_1 DEN messages - v_counter := 0; - tc_ac.start; - alt { - [] eutGeoNetworkingPort.receive( - mw_eutGeoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - ?, - mw_denm( - mw_denmMgmtCon_with_relevances( - ?, - -, - -, - -, - -, - -, - -, - - - ), - mw_situation( - LibItsCommon_ASN1_NamedNumbers.CauseCodeType_roadworks_, - ? - ))))))) -> value v_eutGeoNw { // Receive a DEN message - tc_ac.stop; - v_counter := v_counter + 1; - if (v_counter < 3) { - tc_ac.start; - } else { - log("*** " & testcasename() & ": INFO: EUT2 (vehicle) receives RWW DENMs D1, D2 and D3 ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ":FAIL: EUT2 (vehicle) does not receive RWW DENMs D1, D2 and D3 ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_error); - } - } // End of 'alt' statement - - // Test Body - tc_wait.start; - alt { - [] eutGeoNetworkingPort.receive( - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwShbPacketWithNextHeader_cam( - ?, - ?, - e_btpB, - mw_cam_stationId( - -, - PX_EUT_DESC[p_eut_id].stationId - ))), - c_llBroadcast - )) -> value v_eutGeoNw { - // Compute distance from v_nextPosition2reach - v_distance := f_distance( - v_eutGeoNw.msg.gnPacket.packet.extendedHeader.shbHeader.srcPosVector, - valueof(m_longPosVector(v_nextPosition2reach)) - ); - select (v_isOnPosition) { - case (-1) { - if (v_distance <= PX_PRE_DEFINED_SECURITY_DISTANCE) { // Position PICS_POS1 was reached - v_isOnPosition := 0; - v_nextPosition2reach := PICS_POS1; - tc_noac.start; - } - } - case (0) { - if (v_distance <= PX_PRE_DEFINED_SECURITY_DISTANCE) { // Position PICS_POS2 was reached - v_isOnPosition := 1; - v_nextPosition2reach := PICS_POS2; - tc_noac.start; - } - } - case (1) { - if (v_distance <= PX_PRE_DEFINED_SECURITY_DISTANCE) { // Position PICS_POS3 was reached - v_isOnPosition := 2; - v_nextPosition2reach := PICS_POS3; - tc_noac.start; - } - } - case (2) { - if (v_distance <= PX_PRE_DEFINED_SECURITY_DISTANCE) { // Position PICS_POS4 was reached - v_isOnPosition := 3; - v_nextPosition2reach := PICS_POS4; - tc_noac.start; - } - } - case else { - tc_noac.start; - } - } // End of 'select' statement - repeat; - } - [v_isOnPosition == 0] hmiPort.receive( - mw_hmiSignageEventInd_roadworks_limitedspeed - ) -> value v_hmiSignageEventInd { - log("*** " & testcasename() & ": INFO: EUT2 reaches position ", v_isOnPosition, " ***"); - tc_noac.stop; - repeat; // Continue - } - [v_isOnPosition == 1] hmiPort.receive( - HmiSignageEventInd:?/*TODO*/ - ) -> value v_hmiSignageEventInd { - log("*** " & testcasename() & ": INFO: EUT2 reaches position ", v_isOnPosition, " ***"); - tc_noac.stop; - repeat; // Continue - } - [v_isOnPosition == 2] hmiPort.receive( - HmiSignageEventInd:?/*TODO*/ - ) -> value v_hmiSignageEventInd { - log("*** " & testcasename() & ": INFO: EUT2 reaches position ", v_isOnPosition, " ***"); - tc_noac.stop; - repeat; // Continue - } - [v_isOnPosition == 3] hmiPort.receive( - HmiSignageEventInd:?/*TODO*/ - ) -> value v_hmiSignageEventInd { - log("*** " & testcasename() & ": PASS: Road Works Warning scenario complete ***"); - tc_noac.stop; - repeat; // Continue - } - [] tc_noac.timeout { - log("*** " & testcasename() & ": FAIL: Road Works Warning scenario failure in position ", v_isOnPosition, " ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: Road Works Warning scenario is incomplet ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_RWW_BV_01_eut2 - - } // End of group g_TC_AUTO_IOT_DENM_RWW_BV_01 - - /** - * @desc Verify complete Road hazard Signals scenario - *
-     * Pics Selection: 
-     * Config Id: CF-02
-     * Initial conditions:
-     *  with {
-     *      EUT1 having sent Road Work Warning DEN messages D
-     *         containing a management 
-     *             containing eventPosition 
-     *                 indicating POS1
-     *             containing relevanceDistance 
-     *                 indicating lessThan100m
-     *             containing relevanceTrafficDirection 
-     *                 indicating allTrafficDirections
-     *         containing situation 
-     *             containing eventType 
-     *                 containing causeCode 
-     *                     indicating a valid CAUSE_CODE (Table 4)
-     *                 containing subCauseCode 
-     *                     indicating a valid SUB_CAUSE_CODE (Table 5)
-     *  }
-     * Expected behaviour:
-     *  ensure that {
-     *      when {
-     *          EUT2 reaches the position POS0
-     *      }
-     *      then {
-     *          EUT2 already indicates the Road Hazard information
-     *      }
-     *  }
-     * 
- * - * @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-03) TD_AUTO_IOT_DENM_RHS_BV_01 - * @reference ETSI EN 302 637-3 [5] - */ - testcase TC_AUTO_IOT_DENM_RHS_BV_01() runs on ItsMtc system ItsAutoInteropGeoNetworkingSystem { - - // Local variables - var ItsAutoInteropGeonetworking v_eut1 := null; - var ItsAutoInteropGeonetworking v_eut2 := null; - - // 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_mtcCf02Up(v_eut1, v_eut2); - - // Preamble - - // Start components - v_eut1.start(f_TC_AUTO_IOT_DENM_RHS_BV_01_eut1(v_eut1, PX_EUT1_ID)); - v_eut2.start(f_TC_AUTO_IOT_DENM_RHS_BV_01_eut2(v_eut2, PX_EUT2_ID)); - - // Synchronization - f_serverSyncNClientsAndStop(2, {c_prDone, c_tbDone}); - - // Cleanup - f_mtcCf02Down(v_eut1, v_eut2); - - } // End of TC_AUTO_IOT_DENM_RHS_BV_01 - - group g_TC_AUTO_IOT_DENM_RHS_BV_01 { - - /** - * @desc Behavior function for EUT1 (TC_AUTO_IOT_DENM_RHS_BV_01) - */ - function f_TC_AUTO_IOT_DENM_RHS_BV_01_eut1( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var GeoNetworkingInd v_gnInd; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - // Nothing to do - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[p_eut_id].stationId - ))))) -> value v_gnInd { // Receive a DEN message - tc_ac.stop; - // Re-send DEN message to the other EUTs - eutGeoNetworkingPort.send( - m_forward_geoNetworkingInd( - v_gnInd - )); - tc_ac.start; - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": PASS: Test done ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } // End of 'alt' statement - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_RHS_BV_01_eut1 - - /** - * @desc Behavior function for EUT2 (TC_AUTO_IOT_DENM_RHS_BV_01) - */ - function f_TC_AUTO_IOT_DENM_RHS_BV_01_eut2( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var EutGeoNetworking v_eutGeoNw; - var float v_distance; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - // EUT2 having received a DEN message - tc_ac.start; - alt { - [] eutGeoNetworkingPort.receive( - mw_eutGeoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[PX_EUT1_ID].stationId, - mw_denm( - mw_denmMgmtCon_with_relevances( - mw_anyActionId, - -, - -, - -, - -, - -, - lessThan100m, - allTrafficDirections - ), - mw_situation( - PX_DENM_CAUSE_VA, - PX_DENM_SUBCAUSE_VA - ))))))) { - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected DEN message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } // End of 'alt' statement - - // Test Body - tc_ac.start; - alt { - [] eutGeoNetworkingPort.receive( - mw_eutGeoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacketWithNextHeader_cam( - ?, - ?, - e_btpB, - mw_cam_stationId( - -, - PX_EUT_DESC[p_eut_id].stationId - ))))) -> value v_eutGeoNw { // Receive a DEN message - tc_ac.stop; - // Compute distance from POS0 - v_distance := f_distance( - v_eutGeoNw.msg.gnPacket.packet.extendedHeader.shbHeader.srcPosVector, - valueof(m_longPosVector(PICS_POS0)) - ); - if (v_distance <= PX_LATERAL_COLLISION_SECURITY_DISTANCE) { // Position PICS_POS0 was reached - log("*** " & testcasename() & ": INFO: EUT2 has reached POS0 ***"); - } else { - // Continue - tc_ac.start; - repeat; - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM messages for EUT ", PX_EUT_DESC[p_eut_id].stationId, " not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } // End of 'alt' statement - tc_ac.start; - alt { // EUT2 already indicates the Road Hazard Signal information - [] hmiPort.receive(mw_hmiSignageEventInd_roadHazardSignal) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: The Road Hazard Signal information was received on EUT ", PX_EUT_DESC[p_eut_id].stationId, "***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected Road Hazard Signal information signage was not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_RHS_BV_01_eut2 - - } // End of group g_TC_AUTO_IOT_DENM_RHS_BV_01 - - /** - * @desc Verify complete Stationary Vehicle Warning scenario - *
-     * Pics Selection: 
-     * Config Id: CF-02
-     * Initial conditions:
-     *  with {
-     *      EUT1 having sent Road Work Warning DEN messages D
-     *         containing a management 
-     *             containing eventPosition 
-     *                 indicating POS1
-     *             containing relevanceDistance 
-     *                 indicating lessThan100m
-     *             containing relevanceTrafficDirection 
-     *                 indicating allTrafficDirections
-     *         containing situation 
-     *             containing eventType 
-     *                 containing causeCode 
-     *                     indicating a valid CAUSE_CODE (Table 4)
-     *                 containing subCauseCode 
-     *                     indicating a valid SUB_CAUSE_CODE (Table 5)
-     *  }
-     * Expected behaviour:
-     *  ensure that {
-     *      when {
-     *          EUT2 reaches the position POS0
-     *      }
-     *      then {
-     *          EUT2 already indicates the Stationary Vehicle Information
-     *      }
-     *  }
-     * 
- * - * @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-03) TD_AUTO_IOT_DENM_SVW_BV_01 - * @reference ETSI EN 302 637-3 [5] - */ - testcase TC_AUTO_IOT_DENM_SVW_BV_01() runs on ItsMtc system ItsAutoInteropGeoNetworkingSystem { - - // Local variables - var ItsAutoInteropGeonetworking v_eut1 := null; - var ItsAutoInteropGeonetworking v_eut2 := null; - - // 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_mtcCf02Up(v_eut1, v_eut2); - - // Preamble - - // Start components - v_eut1.start(f_TC_AUTO_IOT_DENM_SVW_BV_01_eut1(v_eut1, PX_EUT1_ID)); - v_eut2.start(f_TC_AUTO_IOT_DENM_SVW_BV_01_eut2(v_eut2, PX_EUT2_ID)); - - // Synchronization - f_serverSyncNClientsAndStop(2, {c_prDone, c_tbDone}); - - // Cleanup - f_mtcCf02Down(v_eut1, v_eut2); - - } // End of TC_AUTO_IOT_DENM_SVW_BV_01 - - group g_TC_AUTO_IOT_DENM_SVW_BV_01 { - - /** - * @desc Behavior function for EUT1 (TC_AUTO_IOT_DENM_SVW_BV_01) - */ - function f_TC_AUTO_IOT_DENM_SVW_BV_01_eut1( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var GeoNetworkingInd v_gnInd; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - // EUT1 having sent a DEN message - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[p_eut_id].stationId, - mw_denm( - mw_denmMgmtCon_with_relevances( - ?, - -, - -, - -, - -, - -, - lessThan100m, - allTrafficDirections - ), - mw_situation( - PX_DENM_CAUSE_VA, - PX_DENM_SUBCAUSE_VA - ))))))) -> value v_gnInd { // Receive a DEN message - tc_ac.stop; - // Re-send DEN message to the other EUTs - eutGeoNetworkingPort.send( - m_forward_geoNetworkingInd( - v_gnInd - )); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected DEN message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } // End of 'alt' statement - - // Test Body - // Nothing to do - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_SVW_BV_01_eut1 - - /** - * @desc Behavior function for EUT2 (TC_AUTO_IOT_DENM_SVW_BV_01) - */ - function f_TC_AUTO_IOT_DENM_SVW_BV_01_eut2( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var EutGeoNetworking v_eutGeoNw; - var float v_distance; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - // EUT2 having received a DEN message - tc_ac.start; - alt { - [] eutGeoNetworkingPort.receive( - mw_eutGeoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[PX_EUT1_ID].stationId, - mw_denm( - mw_denmMgmtCon_with_relevances( - mw_anyActionId, - -, - -, - -, - -, - -, - lessThan100m, - allTrafficDirections - ), - mw_situation( - PX_DENM_CAUSE_VA, - PX_DENM_SUBCAUSE_VA - ))))))) { // Receive a DEN message - tc_ac.stop; - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: Expected DEN message not received ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } // End of 'alt' statement - - // Test Body - tc_ac.start; - alt { - [] eutGeoNetworkingPort.receive( - mw_eutGeoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacketWithNextHeader_cam( - ?, - ?, - e_btpB, - mw_cam_stationId( - -, - PX_EUT_DESC[p_eut_id].stationId - ))))) -> value v_eutGeoNw { - tc_ac.stop; - // Compute distance from POS0 - v_distance := f_distance( - v_eutGeoNw.msg.gnPacket.packet.extendedHeader.shbHeader.srcPosVector, - valueof(m_longPosVector(PICS_POS0)) - ); - if (v_distance <= PX_PRE_DEFINED_SECURITY_DISTANCE) { // Position PICS_POS0 was reached - log("*** " & testcasename() & ": INFO: EUT2 has reached POS0 ***"); - } else { - // Continue - tc_ac.start; - repeat; - } - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM messages for EUT ", PX_EUT_DESC[p_eut_id].stationId, " not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } // End of 'alt' statement - tc_ac.start; - alt { // EUT2 already indicates the Stationary Vehicle Warning information - [] hmiPort.receive(mw_hmiSignageEventInd_stationaryVehicleWarning) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: The Stationary Vehicle Warning information was received on EUT ", PX_EUT_DESC[p_eut_id].stationId, "***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Expected Stationary Vehicle Warning information was not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_SVW_BV_01_eut2 - - } // End of group g_TC_AUTO_IOT_DENM_SVW_BV_01 - - /** - * @desc Verify complete complete Geo-broadcast message caching scenario - *
-     * Pics Selection: 
-     * Config Id: CF-01with EUT4 off-link
-     * Initial conditions:
-     *  with {
-     *      itsGnNonAreaForwardingAlgorithm of EUT1 set to GREEDY
-     *      itsGnNonAreaForwardingAlgorithm of EUT2 set to GREEDY
-     *      itsGnNonAreaForwardingAlgorithm of EUT4 is SIMPLE
-     *  }
-     * Expected behaviour:
-     *  ensure that {
-     *      when {
-     *          EUT1 is requested to send DEN message
-     *              encapsulated in a GBC packet
-     *          containing Basic Header
-     *              containing RHL field
-     *                  indicating a value > 1
-     *          containing DestinationArea
-     *              indicating the TARGET_GEOAREA
-     *      }
-     *      then {
-     *          EUT1 sends a GBC packet
-     *              containing Basic Header
-     *                  containing RHL field
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *                  containing the DEN message
-     *              encapsulated in a LL packet
-     *                  containing a destination MAC address
-     *                      indicating the EUT2 address
-     *      }
-     *      when {
-     *          EUT2 receives the GBC packet from EUT1
-     *      }
-     *      then {
-     *          EUT2 buffers the GBC packet from EUT1
-     *      }
-     *      when {
-     *          EUT2 and EUT4 become on-link
-     *      }
-     *      then {
-     *          EUT2 sends a GBC packet
-     *              containing Basic Header
-     *                  containing RHL field
-     *                      indicating value decreased by 1
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *                  containing the DEN message
-     *              encapsulated in a LL packet
-     *                  containing a destination MAC address
-     *                      indicating the EUT4 address
-     *              and EUT3 does not receive the GBC packet from EUT1
-     *      }
-     *      when {
-     *          EUT4 receives the GBC packet from EUT2
-     *              containing Basic Header
-     *              containing RHL field
-     *                  indicating value decreased by 1
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *                  containing the DEN message
-     *      }
-     *      then {
-     *          EUT4 provides the DEN message to upper layers 
-     *          and EUT4 sends a GBC packet
-     *              containing Basic Header
-     *                  containing RHL field
-     *                      indicating value decreased by 1
-     *              containing DestinationArea
-     *                  indicating the TARGET_GEOAREA
-     *              containing Payload
-     *              containing the DEN message
-     *              encapsulated in a LL packet 
-     *                  containing a destination MAC address
-     *                      indicating broadcast address
-     *      }
-     *      when {
-     *      EUT2 receives the GBC packet from EUT4
-     *      }
-     *      then {
-     *          EUT2 discards the GBC packet
-     *      }
-     *  }
-     * 
- * - * @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-03) TD_AUTO_IOT_DENM_GMC_BV_01 - * @reference ETSI EN 302 636-4-1 Clauses 9.3.11, D & E2 [2] - */ - testcase TC_AUTO_IOT_DENM_GMC_BV_01() runs on ItsMtc system ItsAutoInteropGeoNetworkingSystem { - - // Local variables - var ItsAutoInteropGeonetworking v_eut1 := null; - var ItsAutoInteropGeonetworking v_eut2 := null; - var ItsAutoInteropGeonetworking v_eut3 := null; - var ItsAutoInteropGeonetworking v_eut4 := null; - - // 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_mtcCf01Up(v_eut1, v_eut2, v_eut3, v_eut4); - - // Preamble - - // Start components - v_eut1.start(f_TC_AUTO_IOT_DENM_GMC_BV_01_eut1(v_eut1, PX_EUT1_ID)); - v_eut2.start(f_TC_AUTO_IOT_DENM_GMC_BV_01_eut2(v_eut2, PX_EUT2_ID)); - // v_eut3 not used - v_eut4.start(f_TC_AUTO_IOT_DENM_GMC_BV_01_eut4(v_eut4, PX_EUT4_ID)); - - // Synchronization - f_serverSyncNClientsAndStop(4, {c_prDone, c_initDone, c_tbDone}); - - // Cleanup - f_mtcCf01Down(v_eut1, v_eut2, v_eut3, v_eut4); - - } // End of TC_AUTO_IOT_DENM_GMC_BV_01 - - group g_TC_AUTO_IOT_DENM_GMC_BV_01 { - - /** - * @desc Behavior function for EUT1 (TC_AUTO_IOT_DENM_GMC_BV_01) - */ - function f_TC_AUTO_IOT_DENM_GMC_BV_01_eut1( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var GeoNetworkingInd v_gnInd; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - tc_ac.start; - alt { - [] geoNetworkingPort.receive( // Filter broadcasted DENM - mw_geoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[p_eut_id].stationId - ))), - PX_EUT_DESC[PX_EUT2_ID].ll_mac_address - )) -> value v_gnInd { // Receives the triggered DENM message - tc_ac.stop; - // Re-send DEN message to EUT2s - eutGeoNetworkingPort.send( - m_forward_geoNetworkingInd( - v_gnInd - )); - log("*** " & testcasename() & ": INFO: EUT1 sends a GBC packet ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: EUT1 does not send requested DEN message ***"); - f_selfOrClientSyncAndVerdict(c_prDone, e_timeout); - } - } // End of 'alt' statement - - // Test Body - f_selfOrClientSyncAndVerdict(c_initDone, e_success); - tc_wait.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - ? // FIXME complement(PX_EUT_DESC[p_eut_id].stationId) - ))), - ? - )) -> value v_gnInd { - tc_wait.stop; - log("*** " & testcasename() & ": FAIL: Unexpected DEN message received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": PASS: Geo-broadcast message caching scenario succeed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } // End of 'alt' statement - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_GMC_BV_01_eut1 - - /** - * @desc Behavior function for EUT2 (TC_AUTO_IOT_DENM_GMC_BV_01) - */ - function f_TC_AUTO_IOT_DENM_GMC_BV_01_eut2( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var EutGeoNetworking v_eutGeoNw; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] eutGeoNetworkingPort.receive( // EUT2 receives the GBC packet from EUT1 - mw_eutGeoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[PX_EUT1_ID].stationId - ))))) -> value v_eutGeoNw { - // Here, GBC packet should be buffered - f_selfOrClientSyncAndVerdict(c_initDone, e_success); - // Now, we have to check for EUT4 to broadcast the DENM message - repeat; - } - [] eutGeoNetworkingPort.receive( - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[PX_EUT4_ID].stationId - ))), - c_llBroadcast - )) -> value v_eutGeoNw { - tc_wait.stop; - log("*** " & testcasename() & ": PASS: DEN message was broadcasted by EUT4 ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": FAIL: Geo-broadcast message caching scenario is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } // End of 'alt' statement - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_GMC_BV_01_eut2 - - /** - * @desc Behavior function for EUT4 (TC_AUTO_IOT_DENM_GMC_BV_01) - */ - function f_TC_AUTO_IOT_DENM_GMC_BV_01_eut4( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var GeoNetworkingInd v_gnInd; - var EutGeoNetworking v_eutGeoNw; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - f_selfOrClientSyncAndVerdict(c_initDone, e_success); - // EUT2 and EUT4 become on-link - ItsAutoInterop_Functions.f_utTriggerEvent(UtAutoInteropTrigger:{utRadioOnOff := true}); - tc_ac.start; - alt { - [] eutGeoNetworkingPort.receive( - mw_eutGeoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[PX_EUT1_ID].stationId - ))), - PX_EUT_DESC[p_eut_id].ll_mac_address - )) -> value v_eutGeoNw { // Receive a DEN message from EUT2 - tc_ac.stop; - // Now check that EUT4 brodcasts the DENM message - tc_ac.start; - repeat; - } - [] geoNetworkingPort.receive( - mw_geoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId( - PX_EUT_DESC[p_eut_id].stationId - ))), - c_llBroadcast - )) -> value v_gnInd { // EUT4 has brodcasted the DENM message - tc_ac.stop; - // Re-send DEN message to the other EUTs - eutGeoNetworkingPort.send( - m_forward_geoNetworkingInd( - v_gnInd - )); - log("*** " & testcasename() & ": PASS: Geo-broadcast message caching scenario succeed ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": FAIL: Geo-broadcast message caching scenario is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_error); - } - } // End of 'alt' statement - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_DENM_GMC_BV_01_eut4 - - } // End of group g_TC_AUTO_IOT_DENM_GMC_BV_01 - - /** - * @desc Verify complete neighbors detection scenario based on CA messages and/or beacons - *
-     * Pics Selection: 
-     * Config Id: CF-03
-     * Initial conditions:
-     * with {
-     *     EUT1, EUT2 and EUT3 being on-link
-     * }
-     * Expected behaviour:
-     * ensure that {
-     *     when {
-     *         EUT1 sends CA messages
-     *             containing cam
-     *                 containing camParameters
-     *                     containing basicContainer 
-     *                         containing referencePosition
-     *                             indicating POSITION_1
-     *     }
-     *     then {
-     *         EUT2 indicates EUT1 as neighbour
-     *         EUT3 indicates EUT1 as neighbour
-     *     }
-     *     when {
-     *         EUT2 sends CA messages
-     *             containing cam
-     *                 containing camParameters
-     *                     containing basicContainer 
-     *                         containing referencePosition
-     *                             indicating POSITION_1
-     *     }
-     *     then {
-     *         EUT1 indicates EUT1 as neighbour
-     *         EUT3 indicates EUT1 as neighbour
-     *     }
-     *     when {
-     *         EUT3 sends CA messages
-     *             containing cam
-     *                 containing camParameters
-     *                     containing basicContainer 
-     *                         containing referencePosition
-     *                             indicating POSITION_1
-     *     }
-     *     then {
-     *         EUT1 indicates EUT1 as neighbour
-     *         EUT2 indicates EUT1 as neighbour
-     *     }
-     * }
-     * 
- * - * @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-03) TD_AUTO_IOT_CAM_NBD_BV_01 - * @reference ETSI EN 302 636-2 ETSI EN 302 637-2 [4] - */ - testcase TC_AUTO_IOT_CAM_NBD_BV_01() runs on ItsMtc system ItsAutoInteropGeoNetworkingSystem { - - // Local variables - var ItsAutoInteropGeonetworking v_eut1 := null; - var ItsAutoInteropGeonetworking v_eut2 := null; - var ItsAutoInteropGeonetworking v_eut3 := null; - - // 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_mtcCf03Up(v_eut1, v_eut2, v_eut3); - - // Preamble - - // Start components - v_eut1.start(f_TC_AUTO_IOT_CAM_NBD_BV_01_eut(v_eut1, PX_EUT1_ID)); - v_eut2.start(f_TC_AUTO_IOT_CAM_NBD_BV_01_eut(v_eut2, PX_EUT2_ID)); - v_eut3.start(f_TC_AUTO_IOT_CAM_NBD_BV_01_eut(v_eut3, PX_EUT3_ID)); - - // Synchronization - f_serverSyncNClientsAndStop(3, {c_prDone, c_tbDone}); - - // Cleanup - f_mtcCf03Down(v_eut1, v_eut2, v_eut3); - - } // End of TC_AUTO_IOT_CAM_NBD_BV_01 - - group g_TC_AUTO_IOT_CAM_NBD_BV_01 { - - /** - * @desc Behavior function for EUT (TC_AUTO_IOT_CAM_NBD_BV_01) - */ - function f_TC_AUTO_IOT_CAM_NBD_BV_01_eut( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var GeoNetworkingInd v_gnInd; - var HmiNeighborEventInds v_hmiNeighborEventInds; - var HmiNeighborEventInds v_expected_neighbors := {}; - - // Build the list of the expected neighbors - for (var integer i := 0; i < lengthof(PX_EUT_DESC); i := i + 1) { - if (i != p_eut_id) { - var octetstring v := int2oct(PX_EUT_DESC[i].stationId, 4); // FIXME How to improve type conversion - v_expected_neighbors[lengthof(v_expected_neighbors)].mid := PX_EUT_DESC[i].mid; - v_expected_neighbors[lengthof(v_expected_neighbors)].stationId := oct2int(v); // FIXME How to improve type conversion - } - } // End of 'for' statement - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [] geoNetworkingPort.receive( // Filter broadcasted CAM - mw_geoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwShbPacketWithNextHeader_cam( - ?, - ?, - e_btpB, - mw_cam_stationId( - -, - ? // FIXME complement(PX_EUT_DESC[p_eut_id].stationId) - ))), - c_llBroadcast - )) -> value v_gnInd { // Receives a broadcast MAC address - // Broadcast CA message to the other EUTs - eutGeoNetworkingPort.send( - m_forward_geoNetworkingInd( - v_gnInd - )); - repeat; - } - [] geoNetworkingPort.receive( // Filter broadcasted beacon - mw_geoNwInd_withLinkLayerDestination( - mw_geoNwPdu( - mw_geoNwShbPacket( - mw_longPosVectorAny( - mw_gnAddressMid( - ? // FIXME complement(PX_EUT_DESC[p_eut_id].mid) - )))), - c_llBroadcast - )) -> value v_gnInd { // Receives a broadcast MAC address - // Broadcast Beacon message to the other EUTs - eutGeoNetworkingPort.send( - m_forward_geoNetworkingInd( - v_gnInd - )); - repeat; - } - [] hmiPort.receive( - HmiNeighborEventInds:? - ) -> value v_hmiNeighborEventInds { - for (var integer v_i := 0; v_i < lengthof(v_hmiNeighborEventInds); v_i := v_i + 1) { - if (match(v_expected_neighbors, superset(m_hmiNeighborEventInd(v_hmiNeighborEventInds[v_i].mid, v_hmiNeighborEventInds[v_i].stationId)))) { - // Remove item from the expected list - for (var integer v_j := 0; v_j < lengthof(v_expected_neighbors); v_j := v_j + 1) { - if (v_expected_neighbors[v_j].mid == v_hmiNeighborEventInds[v_i].mid) { - v_expected_neighbors[v_j] := {}; - break; - } - } // End of 'for' statement - } // else nothing to do - } // End of 'for' statement - // Check if all neighbors were detected - if (lengthof(v_expected_neighbors) == 0) { - log("*** " & testcasename() & ": PASS: Neighbors were detected by EUT #", p_eut_id, " ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - repeat; - } - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": FAIL: Neighbors were not be detected by EUT #", p_eut_id, " ***"); - } - } // End of 'alt' statement - - // Postamble - f_poDefault(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_CAM_NBD_BV_01_eut - - } // End of group g_TC_AUTO_IOT_CAM_NBD_BV_01 - - /** - * @desc Verify complete longitudinal collision risk scenario based on CA messages - *
-     * Pics Selection: 
-     * Config Id: CF-02
-     * Initial conditions:
-     *  with {
-     *      EUT1 having moved slowly between positions POS1 and POS2
-     *      and EUT2 having moved from Start position to End position
-     *  }
-     * Expected behaviour:
-     *  ensure that {
-     *      when {
-     *          distance between EUT1 and EUT2 becomes less than the pre-defined security distance
-     *      }
-     *      then {
-     *          EUT1 indicates the forward collision risk
-     *          and EUT2 indicates the forward collision risk
-     *      }
-     *  }
-     * 
- * - * @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-03) TD_AUTO_IOT_CAM_CRW_BV_01 - * @reference ETSI EN 302 637-2 [4] - */ - testcase TC_AUTO_IOT_CAM_CRW_BV_01() runs on ItsMtc system ItsAutoInteropGeoNetworkingSystem { - - // Local variables - var ItsAutoInteropGeonetworking v_eut1 := null; - var ItsAutoInteropGeonetworking v_eut2 := null; - - // 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_mtcCf02Up(v_eut1, v_eut2); - - // Preamble - - // Start components - v_eut1.start(f_TC_AUTO_IOT_CAM_CRW_BV_01_eut(v_eut1, PX_EUT1_ID)); - v_eut2.start(f_TC_AUTO_IOT_CAM_CRW_BV_01_eut(v_eut2, PX_EUT2_ID)); - - // Synchronization - f_serverSyncNClientsAndStop(2, {c_prDone, c_tbDone}); - - // Cleanup - f_mtcCf02Down(v_eut1, v_eut2); - - } // End of TC_AUTO_IOT_CAM_CRW_BV_01 - - group g_TC_AUTO_IOT_CAM_CRW_BV_01 { - - /** - * @desc Behavior function for EUT1 (TC_AUTO_IOT_CAM_CRW_BV_01) - */ - function f_TC_AUTO_IOT_CAM_CRW_BV_01_eut( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var GeoNetworkingInd v_gnInd; - var LongPosVector v_myPosition; - var float v_distance; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - // Acquire my current position - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacketWithNextHeader_cam( - ?, - ?, - e_btpB, - mw_cam_stationId( - -, - PX_EUT_DESC[p_eut_id].stationId - ))))) -> value v_gnInd { // Receive a DEN message - tc_ac.stop; - // Re-send DEN message to the other EUTs - eutGeoNetworkingPort.send( - m_forward_geoNetworkingInd( - v_gnInd - )); - // Store my current position - v_myPosition := v_gnInd.msgIn.gnPacket.packet.extendedHeader.shbHeader.srcPosVector; - } - [] geoNetworkingPort.receive( // TODO Move to default - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacketWithNextHeader_cam - ))) { - tc_ac.stop; - tc_ac.start; - repeat; - } - [] eutGeoNetworkingPort.receive( // TODO Move to default - mw_eutGeoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacketWithNextHeader_cam - ))) { - tc_ac.stop; - tc_ac.start; - repeat; - } - [] geoNetworkingPort.receive( // TODO Move to default - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId - )))) { - tc_ac.stop; - tc_ac.start; - repeat; - } - [] eutGeoNetworkingPort.receive( // TODO Move to default - mw_eutGeoNwInd( - mw_geoNwPdu( - mw_geoNwTsbPacketWithNextHeader_denm( - ?, - ?, - e_btpB, - mw_denm_stationId - )))) { - tc_ac.stop; - tc_ac.start; - repeat; - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM messages for EUT ", PX_EUT_DESC[p_eut_id].stationId, " not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } // End of 'alt' statement - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacketWithNextHeader_cam( - ?, - ?, - e_btpB, - mw_cam_stationId( - -, - PX_EUT_DESC[p_eut_id].stationId - ))))) -> value v_gnInd { // Receive a DEN message - tc_ac.stop; - // Re-send DEN message to the other EUTs - eutGeoNetworkingPort.send( - m_forward_geoNetworkingInd( - v_gnInd - )); - // Store my current position - v_myPosition := v_gnInd.msgIn.gnPacket.packet.extendedHeader.shbHeader.srcPosVector; - } - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacketWithNextHeader_cam( - ?, - ?, - e_btpB, - mw_cam_stationId - )))) -> value v_gnInd { // Receive a DEN message - tc_ac.stop; - // Re-send CA message to the other EUTs - eutGeoNetworkingPort.send( - m_forward_geoNetworkingInd( - v_gnInd - )); - // Store my current position - v_distance := f_distance( - v_gnInd.msgIn.gnPacket.packet.extendedHeader.shbHeader.srcPosVector, - valueof(v_myPosition) - ); - if (v_distance >= PX_FORWARD_COLLISION_SECURITY_DISTANCE) { // TODO Check elevation - tc_ac.start; - repeat; - } // else, nothing to do - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM messages for EUT ", PX_EUT_DESC[p_eut_id].stationId, " not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } // End of 'alt' statement - tc_ac.start; - alt { // Check that Forward Collision Risk was received - [] hmiPort.receive(mw_hmiSignageEventInd_forwardCollisionRisk) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: The Forward Collision Risk signage was received on EUT ", PX_EUT_DESC[p_eut_id].stationId, "***"); - 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(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_CAM_CRW_BV_01_eut - - } // End of group g_TC_AUTO_IOT_CAM_CRW_BV_01 - - /** - * @desc Verify complete intersection collision risk scenario based on CA messages - *
-     * Pics Selection: 
-     * Config Id: CF-04
-     * Initial conditions:
-     *  with {
-     *      EUT1 having moved from Start1 position to End1 position
-     *      and EUT2 having moved from Start2 position to End2 position
-     *  }
-     * Expected behaviour:
-     *  ensure that {
-     *      when {
-     *          EUT1 and EUT2 approach simultaneously POS3
-     *      }
-     *      then {
-     *          EUT1 indicates the lateral collision risk
-     *          and EUT2 indicates the lateral  collision risk
-     *      }
-     *  }
-     * 
- * - * @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-03) TD_AUTO_IOT_CAM_CRW_BV_02 - * @reference ETSI EN 302 637-2 [4] - */ - testcase TC_AUTO_IOT_CAM_CRW_BV_02() runs on ItsMtc system ItsAutoInteropGeoNetworkingSystem { - - // Local variables - var ItsAutoInteropGeonetworking v_eut1 := null; - var ItsAutoInteropGeonetworking v_eut2 := null; - - // 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_mtcCf02Up(v_eut1, v_eut2); - - // Preamble - - // Start components - v_eut1.start(f_TC_AUTO_IOT_CAM_CRW_BV_02_eut(v_eut1, PX_EUT1_ID)); - v_eut2.start(f_TC_AUTO_IOT_CAM_CRW_BV_02_eut(v_eut2, PX_EUT2_ID)); - - // Synchronization - f_serverSyncNClientsAndStop(2, {c_prDone, c_tbDone}); - - // Cleanup - f_mtcCf02Down(v_eut1, v_eut2); - - } // End of TC_AUTO_IOT_CAM_CRW_BV_02 - - group g_TC_AUTO_IOT_CAM_CRW_BV_02 { - - /** - * @desc Behavior function for EUT1 (TC_AUTO_IOT_CAM_CRW_BV_02) - */ - function f_TC_AUTO_IOT_CAM_CRW_BV_02_eut( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var GeoNetworkingInd v_gnInd; - var float v_distance; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - // Nothing to do - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_ac.start; - alt { - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacketWithNextHeader_cam( - ?, - ?, - e_btpB, - mw_cam_stationId( - -, - PX_EUT_DESC[p_eut_id].stationId - ))))) -> value v_gnInd { // Receive a DEN message - tc_ac.stop; - // Re-send CA message to the other EUTs - eutGeoNetworkingPort.send( - m_forward_geoNetworkingInd( - v_gnInd - )); - // Compute distance from POS3 - v_distance := f_distance( - v_gnInd.msgIn.gnPacket.packet.extendedHeader.shbHeader.srcPosVector, - valueof(m_longPosVector(PICS_POS3)) - ); - if (v_distance >= PX_LATERAL_COLLISION_SECURITY_DISTANCE) { // TODO Check elevation - // Continue - tc_ac.start; - repeat; - } // else, nothing to do - } - [] tc_ac.timeout { - log("*** " & testcasename() & ": INCONC: CAM messages for EUT ", PX_EUT_DESC[p_eut_id].stationId, " not received ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } - } // End of 'alt' statement - tc_ac.start; - alt { // Check that Lateral Collision Risk was received - [] hmiPort.receive(mw_hmiSignageEventInd_lateralCollisionRisk) { - tc_ac.stop; - log("*** " & testcasename() & ": PASS: The Lateral Collision Risk signage was received on EUT ", PX_EUT_DESC[p_eut_id].stationId, "***"); - 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(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_CAM_CRW_BV_02_eut - - } // End of group g_TC_AUTO_IOT_CAM_CRW_BV_02 - - /** - * @desc Verify complete resolution of duplicate address conflict scenario based on GN messages - *
-     * Pics Selection: 
-     * Config Id: CF-01
-     * Initial conditions:
-     *  with {
-     *      EUT1 and EUT2 being configured with the same GN address
-     *      and EUT1 and EUT2 being off-link
-     *  }
-     * Expected behaviour:
-     *  ensure that {
-     *      when {
-     *          EUT1 and EUT2 become on-link
-     *      }
-     *      then {
-     *          EUT1 changes its GN address
-     *          and EUT2 changes its GN address
-     *      }
-     *      when {
-     *          EUT1 sends CA messages
-     *              containing cam
-     *                  containing camParameters
-     *                  containing basicContainer 
-     *                      containing referencePosition
-     *      }
-     *      then {
-     *          EUT2 indicates EUT1 as neighbour
-     *      }
-     *      when {
-     *          EUT2 sends CA messages 
-     *          containing cam
-     *              containing camParameters
-     *                  containing basicContainer 
-     *                      containing referencePosition
-     *      }
-     *      then {
-     *          EUT1 indicates EUT2 as neighbour
-     *      }
-     *  }
-     * 
- * - * @see Draft ETSI TS yyy xxx-2 V0.0.8 (2017-03) TD_AUTO_IOT_GN_DAD_BV_01 - * @reference ETSI EN 302 636-4-1 [2] Clause 9.2.1.5 - */ - testcase TC_AUTO_IOT_GN_DAD_BV_01() runs on ItsMtc system ItsAutoInteropGeoNetworkingSystem { - - // Local variables - var ItsAutoInteropGeonetworking v_eut1 := null; - var ItsAutoInteropGeonetworking v_eut2 := null; - - // 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_mtcCf02Up(v_eut1, v_eut2); - - // Preamble - - // Start components - v_eut1.start(f_TC_AUTO_IOT_GN_DAD_BV_01_eut(v_eut1, PX_EUT1_ID, PX_EUT2_ID)); - v_eut2.start(f_TC_AUTO_IOT_GN_DAD_BV_01_eut(v_eut2, PX_EUT2_ID, PX_EUT1_ID)); - - // Synchronization - f_serverSyncNClientsAndStop(2, {c_prDone, c_tbDone}); - - // Cleanup - f_mtcCf02Down(v_eut1, v_eut2); - - } // End of TC_AUTO_IOT_GN_DAD_BV_01 - - group g_TC_AUTO_IOT_GN_DAD_BV_01 { - - /** - * @desc Behavior function for EUTs (TC_AUTO_IOT_GN_DAD_BV_01) - */ - function f_TC_AUTO_IOT_GN_DAD_BV_01_eut( - in ItsAutoInteropGeonetworking p_eut, - in integer p_eut_id, - in integer p_eut_id_neighbour - ) runs on ItsAutoInteropGeonetworking { - - // Local variables - var GeoNetworkingInd v_gnInd; - var GN_Address v_gnAddr; - var boolean v_getFirstCam := false; - var HmiNeighborEventInds v_hmiNeighborEventInds; - - // Test component configuration - f_cfPtcUp(p_eut); - - // Preamble - f_prDefault(); - // EUT1 and EUT2 become on-link - ItsAutoInterop_Functions.f_utTriggerEvent(UtAutoInteropTrigger:{utRadioOnOff := true}); - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body - tc_wait.start; - alt { - [v_getFirstCam == false] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacketWithNextHeader_cam( - ?, - ?, - e_btpB, - mw_cam_stationId( - -, - PX_EUT_DESC[p_eut_id].stationId - ))))) -> value v_gnInd { // Receive a CAM message - v_gnAddr := v_gnInd.msgIn.gnPacket.packet.extendedHeader.shbHeader.srcPosVector.gnAddr; - v_getFirstCam := true; - // Re-send CAM message to the other EUTs - eutGeoNetworkingPort.send( - m_forward_geoNetworkingInd( - v_gnInd - )); - repeat; - } - [] geoNetworkingPort.receive( - mw_geoNwInd( - mw_geoNwPdu( - mw_geoNwShbPacketWithNextHeader_cam( - mw_longPosVectorAny( - ? /* FIXME complement( - v_gnAddr - )*/), - ?, - e_btpB, - mw_cam_stationId( - -, - PX_EUT_DESC[p_eut_id].stationId - ))))) -> value v_gnInd { // Receive a CAM message - // Re-send CA message to the other EUTs - eutGeoNetworkingPort.send( - m_forward_geoNetworkingInd( - v_gnInd - )); - tc_wait.stop; - log("*** " & testcasename() & ": INFO: GN duplicated address conflict resolved ***"); - hmiPort.clear; - } - [] tc_wait.timeout { - log("*** " & testcasename() & ": INCONC: GN duplicate address conflict scenario is incomplete ***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout); - } - } // End of 'alt' statement - tc_ac.start; - alt { // Check neighbours - [] hmiPort.receive( - HmiNeighborEventInds:? - ) -> value v_hmiNeighborEventInds { - var boolean v_found := false; - tc_ac.stop; - for (var integer v_i := 0; v_i < lengthof(v_hmiNeighborEventInds); v_i := v_i + 1) { - if ( - (PX_EUT_DESC[p_eut_id_neighbour].mid == v_hmiNeighborEventInds[v_i].mid) and - (PX_EUT_DESC[p_eut_id_neighbour].stationId == v_hmiNeighborEventInds[v_i].stationId) - ) { - v_found := true; - break; // Got it, leave the loop - } // else, continue - } // End of 'for' statement - if (v_found) { - log("*** " & testcasename() & ": PASS: GN duplicate address conflict scenario compeleted for EUT ", PX_EUT_DESC[p_eut_id].stationId, "***"); - f_selfOrClientSyncAndVerdict(c_tbDone, e_success); - } else { - log("*** " & testcasename() & ": FAIL: GN duplicate address conflict scenario is incomplete ***"); - 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(); - f_cfPtcDown(p_eut); - - } // End of f_TC_AUTO_IOT_GN_DAD_BV_01_eut - - } // End of group g_TC_AUTO_IOT_GN_DAD_BV_01 - -} // End of module AtsInterop_TestCases diff --git a/etc/AtsCAM/AtsCAM.cfg b/etc/AtsCAM/AtsCAM.cfg index a5188ce3a812bff439273fbb09fab7457701a3bb..7d79a93d50f279b8821305a02402ded086e3a525 100644 --- a/etc/AtsCAM/AtsCAM.cfg +++ b/etc/AtsCAM/AtsCAM.cfg @@ -26,41 +26,56 @@ LogEventTypes:= Yes [TESTPORT_PARAMETERS] # In this section you can specify parameters that are passed to Test Ports. +# CAM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc +# header_sub_type : sh (single hop) +# DENM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc # BTP Layer # type : btpA|btpB # destination port: dst_port # source port : src_port # device_mode : Set to 1 if the layer shall encapsulate upper layer PDU +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # GN Layer -# ll_address : GeoNetworking address of the TestSystem -# latitude : latitude of the TestSystem -# longitude : longitude of the TestSystem -# distanceA : Distance for the GeoAreaBroadcast, used for CAM/DENM sending (default: 1000m) -# distanceB : Distance for the GeoAreaBroadcast, used for CAM/DENM sending (default: 1000m) -# angle : Anglee for the GeoAreaBroadcast, used for CAM/DENM sending (default: 0m) -# beaconing : Set to 1 if GnLayer shall start beaconing (default: 0) +# ll_address : GeoNetworking address of the Test System +# latitude : latitude of the Test System +# longitude : longitude of the Test System +# beaconing : Set to 1 if GnLayer shall start beaconing # Beaconning timer expiry: expiry (ms) # device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # Ethernet layer -# Source MAC address of the TestSystem : mac_src -# Broadcast address : mac_bc -# Ethernet type for ITS : eth_type +# mac_src :Source MAC address +# mac_bc :Broadcast address +# eth_type : Ethernet type +# Commsignia layer +# mac_src : Device MAC address, used to discard packets +# To indicate no filering, use the value 000000000000 +# mac_bc : Broadcast address +# eth_type : Ethernet type, used to discard packets +# target_host : Device address +# target_port : Device port +# source_port : Test System port +# interface_id: Interface id, used to discard packets +# tx_power : TX power (dB) # UDP layer (IP/UDP based on Pcap) -# dst_ip : destination IPv4 address (aa.bb.cc.dd), the IUT +# dst_ip : destination IPv4 address (aa.bb.cc.dd) # dst_port: destination port -# src_ip : source IPv4 address (aa.bb.cc.dd), the TestSystem +# src_ip : source IPv4 address (aa.bb.cc.dd) # src_port: source port # Pcap layer -# Pcap filter : filter -# mac_src : used to exclude TestSystem sent message from the capture -# Online mode : -# Local NIC : nic -# If set, online mode is used +# mac_src : Source MAC address, used to exclude from capture the acket sent by the Test System +# filter : Pcap filter (compliant with tcpdump syntax) +# Online mode: +# nic: Local NIC +# If set, online mode is used # Offline mode (nic is present but not set): -# File to read : file -# Frame offset : frame_offset -# Time offset : time_offset -# Save sent packet: save_mode=[0|1] +# file : File to read +# frame_offset: Frame offset, used to skip packets with frame number < frame_offset +# time_offset : Time offset, used to skip packets with time offset < time_offset +# save_mode : 1 to save sent packet, 0 otherwise system.camPort.params := "CAM/BTP(type=btpB,dst_port=2001,src_port=0,deviceMode=1)/GN(ll_address=0800275c4959,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,expiry=1000,beaconing=0,deviceMode=1,its_aid=141)/ETH(mac_src=0800275c4959,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=0800275c4959,nic=enp0s8,filter=and ether proto 0x8947)" diff --git a/etc/AtsDENM/AtsDENM.cfg b/etc/AtsDENM/AtsDENM.cfg index bb481bf17672a6a064983556be9721192a4c94e4..ce82b73b9a8ade17fd7cd55ff72c84b40553b045 100644 --- a/etc/AtsDENM/AtsDENM.cfg +++ b/etc/AtsDENM/AtsDENM.cfg @@ -26,39 +26,56 @@ LogEventTypes:= Yes [TESTPORT_PARAMETERS] # In this section you can specify parameters that are passed to Test Ports. +# CAM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc +# header_sub_type : sh (single hop) +# DENM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc # BTP Layer # type : btpA|btpB # destination port: dst_port # source port : src_port +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # GN Layer -# ll_address : GeoNetworking address of the TestSystem -# latitude : latitude of the TestSystem -# longitude : longitude of the TestSystem -# distanceA : Distance for the GeoAreaBroadcast, used for CAM/DENM sending (default: 1000m) -# distanceB : Distance for the GeoAreaBroadcast, used for CAM/DENM sending (default: 1000m) -# angle : Anglee for the GeoAreaBroadcast, used for CAM/DENM sending (default: 0m) -# beaconing : Set to 1 if GnLayer shall start beaconing (default: 0) +# ll_address : GeoNetworking address of the Test System +# latitude : latitude of the Test System +# longitude : longitude of the Test System +# beaconing : Set to 1 if GnLayer shall start beaconing # Beaconning timer expiry: expiry (ms) +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # Ethernet layer -# Source MAC address of the TestSystem : mac_src -# Broadcast address : mac_bc -# Ethernet type for ITS : eth_type +# mac_src :Source MAC address +# mac_bc :Broadcast address +# eth_type : Ethernet type +# Commsignia layer +# mac_src : Device MAC address, used to discard packets +# To indicate no filering, use the value 000000000000 +# mac_bc : Broadcast address +# eth_type : Ethernet type, used to discard packets +# target_host : Device address +# target_port : Device port +# source_port : Test System port +# interface_id: Interface id, used to discard packets +# tx_power : TX power (dB) # UDP layer (IP/UDP based on Pcap) -# dst_ip : destination IPv4 address (aa.bb.cc.dd), the IUT +# dst_ip : destination IPv4 address (aa.bb.cc.dd) # dst_port: destination port -# src_ip : source IPv4 address (aa.bb.cc.dd), the TestSystem +# src_ip : source IPv4 address (aa.bb.cc.dd) # src_port: source port # Pcap layer -# Pcap filter : filter -# mac_src : used to exclude TestSystem sent message from the capture -# Online mode : -# Local NIC : nic -# If set, online mode is used +# mac_src : Source MAC address, used to exclude from capture the acket sent by the Test System +# filter : Pcap filter (compliant with tcpdump syntax) +# Online mode: +# nic: Local NIC +# If set, online mode is used # Offline mode (nic is present but not set): -# File to read : file -# Frame offset : frame_offset -# Time offset : time_offset -# Save sent packet: save_mode=[0|1] +# file : File to read +# frame_offset: Frame offset, used to skip packets with frame number < frame_offset +# time_offset : Time offset, used to skip packets with time offset < time_offset +# save_mode : 1 to save sent packet, 0 otherwise system.denmPort.params := "DENM/BTP(type=btpB,dst_port=2001,src_port=0)/GN(ll_address=0800275c4959,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,expiry=1000,beaconing=0,its_aid=141)/ETH(mac_src=0800275c4959,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=0800275c4959,nic=enp0s8,filter=and ether proto 0x8947)" diff --git a/etc/AtsGeoNetworking/AtsGeoNetworking.cfg b/etc/AtsGeoNetworking/AtsGeoNetworking.cfg index 44aa9e4621d822b6087cbcc8d719f4e833c78f5c..77234444a360edbef4c7a860dd9732009c7d5b7e 100644 --- a/etc/AtsGeoNetworking/AtsGeoNetworking.cfg +++ b/etc/AtsGeoNetworking/AtsGeoNetworking.cfg @@ -26,38 +26,56 @@ LogEventTypes:= Yes [TESTPORT_PARAMETERS] # In this section you can specify parameters that are passed to Test Ports. +# CAM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc +# header_sub_type : sh (single hop) +# DENM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc # BTP Layer # type : btpA|btpB # destination port: dst_port # source port : src_port +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # GN Layer -# ll_address : GeoNetworking address of the TestSystem -# latitude : latitude of the TestSystem -# longitude : longitude of the TestSystem -# distanceA : Distance for the GeoAreaBroadcast, used for CAM/DENM sending (default: 1000m) -# distanceB : Distance for the GeoAreaBroadcast, used for CAM/DENM sending (default: 1000m) -# angle : Anglee for the GeoAreaBroadcast, used for CAM/DENM sending (default: 0m) -# beaconing : Set to 1 if GnLayer shall start beaconing (default: 0) +# ll_address : GeoNetworking address of the Test System +# latitude : latitude of the Test System +# longitude : longitude of the Test System +# beaconing : Set to 1 if GnLayer shall start beaconing # Beaconning timer expiry: expiry (ms) +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # Ethernet layer -# Source MAC address: mac_src -# Broadcast address : mac_bc -# Ethernet type : eth_type +# mac_src :Source MAC address +# mac_bc :Broadcast address +# eth_type : Ethernet type +# Commsignia layer +# mac_src : Device MAC address, used to discard packets +# To indicate no filering, use the value 000000000000 +# mac_bc : Broadcast address +# eth_type : Ethernet type, used to discard packets +# target_host : Device address +# target_port : Device port +# source_port : Test System port +# interface_id: Interface id, used to discard packets +# tx_power : TX power (dB) # UDP layer (IP/UDP based on Pcap) # dst_ip : destination IPv4 address (aa.bb.cc.dd) # dst_port: destination port # src_ip : source IPv4 address (aa.bb.cc.dd) # src_port: source port # Pcap layer -# Pcap filter: filter +# mac_src : Source MAC address, used to exclude from capture the acket sent by the Test System +# filter : Pcap filter (compliant with tcpdump syntax) # Online mode: -# Local NIC: nic -# If set, online mode is used +# nic: Local NIC +# If set, online mode is used # Offline mode (nic is present but not set): -# File to read : file -# Frame offset : frame_offset -# Time offset : time_offset -# Save sent packet: save_mode=[0|1] +# file : File to read +# frame_offset: Frame offset, used to skip packets with frame number < frame_offset +# time_offset : Time offset, used to skip packets with time offset < time_offset +# save_mode : 1 to save sent packet, 0 otherwise # Single GeoNetworking component port system.geoNetworkingPort.params := "GN(ll_address=F8CAB8083918,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/ETH(mac_src=0800275c4959,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=0800275c4959,nic=enp0s8,filter=and ether proto 0x8947)" diff --git a/etc/AtsIVIM/AtsIVIM.cfg b/etc/AtsIVIM/AtsIVIM.cfg index d957260dc89bbddbaa12191500d671fd96013700..0609fde99e3d4940e51577d7c68aa480c9bae325 100644 --- a/etc/AtsIVIM/AtsIVIM.cfg +++ b/etc/AtsIVIM/AtsIVIM.cfg @@ -26,39 +26,56 @@ LogEventTypes:= Yes [TESTPORT_PARAMETERS] # In this section you can specify parameters that are passed to Test Ports. +# CAM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc +# header_sub_type : sh (single hop) +# DENM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc # BTP Layer # type : btpA|btpB # destination port: dst_port # source port : src_port +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # GN Layer -# ll_address : GeoNetworking address of the TestSystem -# latitude : latitude of the TestSystem -# longitude : longitude of the TestSystem -# distanceA : Distance for the GeoAreaBroadcast (default: 1000m) -# distanceB : Distance for the GeoAreaBroadcast sending (default: 1000m) -# angle : Anglee for the GeoAreaBroadcast sending (default: 0m) -# beaconing : Set to 1 if GnLayer shall start beaconing (default: 0) +# ll_address : GeoNetworking address of the Test System +# latitude : latitude of the Test System +# longitude : longitude of the Test System +# beaconing : Set to 1 if GnLayer shall start beaconing # Beaconning timer expiry: expiry (ms) +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # Ethernet layer -# Source MAC address of the TestSystem : mac_src -# Broadcast address : mac_bc -# Ethernet type for ITS : eth_type +# mac_src :Source MAC address +# mac_bc :Broadcast address +# eth_type : Ethernet type +# Commsignia layer +# mac_src : Device MAC address, used to discard packets +# To indicate no filering, use the value 000000000000 +# mac_bc : Broadcast address +# eth_type : Ethernet type, used to discard packets +# target_host : Device address +# target_port : Device port +# source_port : Test System port +# interface_id: Interface id, used to discard packets +# tx_power : TX power (dB) # UDP layer (IP/UDP based on Pcap) -# dst_ip : destination IPv4 address (aa.bb.cc.dd), the IUT +# dst_ip : destination IPv4 address (aa.bb.cc.dd) # dst_port: destination port -# src_ip : source IPv4 address (aa.bb.cc.dd), the TestSystem +# src_ip : source IPv4 address (aa.bb.cc.dd) # src_port: source port # Pcap layer -# Pcap filter : filter -# mac_src : used to exclude TestSystem sent message from the capture -# Online mode : -# Local NIC : nic -# If set, online mode is used +# mac_src : Source MAC address, used to exclude from capture the acket sent by the Test System +# filter : Pcap filter (compliant with tcpdump syntax) +# Online mode: +# nic: Local NIC +# If set, online mode is used # Offline mode (nic is present but not set): -# File to read : file -# Frame offset : frame_offset -# Time offset : time_offset -# Save sent packet: save_mode=[0|1] +# file : File to read +# frame_offset: Frame offset, used to skip packets with frame number < frame_offset +# time_offset : Time offset, used to skip packets with time offset < time_offset +# save_mode : 1 to save sent packet, 0 otherwise system.ivimPort.params := "IVIM/BTP(type=btpB,dst_port=2001,src_port=0)/GN(ll_address=0800275c4959,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,expiry=1000,beaconing=0,its_aid=141)/ETH(mac_src=0800275c4959,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=0800275c4959,nic=enp0s8,filter=and ether proto 0x8947)" diff --git a/etc/AtsMapemSpatem/AtsMapemSpatem.cfg b/etc/AtsMapemSpatem/AtsMapemSpatem.cfg index 0b2e90484996b72e971d223fabc1d45b68732382..37b4db8a8f3c908d00d770264d4f4b4afcb997ba 100644 --- a/etc/AtsMapemSpatem/AtsMapemSpatem.cfg +++ b/etc/AtsMapemSpatem/AtsMapemSpatem.cfg @@ -26,39 +26,56 @@ LogEventTypes:= Yes [TESTPORT_PARAMETERS] # In this section you can specify parameters that are passed to Test Ports. +# CAM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc +# header_sub_type : sh (single hop) +# DENM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc # BTP Layer # type : btpA|btpB # destination port: dst_port # source port : src_port +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # GN Layer -# ll_address : GeoNetworking address of the TestSystem -# latitude : latitude of the TestSystem -# longitude : longitude of the TestSystem -# distanceA : Distance for the GeoAreaBroadcast (default: 1000m) -# distanceB : Distance for the GeoAreaBroadcast (default: 1000m) -# angle : Anglee for the GeoAreaBroadcast sending (default: 0m) -# beaconing : Set to 1 if GnLayer shall start beaconing (default: 0) +# ll_address : GeoNetworking address of the Test System +# latitude : latitude of the Test System +# longitude : longitude of the Test System +# beaconing : Set to 1 if GnLayer shall start beaconing # Beaconning timer expiry: expiry (ms) +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # Ethernet layer -# Source MAC address of the TestSystem : mac_src -# Broadcast address : mac_bc -# Ethernet type for ITS : eth_type +# mac_src :Source MAC address +# mac_bc :Broadcast address +# eth_type : Ethernet type +# Commsignia layer +# mac_src : Device MAC address, used to discard packets +# To indicate no filering, use the value 000000000000 +# mac_bc : Broadcast address +# eth_type : Ethernet type, used to discard packets +# target_host : Device address +# target_port : Device port +# source_port : Test System port +# interface_id: Interface id, used to discard packets +# tx_power : TX power (dB) # UDP layer (IP/UDP based on Pcap) -# dst_ip : destination IPv4 address (aa.bb.cc.dd), the IUT +# dst_ip : destination IPv4 address (aa.bb.cc.dd) # dst_port: destination port -# src_ip : source IPv4 address (aa.bb.cc.dd), the TestSystem +# src_ip : source IPv4 address (aa.bb.cc.dd) # src_port: source port # Pcap layer -# Pcap filter : filter -# mac_src : used to exclude TestSystem sent message from the capture -# Online mode : -# Local NIC : nic -# If set, online mode is used +# mac_src : Source MAC address, used to exclude from capture the acket sent by the Test System +# filter : Pcap filter (compliant with tcpdump syntax) +# Online mode: +# nic: Local NIC +# If set, online mode is used # Offline mode (nic is present but not set): -# File to read : file -# Frame offset : frame_offset -# Time offset : time_offset -# Save sent packet: save_mode=[0|1] +# file : File to read +# frame_offset: Frame offset, used to skip packets with frame number < frame_offset +# time_offset : Time offset, used to skip packets with time offset < time_offset +# save_mode : 1 to save sent packet, 0 otherwise system.mapemSpatemPort.params := "MapemSpatem/BTP(type=btpB,dst_port=2001,src_port=0)/GN(ll_address=0800275c4959,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,expiry=1000,beaconing=0,its_aid=141)/ETH(mac_src=0800275c4959,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=0800275c4959,nic=enp0s8,filter=and ether proto 0x8947)" diff --git a/etc/AtsRSUsSimulator/AtsRSUSimulator.cfg b/etc/AtsRSUsSimulator/AtsRSUSimulator.cfg index d5cc4d74e521570b29e355686d5c962fae214231..ac8eece8afe593bf87ff40051d1d9c824e7b1195 100644 --- a/etc/AtsRSUsSimulator/AtsRSUSimulator.cfg +++ b/etc/AtsRSUsSimulator/AtsRSUSimulator.cfg @@ -48,40 +48,56 @@ LogEventTypes:= Yes [TESTPORT_PARAMETERS] # In this section you can specify parameters that are passed to Test Ports. +# CAM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc +# header_sub_type : sh (single hop) +# DENM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc # BTP Layer # type : btpA|btpB # destination port: dst_port # source port : src_port # device_mode : Set to 1 if the layer shall encapsulate upper layer PDU +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # GN Layer -# ll_address : GeoNetworking address of the TestSystem -# latitude : latitude of the TestSystem -# longitude : longitude of the TestSystem -# distanceA : Distance for the GeoAreaBroadcast, used for CAM/DENM sending (default: 1000m) -# distanceB : Distance for the GeoAreaBroadcast, used for CAM/DENM sending (default: 1000m) -# angle : Anglee for the GeoAreaBroadcast, used for CAM/DENM sending (default: 0m) -# beaconing : Set to 1 if GnLayer shall start beaconing (default: 0) +# ll_address : GeoNetworking address of the Test System +# latitude : latitude of the Test System +# longitude : longitude of the Test System +# beaconing : Set to 1 if GnLayer shall start beaconing # Beaconning timer expiry: expiry (ms) # device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # Ethernet layer -# Source MAC address: mac_src -# Broadcast address : mac_bc -# Ethernet type : eth_type +# mac_src :Source MAC address +# mac_bc :Broadcast address +# eth_type : Ethernet type +# Commsignia layer +# mac_src : Device MAC address, used to discard packets +# To indicate no filering, use the value 000000000000 +# mac_bc : Broadcast address +# eth_type : Ethernet type, used to discard packets +# target_host : Device address +# target_port : Device port +# source_port : Test System port +# interface_id: Interface id, used to discard packets +# tx_power : TX power (dB) # UDP layer (IP/UDP based on Pcap) # dst_ip : destination IPv4 address (aa.bb.cc.dd) # dst_port: destination port # src_ip : source IPv4 address (aa.bb.cc.dd) # src_port: source port # Pcap layer -# Pcap filter: filter +# mac_src : Source MAC address, used to exclude from capture the acket sent by the Test System +# filter : Pcap filter (compliant with tcpdump syntax) # Online mode: -# Local NIC: nic -# If set, online mode is used +# nic: Local NIC +# If set, online mode is used # Offline mode (nic is present but not set): -# File to read : file -# Frame offset : frame_offset -# Time offset : time_offset -# Save sent packet: save_mode=[0|1] +# file : File to read +# frame_offset: Frame offset, used to skip packets with frame number < frame_offset +# time_offset : Time offset, used to skip packets with time offset < time_offset +# save_mode : 1 to save sent packet, 0 otherwise # Single GeoNetworking component port system.geoNetworkingPort.params := "GN(ll_address=F8CAB8083918,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/ETH(mac_src=0800275c4959,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=0800275c4959,nic=enp0s8,filter=and ether proto 0x8947)" diff --git a/etc/AtsSremSsem/AtsSremSsem.cfg b/etc/AtsSremSsem/AtsSremSsem.cfg index 77ed5d5519c4d29cf77fb6604184c6a9a1ccbc01..23324911ff156a5d5fb93f21974265a8e1af3503 100644 --- a/etc/AtsSremSsem/AtsSremSsem.cfg +++ b/etc/AtsSremSsem/AtsSremSsem.cfg @@ -26,39 +26,56 @@ LogEventTypes:= Yes [TESTPORT_PARAMETERS] # In this section you can specify parameters that are passed to Test Ports. +# CAM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc +# header_sub_type : sh (single hop) +# DENM Layer +# next_header : btpA|btpB (overwrite BTP.type) +# header_type : tsb|gbc # BTP Layer # type : btpA|btpB # destination port: dst_port # source port : src_port +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # GN Layer -# ll_address : GeoNetworking address of the TestSystem -# latitude : latitude of the TestSystem -# longitude : longitude of the TestSystem -# distanceA : Distance for the GeoAreaBroadcast (default: 1000m) -# distanceB : Distance for the GeoAreaBroadcast (default: 1000m) -# angle : Anglee for the GeoAreaBroadcast sending (default: 0m) -# beaconing : Set to 1 if GnLayer shall start beaconing (default: 0) +# ll_address : GeoNetworking address of the Test System +# latitude : latitude of the Test System +# longitude : longitude of the Test System +# beaconing : Set to 1 if GnLayer shall start beaconing # Beaconning timer expiry: expiry (ms) +# device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # Ethernet layer -# Source MAC address of the TestSystem : mac_src -# Broadcast address : mac_bc -# Ethernet type for ITS : eth_type +# mac_src :Source MAC address +# mac_bc :Broadcast address +# eth_type : Ethernet type +# Commsignia layer +# mac_src : Device MAC address, used to discard packets +# To indicate no filering, use the value 000000000000 +# mac_bc : Broadcast address +# eth_type : Ethernet type, used to discard packets +# target_host : Device address +# target_port : Device port +# source_port : Test System port +# interface_id: Interface id, used to discard packets +# tx_power : TX power (dB) # UDP layer (IP/UDP based on Pcap) -# dst_ip : destination IPv4 address (aa.bb.cc.dd), the IUT +# dst_ip : destination IPv4 address (aa.bb.cc.dd) # dst_port: destination port -# src_ip : source IPv4 address (aa.bb.cc.dd), the TestSystem +# src_ip : source IPv4 address (aa.bb.cc.dd) # src_port: source port # Pcap layer -# Pcap filter : filter -# mac_src : used to exclude TestSystem sent message from the capture -# Online mode : -# Local NIC : nic -# If set, online mode is used +# mac_src : Source MAC address, used to exclude from capture the acket sent by the Test System +# filter : Pcap filter (compliant with tcpdump syntax) +# Online mode: +# nic: Local NIC +# If set, online mode is used # Offline mode (nic is present but not set): -# File to read : file -# Frame offset : frame_offset -# Time offset : time_offset -# Save sent packet: save_mode=[0|1] +# file : File to read +# frame_offset: Frame offset, used to skip packets with frame number < frame_offset +# time_offset : Time offset, used to skip packets with time offset < time_offset +# save_mode : 1 to save sent packet, 0 otherwise system.sremSsemPort.params := "SremSsem/BTP(type=btpB,dst_port=2001,src_port=0)/GN(ll_address=0800275c4959,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,expiry=1000,beaconing=0,its_aid=141)/ETH(mac_src=0800275c4959,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=0800275c4959,nic=enp0s8,filter=and ether proto 0x8947)" diff --git a/etc/TestCodec/TestCodec.cfg b/etc/TestCodec/TestCodec.cfg index f81fae9a3880d338a52de5612b2d33a4f34bd1d8..bbed43b1d16c0cc52063c6ee8f98d43e0d23dd0f 100644 --- a/etc/TestCodec/TestCodec.cfg +++ b/etc/TestCodec/TestCodec.cfg @@ -11,8 +11,10 @@ LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := { # IUT Station ID. See testdata set and plugtest1026-log-locD 002.pcap LibItsCommon_Pixits.PX_IUT_STATION_ID := 10143; -LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_any -#LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB +# GeoNetwoking only, no facility layer +#LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_any +# With facility layer +LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB [LOGGING] # In this section you can specify the name of the log file and the classes of events @@ -44,31 +46,42 @@ LogEventTypes:= Yes # device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # GN Layer -# ll_address : GeoNetworking address of the TestSystem -# latitude : latitude of the TestSystem -# longitude : longitude of the TestSystem +# ll_address : GeoNetworking address of the Test System +# latitude : latitude of the Test System +# longitude : longitude of the Test System # beaconing : Set to 1 if GnLayer shall start beaconing # Beaconning timer expiry: expiry (ms) # device_mode : Set to 1 if the layer shall encapsulate upper layer PDU # Ethernet layer -# Source MAC address: mac_src -# Broadcast address : mac_bc -# Ethernet type : eth_type +# mac_src :Source MAC address +# mac_bc :Broadcast address +# eth_type : Ethernet type +# Commsignia layer +# mac_src : Device MAC address, used to discard packets +# To indicate no filering, use the value 000000000000 +# mac_bc : Broadcast address +# eth_type : Ethernet type, used to discard packets +# target_host : Device address +# target_port : Device port +# source_port : Test System port +# interface_id: Interface id, used to discard packets +# tx_power : TX power (dB) # UDP layer (IP/UDP based on Pcap) # dst_ip : destination IPv4 address (aa.bb.cc.dd) # dst_port: destination port # src_ip : source IPv4 address (aa.bb.cc.dd) # src_port: source port # Pcap layer -# Pcap filter: filter +# mac_src : Source MAC address, used to exclude from capture the acket sent by the Test System +# filter : Pcap filter (compliant with tcpdump syntax) # Online mode: -# Local NIC: nic -# If set, online mode is used +# nic: Local NIC +# If set, online mode is used # Offline mode (nic is present but not set): -# File to read : file -# Frame offset : frame_offset -# Time offset : time_offset -# Save sent packet: save_mode=[0|1] +# file : File to read +# frame_offset: Frame offset, used to skip packets with frame number < frame_offset +# time_offset : Time offset, used to skip packets with time offset < time_offset +# save_mode : 1 to save sent packet, 0 otherwise # Single GeoNetworking component port # GN port using NIC @@ -76,7 +89,7 @@ LogEventTypes:= Yes # GN port using PCAP file #system.geoNetworkingPort.params := "GN(ll_address=F8CAB8083918,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/ETH(mac_src=F8CAB8083918,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=BABEBABE0002,nic=,file=../../../testdata/test_61_cam.pcap,filter=and ether proto 0x8947,frame_offset=0,save_mode=0)" # Commsignia GN port -system.geoNetworkingPort.params := "GN(ll_address=F8CAB8083918,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/COMMSIGNIA(mac_src=70b3d5f2a1e3,bc=FFFFFFFFFFFF,eth_type=8947,target_host=10.200.1.101,target_port=7942,sourcePort=7943,its_aid=141,interface_id=2,tx_power=-32)/UDP(dst_ip=192.168.56.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=026f8338c1e5,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=0800275c4959,file=../../../testdata/commsignia_1_denm.pcap,filter=and (udp port 30000 or udp port 7943))" +system.geoNetworkingPort.params := "GN(ll_address=F8CAB8083918,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/COMMSIGNIA(mac_src=70b3d5f2a1e3,bc=FFFFFFFFFFFF,eth_type=8947,target_host=10.200.1.101,target_port=7942,sourcePort=7943,its_aid=141,interface_id=2,tx_power=-32)/UDP(dst_ip=192.168.56.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=026f8338c1e5,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=0800275c4959,file=../../../testdata/commsignia_61_cam.pcap,filter=and (udp port 30000 or udp port 7943))" # Multiple GeoNetworking component port Comp1.geoNetworkingPort.params := "GN(ll_address=F8CAB8083919,latitude=43551050,longitude=10298730,beaconing=1,expiry=1000,its_aid=141)/ETH(mac_src=F8CAB8083918,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=F8CAB8083919,nic=,file=../../../testdata/test_1_cam.pcap,filter=and ether proto 0x8947,frame_offset=0,save_mode=0)" Comp2.geoNetworkingPort.params := "GN(ll_address=F8CAB808391A,latitude=43551050,longitude=10298730,beaconing=1,expiry=1000,its_aid=141)/ETH(mac_src=F8CAB8083918,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=F8CAB808391A,nic=,file=../../../testdata/test_1_cam.pcap,filter=and ether proto 0x8947,frame_offset=0,save_mode=0)" @@ -129,7 +142,7 @@ system.utPort.params := "UT_GN/UDP(dst_ip=192.168.56.1,dst_port=12346,src_ip=192 #TestCodec_GeoNetworking.tc_GeoNet_Port_1 # Use simulator of file to run this test # Used to test device_mode=0,beaconing=1,beacon codec # No startPassBeaconing -#TestCodec_GeoNetworking.tc_GeoNet_Port_2 # Use simulator of file to run this test +TestCodec_GeoNetworking.tc_GeoNet_Port_2 # Use simulator of file to run this test # Used to test device_mode=0,beaconing=1,beacon codec # With startPassBeaconing #TestCodec_GeoNetworking.tc_GeoNet_MultiPort # Use simulator or file to run this test @@ -256,7 +269,8 @@ system.utPort.params := "UT_GN/UDP(dst_ip=192.168.56.1,dst_port=12346,src_ip=192 #TestCodec_SecuredMessages.tc_secured_message_signed_1 #TestCodec_SecuredMessages.tc_secured_message_signed_2 # Chain of certificates -TestCodec_ChainOfCertificates.tc_full_check_certificate_1 +#TestCodec_ChainOfCertificates.tc_full_check_certificate_1 +#TestCodec_ChainOfCertificates.tc_full_check_certificate_2 [MAIN_CONTROLLER] # The options herein control the behavior of MC. diff --git a/testdata/TC_AUTO_IOT_DENM_RWW_BV_01.pcap b/testdata/TC_AUTO_IOT_DENM_RWW_BV_01.pcap new file mode 100644 index 0000000000000000000000000000000000000000..99621a19a54d7a49af286e4ad76f0c4166e19ab3 Binary files /dev/null and b/testdata/TC_AUTO_IOT_DENM_RWW_BV_01.pcap differ diff --git a/testdata/commsignia_1_beacon.pcap b/testdata/commsignia_1_beacon.pcap new file mode 100644 index 0000000000000000000000000000000000000000..568aff48dd88b0a228f3eb964d9fb45df70db11b Binary files /dev/null and b/testdata/commsignia_1_beacon.pcap differ diff --git a/testdata/commsignia_1_cam.pcap b/testdata/commsignia_1_cam.pcap new file mode 100644 index 0000000000000000000000000000000000000000..e91121652dc3cb01d679a5602dd2ff820ff0eee1 Binary files /dev/null and b/testdata/commsignia_1_cam.pcap differ diff --git a/testdata/commsignia_61_beacon.pcap b/testdata/commsignia_61_beacon.pcap new file mode 100644 index 0000000000000000000000000000000000000000..e826005dab958801aa90a9884e7a08ca1fc9f57d Binary files /dev/null and b/testdata/commsignia_61_beacon.pcap differ diff --git a/testdata/commsignia_61_cam.pcap b/testdata/commsignia_61_cam.pcap new file mode 100644 index 0000000000000000000000000000000000000000..5c20ad22e7683ff9927ab87dafb1c48b0f9be314 Binary files /dev/null and b/testdata/commsignia_61_cam.pcap differ diff --git a/ttcn/AtsAutoInterop/ItsAutoInterop_Functions.ttcn b/ttcn/AtsAutoInterop/ItsAutoInterop_Functions.ttcn index b0076b6092096724012e732e7b8363a1a5bb5a41..0cd15608db24dacdcbbcf168476df7d5555e3bb0 100644 --- a/ttcn/AtsAutoInterop/ItsAutoInterop_Functions.ttcn +++ b/ttcn/AtsAutoInterop/ItsAutoInterop_Functions.ttcn @@ -30,6 +30,7 @@ module ItsAutoInterop_Functions { import from ItsAutoInterop_TypesAndValues all; import from ItsAutoInterop_Templates all; import from ItsAutoInterop_TestSystem all; + import from ItsAutoInterop_Pixits all; group utFunctions { @@ -119,19 +120,21 @@ module ItsAutoInterop_Functions { ) runs on ItsAutoInteropGeonetworking /* TITAN TODO: mtc ItsMtc system ItsAutoInteropGeoNetworkingSystem */ { // EUT - //map(p_eut:acPort, system:acPort); Not used - //map(p_eut:utPort, system:utPort); Not used - map(p_eut:hmiPort, system:hmiPort); + if (PX_CAPTURE_MODE == "on-link") { + map(p_eut:acPort, system:acPort); + map(p_eut:utPort, system:utPort); + map(p_eut:hmiPort, system:hmiPort); + } map(p_eut:geoNetworkingPort, system:geoNetworkingPort); connect(p_eut:syncPort, self:syncPort); - //activate(a_cfPtcDown()); // FIXME To be done + //activate(a_cfPtcDown()); // FIXME To be done //Initialze the IUT LibItsGeoNetworking_Functions.f_initialiseSecuredMode(); // MTC intializes IUT - f_initialState(p_scenario); + ItsAutoInterop_Functions.f_initialState(p_scenario); // TODO Create an AtsAtoInterop f_initialState function } // End of function f_cfPtcUp @@ -157,8 +160,10 @@ module ItsAutoInterop_Functions { p_eut4 := ItsAutoInteropGeonetworking.create(c_compNodeE); // Map & Connect - map(self:acPort, system:acPort); - map(self:utPort, system:utPort); + if (PX_CAPTURE_MODE == "on-link") { + map(self:acPort, system:acPort); + map(self:utPort, system:utPort); + } connect(self:syncPort, mtc:syncPort); // EUT1/EUT2/EUT3/EUT4 @@ -188,8 +193,10 @@ module ItsAutoInterop_Functions { p_eut2 := ItsAutoInteropGeonetworking.create(c_compNodeC); // Map & Connect - map(self:acPort, system:acPort); - map(self:utPort, system:utPort); + if (PX_CAPTURE_MODE == "on-link") { + map(self:acPort, system:acPort); + map(self:utPort, system:utPort); + } connect(self:syncPort, mtc:syncPort); // EUT1/EUT2 @@ -218,8 +225,10 @@ module ItsAutoInterop_Functions { p_eut3 := ItsAutoInteropGeonetworking.create(c_compNodeD); // Map & Connect - map(self:acPort, system:acPort); - map(self:utPort, system:utPort); + if (PX_CAPTURE_MODE == "on-link") { + map(self:acPort, system:acPort); + map(self:utPort, system:utPort); + } connect(self:syncPort, mtc:syncPort); // EUT1/EUT2/EUT3 @@ -231,6 +240,31 @@ module ItsAutoInterop_Functions { } // End of function f_mtcCf03Up + /** + * @desc Brings the IUT into an initial state. + * @remark Component variable vc_hashedId8ToBeUsed shall be set with the IUT certificate to be used + */ + function f_initialState(Scenario p_scenario := e_staticPosition) runs on ItsBaseGeoNetworking { + + if (PICS_GN_SECURITY) { + var Oct8 v_hashedId8ToBeUsed := f_setupIutCertificate(vc_hashedId8ToBeUsed); + if (oct2int(v_hashedId8ToBeUsed) == 0) { + v_hashedId8ToBeUsed := 'FFFFFFFFFFFFFFFF'O; // Reset to unknown value, the IUT will use its own certificates + } + if (PX_CAPTURE_MODE == "on-link") { + f_utInitializeIut(m_secGnInitialize(v_hashedId8ToBeUsed)); + } + } // else, default behavior + else { + if (PX_CAPTURE_MODE == "on-link") { + f_utInitializeIut(m_gnInitialize); + } + } + + f_acLoadScenario(p_scenario); + f_acStartScenario(); + } + /** * @desc The default preamble. @@ -238,8 +272,10 @@ module ItsAutoInterop_Functions { function f_prDefault() runs on ItsAutoInteropGeonetworking { activate(ItsAutoInterop_Functions.a_default()); activate(LibItsGeoNetworking_Functions.a_default()); - activate(LibItsGeoNetworking_Functions.a_utDefault()); - activate(a_hmiDefault()); + if (PX_CAPTURE_MODE == "on-link") { + activate(LibItsGeoNetworking_Functions.a_utDefault()); + activate(a_hmiDefault()); + } } } // End of group preambles @@ -260,9 +296,11 @@ module ItsAutoInterop_Functions { deactivate; // EUT - unmap(p_eut:acPort, system:acPort); - unmap(p_eut:utPort, system:utPort); - unmap(p_eut:hmiPort, system:hmiPort); + if (PX_CAPTURE_MODE == "on-link") { + unmap(p_eut:acPort, system:acPort); + unmap(p_eut:utPort, system:utPort); + unmap(p_eut:hmiPort, system:hmiPort); + } unmap(p_eut:geoNetworkingPort, system:geoNetworkingPort); disconnect(p_eut:syncPort, self:syncPort); @@ -292,8 +330,10 @@ module ItsAutoInterop_Functions { deactivate; // Unmap & disconnect - unmap(self:acPort, system:acPort); - unmap(self:utPort, system:utPort); + if (PX_CAPTURE_MODE == "on-link") { + unmap(self:acPort, system:acPort); + unmap(self:utPort, system:utPort); + } disconnect(self:syncPort, mtc:syncPort); // EUT1/EUT2/EUT3/EUT4 @@ -323,10 +363,14 @@ module ItsAutoInterop_Functions { deactivate; // Unmap & disconnect - unmap(self:acPort, system:acPort); - unmap(self:utPort, system:utPort); + if (PX_CAPTURE_MODE == "on-link") { + unmap(self:acPort, system:acPort); + unmap(self:utPort, system:utPort); + } disconnect(self:syncPort, mtc:syncPort); + // EUT1/EUT2 + disconnect(p_eut1:eutGeoNetworkingPort, p_eut2:eutGeoNetworkingPort); } // End of function f_mtcCf02Down /** @@ -336,9 +380,9 @@ module ItsAutoInterop_Functions { * @param p_eut3 The component reference for EUT3 */ function f_mtcCf03Down( - inout ItsAutoInteropGeonetworking p_eut1, - inout ItsAutoInteropGeonetworking p_eut2, - inout ItsAutoInteropGeonetworking p_eut3 + inout ItsAutoInteropGeonetworking p_eut1, + inout ItsAutoInteropGeonetworking p_eut2, + inout ItsAutoInteropGeonetworking p_eut3 ) runs on ItsMtc /* TITAN TODO: mtc ItsMtc system ItsAutoInteropGeoNetworkingSystem */ { // Wait components done @@ -349,8 +393,10 @@ module ItsAutoInterop_Functions { deactivate; // Unmap & disconnect - unmap(self:acPort, system:acPort); - unmap(self:utPort, system:utPort); + if (PX_CAPTURE_MODE == "on-link") { + unmap(self:acPort, system:acPort); + unmap(self:utPort, system:utPort); + } disconnect(self:syncPort, mtc:syncPort); // EUT1/EUT2/EUT3 @@ -403,11 +449,13 @@ module ItsAutoInterop_Functions { mw_geoNwInd( ? )) -> value v_gnInd { // Unexpected GeoNetworking message ==> require refine filtering above + log("*** a_default: ERROR: Received a GN message", v_gnInd, " ***"); + f_selfOrClientSyncAndVerdict("error", e_error); // Re-send DEN message to the other EUTs - eutGeoNetworkingPort.send( - m_forward_geoNetworkingInd( - v_gnInd - )); +// eutGeoNetworkingPort.send( +// m_forward_geoNetworkingInd( +// v_gnInd +// )); } [vc_gnDefaultActive] eutGeoNetworkingPort.receive { // Unexpected EutGeoNetworking message ==> require refine filtering above log("*** a_default: ERROR: Received an unexpected message ***"); diff --git a/ttcn/AtsAutoInterop/ItsAutoInterop_Pics.ttcn b/ttcn/AtsAutoInterop/ItsAutoInterop_Pics.ttcn index 4e0601e015ed290ccfe67c8147e96d63e1534c08..5ec4d9af1de807f9c4aca69f4d7129a6504c0e7d 100644 --- a/ttcn/AtsAutoInterop/ItsAutoInterop_Pics.ttcn +++ b/ttcn/AtsAutoInterop/ItsAutoInterop_Pics.ttcn @@ -50,6 +50,11 @@ module ItsAutoInterop_Pics { */ modulepar UInt32 PICS_DENM_ITS_AID := 37; + modulepar ThreeDLocation PICS_Z1_D1_EP := { + latitude := 435525352, // Z1-D1-EP/latitude + longitude := 103003415 // Z1-D1-EP/longitude + }; // End of c_PICS_Z1_D1_EP + /** * @desc Absolute coordinate for position 0 * @see TODO diff --git a/ttcn/AtsAutoInterop/ItsAutoInterop_Pixits.ttcn b/ttcn/AtsAutoInterop/ItsAutoInterop_Pixits.ttcn index efafa1118317a5a6a8d272b07a805ec887c4615f..09fc98f5fd03d4b2b3dff1d679ddf76e1175934b 100644 --- a/ttcn/AtsAutoInterop/ItsAutoInterop_Pixits.ttcn +++ b/ttcn/AtsAutoInterop/ItsAutoInterop_Pixits.ttcn @@ -10,7 +10,7 @@ module ItsAutoInterop_Pixits { * @desc * Possible values: on-link or off-link */ - modulepar charstring PX_CAPTURE_MODE := "on-link"; + modulepar charstring PX_CAPTURE_MODE := "on-link"; // TODO Change it into boolean /** * @desc The PCAP file name containing the ITS G5 captures diff --git a/ttcn/AtsAutoInterop/ItsAutoInterop_Templates.ttcn b/ttcn/AtsAutoInterop/ItsAutoInterop_Templates.ttcn index a8034385e383b80b50e6128c3d1a4f94c47ed75b..60058366194e09be36f7a360a8f2d9d328298cb2 100644 --- a/ttcn/AtsAutoInterop/ItsAutoInterop_Templates.ttcn +++ b/ttcn/AtsAutoInterop/ItsAutoInterop_Templates.ttcn @@ -230,12 +230,30 @@ module ItsAutoInterop_Templates { template TransmissionInterval p_transmissionInterval := *, template Termination p_termination := *, template (present) RelevanceDistance p_relevanceDistance := ?, - template (present) RelevanceTrafficDirection p_relevanceTrafficDirection := ? + template (present) RelevanceTrafficDirection p_relevanceTrafficDirection := ?, + template (present) ReferencePosition p_eventPosition := ? ) modifies mw_denmMgmtCon := { + eventPosition := p_eventPosition, relevanceDistance := p_relevanceDistance, relevanceTrafficDirection := p_relevanceTrafficDirection } // End of tamplate mw_denmMgmtCon_with_relevances + /** + * @desc Receive template for the test system position + * @param p_longitude The longitude (Default: Test system's longitude) + * @param p_latitude The latitude (Default: Test system's latitude) + * @see m_posConfidenceEllipse + * @see m_elevation + */ + template (present) ReferencePosition mw_referencePosition( + template (present) ThreeDLocation p_location := ? + ) := { + latitude := p_location.latitude, + longitude := p_location.longitude, + positionConfidenceEllipse := ?, + altitude := ? // FIXME Create a convertion function SecElevation to intteger for p_location.elevation + } // End of tamplate mw_referencePosition + } // End of group denmTemplates group hmiPrimitiveTemplates { diff --git a/ttcn/AtsAutoInterop/ItsAutoInterop_TestCases.ttcn b/ttcn/AtsAutoInterop/ItsAutoInterop_TestCases.ttcn index 7ca3ea8fcf0a275fe3f3e5c5957107d688792068..40e407ddbc446aa72c2e0c4563cab1c19a6689ed 100644 --- a/ttcn/AtsAutoInterop/ItsAutoInterop_TestCases.ttcn +++ b/ttcn/AtsAutoInterop/ItsAutoInterop_TestCases.ttcn @@ -1420,10 +1420,7 @@ module ItsAutoInterop_TestCases { // Preamble f_prDefault(); - // Nothing to do - f_selfOrClientSyncAndVerdict(c_prDone, e_success); - - // Test Body + // Wait for DENM1 tc_ac.start; alt { [] geoNetworkingPort.receive( @@ -1444,7 +1441,8 @@ module ItsAutoInterop_TestCases { -, -, -, - - + -, + mw_referencePosition(PICS_Z1_D1_EP) ), mw_situation( LibItsCommon_ASN1_NamedNumbers.CauseCodeType_roadworks_, @@ -1454,7 +1452,44 @@ module ItsAutoInterop_TestCases { // Re-send DEN message to the other EUTs eutGeoNetworkingPort.send( m_forward_geoNetworkingInd( - v_gnInd + v_gnInd + )); + tc_ac.start; + repeat; + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": PASS: Test done ***"); + f_selfOrClientSyncAndVerdict(c_tbDone, e_success); + } + } // End of 'alt' statement + f_selfOrClientSyncAndVerdict(c_prDone, e_success); + + // Test Body + tc_ac.start; + alt { + [] geoNetworkingPort.receive( + mw_geoNwInd( + mw_geoNwPdu( + mw_geoNwTsbPacketWithNextHeader_denm( + ?, + ?, + e_btpB, + mw_denm_stationId( + PX_EUT_DESC[p_eut_id].stationId, + mw_denm( + mw_denmMgmtCon_with_relevances( + ?, + LibItsCommon_ASN1_NamedNumbers.StationType_roadSideUnit_ + ), + mw_situation( + LibItsCommon_ASN1_NamedNumbers.CauseCodeType_roadworks_, + ? + ))))))) -> value v_gnInd { // Receive a DEN message + tc_ac.stop; + // Re-send DEN message to the other EUTs + eutGeoNetworkingPort.send( + m_forward_geoNetworkingInd( + v_gnInd )); tc_ac.start; repeat; @@ -2399,9 +2434,11 @@ module ItsAutoInterop_TestCases { // Test Body f_selfOrClientSyncAndVerdict(c_initDone, e_success); // EUT2 and EUT4 become on-link - ItsAutoInterop_Functions.f_utTriggerEvent(UtAutoInteropTrigger:{utRadioOnOff := true}); + if (PX_CAPTURE_MODE == "on-link") { + ItsAutoInterop_Functions.f_utTriggerEvent(UtAutoInteropTrigger:{utRadioOnOff := true}); + } tc_ac.start; - alt { + alt { [] eutGeoNetworkingPort.receive( mw_eutGeoNwInd_withLinkLayerDestination( mw_geoNwPdu( @@ -3100,7 +3137,9 @@ module ItsAutoInterop_TestCases { // Preamble f_prDefault(); // EUT1 and EUT2 become on-link - ItsAutoInterop_Functions.f_utTriggerEvent(UtAutoInteropTrigger:{utRadioOnOff := true}); + if (PX_CAPTURE_MODE == "on-link") { + ItsAutoInterop_Functions.f_utTriggerEvent(UtAutoInteropTrigger:{utRadioOnOff := true}); + } f_selfOrClientSyncAndVerdict(c_prDone, e_success); // Test Body diff --git a/ttcn/TestCodec/TestCodec_Certificates.ttcn b/ttcn/TestCodec/TestCodec_Certificates.ttcn index dc1715882b7b9ffbdc31725afde19da38e2ad98d..eea610ffe4228ca12cf1ba1cd8f7438da9716738 100644 --- a/ttcn/TestCodec/TestCodec_Certificates.ttcn +++ b/ttcn/TestCodec/TestCodec_Certificates.ttcn @@ -88,13 +88,13 @@ module TestCodec_Certificates { // Sign the certificate using ECDSA/SHA-256 (NIST p-256) v_sig := f_signWithEcdsaNistp256WithSha256(bit2oct(v_encMsg), v_private_key); v_cert.signature_ := m_signature_ecdsaNistP256( - m_ecdsaNistP256Signature( - m_eccP256CurvePoint_uncompressed( - v_publicKeyX, - v_publicKeyY - ), - v_sig - ) + m_ecdsaP256Signature( + m_eccP256CurvePoint_uncompressed( + v_publicKeyX, + v_publicKeyY + ), + v_sig + ) ); // Final certificate v_encMsg := encvalue(v_cert); @@ -173,13 +173,13 @@ module TestCodec_Certificates { // Sign the certificate using ECDSA/SHA-256 (NIST p-256) v_sig := f_signWithEcdsaBrainpoolp256WithSha256(bit2oct(v_encMsg), v_private_key); v_cert.signature_ := m_signature_ecdsaBrainpoolP256r1( - m_ecdsaNistP256Signature( - m_eccP256CurvePoint_uncompressed( - v_publicKeyX, - v_publicKeyY - ), - v_sig - ) + m_ecdsaP256Signature( + m_eccP256CurvePoint_uncompressed( + v_publicKeyX, + v_publicKeyY + ), + v_sig + ) ); // Final certificate v_encMsg := encvalue(v_cert); @@ -257,13 +257,13 @@ module TestCodec_Certificates { // Sign the certificate v_sig := f_signWithEcdsaBrainpoolp384WithSha384(bit2oct(v_encMsg), v_private_key); v_cert.signature_ := m_signature_ecdsaBrainpoolP384r1( - m_ecdsaBrainpoolP384Signature( - m_eccP384CurvePoint_uncompressed( - v_publicKeyX, - v_publicKeyY - ), - v_sig - ) + m_ecdsaP384Signature( + m_eccP384CurvePoint_uncompressed( + v_publicKeyX, + v_publicKeyY + ), + v_sig + ) ); // Final certificate v_encMsg := encvalue(v_cert); @@ -341,13 +341,13 @@ module TestCodec_Certificates { // Sign the certificate using ECDSA/SHA-256 (NIST p-256) v_sig := f_signWithEcdsaNistp256WithSha256(bit2oct(v_encMsg), v_private_key); v_cert.signature_ := m_signature_ecdsaNistP256( - m_ecdsaNistP256Signature( - m_eccP256CurvePoint_uncompressed( - v_publicKeyX, - v_publicKeyY - ), - v_sig - ) + m_ecdsaP256Signature( + m_eccP256CurvePoint_uncompressed( + v_publicKeyX, + v_publicKeyY + ), + v_sig + ) ); // Final certificate v_encMsg := encvalue(v_cert); @@ -424,12 +424,12 @@ module TestCodec_Certificates { v_sig := f_signWithEcdsaNistp256WithSha256(bit2oct(v_encMsg), v_private_key); v_cert.signature_ := m_signature_ecdsaNistP256( - m_ecdsaNistP256Signature( - m_eccP256CurvePoint_x_only( - substr(v_sig, 0, 32) - ), - substr(v_sig, 32, 32) - ) + m_ecdsaP256Signature( + m_eccP256CurvePoint_x_only( + substr(v_sig, 0, 32) + ), + substr(v_sig, 32, 32) + ) ); // Final certificate TestEtsiTs103097Certificate(v_cert, false); @@ -501,12 +501,12 @@ module TestCodec_Certificates { v_sig := f_signWithEcdsaBrainpoolp256WithSha256(bit2oct(v_encMsg), v_private_key); v_cert.signature_ := m_signature_ecdsaBrainpoolP256r1( - m_ecdsaNistP256Signature( - m_eccP256CurvePoint_x_only( - substr(v_sig, 0, 32) - ), - substr(v_sig, 32, 32) - ) + m_ecdsaP256Signature( + m_eccP256CurvePoint_x_only( + substr(v_sig, 0, 32) + ), + substr(v_sig, 32, 32) + ) ); // Final certificate v_encMsg := TestEtsiTs103097Certificate(v_cert, false); @@ -584,12 +584,12 @@ module TestCodec_Certificates { ) ), m_signature_ecdsaNistP256( - m_ecdsaNistP256Signature( - m_eccP256CurvePoint_x_only( - '08B2030104020A0D010C0105C0F80BB1460239348D17405C1A845151D4061200'O - ), - '2617CF4E6B25097F03F502AD0C6F2F125974700D31A60FD1EF12040E4D8231AB'O - ) + m_ecdsaP256Signature( + m_eccP256CurvePoint_x_only( + '08B2030104020A0D010C0105C0F80BB1460239348D17405C1A845151D4061200'O + ), + '2617CF4E6B25097F03F502AD0C6F2F125974700D31A60FD1EF12040E4D8231AB'O + ) ) ); v_cert.toBeSigned.cracaId := v_cracaId; diff --git a/ttcn/TestCodec/TestCodec_ChainOfCertificates.ttcn b/ttcn/TestCodec/TestCodec_ChainOfCertificates.ttcn index 165e7f40205e2cff7fe1286d4919f33da5d14ade..178ea0c183c02f00fd575ed660dbd5140c5de4b5 100644 --- a/ttcn/TestCodec/TestCodec_ChainOfCertificates.ttcn +++ b/ttcn/TestCodec/TestCodec_ChainOfCertificates.ttcn @@ -34,7 +34,7 @@ module TestCodec_ChainOfCertificates { type record chain_sec_info { sec_info ca, - sec_info ea, + sec_info aa, sec_info at } @@ -46,7 +46,7 @@ module TestCodec_ChainOfCertificates { var template (value) GeoNetworkingPdu v_gnSecuredPacket; // Generate CA certificate - v_chain_sec_info.ca.cert := f_create_ca_certificate_sha256_1(v_chain_sec_info.ca); + v_chain_sec_info.ca.cert := f_create_ca_certificate_nistP256_1(v_chain_sec_info.ca); v_enc_msg := encvalue(v_chain_sec_info.ca.cert); v_chain_sec_info.ca.hashid8 := f_HashedId8FromSha256(f_hashWithSha256(bit2oct(v_enc_msg))); // Verify signature of CA certificate by itself @@ -62,15 +62,15 @@ module TestCodec_ChainOfCertificates { setverdict(pass) } - // Generate EA certificate - v_chain_sec_info.ea.cert := f_create_at_certificate_sha256_1(v_chain_sec_info.ca, v_chain_sec_info.ea); - v_enc_msg := encvalue(v_chain_sec_info.ea.cert); - v_chain_sec_info.ea.hashid8 := f_HashedId8FromSha256(f_hashWithSha256(bit2oct(v_enc_msg))); - // Verify signature of EA certificate by CA certificate - v_enc_msg := encvalue(v_chain_sec_info.ea.cert.toBeSigned); + // Generate AA certificate + v_chain_sec_info.aa.cert := f_create_aa_certificate_nistP256_1(v_chain_sec_info.ca, v_chain_sec_info.aa); + v_enc_msg := encvalue(v_chain_sec_info.aa.cert); + v_chain_sec_info.aa.hashid8 := f_HashedId8FromSha256(f_hashWithSha256(bit2oct(v_enc_msg))); + // Verify signature of AA certificate by CA certificate + v_enc_msg := encvalue(v_chain_sec_info.aa.cert.toBeSigned); if (f_verifyWithEcdsaNistp256WithSha256( bit2oct(v_enc_msg), - v_chain_sec_info.ea.cert.signature_.ecdsaNistP256Signature.sSig, + v_chain_sec_info.aa.cert.signature_.ecdsaNistP256Signature.sSig, v_chain_sec_info.ca.cert.toBeSigned.verifyKeyIndicator.verificationKey.ecdsaNistP256.uncompressedP256.x, v_chain_sec_info.ca.cert.toBeSigned.verifyKeyIndicator.verificationKey.ecdsaNistP256.uncompressedP256.y ) == false) { @@ -80,16 +80,16 @@ module TestCodec_ChainOfCertificates { } // Generate AT certificate - v_chain_sec_info.at.cert := f_create_at_certificate_sha256_1(v_chain_sec_info.ea, v_chain_sec_info.at); + v_chain_sec_info.at.cert := f_create_at_certificate_nistP256_1(v_chain_sec_info.aa, v_chain_sec_info.at); v_enc_msg := encvalue(v_chain_sec_info.at.cert); v_chain_sec_info.at.hashid8 := f_HashedId8FromSha256(f_hashWithSha256(bit2oct(v_enc_msg))); - // Verify signature of AT certificate by EA certificate + // Verify signature of AT certificate by AA certificate v_enc_msg := encvalue(v_chain_sec_info.at.cert.toBeSigned); if (f_verifyWithEcdsaNistp256WithSha256( bit2oct(v_enc_msg), v_chain_sec_info.at.cert.signature_.ecdsaNistP256Signature.sSig, - v_chain_sec_info.ea.cert.toBeSigned.verifyKeyIndicator.verificationKey.ecdsaNistP256.uncompressedP256.x, - v_chain_sec_info.ea.cert.toBeSigned.verifyKeyIndicator.verificationKey.ecdsaNistP256.uncompressedP256.y + v_chain_sec_info.aa.cert.toBeSigned.verifyKeyIndicator.verificationKey.ecdsaNistP256.uncompressedP256.x, + v_chain_sec_info.aa.cert.toBeSigned.verifyKeyIndicator.verificationKey.ecdsaNistP256.uncompressedP256.y ) == false) { setverdict(fail); } else { @@ -116,12 +116,12 @@ module TestCodec_ChainOfCertificates { } ); // Build the secured message and sign it - v_secured_data := f_build_and_sign_secured_message_sha256(v_gnNonSecuredPacket, v_chain_sec_info.at); + v_secured_data := f_build_and_sign_secured_message_nistP256_1(v_gnNonSecuredPacket, v_chain_sec_info.at); // Finalyse the GeoNetworking message v_gnSecuredPacket := m_geoNwSecPdu(v_gnNonSecuredPacket, v_secured_data); log("tc_full_check_certificate_1: Final GeoNetworking secured message: ", v_gnSecuredPacket); - // Verify signature of EA certificate by CA certificate + // Verify signature of AA certificate by CA certificate if (f_verifyWithEcdsaNistp256WithSha256( valueof(v_gnSecuredPacket.gnPacket.securedMsg.content.signedData.tbsData.payload.data.content.unsecuredData), valueof(v_gnSecuredPacket.gnPacket.securedMsg.content.signedData.signature_.ecdsaNistP256Signature.sSig), @@ -137,15 +137,114 @@ module TestCodec_ChainOfCertificates { } // End of testcase tc_full_check_certificate_1 + testcase tc_full_check_certificate_2() runs on TCType system TCType { + var chain_sec_info v_chain_sec_info; + var bitstring v_enc_msg := ''B; + var template (value) GnNonSecuredPacket v_gnNonSecuredPacket; + var template (value) EtsiTs103097Data v_secured_data; + var template (value) GeoNetworkingPdu v_gnSecuredPacket; + + // Generate CA certificate + v_chain_sec_info.ca.cert := f_create_ca_certificate_brainpoolP256_1(v_chain_sec_info.ca); + v_enc_msg := encvalue(v_chain_sec_info.ca.cert); + v_chain_sec_info.ca.hashid8 := f_HashedId8FromSha256(f_hashWithSha256(bit2oct(v_enc_msg))); + // Verify signature of CA certificate by itself + v_enc_msg := encvalue(v_chain_sec_info.ca.cert.toBeSigned); + if (f_verifyWithEcdsaBrainpoolp256WithSha256( + bit2oct(v_enc_msg), + v_chain_sec_info.ca.cert.signature_.ecdsaBrainpoolP256r1Signature.sSig, + v_chain_sec_info.ca.cert.toBeSigned.verifyKeyIndicator.verificationKey.ecdsaBrainpoolP256r1.uncompressedP256.x, + v_chain_sec_info.ca.cert.toBeSigned.verifyKeyIndicator.verificationKey.ecdsaBrainpoolP256r1.uncompressedP256.y + ) == false) { + setverdict(fail); + } else { + setverdict(pass) + } + + // Generate AA certificate + v_chain_sec_info.aa.cert := f_create_aa_certificate_brainpoolP256_1(v_chain_sec_info.ca, v_chain_sec_info.aa); + v_enc_msg := encvalue(v_chain_sec_info.aa.cert); + v_chain_sec_info.aa.hashid8 := f_HashedId8FromSha256(f_hashWithSha256(bit2oct(v_enc_msg))); + // Verify signature of AA certificate by CA certificate + v_enc_msg := encvalue(v_chain_sec_info.aa.cert.toBeSigned); + if (f_verifyWithEcdsaBrainpoolp256WithSha256( + bit2oct(v_enc_msg), + v_chain_sec_info.aa.cert.signature_.ecdsaBrainpoolP256r1Signature.sSig, + v_chain_sec_info.ca.cert.toBeSigned.verifyKeyIndicator.verificationKey.ecdsaBrainpoolP256r1.uncompressedP256.x, + v_chain_sec_info.ca.cert.toBeSigned.verifyKeyIndicator.verificationKey.ecdsaBrainpoolP256r1.uncompressedP256.y + ) == false) { + setverdict(fail); + } else { + setverdict(pass) + } + + // Generate AT certificate + v_chain_sec_info.at.cert := f_create_at_certificate_brainpoolP256_1(v_chain_sec_info.aa, v_chain_sec_info.at); + v_enc_msg := encvalue(v_chain_sec_info.at.cert); + v_chain_sec_info.at.hashid8 := f_HashedId8FromSha256(f_hashWithSha256(bit2oct(v_enc_msg))); + // Verify signature of AT certificate by AA certificate + v_enc_msg := encvalue(v_chain_sec_info.at.cert.toBeSigned); + if (f_verifyWithEcdsaBrainpoolp256WithSha256( + bit2oct(v_enc_msg), + v_chain_sec_info.at.cert.signature_.ecdsaBrainpoolP256r1Signature.sSig, + v_chain_sec_info.aa.cert.toBeSigned.verifyKeyIndicator.verificationKey.ecdsaBrainpoolP256r1.uncompressedP256.x, + v_chain_sec_info.aa.cert.toBeSigned.verifyKeyIndicator.verificationKey.ecdsaBrainpoolP256r1.uncompressedP256.y + ) == false) { + setverdict(fail); + } else { + setverdict(pass) + } + + log("tc_full_check_certificate_2: Final chain = ", v_chain_sec_info); + + // Create a basic GeoNetworking message + v_gnNonSecuredPacket := m_geoNwShbPacket( + LongPosVector: { + gnAddr := { + typeOfAddress := e_manual, + stationType := e_roadSideUnit, + stationCountryCode := 33, + mid := 'a4fedecabeef'O + }, + timestamp_ := 123456, + latitude := 4856, + longitude := 675, + pai := '1'B, + speed := 55, + heading := 9876 + } + ); + // Build the secured message and sign it + v_secured_data := f_build_and_sign_secured_message_brainpoolP256_1(v_gnNonSecuredPacket, v_chain_sec_info.at); + + // Finalyse the GeoNetworking message + v_gnSecuredPacket := m_geoNwSecPdu(v_gnNonSecuredPacket, v_secured_data); + log("tc_full_check_certificate_2: Final GeoNetworking secured message: ", v_gnSecuredPacket); + // Verify signature of AA certificate by CA certificate + if (f_verifyWithEcdsaBrainpoolp256WithSha256( + valueof(v_gnSecuredPacket.gnPacket.securedMsg.content.signedData.tbsData.payload.data.content.unsecuredData), + valueof(v_gnSecuredPacket.gnPacket.securedMsg.content.signedData.signature_.ecdsaBrainpoolP256r1Signature.sSig), + v_chain_sec_info.at.cert.toBeSigned.verifyKeyIndicator.verificationKey.ecdsaBrainpoolP256r1.uncompressedP256.x, + v_chain_sec_info.at.cert.toBeSigned.verifyKeyIndicator.verificationKey.ecdsaBrainpoolP256r1.uncompressedP256.y + ) == false) { + setverdict(fail); + } else { + setverdict(pass) + } + + // TODO Add encryption support + + } // End of testcase tc_full_check_certificate_2 + /** * @desc Function to generate a CA certificate / NistP256 - * @see ETSI TS 103 097 V1.3.1 Clause 7.2.1 Authorization tickets + * @see ETSI TS 103 097 V1.3.1 7.2.3 Root CA certificates */ - function f_create_ca_certificate_sha256_1( - out sec_info p_ca_sec_info + function f_create_ca_certificate_nistP256_1( + out sec_info p_ca_sec_info ) runs on TCType return EtsiTs103097Certificate { var template (value) EtsiTs103097Certificate v_cert; // ETSI TS 103 097 V1.3.1 Clause 6 Bullet 1 - var charstring v_certId := "STF538 Root Certificate"; + var charstring v_certId := "STF538 NistP256 Root Certificate"; var HashAlgorithm v_self := sha256; // ETSI TS 103 097 V1.3.1 Clause 7.2.3 Root CA certificates Bullet 1 var SequenceOfPsidSsp v_appPermissions := { // ETSI TS 102 965 Table A.1: ETSI ITS standardized ITS-AIDs valueof(m_appPermissions(36, { bitmapSsp := '830001'O })), @@ -190,30 +289,97 @@ module TestCodec_ChainOfCertificates { // Sign the certificate using ECDSA/SHA-256 (NIST p-256) v_sig := f_signWithEcdsaNistp256WithSha256(bit2oct(v_enc_msg), p_ca_sec_info.private_key); v_cert.signature_ := m_signature_ecdsaNistP256( - m_ecdsaNistP256Signature( - m_eccP256CurvePoint_uncompressed( - p_ca_sec_info.public_key_x, - p_ca_sec_info.public_key_y - ), - v_sig - ) + m_ecdsaP256Signature( + m_eccP256CurvePoint_uncompressed( + p_ca_sec_info.public_key_x, + p_ca_sec_info.public_key_y + ), + v_sig + ) ); - log("f_create_ca_certificate_sha256_1: Signed template ", valueof(v_cert)); + log("f_create_ca_certificate_nistP256_1: Signed template ", valueof(v_cert)); + + // Final CA certificate + return valueof(v_cert); + } // End of function f_create_ca_certificate_nistP256_1 + + /** + * @desc Function to generate a CA certificate / BrainpoolP256 + * @see ETSI TS 103 097 V1.3.1 Clause 77.2.3 Root CA certificates + */ + function f_create_ca_certificate_brainpoolP256_1( + out sec_info p_ca_sec_info + ) runs on TCType return EtsiTs103097Certificate { + var template (value) EtsiTs103097Certificate v_cert; // ETSI TS 103 097 V1.3.1 Clause 6 Bullet 1 + var charstring v_certId := "STF538 BrainpoolP256 Root Certificate"; + var HashAlgorithm v_self := sha256; // ETSI TS 103 097 V1.3.1 Clause 7.2.3 Root CA certificates Bullet 1 + var SequenceOfPsidSsp v_appPermissions := { // ETSI TS 102 965 Table A.1: ETSI ITS standardized ITS-AIDs + valueof(m_appPermissions(36, { bitmapSsp := '830001'O })), + valueof(m_appPermissions(37, { bitmapSsp := '830001'O })) + }; + var SequenceOfPsidSspRange v_certIssuePermissions := { // ETSI TS 103 097 V1.3.1 Clause 7.2.3 Root CA certificates Bullet 3 + valueof(m_psidSspRange(1)) + }; + var HashedId8 v_sha256AndDigest; + var Oct32 v_sig := int2oct(0, 32); + var bitstring v_enc_msg := ''B; + + // Generate Private/Public keys + f_generate_key_pair_nistp256(p_ca_sec_info.private_key, p_ca_sec_info.public_key_x, p_ca_sec_info.public_key_y); + // Store Private key in binary format + // Fill Certificate template with the public key + v_cert := m_etsiTs103097Certificate( + m_issuerIdentifier_self(v_self), + m_toBeSignedCertificate_ca( + { name := v_certId }, + v_appPermissions, + { + m_psidGroupPermissions( + m_subjectPermissions_explicit( + v_certIssuePermissions + )) + }, + m_verificationKeyIndicator_verificationKey( + m_publicVerificationKey_ecdsaBrainpoolP256( + m_eccP256CurvePoint_uncompressed( // Signed by itself + p_ca_sec_info.public_key_x, + p_ca_sec_info.public_key_y + ))), + m_validityPeriod( + 17469212, + m_duration_years(10) + ) + ) + ); + // Encode it ==> Get octetstring + v_enc_msg := encvalue(v_cert.toBeSigned); + // Sign the certificate using ECDSA/SHA-256 (BRAINPOOL P-256) + v_sig := f_signWithEcdsaBrainpoolp256WithSha256(bit2oct(v_enc_msg), p_ca_sec_info.private_key); + v_cert.signature_ := m_signature_ecdsaBrainpoolP256r1( + m_ecdsaP256Signature( + m_eccP256CurvePoint_uncompressed( + p_ca_sec_info.public_key_x, + p_ca_sec_info.public_key_y + ), + v_sig + ) + ); + log("f_create_ca_certificate_brainpoolP256_1: Signed template ", valueof(v_cert)); // Final CA certificate return valueof(v_cert); - } // End of function f_create_ca_certificate_sha256_1 + } // End of function f_create_ca_certificate_brainpoolP256_1 /** - * @desc EA certificate / NistP256 + * @desc AA certificate / NistP256 * @see ETSI TS 103 097 V1.3.1 Clause 7.2.1 Enrollment certificate */ - function f_create_ea_certificate_sha256_1( - in sec_info p_ca_sec_info, - out sec_info p_ea_sec_info + function f_create_aa_certificate_nistP256_1( + in sec_info p_ca_sec_info, + out sec_info p_aa_sec_info ) runs on TCType return EtsiTs103097Certificate { var template (value) EtsiTs103097Certificate v_cert; // ETSI TS 103 097 V1.3.1 Clause 6 Bullet 1 - var charstring v_certId := "STF538 EA Certificate"; // ETSI TS 103 097 V1.3.1 Clause 7.2.2 Enrolment credential #5 + var charstring v_certId := "STF538 NistP256 AA Certificate"; // ETSI TS 103 097 V1.3.1 Clause 7.2.2 Enrolment credential #5 var SequenceOfPsidSsp v_appPermissions := { // ETSI TS 102 965 Table A.1: ETSI ITS standardized ITS-AIDs valueof(m_appPermissions(36, { bitmapSsp := '830001'O })), valueof(m_appPermissions(37, { bitmapSsp := '830001'O })) @@ -222,19 +388,19 @@ module TestCodec_ChainOfCertificates { var bitstring v_enc_msg := ''B; // Generate Private/Public keys - f_generate_key_pair_nistp256(p_ea_sec_info.private_key, p_ea_sec_info.public_key_x, p_ea_sec_info.public_key_y); + f_generate_key_pair_nistp256(p_aa_sec_info.private_key, p_aa_sec_info.public_key_x, p_aa_sec_info.public_key_y); // Store Private key in binary format // Fill Certificate template with the public key v_cert := m_etsiTs103097Certificate( m_issuerIdentifier_sha256AndDigest(p_ca_sec_info.hashid8), - m_toBeSignedCertificate_ea( + m_toBeSignedCertificate_aa( { name := v_certId }, v_appPermissions, m_verificationKeyIndicator_verificationKey( m_publicVerificationKey_ecdsaNistP256( m_eccP256CurvePoint_uncompressed( - p_ea_sec_info.public_key_x, - p_ea_sec_info.public_key_y + p_aa_sec_info.public_key_x, + p_aa_sec_info.public_key_y ))), m_validityPeriod( 17469212, @@ -250,33 +416,96 @@ module TestCodec_ChainOfCertificates { ); // Encode it ==> Get octetstring v_enc_msg := encvalue(v_cert.toBeSigned); - // Sign the certificate using ECDSA/SHA-256 (NIST p-256) + // Sign the certificate using ECDSA/SHA-256 (NIST P-256) v_sig := f_signWithEcdsaNistp256WithSha256(bit2oct(v_enc_msg), p_ca_sec_info.private_key); v_cert.signature_ := m_signature_ecdsaNistP256( - m_ecdsaNistP256Signature( - m_eccP256CurvePoint_uncompressed( - p_ca_sec_info.public_key_x, - p_ca_sec_info.public_key_y - ), - v_sig - ) + m_ecdsaP256Signature( + m_eccP256CurvePoint_uncompressed( + p_ca_sec_info.public_key_x, + p_ca_sec_info.public_key_y + ), + v_sig + ) ); - log("f_create_ea_certificate_sha256_1: Signed template ", valueof(v_cert)); + log("f_create_aa_certificate_nistP256_1: Signed template ", valueof(v_cert)); - // Final EA certificate + // Final AA certificate return valueof(v_cert); - } // End of function f_create_ea_certificate_sha256_1 + } // End of function f_create_aa_certificate_nistP256_1 /** - * @desc AT certificate / NistP256 + * @desc AA certificate / BrainpoolP256 * @see ETSI TS 103 097 V1.3.1 Clause 7.2.1 Enrollment certificate */ - function f_create_at_certificate_sha256_1( - in sec_info p_ea_sec_info, - out sec_info p_at_sec_info + function f_create_aa_certificate_brainpoolP256_1( + in sec_info p_ca_sec_info, + out sec_info p_aa_sec_info ) runs on TCType return EtsiTs103097Certificate { var template (value) EtsiTs103097Certificate v_cert; // ETSI TS 103 097 V1.3.1 Clause 6 Bullet 1 - var charstring v_certId := "STF538 AT Certificate"; // ETSI TS 103 097 V1.3.1 Clause 7.2.1 Authorization tickets #2 + var charstring v_certId := "STF538 BrainpoolP256 AA Certificate"; // ETSI TS 103 097 V1.3.1 Clause 7.2.2 Enrolment credential #5 + var SequenceOfPsidSsp v_appPermissions := { // ETSI TS 102 965 Table A.1: ETSI ITS standardized ITS-AIDs + valueof(m_appPermissions(36, { bitmapSsp := '830001'O })), + valueof(m_appPermissions(37, { bitmapSsp := '830001'O })) + }; + var Oct32 v_sig := int2oct(0, 32); + var bitstring v_enc_msg := ''B; + + // Generate Private/Public keys + f_generate_key_pair_nistp256(p_aa_sec_info.private_key, p_aa_sec_info.public_key_x, p_aa_sec_info.public_key_y); + // Store Private key in binary format + // Fill Certificate template with the public key + v_cert := m_etsiTs103097Certificate( + m_issuerIdentifier_sha256AndDigest(p_ca_sec_info.hashid8), + m_toBeSignedCertificate_aa( + { name := v_certId }, + v_appPermissions, + m_verificationKeyIndicator_verificationKey( + m_publicVerificationKey_ecdsaBrainpoolP256( + m_eccP256CurvePoint_uncompressed( + p_aa_sec_info.public_key_x, + p_aa_sec_info.public_key_y + ))), + m_validityPeriod( + 17469212, + m_duration_years(10) + ), + m_geographicRegion_identifiedRegion( + { + m_identifiedRegion_country_only(12), + m_identifiedRegion_country_only(34) + } + ) + ) + ); + // Encode it ==> Get octetstring + v_enc_msg := encvalue(v_cert.toBeSigned); + // Sign the certificate using ECDSA/SHA-256 (BRAINPOOL P-256) + v_sig := f_signWithEcdsaBrainpoolp256WithSha256(bit2oct(v_enc_msg), p_ca_sec_info.private_key); + v_cert.signature_ := m_signature_ecdsaBrainpoolP256r1( + m_ecdsaP256Signature( + m_eccP256CurvePoint_uncompressed( + p_ca_sec_info.public_key_x, + p_ca_sec_info.public_key_y + ), + v_sig + ) + ); + log("f_create_aa_certificate_brainpoolP256_1: Signed template ", valueof(v_cert)); + + // Final AA certificate + return valueof(v_cert); + } // End of function f_create_aa_certificate_brainpoolP256_1 + + /** + * @desc AT certificate / NistP256 + * @see ETSI TS 103 097 V1.3.1 Clause 7.2.1 Authorization tickets + */ + function f_create_at_certificate_nistP256_1( + in sec_info p_aa_sec_info, + out sec_info p_at_sec_info + ) runs on TCType return EtsiTs103097Certificate { + var template (value) EtsiTs103097Certificate v_cert; // ETSI TS 103 097 V1.3.1 Clause 6 Bullet 1 + var charstring v_certId := "STF538 NistP256 AT Certificate"; // ETSI TS 103 097 V1.3.1 Clause 7.2.1 Authorization tickets #2 var SequenceOfPsidSsp v_appPermissions := { // ETSI TS 102 965 Table A.1: ETSI ITS standardized ITS-AIDs valueof(m_appPermissions(36, { bitmapSsp := '830001'O })), valueof(m_appPermissions(37, { bitmapSsp := '830001'O })) @@ -289,8 +518,8 @@ module TestCodec_ChainOfCertificates { // Store Private key in binary format // Fill Certificate template with the public key v_cert := m_etsiTs103097Certificate( - m_issuerIdentifier_sha256AndDigest(p_ea_sec_info.hashid8), - m_toBeSignedCertificate_ea( + m_issuerIdentifier_sha256AndDigest(p_aa_sec_info.hashid8), + m_toBeSignedCertificate_aa( { name := v_certId }, v_appPermissions, m_verificationKeyIndicator_verificationKey( @@ -314,26 +543,90 @@ module TestCodec_ChainOfCertificates { // Encode it ==> Get octetstring log("Encode template ", valueof(v_cert)); v_enc_msg := encvalue(v_cert.toBeSigned); - // Sign the certificate using ECDSA/SHA-256 (NIST p-256) - v_sig := f_signWithEcdsaNistp256WithSha256(bit2oct(v_enc_msg), p_ea_sec_info.private_key); + // Sign the certificate using ECDSA/SHA-256 (NIST P-256) + v_sig := f_signWithEcdsaNistp256WithSha256(bit2oct(v_enc_msg), p_aa_sec_info.private_key); v_cert.signature_ := m_signature_ecdsaNistP256( - m_ecdsaNistP256Signature( - m_eccP256CurvePoint_uncompressed( - p_ea_sec_info.public_key_x, - p_ea_sec_info.public_key_y - ), - v_sig - ) + m_ecdsaP256Signature( + m_eccP256CurvePoint_uncompressed( + p_aa_sec_info.public_key_x, + p_aa_sec_info.public_key_y + ), + v_sig + ) ); - log("f_create_at_certificate_sha256_1: Signed template ", valueof(v_cert)); + log("f_create_at_certificate_nistP256_1: Signed template ", valueof(v_cert)); // Final AT certificate return valueof(v_cert); - } // End of function f_create_at_certificate_sha256_1 + } // End of function f_create_at_certificate_nistP256_1 - function f_build_and_sign_secured_message_sha256( - in template (value) GnNonSecuredPacket p_gnNonSecuredPacket, - in sec_info p_at_sec_info + /** + * @desc AT certificate / BrainpoolP256 + * @see ETSI TS 103 097 V1.3.1 Clause 7.2.1 Authorization tickets + */ + function f_create_at_certificate_brainpoolP256_1( + in sec_info p_aa_sec_info, + out sec_info p_at_sec_info + ) runs on TCType return EtsiTs103097Certificate { + var template (value) EtsiTs103097Certificate v_cert; // ETSI TS 103 097 V1.3.1 Clause 6 Bullet 1 + var charstring v_certId := "STF538 BrainpoolP256 AT Certificate"; // ETSI TS 103 097 V1.3.1 Clause 7.2.1 Authorization tickets #2 + var SequenceOfPsidSsp v_appPermissions := { // ETSI TS 102 965 Table A.1: ETSI ITS standardized ITS-AIDs + valueof(m_appPermissions(36, { bitmapSsp := '830001'O })), + valueof(m_appPermissions(37, { bitmapSsp := '830001'O })) + }; + var Oct32 v_sig := int2oct(0, 32); + var bitstring v_enc_msg := ''B; + + // Generate Private/Public keys + f_generate_key_pair_brainpoolp256(p_at_sec_info.private_key, p_at_sec_info.public_key_x, p_at_sec_info.public_key_y); + // Store Private key in binary format + // Fill Certificate template with the public key + v_cert := m_etsiTs103097Certificate( + m_issuerIdentifier_sha256AndDigest(p_aa_sec_info.hashid8), + m_toBeSignedCertificate_aa( + { name := v_certId }, + v_appPermissions, + m_verificationKeyIndicator_verificationKey( + m_publicVerificationKey_ecdsaBrainpoolP256( + m_eccP256CurvePoint_uncompressed( + p_at_sec_info.public_key_x, + p_at_sec_info.public_key_y + ))), + m_validityPeriod( + 17469212, + m_duration_years(10) + ), + m_geographicRegion_identifiedRegion( + { + m_identifiedRegion_country_only(12), + m_identifiedRegion_country_only(34) + } + ) + ) + ); + // Encode it ==> Get octetstring + log("Encode template ", valueof(v_cert)); + v_enc_msg := encvalue(v_cert.toBeSigned); + // Sign the certificate using ECDSA/SHA-256 (BRAINPOOL P-256) + v_sig := f_signWithEcdsaBrainpoolp256WithSha256(bit2oct(v_enc_msg), p_aa_sec_info.private_key); + v_cert.signature_ := m_signature_ecdsaBrainpoolP256r1( + m_ecdsaP256Signature( + m_eccP256CurvePoint_uncompressed( + p_aa_sec_info.public_key_x, + p_aa_sec_info.public_key_y + ), + v_sig + ) + ); + log("f_create_at_certificate_brainpoolP256_1: Signed template ", valueof(v_cert)); + + // Final AT certificate + return valueof(v_cert); + } // End of function f_create_at_certificate_brainpoolP256_1 + + function f_build_and_sign_secured_message_nistP256_1( + in template (value) GnNonSecuredPacket p_gnNonSecuredPacket, + in sec_info p_at_sec_info ) runs on TCType return EtsiTs103097Data { var octetstring v_raw_payload_to_be_signed; var template (value) ToBeSignedData v_toBeSignedData; @@ -361,18 +654,62 @@ module TestCodec_ChainOfCertificates { v_toBeSignedData, { digest := p_at_sec_info.hashid8 }, m_signature_ecdsaNistP256( - m_ecdsaNistP256Signature( - m_eccP256CurvePoint_x_only( - p_at_sec_info.public_key_x - ), - v_sig - ) + m_ecdsaP256Signature( + m_eccP256CurvePoint_x_only( + p_at_sec_info.public_key_x + ), + v_sig + ) ) ) ); - log("f_build_and_sign_secured_message_sha256: v_secured_data = ", v_secured_data); + log("f_build_and_sign_secured_message_nistP256_1: v_secured_data = ", v_secured_data); + + return valueof(v_secured_data); + } // End of function f_build_and_sign_secured_message_nistP256_1 + + function f_build_and_sign_secured_message_brainpoolP256_1( + in template (value) GnNonSecuredPacket p_gnNonSecuredPacket, + in sec_info p_at_sec_info + ) runs on TCType return EtsiTs103097Data { + var octetstring v_raw_payload_to_be_signed; + var template (value) ToBeSignedData v_toBeSignedData; + var Oct32 v_sig := '0000000000000000000000000000000000000000000000000000000000000000'O; + var template (value) EtsiTs103097Data v_secured_data; + + // Build the message to be signed + v_raw_payload_to_be_signed := bit2oct(encvalue(p_gnNonSecuredPacket)); + v_toBeSignedData := m_toBeSignedData( + m_signedDataPayload( + m_etsiTs103097Data_unsecured(v_raw_payload_to_be_signed) + ), + m_headerInfo_gn( + -, + 12345, + 123456 + ) + ); + // Signed it + v_sig := f_signWithEcdsaBrainpoolp256WithSha256(v_raw_payload_to_be_signed, p_at_sec_info.private_key); + // Finalize the secured message + v_secured_data := m_etsiTs103097Data_signed( + m_signedData( + sha256, + v_toBeSignedData, + { digest := p_at_sec_info.hashid8 }, + m_signature_ecdsaBrainpoolP256r1( + m_ecdsaP256Signature( + m_eccP256CurvePoint_x_only( + p_at_sec_info.public_key_x + ), + v_sig + ) + ) + ) + ); + log("f_build_and_sign_secured_message_brainpoolP256_1: v_secured_data = ", v_secured_data); return valueof(v_secured_data); - } // End of function f_build_and_sign_secured_message_sha256 + } // End of function f_build_and_sign_secured_message_brainpoolP256_1 } // End of module TestCodec_ChainOfCertificates diff --git a/ttcn/TestCodec/TestCodec_DENM.ttcn b/ttcn/TestCodec/TestCodec_DENM.ttcn index 6016213d4d57c25c5b2d1e59d9c3b78afe08fed8..932c03ea224b6d4f2f05f30d332096958da4baed 100644 --- a/ttcn/TestCodec/TestCodec_DENM.ttcn +++ b/ttcn/TestCodec/TestCodec_DENM.ttcn @@ -445,7 +445,7 @@ module TestCodec_DENM { tc_ac.start; alt { [v_got_denm == false] denmPort.receive(DenmInd : ?) { - v_got_denm := true + v_got_denm := true; setverdict(pass); repeat; } diff --git a/ttcn/TestCodec/TestCodec_SecuredMessages.ttcn b/ttcn/TestCodec/TestCodec_SecuredMessages.ttcn index 6651d1fc14a5bf68edec544334e80d2bbbab1863..7914149f9fcf0aa78bf508b6e1a874d856948e12 100644 --- a/ttcn/TestCodec/TestCodec_SecuredMessages.ttcn +++ b/ttcn/TestCodec/TestCodec_SecuredMessages.ttcn @@ -140,12 +140,12 @@ module TestCodec_SecuredMessages { ), { digest := v_digest }, m_signature_ecdsaNistP256( - m_ecdsaNistP256Signature( - m_eccP256CurvePoint_x_only( - '08B2030104020A0D010C0105C0F80BB1460239348D17405C1A845151D4061200'O - ), - '2617CF4E6B25097F03F502AD0C6F2F125974700D31A60FD1EF12040E4D8231AB'O - ) + m_ecdsaP256Signature( + m_eccP256CurvePoint_x_only( + '08B2030104020A0D010C0105C0F80BB1460239348D17405C1A845151D4061200'O + ), + '2617CF4E6B25097F03F502AD0C6F2F125974700D31A60FD1EF12040E4D8231AB'O + ) ) ) ); @@ -204,12 +204,12 @@ module TestCodec_SecuredMessages { ), { digest := v_digest }, m_signature_ecdsaNistP256( - m_ecdsaNistP256Signature( - m_eccP256CurvePoint_x_only( - '08B2030104020A0D010C0105C0F80BB1460239348D17405C1A845151D4061200'O - ), - '2617CF4E6B25097F03F502AD0C6F2F125974700D31A60FD1EF12040E4D8231AB'O - ) + m_ecdsaP256Signature( + m_eccP256CurvePoint_x_only( + '08B2030104020A0D010C0105C0F80BB1460239348D17405C1A845151D4061200'O + ), + '2617CF4E6B25097F03F502AD0C6F2F125974700D31A60FD1EF12040E4D8231AB'O + ) ) ) ); diff --git a/validation/FunctionaValidation.xlsm b/validation/FunctionaValidation.xlsm index 4f172c491f8ba3440113490bb9e36177f260ebf4..06c42d0d6f6ebca828c7c4fba924925d7dbb24fd 100644 Binary files a/validation/FunctionaValidation.xlsm and b/validation/FunctionaValidation.xlsm differ