Commit a8ab9652 authored by garciay's avatar garciay
Browse files

Enhance AtsRSUSimulator to validate Test System & ATSs

parent ba954680
Loading
Loading
Loading
Loading
+23 −19
Original line number Diff line number Diff line
@@ -5,11 +5,16 @@ LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := {
  typeOfAddress := e_initial,
  stationType := e_passengerCar,
  stationCountryCode := 0,
  mid := '92569202017a'O
  mid := '4C5E0C14D2EB'O
}

# GeoNetwoking only, no facility layer
#LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_any
# With facility layer
LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpA

# Indicate which RSU to simulate
ItsRSUsSimulator_Pixits.PX_RSU_ID := 2;
ItsRSUsSimulator_Pixits.PX_RSU_ID := 8;
# Indicate which Use Case to simulate
#   UC1 (DENM only):         PX_ETSI_USE_CASE_ID := 1
#   UC3 (TLM MAPEM/SPATEM):  PX_ETSI_USE_CASE_ID := 3
@@ -18,15 +23,13 @@ ItsRSUsSimulator_Pixits.PX_RSU_ID := 2;
#   UC7 (CAM only):          PX_ETSI_USE_CASE_ID := 7
#   UC8 (EVCSN only):        PX_ETSI_USE_CASE_ID := 8
#   UC9 (CAM only):          PX_ETSI_USE_CASE_ID := 9
# remark: LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB
LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB
ItsRSUsSimulator_Pixits.PX_ETSI_USE_CASE_ID := 1
ItsRSUsSimulator_Pixits.PX_ETSI_USE_CASE_ID := 6
# Indicate which zone to simulate
ItsRSUsSimulator_Pixits.PX_ETSI_ZONE_ID := 1

ItsRSUsSimulator_Pixits.PICS_GENERATE_BEACON   := false
ItsRSUsSimulator_Pixits.PICS_GENERATE_CAM      := false
ItsRSUsSimulator_Pixits.PICS_GENERATE_DENM     := true
ItsRSUsSimulator_Pixits.PICS_GENERATE_CAM      := true
ItsRSUsSimulator_Pixits.PICS_GENERATE_DENM     := false
ItsRSUsSimulator_Pixits.PICS_GENERATE_IVIM     := false
ItsRSUsSimulator_Pixits.PICS_GENERATE_MAPEM    := false
ItsRSUsSimulator_Pixits.PICS_GENERATE_SPATEM   := false
@@ -35,12 +38,11 @@ ItsRSUsSimulator_Pixits.PICS_GENERATE_SSEM := false
[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
@@ -62,19 +64,21 @@ 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
#   its_aid                : ITS AID as defined by ETSI TS 102 965 V1.2.1. Default: 141
#   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)
#   latitude               : Latitude of the Test System
#   longitude              : Kongitude of the Test System
#   beaconing              : Set to 1 if the Test System shall start beaconing
#   Beaconning timer expiry: Expiry (ms)
#   device_mode            : Set to 1 if the layer shall encapsulate upper layer PDU
#   secured_mode           : Set to 1 if message exchanges shall be secured
#   certificate            : Certificate identifier the Test Adapter shall use
#   secure_db_path         : Path to the certificates and keys storage location
#   hash                   : Hash algorithm to be used when secured mode is set
#                            Authorized values are SHA-256 or SHA-384
#                            Default: SHA-256
#   signature              : Signature algorithm to be used when secured mode is set
#                            Authorized values are NISTP-256, NISTP-384, BP-256 and BP-384
#                            Authorized values are NISTP-256, BP-256 and BP-384
#                            Default: NISTP-256
#   cypher                 : Cyphering algorithm to be used when secured mode is set
# Ethernet layer
@@ -109,10 +113,10 @@ LogEventTypes:= Yes
#     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=38)/ETH(mac_src=0800275c4959,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=0800275c4959,nic=eth1,filter=and ether proto 0x8947)"
system.geoNetworkingPort.params := "GN(ll_address=F8CAB8083918,latitude=43551050,longitude=10298730,beaconing=1,expiry=1000)/ETH(mac_src=0800275c4959,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=0800275c4959,nic=enp0s8,filter=and ether proto 0x8947)"

# UpperTester port based on UDP
system.utPort.params := "UT/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=eth1,filter=udp port 12346)"
system.utPort.params := "UT/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=udp port 12346)"

[EXECUTE]
ItsRSUsSimulator_TestCases.TC_RSUSIMU_BV_01
+12 −3
Original line number Diff line number Diff line
@@ -399,6 +399,7 @@ module ItsRSUsSimulator_Functions {
                //                v_evcsn,
                v_ssem
        );
        //log("vc_rsuMessagesValueList[p_rsu_id] = ", vc_rsuMessagesValueList[p_rsu_id]);
        if (PICS_RSU_PARAMS[p_rsu_id].geoShape == e_geoCircle) {
            vc_geoArea := {
                shape := e_geoCircle,
@@ -464,6 +465,7 @@ module ItsRSUsSimulator_Functions {
                                            e_any
                                            )
        );
      log("f_prepare_beacon: ", p_payload);
    } // End of function f_prepare_beacon
    
    function f_prepare_cam(
@@ -771,7 +773,10 @@ module ItsRSUsSimulator_Functions {
                    vc_longPosVectorRsu,
                    valueof(p_payload)
                ),
                m_defaultLifetime,
                Lifetime:{
                  multiplier := c_defaultLifetime,
                  ltBase := e_100s
                },
                c_hopLimit1
            ));
        } else {
@@ -784,9 +789,13 @@ module ItsRSUsSimulator_Functions {
                    -,
                    valueof(p_payload)
                ),
                m_defaultLifetime,
                Lifetime:{
                  multiplier := c_defaultLifetime,
                  ltBase := e_100s
                },
                c_hopLimit1
            ));
        v_geoNetworkingPdu.gnPacket.packet.commonHeader.nextHeader := e_any;
        }
        f_sendGeoNetMessage(valueof(m_geoNwReq_linkLayerBroadcast(v_geoNetworkingPdu, p_its_aid)));
    } // End of function f_send
+6 −6
Original line number Diff line number Diff line
@@ -336,10 +336,10 @@ module ItsRSUsSimulator_PicsInitConsts {
             * @desc RSU GN address
             */
            const GN_Address c_PICS_RSU_GN_ADDRESS_RSU8 := {
                typeOfAddress         := e_manual,
                stationType           := e_roadSideUnit,
                stationCountryCode    := 33,
                mid                   := '001C6B0D0208'O
                typeOfAddress         := e_initial,
                stationType           := e_unknown,
                stationCountryCode    := 0,
                mid                   := '4C5E0C14D2EA'O
            } // End of c_PICS_RSU_GN_ADDRESS_RSU8
            
            const RsuParm c_PICS_RSU8 := {
@@ -352,8 +352,8 @@ module ItsRSUsSimulator_PicsInitConsts {
                    speed         := 0,
                    heading       := 0
                },
                stationID := 1111108,
                stationType := LibItsCommon_ASN1_NamedNumbers.StationType_roadSideUnit_,
                stationID := 10143,
                stationType := LibItsCommon_ASN1_NamedNumbers.StationType_passengerCar_,
                vehicleRole := roadOperator,
                geoShape := e_geoCircle,
                geoParms := {
+4 −4
Original line number Diff line number Diff line
@@ -101,12 +101,12 @@ module ItsRSUsSimulator_TestCases {
                //log("*** " & testcasename() & ": DEBUG: Processing DENM ***");
                // Nothing to do, just for logging purposes
                repeat;
            }
                }*/
            [] geoNetworkingPort.receive(mw_geoNwInd(?)) -> value v_gnInd { // Receive a message
                //log("*** " & testcasename() & ": DEBUG: Recieving unsollicited message ***");
                log("*** " & testcasename() & ": DEBUG: Recieving unsollicited message ***");
                // Nothing to do, just for logging purposes
                repeat;
            }*/
            }
            /*[] cfPort.receive(CfEvent:?) -> value v_cfEvent {
                //log("*** " & testcasename() & ": DEBUG: Configuration port command:", v_cfEvent, " ***");
                if (f_process_cf_event(v_cfEvent) == true) {
@@ -114,7 +114,7 @@ module ItsRSUsSimulator_TestCases {
                }
            }*/
            [vc_beacon == true] tc_beacon.timeout {
                //log("*** " & testcasename() & ": DEBUG: Processing BEACON ***");
                log("*** " & testcasename() & ": DEBUG: Processing BEACON ***");
                f_prepare_beacon(v_payload);
                f_send(v_payload, PICS_BEACON_ITS_AID);
                tc_beacon.start;