Commit de7d529c authored by Yann Garcia's avatar Yann Garcia
Browse files

Validate AtsRtcmem against TTwb 1.1.30

parent c39c9e2f
...@@ -97,6 +97,17 @@ namespace LibItsIvim__TestSystem { ...@@ -97,6 +97,17 @@ namespace LibItsIvim__TestSystem {
loggers::get_instance().set_stop_time(_time_key, duration); loggers::get_instance().set_stop_time(_time_key, duration);
} }
void IvimPort::outgoing_send(const IvimInd& send_par)
{
loggers::get_instance().log_msg(">>> IvimPort::outgoing_send: payload=", send_par);
float duration;
loggers::get_instance().set_start_time(_time_key);
params params;
static_cast<ivim_layer *>(_layer)->sendMsg(send_par, params);
loggers::get_instance().set_stop_time(_time_key, duration);
}
void IvimPort::receiveMsg(const LibItsIvim__TestSystem::IvimInd& p_ind, const params& p_params) { void IvimPort::receiveMsg(const LibItsIvim__TestSystem::IvimInd& p_ind, const params& p_params) {
loggers::get_instance().log_msg(">>> IvimPort::receive_msg: ", p_ind); loggers::get_instance().log_msg(">>> IvimPort::receive_msg: ", p_ind);
......
...@@ -43,6 +43,7 @@ protected: ...@@ -43,6 +43,7 @@ protected:
void user_stop(); void user_stop();
void outgoing_send(const IvimReq& send_par); void outgoing_send(const IvimReq& send_par);
void outgoing_send(const IvimInd& send_par);
}; };
} /* end of namespace */ } /* end of namespace */
......
...@@ -1152,7 +1152,6 @@ int ConfigRsuSimulatorLayer::process_ut_rtcmem_trigger(const OCTETSTRING& data, ...@@ -1152,7 +1152,6 @@ int ConfigRsuSimulatorLayer::process_ut_rtcmem_trigger(const OCTETSTRING& data,
trigger.rev() = DSRC::RTCM__Revision(static_cast<int>(*p++)); trigger.rev() = DSRC::RTCM__Revision(static_cast<int>(*p++));
// Decode msgs // Decode msgs
DSRC::RTCMmessageList msgs; DSRC::RTCMmessageList msgs;
p += 1; // Skip COER flag
unsigned char num_items = *p++; // Number of items unsigned char num_items = *p++; // Number of items
msgs.set_size(num_items); msgs.set_size(num_items);
for (unsigned char i = 0; i < num_items; i++) { for (unsigned char i = 0; i < num_items; i++) {
...@@ -1161,19 +1160,21 @@ int ConfigRsuSimulatorLayer::process_ut_rtcmem_trigger(const OCTETSTRING& data, ...@@ -1161,19 +1160,21 @@ int ConfigRsuSimulatorLayer::process_ut_rtcmem_trigger(const OCTETSTRING& data,
p += len; p += len;
} // End of 'for' statement } // End of 'for' statement
trigger.msgs() = msgs; trigger.msgs() = msgs;
// ValidityDuration // timeStamp
if ((flag & 0x80) == 0x80) { if ((flag & 0x80) == 0x80) {
// TODO trigger.timeStamp() = OPTIONAL<INTEGER>(oct2int(OCTETSTRING(3, p))); // TODO trigger.timeStamp() = OPTIONAL<INTEGER>(oct2int(OCTETSTRING(3, p)));
} else { } else {
trigger.timeStamp().set_to_omit(); trigger.timeStamp().set_to_omit();
} }
// TODO p += 3; // TODO p += 3;
// anchorPoint
if ((flag & 0x40) == 0x40) { if ((flag & 0x40) == 0x40) {
// TODO trigger.anchorPoint() = OPTIONAL<INTEGER>(oct2int(OCTETSTRING(3, p))); // TODO trigger.anchorPoint() = OPTIONAL<INTEGER>(oct2int(OCTETSTRING(3, p)));
} else { } else {
trigger.anchorPoint().set_to_omit(); trigger.anchorPoint().set_to_omit();
} }
// TODO p += 3; // TODO p += 3;
// rtcmHeader
if ((flag & 0x20) == 0x20) { if ((flag & 0x20) == 0x20) {
// TODO trigger.rtcmHeader() = OPTIONAL<INTEGER>(oct2int(OCTETSTRING(3, p))); // TODO trigger.rtcmHeader() = OPTIONAL<INTEGER>(oct2int(OCTETSTRING(3, p)));
} else { } else {
......
...@@ -30,6 +30,18 @@ void ivim_layer::sendMsg(const LibItsIvim__TestSystem::IvimReq& p, params& param ...@@ -30,6 +30,18 @@ void ivim_layer::sendMsg(const LibItsIvim__TestSystem::IvimReq& p, params& param
send_data(data, _params); send_data(data, _params);
} }
void ivim_layer::sendMsg(const LibItsIvim__TestSystem::IvimInd& p, params& params){
loggers::get_instance().log_msg(">>> ivim_layer::sendMsg: ", p);
// Encode IVIM PDU
OCTETSTRING data;
if (_codec.encode(p.msgIn(), data) == -1) {
loggers::get_instance().warning("ivim_layer::sendMsg: Encoding failure");
return;
}
send_data(data, _params);
}
void ivim_layer::send_data(OCTETSTRING& data, params& params) { void ivim_layer::send_data(OCTETSTRING& data, params& params) {
loggers::get_instance().log_msg(">>> ivim_layer::send_data: ", data); loggers::get_instance().log_msg(">>> ivim_layer::send_data: ", data);
//params.log(); //params.log();
......
...@@ -28,7 +28,8 @@ public: ...@@ -28,7 +28,8 @@ public:
virtual ~ivim_layer() {}; virtual ~ivim_layer() {};
void sendMsg(const LibItsIvim__TestSystem::IvimReq&, params& params); void sendMsg(const LibItsIvim__TestSystem::IvimReq&, params& params);
void sendMsg(const LibItsIvim__TestSystem::IvimInd&, params& params);
virtual void send_data(OCTETSTRING& data, params& params); virtual void send_data(OCTETSTRING& data, params& params);
virtual void receive_data(OCTETSTRING& data, params& info); virtual void receive_data(OCTETSTRING& data, params& info);
......
...@@ -80,8 +80,18 @@ int UpperTesterRtcmemCodec::encode_ (const Base_Type& type, const TTCN_Typedescr ...@@ -80,8 +80,18 @@ int UpperTesterRtcmemCodec::encode_ (const Base_Type& type, const TTCN_Typedescr
} else { } else {
std::string s(field_descriptor.name); std::string s(field_descriptor.name);
loggers::get_instance().log("UpperTesterRtcmemCodec::encode_: field to process %s", s.c_str()); loggers::get_instance().log("UpperTesterRtcmemCodec::encode_: field to process %s", s.c_str());
loggers::get_instance().log("UpperTesterRtcmemCodec::encode_ (else): processing type %s/%s", type.get_descriptor()->name, field_descriptor.name); if (s.compare("@LibItsRtcmem_TypesAndValues.UtRtcmemTrigger.msgs") == 0) {
type.encode(field_descriptor, encoding_buffer, TTCN_EncDec::CT_OER); const PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING& rov = dynamic_cast<const PreGenRecordOf::PREGEN__RECORD__OF__OCTETSTRING&>(type);
encoding_buffer.put_c(static_cast<unsigned char>(rov.lengthof()));
for (int i = 0; i < rov.lengthof(); i++) {
const OCTETSTRING& os = rov[i];
encoding_buffer.put_c(static_cast<unsigned char>(os.lengthof()));
encoding_buffer.put_os(os);
} // End of 'for' statement
} else {
loggers::get_instance().log("UpperTesterRtcmemCodec::encode_ (else): processing type %s/%s", type.get_descriptor()->name, field_descriptor.name);
type.encode(field_descriptor, encoding_buffer, TTCN_EncDec::CT_OER); // HashId8
}
} }
loggers::get_instance().log_to_hexa("<<<UpperTesterRtcmemCodec::encode_: encoding_buffer=", encoding_buffer); loggers::get_instance().log_to_hexa("<<<UpperTesterRtcmemCodec::encode_: encoding_buffer=", encoding_buffer);
......
...@@ -24,7 +24,7 @@ LogEventTypes:= Yes ...@@ -24,7 +24,7 @@ LogEventTypes:= Yes
[TESTPORT_PARAMETERS] [TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports. # In this section you can specify parameters that are passed to Test Ports.
# CAM Layer # IVIM Layer
# next_header : btpA|btpB (overwrite BTP.type) # next_header : btpA|btpB (overwrite BTP.type)
# header_type : tsb|gbc|uni # header_type : tsb|gbc|uni
# header_sub_type : sh (single hop) # header_sub_type : sh (single hop)
...@@ -90,7 +90,7 @@ LogEventTypes:= Yes ...@@ -90,7 +90,7 @@ LogEventTypes:= Yes
#Cygwin #Cygwin
#system.ivimPort.params := "IVIM(next_header=btpB,header_type=uni)/BTP(dst_port=2006)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=0,sec_db_path=/home/yanng/tmp/asn1c_cert)/ETH(mac_src=e2b7b30429eb)/PCAP(mac_src=e2b7b30429eb,nic=CEBB111F-D749-4B40-8B4D-DBB060E90987,filter=and ether proto 0x8947)" #system.ivimPort.params := "IVIM(next_header=btpB,header_type=uni)/BTP(dst_port=2006)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=0,sec_db_path=/home/yanng/tmp/asn1c_cert)/ETH(mac_src=e2b7b30429eb)/PCAP(mac_src=e2b7b30429eb,nic=CEBB111F-D749-4B40-8B4D-DBB060E90987,filter=and ether proto 0x8947)"
# Linux # Linux
system.ivimPort.params := "IVIM(next_header=btpB,header_type=uni)/BTP(dst_port=2006)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=1,sec_db_path=/home/yann/tmp/asn1c_cert)/ETH(mac_src=dc536045af7e)/PCAP(mac_src=dc536045af7e,nic=wlp2s0,filter=and ether proto 0x8947)" system.ivimPort.params := "IVIM(next_header=btpB,header_type=gbc)/BTP(dst_port=2006)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=1,sec_db_path=/home/yann/tmp/asn1c_cert)/ETH(mac_src=dc536045af7e)/PCAP(mac_src=dc536045af7e,nic=wlp2s0,filter=and ether proto 0x8947)"
# IVIM UpperTester port based on UDP (ETSI Wlan) # IVIM UpperTester port based on UDP (ETSI Wlan)
system.utPort.params := "UT_IVIM/UDP(dst_ip=127.0.0.1,dst_port=12345,src_port=12346)" system.utPort.params := "UT_IVIM/UDP(dst_ip=127.0.0.1,dst_port=12345,src_port=12346)"
......
...@@ -55,15 +55,15 @@ ItsRSUsSimulator_Pics.PICS_DENM_FREQUENCY := 1.0 ...@@ -55,15 +55,15 @@ ItsRSUsSimulator_Pics.PICS_DENM_FREQUENCY := 1.0
ItsRSUsSimulator_Pics.PICS_SEND_BEACON_INDICATION := false ItsRSUsSimulator_Pics.PICS_SEND_BEACON_INDICATION := false
ItsRSUsSimulator_Pics.PICS_SEND_CAM_INDICATION := false ItsRSUsSimulator_Pics.PICS_SEND_CAM_INDICATION := false
ItsRSUsSimulator_Pics.PICS_SEND_DENM_INDICATION := false ItsRSUsSimulator_Pics.PICS_SEND_DENM_INDICATION := false
ItsRSUsSimulator_Pics.PICS_SEND_IVIM_INDICATION := true ItsRSUsSimulator_Pics.PICS_SEND_IVIM_INDICATION := false
ItsRSUsSimulator_Pics.PICS_SEND_MAPEM_INDICATION := false ItsRSUsSimulator_Pics.PICS_SEND_MAPEM_INDICATION := false
ItsRSUsSimulator_Pics.PICS_SEND_SPATEM_INDICATION := false ItsRSUsSimulator_Pics.PICS_SEND_SPATEM_INDICATION := false
ItsRSUsSimulator_Pics.PICS_SEND_SREM_INDICATION := false ItsRSUsSimulator_Pics.PICS_SEND_SREM_INDICATION := false
ItsRSUsSimulator_Pics.PICS_SEND_SSEM_INDICATION := false ItsRSUsSimulator_Pics.PICS_SEND_SSEM_INDICATION := false
ItsRSUsSimulator_Pics.PICS_SEND_RTCMEM_INDICATION := false ItsRSUsSimulator_Pics.PICS_SEND_RTCMEM_INDICATION := true
# Enable Security support # Enable Security support
LibItsGeoNetworking_Pics.PICS_GN_SECURITY := true LibItsGeoNetworking_Pics.PICS_GN_SECURITY := false
# Root path to access certificate stored in files, identified by certficate ID # Root path to access certificate stored in files, identified by certficate ID
LibItsSecurity_Pixits.PX_CERTIFICATE_POOL_PATH := "/home/yann/tmp" LibItsSecurity_Pixits.PX_CERTIFICATE_POOL_PATH := "/home/yann/tmp"
# Configuration sub-directory to access certificate stored in files # Configuration sub-directory to access certificate stored in files
...@@ -182,7 +182,7 @@ LogEventTypes:= Yes ...@@ -182,7 +182,7 @@ LogEventTypes:= Yes
#system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,its_aid=36,secured_mode=0,certificate=CERT_IUT_A_AT,sec_db_path=/home/yann/tmp/asn1c_cert)/ETH(mac_src=f8cab8083918)/PCAP(mac_src=f8cab8083918,nic=CEBB111F-D749-4B40-8B4D-DBB060E90987,filter=and ether proto 0x8947)" #system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,its_aid=36,secured_mode=0,certificate=CERT_IUT_A_AT,sec_db_path=/home/yann/tmp/asn1c_cert)/ETH(mac_src=f8cab8083918)/PCAP(mac_src=f8cab8083918,nic=CEBB111F-D749-4B40-8B4D-DBB060E90987,filter=and ether proto 0x8947)"
# Linux # Linux
#system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,its_aid=36,secured_mode=1,certificate=CERT_IUT_A_AT,sec_db_path=/home/yann/tmp/asn1c_cert)/ETH(mac_src=f8cab8083918)/PCAP(mac_src=f8cab8083918,nic=eno1,filter=and ether proto 0x8947)" #system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,its_aid=36,secured_mode=1,certificate=CERT_IUT_A_AT,sec_db_path=/home/yann/tmp/asn1c_cert)/ETH(mac_src=f8cab8083918)/PCAP(mac_src=f8cab8083918,nic=eno1,filter=and ether proto 0x8947)"
system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,its_aid=139,secured_mode=1,certificate=CERT_IUT_A_AT,sec_db_path=/home/yann/tmp/asn1c_cert)/ETH(mac_src=dc536045af7f)/PCAP(mac_src=dc536045af7f,nic=wlp2s0,filter=and ether proto 0x8947)" system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,its_aid=128,secured_mode=0,certificate=CERT_IUT_A_AT,sec_db_path=/home/yann/tmp/asn1c_cert)/ETH(mac_src=dc536045af7e)/PCAP(mac_src=dc536045af7e,nic=wlp2s0,filter=and ether proto 0x8947)"
# Commsignia # Commsignia
#system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,its_aid=37,secured_mode=0,encrypted_mode=0,certificate=CERT_IUT_A_AT,peer_certificate=CERT_TS_A_AT,sec_db_path=/home/yann/tmp/asn1c_cert)/COMMSIGNIA(xport_mode=LTE-V2X,mac_src=080027F44E7D,interface_id=2,target_host=192.168.0.54)/UDP(dst_ip=192.168.0.54,src_port=9091,dst_port=7946)" #system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,its_aid=37,secured_mode=0,encrypted_mode=0,certificate=CERT_IUT_A_AT,peer_certificate=CERT_TS_A_AT,sec_db_path=/home/yann/tmp/asn1c_cert)/COMMSIGNIA(xport_mode=LTE-V2X,mac_src=080027F44E7D,interface_id=2,target_host=192.168.0.54)/UDP(dst_ip=192.168.0.54,src_port=9091,dst_port=7946)"
# Qualcom # Qualcom
...@@ -195,10 +195,11 @@ system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050 ...@@ -195,10 +195,11 @@ system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050
# Config port based on UDP # Config port based on UDP
#system.cfPort.params := "CF(ut=cam)/UDP(src_port=12345,dst_port=12346,reuse_incoming_source_adddress=1)" #system.cfPort.params := "CF(ut=cam)/UDP(src_port=12345,dst_port=12346,reuse_incoming_source_adddress=1)"
#system.cfPort.params := "CF(ut=denm)/UDP(src_port=12345,reuse_incoming_source_adddress=1)" #system.cfPort.params := "CF(ut=denm)/UDP(src_port=12345,reuse_incoming_source_adddress=1)"
system.cfPort.params := "CF(ut=ivim)/UDP(src_port=12345,dst_port=12346,reuse_incoming_source_adddress=1)" #system.cfPort.params := "CF(ut=ivim)/UDP(src_port=12345,dst_port=12346,reuse_incoming_source_adddress=1)"
#system.cfPort.params := "CF(ut=mapemspatem)/UDP(src_port=12345,dst_port=12346,reuse_incoming_source_adddress=1)" #system.cfPort.params := "CF(ut=mapemspatem)/UDP(src_port=12345,dst_port=12346,reuse_incoming_source_adddress=1)"
#system.cfPort.params := "CF(ut=sremssem)/UDP(src_port=12345,dst_port=12346,reuse_incoming_source_adddress=1)" #system.cfPort.params := "CF(ut=sremssem)/UDP(src_port=12345,dst_port=12346,reuse_incoming_source_adddress=1)"
#system.cfPort.params := "CF(ut=rtcmem)/UDP(src_port=12345,dst_port=12346,reuse_incoming_source_adddress=1)" system.cfPort.params := "CF(ut=rtcmem)/UDP(src_port=12345,dst_port=12346,reuse_incoming_source_adddress=1)"
#system.cfPort.params := "CF(ut=rtcmem)/UDP(src_port=12345,dst_port=12345,reuse_incoming_source_adddress=1)"
#system.cfPort.params := "CF(ut=gn)/UDP(src_port=12345,dst_port=12346,reuse_incoming_source_adddress=1)" #system.cfPort.params := "CF(ut=gn)/UDP(src_port=12345,dst_port=12346,reuse_incoming_source_adddress=1)"
#system.cfPort.params := "CF(ut=pki)/UDP(src_port=12345,dst_port=12346,reuse_incoming_source_adddress=1)" #system.cfPort.params := "CF(ut=pki)/UDP(src_port=12345,dst_port=12346,reuse_incoming_source_adddress=1)"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
LibItsCommon_Pixits.PX_IUT_STATION_ID := 2533729309 LibItsCommon_Pixits.PX_IUT_STATION_ID := 2533729309
LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB
LibItsCam_Pics.PICS_IS_IUT_SECURED := true LibItsCam_Pics.PICS_IS_IUT_SECURED := false
[LOGGING] [LOGGING]
# In this section you can specify the name of the log file and the classes of events # In this section you can specify the name of the log file and the classes of events
...@@ -22,9 +22,9 @@ LogEventTypes:= Yes ...@@ -22,9 +22,9 @@ LogEventTypes:= Yes
[TESTPORT_PARAMETERS] [TESTPORT_PARAMETERS]
# In this section you can specify parameters that are passed to Test Ports. # In this section you can specify parameters that are passed to Test Ports.
# CAM Layer # RTCMEM Layer
# next_header : btpA|btpB (overwrite BTP.type) # next_header : btpA|btpB (overwrite BTP.type)
# header_type : tsb|gbc # header_type : tsb|gbc|uni
# header_sub_type : sh (single hop) # header_sub_type : sh (single hop)
# RTCMEM Layer # RTCMEM Layer
# next_header : btpA|btpB (overwrite BTP.type) # next_header : btpA|btpB (overwrite BTP.type)
...@@ -89,14 +89,14 @@ LogEventTypes:= Yes ...@@ -89,14 +89,14 @@ LogEventTypes:= Yes
#Cygwin #Cygwin
#system.rtcmemPort.params := "Rtcmem(next_header=btpB)/BTP(dst_port=2013)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=0,sec_db_path=/home/yanng/tmp/asn1c_cert)/ETH(mac_src=e2b7b30429eb)/PCAP(mac_src=e2b7b30429eb,nic=CEBB111F-D749-4B40-8B4D-DBB060E90987,filter=and ether proto 0x8947)" #system.rtcmemPort.params := "Rtcmem(next_header=btpB)/BTP(dst_port=2013)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=0,sec_db_path=/home/yanng/tmp/asn1c_cert)/ETH(mac_src=e2b7b30429eb)/PCAP(mac_src=e2b7b30429eb,nic=CEBB111F-D749-4B40-8B4D-DBB060E90987,filter=and ether proto 0x8947)"
# Linux # Linux
system.rtcmemPort.params := "Rtcmem(next_header=btpB)/BTP(dst_port=2013)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=1,sec_db_path=/home/yanng/tmp/asn1c_cert)/ETH(mac_src=dc536045af7e)/PCAP(mac_src=dc536045af7e,nic=wlp2s0,filter=and ether proto 0x8947)" system.rtcmemPort.params := "Rtcmem(next_header=btpB,header_type=gbc)/BTP(dst_port=2013)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1,secured_mode=0,sec_db_path=/home/yanng/tmp/asn1c_cert)/ETH(mac_src=dc536045af7f)/PCAP(mac_src=dc536045af7f,nic=wlp2s0,filter=and ether proto 0x8947)"
# SremSsem UpperTester port based on UDP # SremSsem UpperTester port based on UDP
system.utPort.params := "UT_RTCMEM/UDP(dst_ip=127.0.0.1,dst_port=12345,src_port=12346)" system.utPort.params := "UT_RTCMEM/UDP(dst_ip=192.168.1.25,dst_port=12345,src_port=12346)"
[EXECUTE] [EXECUTE]
# Check that protocolVersion is set to 1 and messageID is set to 13 # Check that protocolVersion is set to 1 and messageID is set to 13
#ItsRtcmem_TestCases.TC_IS_GPC_GEN_MSGF_BV_01 ItsRtcmem_TestCases.TC_IS_GPC_GEN_MSGF_BV_01
# Check that GPC Service generates a new RTCMEM on reception of a valid AppRTCMEM_Start request # Check that GPC Service generates a new RTCMEM on reception of a valid AppRTCMEM_Start request
#ItsRtcmem_TestCases.TC_IS_GPC_GEN_EVGN_BV_01 #ItsRtcmem_TestCases.TC_IS_GPC_GEN_EVGN_BV_01
# Check that GPC Service terminates on reception of a valid AppRTCMEM_Stop request # Check that GPC Service terminates on reception of a valid AppRTCMEM_Stop request
...@@ -105,7 +105,7 @@ system.utPort.params := "UT_RTCMEM/UDP(dst_ip=127.0.0.1,dst_port=12345,src_port= ...@@ -105,7 +105,7 @@ system.utPort.params := "UT_RTCMEM/UDP(dst_ip=127.0.0.1,dst_port=12345,src_port=
# Check that the destination port for RTCMEM is set to 2013 # Check that the destination port for RTCMEM is set to 2013
#ItsRtcmem_TestCases.TC_IS_GPC_GEN_COM_BV_02 #ItsRtcmem_TestCases.TC_IS_GPC_GEN_COM_BV_02
# Check that GPC service encapsulates RTCMEM in a GBC with the HeaderType field set to the value of 4 # Check that GPC service encapsulates RTCMEM in a GBC with the HeaderType field set to the value of 4
ItsRtcmem_TestCases.TC_IS_GPC_GEN_COM_BV_03 #ItsRtcmem_TestCases.TC_IS_GPC_GEN_COM_BV_03
# Check that GPC service uses certificate containing valid ITS AID to sign RTCMEM messages # Check that GPC service uses certificate containing valid ITS AID to sign RTCMEM messages
#ItsRtcmem_TestCases.TC_IS_GPC_GEN_SEC_BV_01 #ItsRtcmem_TestCases.TC_IS_GPC_GEN_SEC_BV_01
# Check that GPC service uses generic security profile to sign RTCMEM message and does not include additional security header elements # Check that GPC service uses generic security profile to sign RTCMEM message and does not include additional security header elements
......
...@@ -216,7 +216,7 @@ MV_CMD='s/all: $(TARGET) ;/all: $(TARGET) ; @if [ -f ..\/objs\/$(EXECUTABLE) ]; ...@@ -216,7 +216,7 @@ MV_CMD='s/all: $(TARGET) ;/all: $(TARGET) ; @if [ -f ..\/objs\/$(EXECUTABLE) ];
sed --in-place "${MV_CMD}" ./Makefile sed --in-place "${MV_CMD}" ./Makefile
# Add run command # Add run command
ADD_HOST='/PLATFORM = /aHOST=127.0.0.1' ADD_HOST='/PLATFORM = /aHOST=127.0.0.1'
ADD_PORT='/PLATFORM = /aPORT=12000' ADD_PORT='/PLATFORM = /aPORT=12001'
sed --in-place "${ADD_PORT}" ./Makefile sed --in-place "${ADD_PORT}" ./Makefile
sed --in-place "${ADD_HOST}" ./Makefile sed --in-place "${ADD_HOST}" ./Makefile
ADD_RUN_LINE_1='$arun: all' ADD_RUN_LINE_1='$arun: all'
......
...@@ -939,10 +939,10 @@ module ItsRSUsSimulator_Functions { ...@@ -939,10 +939,10 @@ module ItsRSUsSimulator_Functions {
)); ));
} else if (p_its_aid == 139) { // IVIM } else if (p_its_aid == 139) { // IVIM
v_geoNetworkingPdu := valueof(m_geoNwPdu( // FIXME Use PIXIT parameter to get a fully configurable template v_geoNetworkingPdu := valueof(m_geoNwPdu( // FIXME Use PIXIT parameter to get a fully configurable template
m_geoNwUnicastPacket_with_payload( m_geoNwBroadcastPacket_payload(
vc_longPosVectorRsu, vc_longPosVectorRsu,
f_longPosVector2ShortPosVector(vc_longPosVectorRsu),
f_incLocalSeqNumber(), f_incLocalSeqNumber(),
f_geoArea2GeoBroadcastArea(vc_geoArea),
-, -, -, -,
valueof(p_payload) valueof(p_payload)
), ),
...@@ -967,7 +967,7 @@ module ItsRSUsSimulator_Functions { ...@@ -967,7 +967,7 @@ module ItsRSUsSimulator_Functions {
}, },
c_hopLimit1 c_hopLimit1
)); ));
} else if (p_its_aid == 141) { // RTCMEM } else if (p_its_aid == 140) { // RTCMEM
v_geoNetworkingPdu := valueof(m_geoNwPdu( // FIXME Use PIXIT parameter to get a fully configurable template v_geoNetworkingPdu := valueof(m_geoNwPdu( // FIXME Use PIXIT parameter to get a fully configurable template
m_geoNwBroadcastPacket_payload( m_geoNwBroadcastPacket_payload(
vc_longPosVectorRsu, vc_longPosVectorRsu,
...@@ -1178,6 +1178,27 @@ module ItsRSUsSimulator_Functions { ...@@ -1178,6 +1178,27 @@ module ItsRSUsSimulator_Functions {
} // else, ignore message } // else, ignore message
} // End of function f_processSsem } // End of function f_processSsem
function f_processRtcmem(
in GeoNetworkingPdu p_geoNetworkingPdu
) runs on ItsRSUsSimulator {
var bitstring v_enc_msg;
log("f_processRtcmem: RTCMEM=", p_geoNetworkingPdu.gnPacket.packet.payload);
if (PICS_SEND_RTCMEM_INDICATION) {
var UtRtcmemEventInd v_utRtcmemEventInd;
var integer v_result;
// Extract RTCMEM message
var octetstring v_payload := p_geoNetworkingPdu.gnPacket.packet.payload;
// Remove BTP layer
v_payload := substr(v_payload, 4, lengthof(v_payload) - 4);
// Send UtRtcmemEventInd
log("f_processRtcmem: v_payload=", v_payload);
v_enc_msg := oct2bit(v_payload);
if (decvalue(v_enc_msg, v_utRtcmemEventInd.rtcmemMsg) == 0) {
cfPort.send(v_utRtcmemEventInd);
}
}
}
function f_incLocalSeqNumber() runs on ItsRSUsSimulator return UInt16 { function f_incLocalSeqNumber() runs on ItsRSUsSimulator return UInt16 {
vc_localSeqNumber := (vc_localSeqNumber + 1) mod 65536; vc_localSeqNumber := (vc_localSeqNumber + 1) mod 65536;
return vc_localSeqNumber; return vc_localSeqNumber;
......
...@@ -205,11 +205,11 @@ module ItsRSUsSimulator_Templates { ...@@ -205,11 +205,11 @@ module ItsRSUsSimulator_Templates {
* @param p_seqNumber Sequence number of GeoUnicast packet * @param p_seqNumber Sequence number of GeoUnicast packet
* @param p_nextHeader Id of next header * @param p_nextHeader Id of next header
*/ */
template (present) GnNonSecuredPacket mw_geoNwUnicastPacketWithNextHeader_ivim( template (present) GnNonSecuredPacket mw_geoNwBroadcastPacketWithNextHeader_ivim(
template (present) ShortPosVector p_destinationShortPosVec := ?, template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?, template (present) UInt16 p_seqNumber := ?,
template (present) NextHeader p_nextHeader := ? template (present) NextHeader p_nextHeader := ?
) modifies mw_geoNwUnicastPacketWithNextHeader := { ) modifies mw_geoNwBroadcastPacketWithNextHeader := {
payload := f_payload_template(PICS_IVIM_BTP_DESTINATION_PORT, PICS_IVIM_BTP_SOURCE_PORT) payload := f_payload_template(PICS_IVIM_BTP_DESTINATION_PORT, PICS_IVIM_BTP_SOURCE_PORT)
} }
...@@ -220,9 +220,9 @@ module ItsRSUsSimulator_Templates { ...@@ -220,9 +220,9 @@ module ItsRSUsSimulator_Templates {
* @param p_nextHeader Id of next header * @param p_nextHeader Id of next header
*/ */
template (present) GnNonSecuredPacket mw_geoNwBroadcastPacketWithNextHeader_mapem( template (present) GnNonSecuredPacket mw_geoNwBroadcastPacketWithNextHeader_mapem(
template (present) LongPosVector p_sourceLongPosVec := ?, template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?, template (present) UInt16 p_seqNumber := ?,
template (present) NextHeader p_nextHeader := ? template (present) NextHeader p_nextHeader := ?
) modifies mw_geoNwBroadcastPacketWithNextHeader := { ) modifies mw_geoNwBroadcastPacketWithNextHeader := {
payload := f_payload_template(PICS_MAPEM_BTP_DESTINATION_PORT, PICS_MAPEM_BTP_SOURCE_PORT) payload := f_payload_template(PICS_MAPEM_BTP_DESTINATION_PORT, PICS_MAPEM_BTP_SOURCE_PORT)
} }
...@@ -234,13 +234,27 @@ module ItsRSUsSimulator_Templates { ...@@ -234,13 +234,27 @@ module ItsRSUsSimulator_Templates {
* @param p_nextHeader Id of next header * @param p_nextHeader Id of next header
*/ */
template (present) GnNonSecuredPacket mw_geoNwBroadcastPacketWithNextHeader_spatem( template (present) GnNonSecuredPacket mw_geoNwBroadcastPacketWithNextHeader_spatem(
template (present) LongPosVector p_sourceLongPosVec := ?, template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?, template (present) UInt16 p_seqNumber := ?,
template (present) NextHeader p_nextHeader := ? template (present) NextHeader p_nextHeader := ?
) modifies mw_geoNwBroadcastPacketWithNextHeader := { ) modifies mw_geoNwBroadcastPacketWithNextHeader := {
payload := f_payload_template(PICS_SPATEM_BTP_DESTINATION_PORT, PICS_SPATEM_BTP_SOURCE_PORT) payload := f_payload_template(PICS_SPATEM_BTP_DESTINATION_PORT, PICS_SPATEM_BTP_SOURCE_PORT)
} }
/**
* @desc Receive template for GeoNetworking Unicast Packet
* @param p_destinationShortPosVec Short position vector of destination
* @param p_seqNumber Sequence number of GeoUnicast packet
* @param p_nextHeader Id of next header
*/
template (present) GnNonSecuredPacket mw_geoNwBroadcastPacketWithNextHeader_rtcmem(
template (present) LongPosVector p_sourceLongPosVec := ?,
template (present) UInt16 p_seqNumber := ?,
template (present) NextHeader p_nextHeader := ?
) modifies mw_geoNwBroadcastPacketWithNextHeader := {
payload := f_payload_template(PICS_RTCMEM_BTP_DESTINATION_PORT, PICS_RTCMEM_BTP_SOURCE_PORT)
}
/** /**
* @desc Receive template for GeoNetworking Unicast Packet * @desc Receive template for GeoNetworking Unicast Packet
* @param p_destinationShortPosVec Short position vector of destination * @param p_destinationShortPosVec Short position vector of destination
......
...@@ -117,7 +117,7 @@ module ItsRSUsSimulator_TestCases { ...@@ -117,7 +117,7 @@ module ItsRSUsSimulator_TestCases {
[PICS_SEND_IVIM_INDICATION == true] geoNetworkingPort.receive( [PICS_SEND_IVIM_INDICATION == true] geoNetworkingPort.receive(
mw_geoNwInd( mw_geoNwInd(
mw_geoNwPdu( mw_geoNwPdu(
mw_geoNwUnicastPacketWithNextHeader_ivim( mw_geoNwBroadcastPacketWithNextHeader_ivim(
?, ?,
?, ?,
e_btpB e_btpB
...@@ -162,6 +162,18 @@ module ItsRSUsSimulator_TestCases { ...@@ -162,6 +162,18 @@ module ItsRSUsSimulator_TestCases {
f_processSsem(v_gnInd.msgIn); f_processSsem(v_gnInd.msgIn);
repeat; repeat;
} }
[PICS_SEND_RTCMEM_INDICATION == true] geoNetworkingPort.receive(
mw_geoNwInd(
mw_geoNwPdu(
mw_geoNwBroadcastPacketWithNextHeader_rtcmem(
?,
?,
e_btpB
)))) -> value v_gnInd { // Receive a RTCMEM message
log("*** " & testcasename() & ": DEBUG: Processing RTCMEM ***");
f_processRtcmem(v_gnInd.msgIn);
repeat;
}
[] geoNetworkingPort.receive( [] geoNetworkingPort.receive(
mw_geoNwInd( mw_geoNwInd(
mw_geoNwPdu( mw_geoNwPdu(
......
...@@ -42,11 +42,10 @@ module ItsRtcmem_TpFunctions { ...@@ -42,11 +42,10 @@ module ItsRtcmem_TpFunctions {
f_cfUp(); f_cfUp();
// Preamble // Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body // Test Body
f_utTriggerEvent(m_utTriggerEvent(0, -, { char2oct("STR;SCSC;Glendora, CA;RTCM 3.1;1004(1),1005(10),1012(1);2;GPS+GLO;SNIP;USA;34.13;-117.83;0;0;sNTRIP;none;N;N;0;"), char2oct("STR;SCSC;Glendora, CA;RTCM 3.1;1004(1),1005(10),1012(1);2;GPS+GLO;SNIP;USA;34.13;-117.83;0;0;sNTRIP;none;N;N;0;") })); f_utTriggerEvent(m_utTriggerEvent(10, -, { char2oct("STR;SCSC;Glendora, CA;RTCM 3.1;1004(1),1005(10),1012(1);2;GPS+GLO;SNIP;USA;34.13;-117.83;0;0;sNTRIP;none;N;N;0;"), char2oct("STR;SCSC;Glendora, CA;RTCM 3.1;1004(1),1005(10),1012(1);2;GPS+GLO;SNIP;USA;34.13;-117.83;0;0;sNTRIP;none;N;N;0;"), char2oct("STR;SCSC;Glendora, CA;RTCM 3.1;1004(1),1005(10),1012(1);2;GPS+GLO;SNIP;USA;34.13;-117.83;0;0;sNTRIP;none;N;N;0;"), char2oct("STR;SCSC;Glendora, CA;RTCM 3.1;1004(1),1005(10),1012(1);2;GPS+GLO;SNIP;USA;34.13;-117.83;0;0;sNTRIP;none;N;N;0;") }));
tc_ac.start; tc_ac.start;
alt { alt {
...@@ -65,7 +64,7 @@ module ItsRtcmem_TpFunctions { ...@@ -65,7 +64,7 @@ module ItsRtcmem_TpFunctions {
} }
// Postamble // Postamble
f_utTerminateEvent(m_utTriggerTermination(0)); f_utTerminateEvent(m_utTriggerTermination(10));
f_poDefault(); f_poDefault();
f_cfDown(); f_cfDown();
...@@ -90,11 +89,10 @@ module ItsRtcmem_TpFunctions { ...@@ -90,11 +89,10 @@ module ItsRtcmem_TpFunctions {
f_cfUp(); f_cfUp();
// Preamble // Preamble
f_prInitialState();
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success); f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body // Test Body
f_utTriggerEvent(m_utTriggerEvent(0, -, { char2oct("STR;SCSC;Glendora, CA;RTCM 3.1;1004(1),1005(10),1012(1);2;GPS+GLO;SNIP;USA;34.13;-117.83;0;0;sNTRIP;none;N;N;0;"), char2oct("STR;SCSC;Glendora, CA;RTCM 3.1;1004(1),1005(10),1012(1);2;GPS+GLO;SNIP;USA;34.13;-117.83;0;0;sNTRIP;none;N;N;0;") })); f_utTriggerEvent(m_utTriggerEvent(10, -, { char2oct("STR;SCSC;Glendora, CA;RTCM 3.1;1004(1),1005(10),1012(1);2;GPS+GLO;SNIP;USA;34.13;-117.83;0;0;sNTRIP;none;N;N;0;"), char2oct("STR;SCSC;Glendora, CA;RTCM 3.1;1004(1),1005(10),1012(1);2;GPS+GLO;SNIP;USA;34.13;-117.83;0;0;sNTRIP;none;N;N;0;") }));
tc_ac.start; tc_ac.start;
alt { alt {
...@@ -113,7 +111,7 @@ module ItsRtcmem_TpFunctions { ...@@ -113,7 +111,7 @@ module ItsRtcmem_TpFunctions {
} // End of 'alt' statement } // End of 'alt' statement
// Postamble // Postamble
f_utTerminateEvent(m_utTriggerTermination(0)); f_utTerminateEvent(m_utTriggerTermination(10));
f_poDefault(); f_poDefault();
f_cfDown(); f_cfDown();
...@@ -134,8 +132,7 @@ module ItsRtcmem_TpFunctions { ...@@ -134,8 +132,7 @@ module ItsRtcmem_TpFunctions {
f_cfUp(); f_cfUp();
// Preamble // Preamble
f_prInitialState(); f_utTriggerEvent(m_utTriggerEvent(10, -, { char2oct("STR;SCSC;Glendora, CA;RTCM 3.1;1004(1),1005(10),1012(1);2;GPS+GLO;SNIP;USA;34.13;-117.83;0;0;sNTRIP;none;N;N;0;"), char2oct("STR;SCSC;Glendora, CA;RTCM 3.1;1004(1),1005(10),1012(1);2;GPS+GLO;SNIP;USA;34.13;-117.83;0;0;sNTRIP;none;N;N;0;") }));
f_utTriggerEvent(m_utTriggerEvent(0, -, { char2oct("STR;SCSC;Glendora, CA;RTCM 3.1;1004(1),1005(10),1012(1);2;GPS+GLO;SNIP;USA;34.13;-117.83;0;0;sNTRIP;none;N;N;0;"), char2oct("STR;SCSC;Glendora, CA;RTCM 3.1;1004(1),1005(10),1012(1);2;GPS+GLO;SNIP;USA;34.13;-117.83;0;0;sNTRIP;none;N;N;0;") }));
tc_ac.start; tc_ac.start;
alt { alt {
[] rtcmemPort.receive( [] rtcmemPort.receive(
...@@ -153,7 +150,7 @@ module ItsRtcmem_TpFunctions { ...@@ -153,7 +150,7 @@ module ItsRtcmem_TpFunctions {
} // End of 'alt' statement