Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
ITS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
6
Issues
6
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ITS
ITS
Commits
9da1e40b
Commit
9da1e40b
authored
Mar 20, 2020
by
Yann Garcia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'STF525' of
https://forge.etsi.org/gitlab/ITS/ITS
into STF525
parents
506d49cf
1ba28898
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
89 additions
and
128 deletions
+89
-128
ConfigRsuSimulatorLayer.cc
...bIts_ports/RSUsSimulator_ports/ConfigRsuSimulatorLayer.cc
+19
-5
certificates_loader.cc
ccsrc/Protocols/Security/certificates_loader.cc
+1
-1
uppertester_pki_codec.hh
ccsrc/Protocols/UpperTester/uppertester_pki_codec.hh
+2
-2
AtsRSUSimulator.cfg
etc/AtsRSUsSimulator/AtsRSUSimulator.cfg
+5
-2
titan_repos.txt
scripts/titan_repos.txt
+0
-79
ItsRSUsSimulator_Functions.ttcn
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Functions.ttcn
+35
-20
ItsRSUsSimulator_Pics.ttcn
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Pics.ttcn
+9
-3
ItsRSUsSimulator_TestCases.ttcn
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_TestCases.ttcn
+17
-15
LibIts
ttcn/LibIts
+1
-1
No files found.
ccsrc/Ports/LibIts_ports/RSUsSimulator_ports/ConfigRsuSimulatorLayer.cc
View file @
9da1e40b
...
...
@@ -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
(
0xB
C
/*static_cast<const unsigned char>(uppertester_pki_codec::c_utPkiTriggerResult)*/
);
encoding_buffer
.
put_c
(
0xB
0
/*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
;
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
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
{
...
...
ccsrc/Protocols/Security/certificates_loader.cc
View file @
9da1e40b
...
...
@@ -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
);
...
...
ccsrc/Protocols/UpperTester/uppertester_pki_codec.hh
View file @
9da1e40b
...
...
@@ -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
);
...
...
etc/AtsRSUsSimulator/AtsRSUSimulator.cfg
View file @
9da1e40b
...
...
@@ -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
...
...
scripts/titan_repos.txt
View file @
9da1e40b
...
...
@@ -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
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Functions.ttcn
View file @
9da1e40b
...
...
@@ -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 {
...
...
@@ -1404,11 +1419,11 @@ module ItsRSUsSimulator_Functions {
var HttpMessage v_response;
var EtsiTs102941Data v_etsi_ts_102941_data;
timer v_t := 5.0;
log(">>> f_trigger_enrolment_request_await_response");
f_cfHttpUp(PICS_TS_EA_CERTIFICATE_ID);
f_http_build_inner_ec_request(v_private_key, v_compressed_public_key, v_compressed_mode, v_aes_sym_key, v_encrypted_sym_key, v_authentication_vector, v_nonce, v_salt, v_ieee1609dot2_signed_and_encrypted_data, v_request_hash);
f_init_default_headers_list(-, "inner_ec_request", v_headers);
httpPort.send(
...
...
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Pics.ttcn
View file @
9da1e40b
...
...
@@ -36,6 +36,14 @@ module ItsRSUsSimulator_Pics {
// ItsRSUsSimulator
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
...
...
@@ -5810,5 +5816,5 @@ module ItsRSUsSimulator_Pics {
modulepar float PICS_EVCSN_FREQUENCY := 1.0;
} // End of group generationFrequencies
} // End of module ItsRSUsSimulator_Pics
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_TestCases.ttcn
View file @
9da1e40b
...
...
@@ -56,27 +56,29 @@ module ItsRSUsSimulator_TestCases {
f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
// Test Body
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].beacon)) {
if (PICS_ITS_S_ROLE == false) {
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].beacon)) {
tc_beacon.start;
}
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].cam)) {
}
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].cam)) {
tc_cam.start(vc_cam_timer_value);
}
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].denms)) {
}
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].denms)) {
tc_denm.start;
}
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].mapem)) {
}
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].mapem)) {
tc_mapem.start;
}
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].spatems)) {
}
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].spatems)) {
tc_spatem.start;
}
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].ivim)) {
}
if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].ivim)) {
tc_ivim.start;
}
/* if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].evcsn)) { */
/* tc_evcsn.start; */
/* } */
}
/* if (ispresent(vc_rsuMessagesValueList[vc_rsu_id].evcsn)) { */
/* tc_evcsn.start; */
/* } */
} // else, nothing to do, waiting for PKI triggers
geoNetworkingPort.clear;
alt {
...
...
LibIts
@
85cb2b6c
Subproject commit
3f7c134dc24afb3a4b8ae71dd04b75b116b8fda7
Subproject commit
85cb2b6c78a91a7d1370036baa632d557c509ed4
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment