Commit 9da1e40b authored by Yann Garcia's avatar Yann Garcia

Merge branch 'STF525' of https://forge.etsi.org/gitlab/ITS/ITS into STF525

parents 506d49cf 1ba28898
......@@ -153,7 +153,7 @@ void ConfigRsuSimulatorLayer::sendMsg(const LibItsPki__TypesAndValues::UtPkiResu
encoding_buffer.put_c(0x01/*static_cast<const unsigned char>(uppertester_pki_codec::c_utPkiInitializeResult)*/);
encoding_buffer.put_c((unsigned char)static_cast<const boolean>(send_par.utPkiInitializeResult()));
} else if (send_par.ischosen(LibItsPki__TypesAndValues::UtPkiResults::ALT_utPkiTriggerResult)) {
encoding_buffer.put_c(0xBC/*static_cast<const unsigned char>(uppertester_pki_codec::c_utPkiTriggerResult)*/);
encoding_buffer.put_c(0xB0/*static_cast<const unsigned char>(uppertester_pki_codec::c_utPkiTriggerResult)*/);
encoding_buffer.put_c((unsigned char)static_cast<const boolean>(send_par.utPkiTriggerResult()));
} else {
loggers::get_instance().warning("ConfigRsuSimulatorLayer::sendMsg: Unsupported UtPkiResults variant");
......@@ -585,6 +585,7 @@ int ConfigRsuSimulatorLayer::process_ut_geonetworking_trigger(const OCTETSTRING&
}
p.tsb() = g;
}
// Pass it to the ports if any
to_all_upper_ports(p, params);
} else {
......@@ -605,11 +606,24 @@ int ConfigRsuSimulatorLayer::process_ut_pki_trigger(const OCTETSTRING& data, par
}
if (_params[std::string("ut")].compare("pki") == 0) {
unsigned char msg_id = *static_cast<const unsigned char*>(data);
loggers::get_instance().log("ConfigRsuSimulatorLayer::process_ut_geonetworking_trigger: msg_id=%02x", msg_id);
OCTETSTRING payload(data.lengthof() - 1, 1 + static_cast<const unsigned char*>(data));
loggers::get_instance().log_msg("ConfigRsuSimulatorLayer::process_ut_geonetworking_trigger: payload:", payload);
TTCN_EncDec::clear_error();
TTCN_Buffer decoding_buffer(payload);
LibItsPki__TypesAndValues::UtPkiTrigger p;
if (msg_id == 0xbb/*uppertester_pki_codec*/) {
// LibItsPki__TypesAndValues::TriggerEnrolmentRequest e;
// e.decode(*e.get_descriptor(), decoding_buffer, TTCN_EncDec::CT_RAW);
//p.triggerEnrolmentRequest() = e;
p.triggerEnrolmentRequest().cannonicalId() = OCTETSTRING(0, nullptr); // No parameter used
p.triggerEnrolmentRequest().encAlgorithm() = OCTETSTRING(0, nullptr); // No parameter used
p.triggerEnrolmentRequest().privateKey() = OCTETSTRING(0, nullptr); // No parameter used
p.triggerEnrolmentRequest().compressedPublickey() = OCTETSTRING(0, nullptr); // No parameter used
}
// Pass it to the ports if any
to_all_upper_ports(p, params);
} else {
......
......@@ -248,7 +248,7 @@ int certificates_loader::build_certificates_cache(std::set<std::experimental::fi
OCTETSTRING hash; // Whole-certificate hash
OCTETSTRING hashed_id; // Whole-certificate hashedid-8
OCTETSTRING issuer; // Certificate issuer
if (public_key_x.lengthof() == 32) {
if (public_key_x.lengthof() == 32) { // See IEEE Std 1609.2a-2017 Clause 6.4.3 CertificateBase
hash = hash_sha_256;
loggers::get_instance().log_msg("certificates_loader::build_certificates_cache: Whole-certificate SHA-256 hash: ", hash);
hashed_id = OCTETSTRING(8, static_cast<const unsigned char*>(hash) + hash.lengthof() - 8);
......
......@@ -33,9 +33,9 @@ class uppertester_pki_codec: public codec <
public:
const unsigned char c_utPkiInitialize = 0x00;
const unsigned char c_utPkiInitializeResult = 0x01;
const unsigned char c_utPkiTriggerResult = 0xB0;
const unsigned char c_utPkiTriggerEnrolmentRequest = 0xBB;
const unsigned char c_utPkiTriggerResult = 0xBC;
const unsigned char c_utPkiTriggerAuthorizationRequest = 0xBD;
const unsigned char c_utPkiTriggerAuthorizationRequest = 0xBC;
private:
int encode_ (const Base_Type& type, const TTCN_Typedescriptor_t& field_descriptor, TTCN_Buffer& encoding_buffer);
......
......@@ -43,6 +43,7 @@ ItsRSUsSimulator_Pics.PICS_GENERATE_MAPEM := false
ItsRSUsSimulator_Pics.PICS_GENERATE_SPATEM := false
ItsRSUsSimulator_Pics.PICS_GENERATE_SSEM := false
ItsRSUsSimulator_Pics.PICS_ITS_S_ROLE := true;
ItsRSUsSimulator_Pics.PICS_PKI_SUPPORT := true
ItsRSUsSimulator_Pics.PICS_BEACON_FREQUENCY := 1.0
......@@ -166,14 +167,16 @@ system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050
#system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=36747486,longitude=-4556772,distanceA=25,distanceB=25,its_aid=37,secured_mode=1,encrypted_mode=0,certificate=CERT_MICROSEC_AT_01,peer_certificate=CERT_TS_A_AT,sec_db_path=/home/vagrant/tmp/asn1c_cert)/QUALCOMM/UDP(dst_ip=10.200.1.113,src_port=9091,dst_port=4041)"
#system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=192.168.42.252,port=80)"
system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=192.168.1.252,port=80)"
#system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=192.168.1.252,port=80)"
system.httpPort.params := "HTTP(codecs=http_its:http_etsi_ieee1609dot2_codec)/TCP(debug=1,server=192.168.1.39,port=8080)"
# Config port based on UDP
#system.cfPort.params := "CF(ut=pki)/UDP(dst_ip=192.168.42.252,src_port=12345)"
#system.cfPort.params := "CF(ut=cam)/UDP(dst_ip=192.168.1.39,src_port=12345)"
#system.cfPort.params := "CF(ut=cam)/UDP(dst_ip=172.28.4.87,src_port=12345,reuse_incoming_source_adddress=1)"
system.cfPort.params := "CF(ut=denm)/UDP(dst_ip=172.28.4.87,src_port=12345,reuse_incoming_source_adddress=1)"
#system.cfPort.params := "CF(ut=denm)/UDP(dst_ip=172.28.4.87,src_port=12345,reuse_incoming_source_adddress=1)"
#system.cfPort.params := "CF(ut=gn)/UDP(dst_ip=172.28.4.87,src_port=12345,reuse_incoming_source_adddress=1)"
system.cfPort.params := "CF(ut=pki)/UDP(dst_ip=172.28.4.87,src_port=12345,reuse_incoming_source_adddress=1)"
[EXECUTE]
ItsRSUsSimulator_TestCases.TC_RSUSIMU_BV_01
......
......@@ -54,82 +54,3 @@ https://github.com/eclipse/titan.ProtocolModules.SRTP.git
https://github.com/eclipse/titan.ProtocolModules.WebSocket.git
https://github.com/eclipse/titan.ProtocolModules.HTTP2.0.git
https://github.com/eclipse/titan.Libraries.TCCUsefulFunctions.git
git://git.eclipse.org/gitroot/titan/titan.ApplicationLibraries.CoAP.git
git://git.eclipse.org/gitroot/titan/titan.ApplicationLibraries.HTTP.git
git://git.eclipse.org/gitroot/titan/titan.ApplicationLibraries.LWM2M.git
git://git.eclipse.org/gitroot/titan/titan.ApplicationLibraries.MBT.git
git://git.eclipse.org/gitroot/titan/titan.ApplicationLibraries.MQTT.git
git://git.eclipse.org/gitroot/titan/titan.Applications.IoT_Functiontest_Framework.git
git://git.eclipse.org/gitroot/titan/titan.Applications.IoT_Loadtest_Framework.git
git://git.eclipse.org/gitroot/titan/titan.Applications.RIoT.git
git://git.eclipse.org/gitroot/titan/titan.Libraries.CLL.git
git://git.eclipse.org/gitroot/titan/titan.Libraries.ServiceFramework.git
git://git.eclipse.org/gitroot/titan/titan.Libraries.TLS.git
git://git.eclipse.org/gitroot/titan/titan.Libraries.Web_GUI.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolEmulations.M3UA.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolEmulations.SCCP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolEmulations.SCTP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolEmulations.SUA.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29502_Nsmf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29503_Nudm_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29508_Nsmf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29509_Nausf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29510_Nnrf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29511_N5g_eir_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29512_Npcf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29514_Npcf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29518_Namf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29520_Nnwdaf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29571_CommonData_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29572_Nlmf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS29594_Nchf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.5G_system_TS32291_Nchf_v15.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.BSSAPP_v7.3.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.BSSGP_v13.0.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.BSSMAP_v11.2.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.CoAP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.DSS1_ETSI.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.DUA.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.EAP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.GCP_31r1.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.GRE.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.GTP_v13.5.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.GTPv2_v13.7.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.GTPv2_v15.2.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.HTTP2.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.ISUP_Q.762.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.JSON_Generic.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.LLC_v7.1.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.M2PA.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.M2UA.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.MobileL3_v13.4.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.MongoDB.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.MQTT.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.NAS_EPS_15.2.0.1.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.NDP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.NS_v7.3.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.NTAF.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.OPC_UA.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.PFCP_v15.1.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.ROSE.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SCTP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SDP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SGsAP_13.2.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SNDCP_v7.0.0.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.STOMP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.STUN.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.STUN_RFC5389.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SUA.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.TLS.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.V5.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.WTP.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.XML_RPC.git
git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.XTDP.git
git://git.eclipse.org/gitroot/titan/titan.Servers.GTP_Tunnel_Daemon.git
git://git.eclipse.org/gitroot/titan/titan.Servers.IP_Daemon_Dynamic.git
git://git.eclipse.org/gitroot/titan/titan.Servers.SCTP_Daemon_Dynamic.git
git://git.eclipse.org/gitroot/titan/titan.TestPorts.GPIO.git
git://git.eclipse.org/gitroot/titan/titan.TestPorts.MTP3asp.git
git://git.eclipse.org/gitroot/titan/titan.TestPorts.Serial.git
git://git.eclipse.org/gitroot/titan/titan.TestPorts.SocketCANasp.git
git://git.eclipse.org/gitroot/titan/titan.TestPorts.Thrift_TPG.git
......@@ -28,6 +28,7 @@ module ItsRSUsSimulator_Functions {
import from EtsiTs103097Module language "ASN.1:1997" all;
// LibItsCommon
import from LibItsCommon_Templates all;
import from LibItsCommon_Functions all;
// LibItsBtp
......@@ -1024,7 +1025,7 @@ module ItsRSUsSimulator_Functions {
[] cfPort.receive(UtGnInitialize:?) -> value v_utGnInitialize {
var GeoNetworkingPdu v_geoNwPdu;
log("v_utGnInitialize = ", v_utGnInitialize);
log("a_process_cf_ut_command: v_utGnInitialize = ", v_utGnInitialize);
v_geoNwPdu :=valueof(
m_geoNwPdu(
m_geoNwBeaconPacket(
......@@ -1040,7 +1041,7 @@ module ItsRSUsSimulator_Functions {
repeat;
}
[] cfPort.receive(UtGnTrigger:?) -> value v_utGnTrigger {
log("v_utGnTrigger = ", v_utGnTrigger);
log("a_process_cf_ut_command: v_utGnTrigger = ", v_utGnTrigger);
if (ischosen(v_utGnTrigger.geoUnicast)) {
var GnNonSecuredPacket v_geoNwUnicastPacket := valueof(
m_geoNwUnicastPacket_with_payload(
......@@ -1186,9 +1187,15 @@ module ItsRSUsSimulator_Functions {
repeat;
}
[vc_cam == true] cfPort.receive(UtCamInitialize:?) -> value v_utCamInitialize {
log("v_utCamInitialize = ", v_utCamInitialize);
/*if (v_utCamInitialize.hashedId8 != int2oct(0, 8)) {
}*/
log("a_process_cf_ut_command: v_utCamInitialize = ", v_utCamInitialize);
if (oct2int(v_utCamInitialize.hashedId8) != 0) {
var charstring v_certificate_id;
var EtsiTs103097Certificate v_certificate;
log("a_process_cf_ut_command: Looking for certificate ", v_utCamInitialize.hashedId8);
f_getCertificateFromDigest(v_utCamInitialize.hashedId8, v_certificate, v_certificate_id);
log("a_process_cf_ut_command (pki): Change certificate to ", v_certificate_id);
f_acTriggerSecEvent(m_acEnableSecurity(v_certificate_id));
}
vc_cam_timer_value := 1.0; // Reset CAM timer
vc_rsuMessagesValueList[vc_rsu_id].cam.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.curvature.curvatureValue := 0
vc_rsuMessagesValueList[vc_rsu_id].cam.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue := 0;
......@@ -1198,13 +1205,13 @@ module ItsRSUsSimulator_Functions {
repeat;
}
[vc_cam == true] cfPort.receive(UtCamTrigger: { changeSpeed := ? }) -> value v_utCamTrigger {
log("v_utCamTrigger = ", v_utCamTrigger);
log("a_process_cf_ut_command: v_utCamTrigger = ", v_utCamTrigger);
cfPort.send(UtCamResults: { utCamTriggerResult := true } );
vc_cam_timer_value := vc_cam_timer_value / 2.0;
repeat;
}
[vc_cam == true] cfPort.receive(UtCamTrigger: { changeCurvature := ? }) -> value v_utCamTrigger {
log("v_utCamTrigger = ", v_utCamTrigger);
log("a_process_cf_ut_command: v_utCamTrigger = ", v_utCamTrigger);
if (ischosen(vc_rsuMessagesValueList[vc_rsu_id].cam.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency)) {
cfPort.send(UtCamResults: { utCamTriggerResult := true } );
vc_rsuMessagesValueList[vc_rsu_id].cam.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.curvature.curvatureValue := v_utCamTrigger.changeCurvature;
......@@ -1214,7 +1221,7 @@ module ItsRSUsSimulator_Functions {
repeat;
}
[vc_cam == true] cfPort.receive(UtCamTrigger: { changeHeading := ? }) -> value v_utCamTrigger {
log("v_utCamTrigger = ", v_utCamTrigger);
log("a_process_cf_ut_command: v_utCamTrigger = ", v_utCamTrigger);
if (ischosen(vc_rsuMessagesValueList[vc_rsu_id].cam.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency)) {
cfPort.send(UtCamResults: { utCamTriggerResult := true } );
vc_rsuMessagesValueList[vc_rsu_id].cam.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue := valueof(vc_rsuMessagesValueList[vc_rsu_id].cam.cam.camParameters.highFrequencyContainer.basicVehicleContainerHighFrequency.heading.headingValue) + v_utCamTrigger.changeHeading;
......@@ -1224,14 +1231,14 @@ module ItsRSUsSimulator_Functions {
repeat;
}
[vc_cam == true] cfPort.receive(UtCamTrigger: { setVehicleRole := ? }) -> value v_utCamTrigger {
log("v_utCamTrigger = ", v_utCamTrigger);
log("a_process_cf_ut_command: v_utCamTrigger = ", v_utCamTrigger);
vc_rsuMessagesValueList[vc_rsu_id].cam.cam.camParameters.lowFrequencyContainer.basicVehicleContainerLowFrequency.vehicleRole := v_utCamTrigger.setVehicleRole;
vc_rsuMessagesValueList[vc_rsu_id].cam.cam.camParameters.specialVehicleContainer := { publicTransportContainer := { embarkationStatus := true, ptActivation := omit } };
cfPort.send(UtCamResults: { utCamTriggerResult := true } );
repeat;
}
[] cfPort.receive(UtDenmInitialize:?) -> value v_utDenmInitialize {
log("v_utDenmInitialize = ", v_utDenmInitialize);
log("a_process_cf_ut_command: v_utDenmInitialize = ", v_utDenmInitialize);
vc_rsuMessagesValueList[vc_rsu_id].denms := {};
vc_denmEventCounter := 0;
vc_denm := true;
......@@ -1243,7 +1250,7 @@ module ItsRSUsSimulator_Functions {
var DenmEventsParmsPerZone v_denmEventsParmsPerZone := PICS_DENM_EVENTS_RSU_UC1[vc_rsu_id][PX_ETSI_ZONE_ID - 1];
var integer seq_number := f_incDenmSequenceNumber();
log("v_utDenmTrigger: ", v_utDenmTrigger);
log("a_process_cf_ut_command: v_utDenmTrigger: ", v_utDenmTrigger);
v_denmParmContainers := m_denmParmContainers(
PICS_RSU_PARAMS[vc_rsu_id].stationID,
seq_number,
......@@ -1265,7 +1272,7 @@ module ItsRSUsSimulator_Functions {
v_denmParmContainers.situationContainer,
v_denmParmContainers.locationContainer
)));
log("utDenmTrigger: denm=[" & int2char(lengthof(vc_rsuMessagesValueList[vc_rsu_id].denms) - 1) & "]=", vc_rsuMessagesValueList[vc_rsu_id].denms[lengthof(vc_rsuMessagesValueList[vc_rsu_id].denms) - 1]);
log("a_process_cf_ut_command: utDenmTrigger: denm=[" & int2char(lengthof(vc_rsuMessagesValueList[vc_rsu_id].denms) - 1) & "]=", vc_rsuMessagesValueList[vc_rsu_id].denms[lengthof(vc_rsuMessagesValueList[vc_rsu_id].denms) - 1]);
//denm={ { header := { protocolVersion := 2, messageID := 1, stationID := 1111101 }, denm := { management := { actionID := { originatingStationID := 1111101, sequenceNumber := 1 }, detectionTime := 510819417810, referenceTime := 510819420809, termination := omit, eventPosition := { latitude := 367467556, longitude := -45552381, positionConfidenceEllipse := { semiMajorConfidence := 100, semiMinorConfidence := 100, semiMajorOrientation := 0 }, altitude := { altitudeValue := 0, altitudeConfidence := alt_000_01 (0) } }, relevanceDistance := lessThan50m (0), relevanceTrafficDirection := upstreamTraffic (1), validityDuration := 2, transmissionInterval := omit, stationType := 15 }, situation := { informationQuality := 0, eventType := { causeCode := 91, subCauseCode := 0 }, linkedCause := omit, eventHistory := { { eventPosition := { deltaLatitude := 135, deltaLongitude := -147, deltaAltitude := 0 }, eventDeltaTime := omit, informationQuality := 0 }, { eventPosition := { deltaLatitude := -68, deltaLongitude := 74, deltaAltitude := 0 }, eventDeltaTime := omit, informationQuality := 0 } } }, location := { eventSpeed := omit, eventPositionHeading := omit, traces := { { { pathPosition := { deltaLatitude := -1086, deltaLongitude := 2551, deltaAltitude := 0 }, pathDeltaTime := omit }, { pathPosition := { deltaLatitude := -450, deltaLongitude := 1010, deltaAltitude := 0 }, pathDeltaTime := omit }, { pathPosition := { deltaLatitude := -460, deltaLongitude := 1000, deltaAltitude := 0 }, pathDeltaTime := omit }, { pathPosition := { deltaLatitude := -440, deltaLongitude := 1000, deltaAltitude := 0 }, pathDeltaTime := omit }, { pathPosition := { deltaLatitude := -440, deltaLongitude := 990, deltaAltitude := 0 }, pathDeltaTime := omit } } }, roadType := omit }, alacarte := omit } } }
if (lengthof(vc_rsuMessagesValueList[vc_rsu_id].denms) == 1) {
tc_denm.start;
......@@ -1277,7 +1284,7 @@ module ItsRSUsSimulator_Functions {
var integer v_i := 0;
var boolean v_found := false;
log("v_utDenmUpdate = ", v_utDenmUpdate);
log("a_process_cf_ut_command: v_utDenmUpdate = ", v_utDenmUpdate);
for (v_i := 0; v_i < lengthof(vc_rsuMessagesValueList[vc_rsu_id].denms); v_i := v_i + 1) {
if (v_utDenmUpdate.actionId.sequenceNumber == valueof(vc_rsuMessagesValueList[vc_rsu_id].denms[v_i].denm.management.actionID.sequenceNumber)) {
v_found := true;
......@@ -1315,7 +1322,7 @@ module ItsRSUsSimulator_Functions {
var integer v_i := 0;
var boolean v_found := false;
log("v_utDenmTermination: ", v_utDenmTermination);
log("a_process_cf_ut_command: v_utDenmTermination: ", v_utDenmTermination);
for (v_i := 0; v_i < lengthof(vc_rsuMessagesValueList[vc_rsu_id].denms); v_i := v_i + 1) {
if (v_utDenmTermination.actionId.sequenceNumber == valueof(vc_rsuMessagesValueList[vc_rsu_id].denms[v_i].denm.management.actionID.sequenceNumber)) {
v_found := true;
......@@ -1323,8 +1330,8 @@ module ItsRSUsSimulator_Functions {
}
} // End of 'for' statement
if (v_found == true) {
log("v_utDenmTermination: v_i=", v_i);
log("v_utDenmTermination: l=", lengthof(vc_rsuMessagesValueList[vc_rsu_id].denms));
log("a_process_cf_ut_command: v_utDenmTermination: v_i=", v_i);
log("a_process_cf_ut_command: v_utDenmTermination: l=", lengthof(vc_rsuMessagesValueList[vc_rsu_id].denms));
if (lengthof(vc_rsuMessagesValueList[vc_rsu_id].denms) > 1) { //Shift elements
for (var integer v_j := v_i + 1; v_i < lengthof(vc_rsuMessagesValueList[vc_rsu_id].denms); v_i := v_i + 1) {
vc_rsuMessagesValueList[vc_rsu_id].denms[v_i] := vc_rsuMessagesValueList[vc_rsu_id].denms[v_j];
......@@ -1346,13 +1353,22 @@ module ItsRSUsSimulator_Functions {
repeat;
}
[vc_pki == true] cfPort.receive(UtPkiInitialize:?) -> value v_utPkiInitialize {
log("v_utPkiInitialize = ", v_utPkiInitialize);
log("a_process_cf_ut_command: v_utPkiInitialize = ", v_utPkiInitialize);
if (oct2int(v_utPkiInitialize.hashedId8) != 0) {
var charstring v_certificate_id;
var EtsiTs103097Certificate v_certificate;
log("a_process_cf_ut_command: Looking for certificate ", v_utPkiInitialize.hashedId8);
f_getCertificateFromDigest(v_utPkiInitialize.hashedId8, v_certificate, v_certificate_id);
log("a_process_cf_ut_command (pki): Change certificate to ", v_certificate_id);
f_acTriggerSecEvent(m_acEnableSecurity(v_certificate_id));
}
cfPort.send(UtPkiResults: { utPkiInitializeResult := true } );
repeat;
}
[vc_pki == true] cfPort.receive(UtPkiTrigger: { triggerEnrolmentRequest := ? }) -> value v_utPkiTrigger {
var ItsPkiHttp v_pki;
log("a_process_cf_ut_command: v_utPkiTrigger=", v_utPkiTrigger);
cfPort.send(UtPkiResults: { utPkiTriggerResult := true } );
v_pki := ItsPkiHttp.create("TriggeredEc") alive;
v_pki.start(f_trigger_enrolment_request_await_response(
......@@ -1360,7 +1376,6 @@ module ItsRSUsSimulator_Functions {
vc_ec_counter,
vc_ec_certificates
));
//v_pki.done;
repeat;
}
[vc_pki == true] cfPort.receive(UtPkiTrigger: { triggerAuthorizationRequest := ? }) -> value v_utPkiTrigger {
......
......@@ -37,6 +37,14 @@ module ItsRSUsSimulator_Pics {
import from ItsRSUsSimulator_TypesAndValues all;
import from ItsRSUsSimulator_PicsInitConsts all;
group itss {
modulepar boolean PICS_PKI_SUPPORT := false;
modulepar boolean PICS_ITS_S_ROLE := false;
} // End of group itss
/**
* @desc This group describes the RSUs installed on the track
*/
......@@ -5747,8 +5755,6 @@ module ItsRSUsSimulator_Pics {
modulepar boolean PICS_GENERATE_SSEM := false;
modulepar boolean PICS_PKI_SUPPORT := false;
//modulepar boolean PICS_GENERATE_EVCSN := false;
} // End of group messages
......
......@@ -56,6 +56,7 @@ module ItsRSUsSimulator_TestCases {
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
if (PICS_ITS_S_ROLE == false) {
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].beacon)) {
tc_beacon.start;
}
......@@ -77,6 +78,7 @@ module ItsRSUsSimulator_TestCases {
/* if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].evcsn)) { */
/* tc_evcsn.start; */
/* } */
} // else, nothing to do, waiting for PKI triggers
geoNetworkingPort.clear;
alt {
......
Subproject commit 3f7c134dc24afb3a4b8ae71dd04b75b116b8fda7
Subproject commit 85cb2b6c78a91a7d1370036baa632d557c509ed4
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment