Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ITS - Intelligent Transport Systems
ITS
Commits
20af6998
Commit
20af6998
authored
Jan 27, 2021
by
Yann Garcia
Browse files
Validate AtsSpatem
parent
3a98ae69
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
539 additions
and
675 deletions
+539
-675
ccsrc/Protocols/BTP/btp_codec.cc
ccsrc/Protocols/BTP/btp_codec.cc
+26
-26
ccsrc/Protocols/GeoNetworking/geonetworking_codec.cc
ccsrc/Protocols/GeoNetworking/geonetworking_codec.cc
+46
-44
ccsrc/Protocols/GeoNetworking/geonetworking_layer.cc
ccsrc/Protocols/GeoNetworking/geonetworking_layer.cc
+3
-3
etc/AtsMapemSpatem/AtsMapemSpatem.cfg
etc/AtsMapemSpatem/AtsMapemSpatem.cfg
+32
-1
etc/AtsRSUsSimulator/AtsRSUSimulator.cfg
etc/AtsRSUsSimulator/AtsRSUSimulator.cfg
+6
-6
ttcn/AtsMapemSpatem/ItsMapemSpatem_TestControl.ttcn
ttcn/AtsMapemSpatem/ItsMapemSpatem_TestControl.ttcn
+1
-1
ttcn/AtsMapemSpatem/ItsSpatem_TestCases.ttcn
ttcn/AtsMapemSpatem/ItsSpatem_TestCases.ttcn
+4
-3
ttcn/AtsMapemSpatem/ItsSpatem_TpFunctions.ttcn
ttcn/AtsMapemSpatem/ItsSpatem_TpFunctions.ttcn
+373
-589
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Functions.ttcn
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Functions.ttcn
+40
-1
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_PicsInitConsts.ttcn
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_PicsInitConsts.ttcn
+7
-0
ttcn/LibIts
ttcn/LibIts
+1
-1
No files found.
ccsrc/Protocols/BTP/btp_codec.cc
View file @
20af6998
...
...
@@ -11,49 +11,49 @@ class TTCN_EncDec;
int
btp_codec
::
encode
(
const
LibItsBtp__TypesAndValues
::
BtpPacket
&
msg
,
OCTETSTRING
&
data
)
{
loggers
::
get_instance
().
log_msg
(
">>> btp_codec::encode: "
,
(
const
Base_Type
&
)
msg
);
//
loggers::get_instance().log_msg(">>> btp_codec::encode: ", (const Base_Type&)msg);
TTCN_EncDec
::
clear_error
();
TTCN_Buffer
encoding_buffer
;
encode_
(
msg
,
*
msg
.
get_descriptor
(),
encoding_buffer
);
data
=
OCTETSTRING
(
encoding_buffer
.
get_len
(),
encoding_buffer
.
get_data
());
loggers
::
get_instance
().
log_msg
(
"<<< btp_codec::encode: data="
,
data
);
//
loggers::get_instance().log_msg("<<< btp_codec::encode: data=", data);
return
0
;
}
int
btp_codec
::
encode_
(
const
Base_Type
&
type
,
const
TTCN_Typedescriptor_t
&
field_descriptor
,
TTCN_Buffer
&
encoding_buffer
)
{
loggers
::
get_instance
().
log
(
">>> btp_codec::encode_: processing %s/%s"
,
type
.
get_descriptor
()
->
name
,
field_descriptor
.
name
);
loggers
::
get_instance
().
log_msg
(
">>> btp_codec::encode_: "
,
type
);
//
loggers::get_instance().log(">>> btp_codec::encode_: processing %s/%s", type.get_descriptor()->name, field_descriptor.name);
//
loggers::get_instance().log_msg(">>> btp_codec::encode_: ", type);
if
(
dynamic_cast
<
const
Record_Type
*>
(
&
type
)
!=
NULL
)
{
const
Record_Type
&
r
=
(
const
Record_Type
&
)
type
;
loggers
::
get_instance
().
log
(
"btp_codec::encode_: processing Record_Type %s"
,
r
.
get_descriptor
()
->
name
);
//
loggers::get_instance().log("btp_codec::encode_: processing Record_Type %s", r.get_descriptor()->name);
for
(
int
i
=
0
;
i
<
r
.
get_count
();
i
++
)
{
loggers
::
get_instance
().
log
(
"btp_codec::encode_: processing %s/%s/%s - %d (1 ==> use dynamic_cast<const OPTIONAL<...>) - %d"
,
r
.
fld_name
(
i
),
r
.
fld_descr
(
i
)
->
name
,
r
.
get_at
(
i
)
->
get_descriptor
()
->
name
,
r
.
get_at
(
i
)
->
is_optional
(),
r
.
get_at
(
i
)
->
is_present
());
//
loggers::get_instance().log("btp_codec::encode_: processing %s/%s/%s - %d (1 ==> use dynamic_cast<const OPTIONAL<...>) - %d", r.fld_name(i), r.fld_descr(i)->name, r.get_at(i)->get_descriptor()->name, r.get_at(i)->is_optional(), r.get_at(i)->is_present());
if
(
r
.
get_at
(
i
)
->
is_present
())
{
if
(
encode_
(
*
r
.
get_at
(
i
),
*
r
.
fld_descr
(
i
),
encoding_buffer
)
==
-
1
)
{
loggers
::
get_instance
().
warning
(
"btp_codec::encode_: -1 result code returned"
);
//
loggers::get_instance().warning("btp_codec::encode_: -1 result code returned");
return
-
1
;
}
}
}
// End of 'for' statement
}
else
if
(
std
::
string
(
field_descriptor
.
name
).
compare
(
"@LibItsBtp_TypesAndValues.BtpPacket.payload"
)
==
0
)
{
const
OPTIONAL
<
LibItsBtp__TypesAndValues
::
BtpRawPayload
>
&
v
=
dynamic_cast
<
const
OPTIONAL
<
LibItsBtp__TypesAndValues
::
BtpRawPayload
>
&>
(
type
);
loggers
::
get_instance
().
log
(
"btp_codec::encode_: BtpRawPayload present: %d"
,
v
.
is_present
());
//
loggers::get_instance().log("btp_codec::encode_: BtpRawPayload present: %d", v.is_present());
if
(
v
.
is_present
())
{
if
(
encode_
(
static_cast
<
const
LibItsBtp__TypesAndValues
::
BtpRawPayload
&>
(
*
v
.
get_opt_value
()),
LibItsBtp__TypesAndValues
::
BtpRawPayload_descr_
,
encoding_buffer
)
==
-
1
)
{
loggers
::
get_instance
().
warning
(
"btp_codec::encode_: -1 result code returned"
);
//
loggers::get_instance().warning("btp_codec::encode_: -1 result code returned");
return
-
1
;
}
}
}
else
{
loggers
::
get_instance
().
log
(
"btp_codec::encode_ (else): processing type %s/%s"
,
type
.
get_descriptor
()
->
name
,
field_descriptor
.
name
);
//
loggers::get_instance().log("btp_codec::encode_ (else): processing type %s/%s", type.get_descriptor()->name, field_descriptor.name);
type
.
encode
(
field_descriptor
,
encoding_buffer
,
TTCN_EncDec
::
CT_RAW
);
}
loggers
::
get_instance
().
log_to_hexa
(
"<<<btp_codec::encode_: encoding_buffer="
,
encoding_buffer
);
//
loggers::get_instance().log_to_hexa("<<<btp_codec::encode_: encoding_buffer=", encoding_buffer);
return
0
;
}
...
...
@@ -63,30 +63,30 @@ int btp_codec::decode (const OCTETSTRING& data, LibItsBtp__TypesAndValues::BtpPa
TTCN_Buffer
decoding_buffer
(
data
);
_params
=
params
;
loggers
::
get_instance
().
log_to_hexa
(
">>> btp_codec::decode: decoding_buffer="
,
decoding_buffer
);
//
loggers::get_instance().log_to_hexa(">>> btp_codec::decode: decoding_buffer=", decoding_buffer);
decode_
(
msg
,
*
msg
.
get_descriptor
(),
decoding_buffer
);
loggers
::
get_instance
().
log_msg
(
"<<< btp_codec::decode: "
,
(
const
Base_Type
&
)
msg
);
//
loggers::get_instance().log_msg("<<< btp_codec::decode: ", (const Base_Type&)msg);
return
0
;
}
int
btp_codec
::
decode_
(
Base_Type
&
type
,
const
TTCN_Typedescriptor_t
&
field_descriptor
,
TTCN_Buffer
&
decoding_buffer
)
{
loggers
::
get_instance
().
log
(
">>> btp_codec::decode_: processing %s/%s (%d,%d,%p)"
,
type
.
get_descriptor
()
->
name
,
field_descriptor
.
name
,
decoding_buffer
.
get_len
(),
decoding_buffer
.
get_pos
(),
decoding_buffer
.
get_read_data
());
//
loggers::get_instance().log(">>> btp_codec::decode_: processing %s/%s (%d,%d,%p)", type.get_descriptor()->name, field_descriptor.name, decoding_buffer.get_len(), decoding_buffer.get_pos(), decoding_buffer.get_read_data());
if
(
dynamic_cast
<
Record_Type
*>
(
&
type
)
!=
NULL
)
{
Record_Type
&
r
=
(
Record_Type
&
)
type
;
loggers
::
get_instance
().
log
(
"btp_codec::decode_: processing Record_Type %s"
,
r
.
get_descriptor
()
->
name
);
//
loggers::get_instance().log("btp_codec::decode_: processing Record_Type %s", r.get_descriptor()->name);
for
(
int
i
=
0
;
i
<
r
.
get_count
();
i
++
)
{
loggers
::
get_instance
().
log
(
"btp_codec::decode_: processing %s/%s/%s"
,
r
.
fld_name
(
i
),
r
.
fld_descr
(
i
)
->
name
,
r
.
get_at
(
i
)
->
get_descriptor
()
->
name
);
//
loggers::get_instance().log("btp_codec::decode_: processing %s/%s/%s", r.fld_name(i), r.fld_descr(i)->name, r.get_at(i)->get_descriptor()->name);
if
(
decode_
(
*
dynamic_cast
<
Base_Type
*>
(
r
.
get_at
(
i
)),
*
(
r
.
fld_descr
(
i
)),
decoding_buffer
)
==
-
1
)
{
return
-
1
;
}
}
// End of 'for' statement
}
else
{
loggers
::
get_instance
().
log
(
"btp_codec::decode_ (else): processing type %s/%s - optional:%d"
,
type
.
get_descriptor
()
->
name
,
field_descriptor
.
name
,
type
.
is_optional
());
//
loggers::get_instance().log("btp_codec::decode_ (else): processing type %s/%s - optional:%d", type.get_descriptor()->name, field_descriptor.name, type.is_optional());
if
(
std
::
string
(
field_descriptor
.
name
).
compare
(
"@LibItsBtp_TypesAndValues.BtpPacket.header"
)
==
0
)
{
loggers
::
get_instance
().
log
(
"btp_codec::decode_: _type = %d"
,
_type
);
//
loggers::get_instance().log("btp_codec::decode_: _type = %d", _type);
LibItsBtp__TypesAndValues
::
BtpHeader
&
b
=
static_cast
<
LibItsBtp__TypesAndValues
::
BtpHeader
&>
(
type
);
if
(
_type
==
btp_codec
::
btpA
)
{
decode_
(
b
.
btpAHeader
(),
*
b
.
btpAHeader
().
get_descriptor
(),
decoding_buffer
);
...
...
@@ -102,25 +102,25 @@ int btp_codec::decode_ (Base_Type& type, const TTCN_Typedescriptor_t& field_desc
(
*
_params
)[
params
::
btp_info
]
=
std
::
to_string
(
static_cast
<
int
>
(
b
.
btpBHeader
().
destinationPortInfo
()));
}
}
else
{
loggers
::
get_instance
().
error
(
"btp_codec::decode_: Invalid BTP type"
);
// Cannot be reached
//
loggers::get_instance().error("btp_codec::decode_: Invalid BTP type"); // Cannot be reached
}
loggers
::
get_instance
().
log_msg
(
"btp_codec::decode_: BtpHeader: "
,
type
);
//
loggers::get_instance().log_msg("btp_codec::decode_: BtpHeader: ", type);
}
else
if
(
std
::
string
(
field_descriptor
.
name
).
compare
(
"@LibItsBtp_TypesAndValues.BtpPacket.payload"
)
==
0
)
{
if
(
decoding_buffer
.
get_len
()
==
decoding_buffer
.
get_pos
())
{
// No payload, set it to omit
loggers
::
get_instance
().
log
(
"btp_codec::decode_: Set OPTIONAL<BtpRawPayload> to omit"
);
//
loggers::get_instance().log("btp_codec::decode_: Set OPTIONAL<BtpRawPayload> to omit");
dynamic_cast
<
OPTIONAL
<
LibItsBtp__TypesAndValues
::
BtpRawPayload
>
&>
(
type
).
set_to_omit
();
}
else
{
// Decode BtpRawPayload data structure
OCTETSTRING
os
(
decoding_buffer
.
get_len
()
-
decoding_buffer
.
get_pos
(),
decoding_buffer
.
get_data
()
+
decoding_buffer
.
get_pos
());
loggers
::
get_instance
().
log_msg
(
"btp_codec::decode_: s="
,
os
);
//
loggers::get_instance().log_msg("btp_codec::decode_: s=", os);
if
(
_params
!=
NULL
)
{
(
*
_params
)[
params
::
btp_payload
]
=
std
::
string
(
static_cast
<
const
char
*>
(
oct2str
(
os
)));
}
if
(
os
.
lengthof
()
!=
0
)
{
dynamic_cast
<
OPTIONAL
<
LibItsBtp__TypesAndValues
::
BtpRawPayload
>
&>
(
type
)
=
OPTIONAL
<
LibItsBtp__TypesAndValues
::
BtpRawPayload
>
(
os
);
loggers
::
get_instance
().
log_msg
(
"btp_codec::decode_: Set OPTIONAL to "
,
type
);
//
loggers::get_instance().log_msg("btp_codec::decode_: Set OPTIONAL to ", type);
}
else
{
loggers
::
get_instance
().
log
(
"btp_codec::decode_: Set OPTIONAL to omit"
);
//
loggers::get_instance().log("btp_codec::decode_: Set OPTIONAL to omit");
dynamic_cast
<
OPTIONAL
<
LibItsBtp__TypesAndValues
::
BtpRawPayload
>
&>
(
type
).
set_to_omit
();
}
}
...
...
@@ -129,8 +129,8 @@ int btp_codec::decode_ (Base_Type& type, const TTCN_Typedescriptor_t& field_desc
}
}
loggers
::
get_instance
().
log_msg
(
"<<< btp_codec::decode_: "
,
type
);
loggers
::
get_instance
().
log_to_hexa
(
"<<< btp_codec::decode_: decoding_buffer="
,
decoding_buffer
);
//
loggers::get_instance().log_msg("<<< btp_codec::decode_: ", type);
//
loggers::get_instance().log_to_hexa("<<< btp_codec::decode_: decoding_buffer=", decoding_buffer);
return
0
;
}
...
...
ccsrc/Protocols/GeoNetworking/geonetworking_codec.cc
View file @
20af6998
This diff is collapsed.
Click to expand it.
ccsrc/Protocols/GeoNetworking/geonetworking_layer.cc
View file @
20af6998
...
...
@@ -1107,14 +1107,14 @@ int geonetworking_layer::build_secured_pdu(OCTETSTRING& data, params& params) {
}
int
geonetworking_layer
::
decode_basic_header
(
const
OCTETSTRING
&
p_data
,
LibItsGeoNetworking__TypesAndValues
::
BasicHeader
&
p_basic_header
)
{
loggers
::
get_instance
().
log_msg
(
">>> geonetworking_layer::decode_basic_header: "
,
p_data
);
//
loggers::get_instance().log_msg(">>> geonetworking_layer::decode_basic_header: ", p_data);
// Update security mode
OCTETSTRING
bh
=
OCTETSTRING
(
4
,
static_cast
<
const
unsigned
char
*>
(
p_data
));
// Extract the basic header as specified in ETSI EN 302 636-4-1 V1.3.1 (2017-08) Clause 9.6
loggers
::
get_instance
().
log_msg
(
"geonetworking_layer::decode_basic_header: bh: "
,
bh
);
//
loggers::get_instance().log_msg("geonetworking_layer::decode_basic_header: bh: ", bh);
TTCN_Buffer
decoding_buffer
(
bh
);
p_basic_header
.
RAW_decode
(
*
p_basic_header
.
get_descriptor
(),
decoding_buffer
,
decoding_buffer
.
get_len
()
*
8
,
raw_order_t
::
ORDER_MSB
);
loggers
::
get_instance
().
log_msg
(
"geonetworking_layer::decode_basic_header: "
,
p_basic_header
);
//
loggers::get_instance().log_msg("geonetworking_layer::decode_basic_header: ", p_basic_header);
return
0
;
}
...
...
etc/AtsMapemSpatem/AtsMapemSpatem.cfg
View file @
20af6998
...
...
@@ -187,7 +187,38 @@ system.utPort.params := "UT_MAPEMSPATEM/UDP(dst_ip=127.0.0.1,dst_port=12345,src_
# For each vehicular manoeuvre at a signalized intersection, an IUT shall include the current movement state
#ItsSpatem_TestCases.TC_IS_TLM_GEN_MSGF_BV_06
# For each pedestrian manoeuvre at a signalized intersection, an IUT shall include the current movement state
ItsSpatem_TestCases.TC_IS_TLM_GEN_MSGF_BV_07
#ItsSpatem_TestCases.TC_IS_TLM_GEN_MSGF_BV_07
# For each active manoeuvre an IUT shall include the earliest time point when the manoeuvre state is predicted to change
#ItsSpatem_TestCases.TC_IS_TLM_GEN_MSGF_BV_08
# For each manoeuvre at a signalized intersection, an IUT shall include:
# - the next expected movement states pertaining to that manoeuvre
# - the time point for when the succeeding manoeuvre state is predicted to change
# - the start time for each pending manoeuvre
#ItsSpatem_TestCases.TC_IS_TLM_GEN_MSGF_BV_09
# Check that SPAT message prioritization is encoded using regional extension
#Not Supported yet ItsSpatem_TestCases.TC_IS_TLM_GEN_MSGF_BV_10
# For each manoeuvre at a signalized intersection, an IUT shall indicate if one or more pedestrians have been detected in the pedestrian crossing
#ItsSpatem_TestCases.TC_IS_TLM_GEN_MSGF_BV_11
# An IUT shall transmit information about the optimal speed for vehicles on each lane
#ItsSpatem_TestCases.TC_IS_TLM_GEN_MSGF_BV_12
# An IUT shall transmit information about the signal timing progression speed along the roadway
#ItsSpatem_TestCases.TC_IS_TLM_GEN_MSGF_BV_13
# An IUT shall transmit the length of the queue and the length of available vehicular storage on each egress lane
#ItsSpatem_TestCases.TC_IS_TLM_GEN_MSGF_BV_14
# Check that TLM Service generates a new SPATEM on reception of a valid AppSPATEM _Start request
#ItsSpatem_TestCases.TC_IS_TLM_GEN_EVGN_BV_01
# Check that TLM Service generates SPATEM are time ordered
#ItsSpatem_TestCases.TC_IS_TLM_GEN_EVGN_BV_02
# Check that TLM Service terminates on reception of a valid AppSPATEM _Stop request
#ItsSpatem_TestCases.TC_IS_TLM_GEN_EVGN_BV_03
# Check that TLM Service generates a new SPATEM on reception of a valid AppSPATEM_Trigger request
#ItsSpatem_TestCases.TC_IS_TLM_GEN_EVGN_BV_04
# Check that TLM Service provides the destination area in SPATEM
#ItsSpatem_TestCases.TC_IS_TLM_GEN_COM_BV_01
# Check that SPATEM uses BTP_B packet. Check that the destination port for SPATEM is set to 2004
#ItsSpatem_TestCases.TC_IS_TLM_GEN_COM_BV_02
# Check that TLM service encapsulates SPATEM in a GBC with the HeaderType field set to the value of 4
ItsSpatem_TestCases.TC_IS_TLM_GEN_COM_BV_03
[MAIN_CONTROLLER]
# The options herein control the behavior of MC.
...
...
etc/AtsRSUsSimulator/AtsRSUSimulator.cfg
View file @
20af6998
...
...
@@ -27,7 +27,7 @@ ItsRSUsSimulator_Pixits.PX_RSU_ID := 1;
# UC7 (CAM only): PX_ETSI_USE_CASE_ID := 7
# UC8 (EVCSN only): PX_ETSI_USE_CASE_ID := 8
# UC9 (CAM only): PX_ETSI_USE_CASE_ID := 9
ItsRSUsSimulator_Pixits.PX_ETSI_USE_CASE_ID :=
5
# 7 PX_RSU_ID := 8 ==> LCWW
ItsRSUsSimulator_Pixits.PX_ETSI_USE_CASE_ID :=
3
# 7 PX_RSU_ID := 8 ==> LCWW
# 1 PX_RSU_ID := 1 ==> RWW
# 2 PX_RSU_ID := 1 ==> RHW
# Indicate which zone to simulate
...
...
@@ -38,7 +38,7 @@ ItsRSUsSimulator_Pixits.PX_DENM_PARAM_UC2 := 1; # ==> RHW (1..5)
ItsRSUsSimulator_Pics.PICS_GENERATE_BEACON := false # Change also its_aid in geoNetworking port setting
ItsRSUsSimulator_Pics.PICS_GENERATE_CAM := false # Change also its_aid in geoNetworking port setting
ItsRSUsSimulator_Pics.PICS_GENERATE_DENM := false # Change also its_aid in geoNetworking port setting
ItsRSUsSimulator_Pics.PICS_GENERATE_IVIM :=
tru
e # Change also its_aid in geoNetworking port setting
ItsRSUsSimulator_Pics.PICS_GENERATE_IVIM :=
fals
e # Change also its_aid in geoNetworking port setting
ItsRSUsSimulator_Pics.PICS_GENERATE_MAPEM := false # Change also its_aid in geoNetworking port setting
ItsRSUsSimulator_Pics.PICS_GENERATE_SPATEM := false # Change also its_aid in geoNetworking port setting
ItsRSUsSimulator_Pics.PICS_GENERATE_SREM := false # Change also its_aid in geoNetworking port setting
...
...
@@ -54,7 +54,7 @@ ItsRSUsSimulator_Pics.PICS_DENM_FREQUENCY := 1.0
ItsRSUsSimulator_Pics.PICS_SEND_BEACON_INDICATION := false
ItsRSUsSimulator_Pics.PICS_SEND_CAM_INDICATION := true
ItsRSUsSimulator_Pics.PICS_SEND_DENM_INDICATION :=
fals
e
ItsRSUsSimulator_Pics.PICS_SEND_DENM_INDICATION :=
tru
e
ItsRSUsSimulator_Pics.PICS_SEND_IVIM_INDICATION := true
ItsRSUsSimulator_Pics.PICS_SEND_MAPEM_INDICATION := true
ItsRSUsSimulator_Pics.PICS_SEND_SPATEM_INDICATION := true
...
...
@@ -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)"
# 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=13
9
,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)"
system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,its_aid=13
8
,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
#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
...
...
@@ -195,8 +195,8 @@ system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050
# 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=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=mapemspatem)/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=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=gn)/UDP(src_port=12345,dst_port=12346,reuse_incoming_source_adddress=1)"
...
...
ttcn/AtsMapemSpatem/ItsMapemSpatem_TestControl.ttcn
View file @
20af6998
...
...
@@ -99,7 +99,7 @@ module ItsMapemSpatem_TestControl {
if
(
PICS_SPATEM_PRIORITIZATION
)
{
execute
(
TC_IS_TLM_GEN_MSGF_BV_10
());
}
if
(
PICS_SPATEM_PEDESTRIAN_MAOEUVRES
)
{
if
(
PICS_SPATEM_PEDESTRIAN_MA
N
OEUVRES
)
{
execute
(
TC_IS_TLM_GEN_MSGF_BV_11
());
}
if
(
PICS_SPATEM_HAS_OPTIMAL_SPEED
)
{
...
...
ttcn/AtsMapemSpatem/ItsSpatem_TestCases.ttcn
View file @
20af6998
...
...
@@ -724,7 +724,8 @@ module ItsSpatem_TestCases {
* containing elements of type ConnectionManeuverAssist
* containing queueLength
* indicating current length of the queue
* and containing availableStorageLength
* and containing availableStorageLength
* indicating available space for the line queue
* }
* }
...
...
@@ -846,10 +847,10 @@ module ItsSpatem_TestCases {
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppSPATEM _
Stop
request from the application layer
* the IUT receives an AppSPATEM _
Trigger
request from the application layer
* }
* then {
* the IUT s
tops sending
SPATEM
* the IUT s
ends a valid
SPATEM
* }
* }
* </pre>
...
...
ttcn/AtsMapemSpatem/ItsSpatem_TpFunctions.ttcn
View file @
20af6998
This diff is collapsed.
Click to expand it.
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Functions.ttcn
View file @
20af6998
...
...
@@ -676,6 +676,7 @@ module ItsRSUsSimulator_Functions {
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
0
].
state_time_speed
[
0
].
timing
.
minEndTime
:=
f_computeEndPhaseStartTime
(
vc_currentPhaseStartTime
,
PICS_SPATEM_REPITITION_DURATION_STATE_30
);
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
1
].
state_time_speed
[
0
].
timing
.
startTime
:=
f_computeEndPhaseStartTime
(
vc_currentPhaseStartTime
,
PICS_SPATEM_REPITITION_DURATION_STATE_30
);
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
1
].
state_time_speed
[
0
].
timing
.
minEndTime
:=
f_computeEndPhaseStartTime
(
vc_currentPhaseStartTime
,
PICS_SPATEM_REPITITION_DURATION_STATE_40
);
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
1
].
state_time_speed
[
0
].
timing
.
nextTime
:=
f_computeEndPhaseStartTime
(
vc_currentPhaseStartTime
,
PICS_SPATEM_REPITITION_DURATION_STATE_40
);
log
(
"################## 01-0"
)
}
case
(
1
)
{
// permissive-clearance
...
...
@@ -694,6 +695,7 @@ module ItsRSUsSimulator_Functions {
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
0
].
state_time_speed
[
0
].
timing
.
minEndTime
:=
f_computeEndPhaseStartTime
(
vc_currentPhaseStartTime
,
PICS_SPATEM_REPITITION_DURATION_STATE_20
);
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
1
].
state_time_speed
[
0
].
timing
.
startTime
:=
f_computeEndPhaseStartTime
(
vc_currentPhaseStartTime
,
PICS_SPATEM_REPITITION_DURATION_STATE_20
);
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
1
].
state_time_speed
[
0
].
timing
.
minEndTime
:=
f_computeEndPhaseStartTime
(
vc_currentPhaseStartTime
,
PICS_SPATEM_REPITITION_DURATION_STATE_50
);
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
1
].
state_time_speed
[
0
].
timing
.
nextTime
:=
f_computeEndPhaseStartTime
(
vc_currentPhaseStartTime
,
PICS_SPATEM_REPITITION_DURATION_STATE_50
);
log
(
"################## 01-2"
)
}
case
else
{
...
...
@@ -1754,6 +1756,19 @@ module ItsRSUsSimulator_Functions {
for
(
var
integer
v_intersection
:=
0
;
v_intersection
<
lengthof
(
vc_rsuMessagesValueList
[
vc_rsu_id
].
spatems
[
0
].
spat
.
intersections
);
v_intersection
:=
v_intersection
+
1
)
{
vc_states
[
0
][
v_intersection
]
:=
vc_rsuMessagesValueList
[
vc_rsu_id
].
spatems
[
0
].
spat
.
intersections
[
v_intersection
].
states
;
}
// End of 'for' statement
// FIXME How to set regional for SPaT
//vc_rsuMessagesValueList[vc_rsu_id].spatems[0].spat.regional := {
// {
// regionId := 3,
// regExtValue := {
// IntersectionState_addGrpC := {
// activePrioritizations := omit/*{
// { stationID := 112, priorState := unknown, signalGroup := 50 }
// }*/
// }
// }
// }
//}
// TODO Add more?
vc_spatem
:=
true
;
}
...
...
@@ -1765,10 +1780,27 @@ module ItsRSUsSimulator_Functions {
}
[
vc_mapem
==
true
or
vc_spatem
==
true
]
cfPort
.
receive
(
UtMapemSpatemTrigger
:?
)
->
value
v_utMapemSpatemTrigger
{
log
(
"a_process_cf_ut_command: v_utMapemSpatemTrigger: "
,
v_utMapemSpatemTrigger
);
if
(
v_utMapemSpatemTrigger
.
event
==
spatProfile0
)
{
// SPATEM command
if
(
(
v_utMapemSpatemTrigger
.
event
==
spatProfile0
)
or
(
v_utMapemSpatemTrigger
.
event
==
spatProfile1
)
or
(
v_utMapemSpatemTrigger
.
event
==
spatProfile2
)
or
(
v_utMapemSpatemTrigger
.
event
==
spatProfile3
)
)
{
// SPATEM command
if
(
v_utMapemSpatemTrigger
.
intersectionID
!=
valueof
(
vc_rsuMessagesValueList
[
vc_rsu_id
].
mapem
.
map_
.
intersections
[
0
].
id
.
id
))
{
// TODO
}
if
(
v_utMapemSpatemTrigger
.
event
==
spatProfile1
)
{
//log("a_process_cf_ut_command: Before, vc_states=", vc_states);
for
(
var
integer
i
:=
0
;
i
<
lengthof
(
vc_states
);
i
:=
i
+
1
)
{
vc_states
[
i
][
0
][
0
].
state_time_speed
[
0
].
speeds
:=
{
m_advisorySpeed
(
ecoDrive
,
40
)
};
}
//log("a_process_cf_ut_command: After, vc_states=", vc_states);
}
else
if
(
v_utMapemSpatemTrigger
.
event
==
spatProfile2
)
{
//log("a_process_cf_ut_command: Before, vc_states=", vc_states);
for
(
var
integer
i
:=
0
;
i
<
lengthof
(
vc_states
);
i
:=
i
+
1
)
{
vc_states
[
i
][
0
][
0
].
state_time_speed
[
0
].
speeds
:=
{
m_advisorySpeed
(
greenwave
,
40
)
};
}
//log("a_process_cf_ut_command: After, vc_states=", vc_states);
}
else
if
(
v_utMapemSpatemTrigger
.
event
==
spatProfile3
)
{
vc_rsuMessagesValueList
[
vc_rsu_id
].
spatems
[
0
].
spat
.
intersections
[
0
].
maneuverAssistList
:=
{
m_connectionManeuverAssist
(
1
,
6
,
10
)
};
}
cfPort
.
send
(
UtMapemSpatemResults
:
{
utMapemSpatemTriggerResult
:=
true
}
);
tc_spatem
.
start
;
}
else
if
(
v_utMapemSpatemTrigger
.
event
==
mapProfile0
)
{
// MAPEM command
...
...
@@ -1782,6 +1814,13 @@ module ItsRSUsSimulator_Functions {
}
cfPort
.
send
(
UtMapemSpatemResults
:
{
utMapemSpatemTriggerResult
:=
true
}
);
tc_mapem
.
start
;
}
else
if
(
v_utMapemSpatemTrigger
.
event
==
tlmPedestrianDetected
)
{
vc_rsuMessagesValueList
[
vc_rsu_id
].
spatems
[
0
].
spat
.
intersections
[
0
].
maneuverAssistList
:=
{
m_connectionManeuverAssist
(
10
,
-
,
-
,
-
,
true
)
};
cfPort
.
send
(
UtMapemSpatemResults
:
{
utMapemSpatemTriggerResult
:=
true
}
);
}
else
if
(
v_utMapemSpatemTrigger
.
event
==
stopTLMService
)
{
vc_spatem
:=
false
;
tc_spatem
.
stop
;
cfPort
.
send
(
UtMapemSpatemResults
:
{
utMapemSpatemTriggerResult
:=
true
}
);
}
repeat
;
}
...
...
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_PicsInitConsts.ttcn
View file @
20af6998
...
...
@@ -4641,6 +4641,13 @@ module ItsRSUsSimulator_PicsInitConsts {
group
spatemConformanceTest
{
group
profileId0
{
const
Position3D_addGrpC
c_PICS_SPAT_ConfTest_ProfileId_0_Position_1
:=
{
altitude
:=
{
altitudeValue
:=
0
,
altitudeConfidence
:=
alt_000_01
//unavailable
}
}
const
SignalGroupParm
c_PICS_SPAT_ConfTest_ProfileId_0
:=
{
signalGroupID
:=
1
,
...
...
LibIts
@
6923d0bb
Compare
18a7b38a
...
6923d0bb
Subproject commit
18a7b38a2780dcf27f55c06b3756ea8fc222ebf5
Subproject commit
6923d0bb14bcf3bf4dd32d830a9989820fddb0ee
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