Commit 7e92caf3 authored by garciay's avatar garciay
Browse files

Bug fixed in CAM values

parent b26dc07e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@

#include "converter.hh"

btp_layer::btp_layer(const std::string & p_type, const std::string & param) : t_layer<LibItsBtp__TestSystem::BtpPort>(p_type), _params(), _codec(), _device_mode{false} {
btp_layer::btp_layer(const std::string & p_type, const std::string & param) : t_layer<LibItsBtp__TestSystem::BtpPort>(p_type), _params(), _codec(), _device_mode{true} {
  loggers::get_instance().log(">>> btp_layer::btp_layer: %s, %s", to_string().c_str(), param.c_str());
  // Setup parameters
  params::convert(_params, param);
+5 −1
Original line number Diff line number Diff line
@@ -258,9 +258,13 @@ int uppertester_cam_codec::decode (const OCTETSTRING& data, LibItsCam__TypesAndV

  const unsigned char* ptr = static_cast<const unsigned char*>(data) + 1;
  OCTETSTRING os(2, ptr);
  const unsigned int length = (const unsigned int)((*ptr << 8 & 0xff00) | *(ptr + 1));
  ptr += 2;
  unsigned int length = oct2int(os);
  loggers::get_instance().log("uppertester_cam_codec::decode: CAM message length=%d", length);
  if (data.lengthof() - 3 != (const int)length) {
    loggers::get_instance().warning("uppertester_cam_codec::decode (4): Wrong payload length: %d", length);
    return -1;
  }
  os = OCTETSTRING(length, ptr);
  loggers::get_instance().log_to_hexa("uppertester_cam_codec::decode: CAM message=", os);
  cam_codec codec;
+55 −19
Original line number Diff line number Diff line
@@ -2,19 +2,13 @@
[MODULE_PARAMETERS]
# This section shall contain the values of all parameters that are defined in your TTCN-3 modules.

# The GeoNetworking address of the IUT.
LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := {
  typeOfAddress := e_initial,
  stationType := e_unknown, #e_roadSideUnit,
  stationCountryCode := 0, #33,
  mid := '4C5E0C14D2EB'O
}

# IUT Station ID. See testdata set and plugtest1026-log-locD 002.pcap
LibItsCommon_Pixits.PX_IUT_STATION_ID := 10143;
# IUT Station ID
LibItsCommon_Pixits.PX_IUT_STATION_ID := 2533729309

LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB

LibItsCam_Pics.PICS_DANGEROUSGOODS := 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).
@@ -95,22 +89,64 @@ LogEventTypes:= Yes
#     time_offset : Time offset, used to skip packets with time offset < time_offset
#     save_mode   : Set to 1 to save sent packet, 0 otherwise

# Non secured IUT
#system.camPort.params := "CAM(next_header=btpB,header_type=tsb,header_sub_type=sh)/BTP(type=btpB,dst_port=2001,src_port=0,device_mode=1)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1)/ETH(mac_src=080027D2B658)/PCAP(mac_src=080027D2B658,nic=eth1,filter=and ether proto 0x8947)"
# Secured IUT
system.camPort.params := "CAM(next_header=btpB,header_type=tsb,header_sub_type=sh)/BTP(type=btpB,dst_port=2001,src_port=0,deviceMode=1)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,expiry=1000,deviceMode=1,secured_mode=1,certificate=CERT_IUT_F_AT,sec_db_path=/home/vagrant/tmp/test_01)/ETH(mac_src=080027D2B658,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=080027D2B658,nic=eth1,filter=and ether proto 0x8947)"
system.camPort.params := "CAM(next_header=btpB,header_type=tsb,header_sub_type=sh)/BTP/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1)/ETH(mac_src=080027500f9b)/PCAP(mac_src=080027500f9b,nic=tap0)"

# CAM UpperTester port based on UDP (ETSI Wlan)
system.utPort.params := "UT_CAM(loopback=0)/UDP(dst_ip=192.168.1.250,dst_port=12345,src_ip=192.168.1.253,src_port=12345)/ETH(mac_src=080027d2b658,mac_dst=90fd61e61902,eth_type=0800)/PCAP(mac_src=080027d2b658,nic=eth1,filter=and udp port 12345)"
# CAM UpperTester port based on UDP
system.utPort.params := "UT_CAM/UDP(dst_ip=172.23.0.1,dst_port=8000)"

[EXECUTE]
ItsCam_TestCases.TC_CAM_MSD_FMT_BV_01
ItsCam_TestCases.TC_CAM_MSD_FMT_BV_02
#ItsCam_TestCases.TC_CAM_MSD_FMT_BV_01
#ItsCam_TestCases.TC_CAM_MSD_FMT_BV_02
#ItsCam_TestCases.TC_CAM_MSD_FMT_BV_03
#ItsCam_TestCases.TC_CAM_MSD_FMT_BV_04
#ItsCam_TestCases.TC_CAM_MSD_FMT_BV_05
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_01
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_02
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_03
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_04
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_05
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_06
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_07
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_08
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_09
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_10
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_11
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_12
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_13
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_14
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_15
ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_16
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_17
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_18
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_19
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_20
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_21
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_22
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_23
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_24
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_25
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_26
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_27
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_28
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_29
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_30
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_31
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_32
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_33
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_34
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_35
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_02
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_03
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_04
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_05
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_06
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_07
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_08
#ItsCam_TestCases.TC_CAM_MSP_BV_01

[MAIN_CONTROLLER]
# The options herein control the behavior of MC.
KillTimer := 10.0
TCPPort := 0
LocalAddress := 127.0.0.1
TCPPort := 12000
NumHCs := 1
+4 −7
Original line number Diff line number Diff line
@@ -8,8 +8,8 @@ LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := {
  mid := '4C5E0C14D2EB'O
}

# IUT Station ID. See testdata set and plugtest1026-log-locD 002.pcap
LibItsCommon_Pixits.PX_IUT_STATION_ID := 10143;
# IUT Station ID
LibItsCommon_Pixits.PX_IUT_STATION_ID := 2533729309

LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB

@@ -93,13 +93,10 @@ LogEventTypes:= Yes
#     time_offset : Time offset, used to skip packets with time offset < time_offset
#     save_mode   : Set to 1 to save sent packet, 0 otherwise

# Non secured device
system.denmPort.params := "DENM(next_header=btpB,header_type=tsb)/BTP(type=btpB,dst_port=2002)/GN(ll_address=0800275c4958,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,expiry=1000,device_mode=1)/ETH(mac_src=0800275c4958)/PCAP(mac_src=0800275c4958,nic=eth1,filter=and ether proto 0x8947)"
# Secured device
#system.denmPort.params := "DENM(next_header=btpB,header_type=tsb)/BTP(type=btpB,dst_port=2002)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,expiry=1000,deviceMode=1,secured_mode=1,certificate=CERT_IUT_F_AT,sec_db_path=/home/vagrant/tmp/test_01)/ETH(mac_src=080027D2B658,mac_bc=FFFFFFFFFFFF,eth_type=8947)/PCAP(mac_src=080027D2B658,nic=eth1,filter=and ether proto 0x8947)"
system.denmPort.params := "DENM(next_header=btpB,header_type=tsb)/BTP(dst_port=2002)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,deviceMode=1)/ETH(mac_src=080027500f9b)/PCAP(mac_src=080027500f9b,nic=tap0)"

# DENM UpperTester port based on UDP (ETSI Wlan)
system.utPort.params := "UT_DENM(loopback=1,station_id=10143)" #/UDP(dst_ip=192.168.1.250,dst_port=12345,src_ip=192.168.1.253,src_port=12345)/ETH(mac_src=080027d2b658,mac_dst=90fd61e61902,eth_type=0800)/PCAP(mac_src=080027d2b658,nic=eth1,filter=and udp port 12345)"
system.utPort.params := "UT_DENM/UDP(dst_ip=172.23.0.1,dst_port=8000)"

[EXECUTE]
ItsDenm_TestCases.TC_DEN_MSGF_BV_01
Compare f22a3664 to 10d0d81a
Original line number Diff line number Diff line
Subproject commit f22a3664752f329b55e039705d81bc1c7d73ef16
Subproject commit 10d0d81a0b08db8b53ae74072a528dd0333e4dd7