Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ITS - Intelligent Transport Systems
ITS
Commits
4be56b48
Commit
4be56b48
authored
Sep 07, 2018
by
garciay
Browse files
Bug fixed in CAM values
parent
9bcc3775
Changes
9
Hide whitespace changes
Inline
Side-by-side
ccsrc/Ports/LibIts_ports/CAM_ports/UpperTesterPort_CAM.partC
View file @
4be56b48
...
...
@@ -129,10 +129,13 @@ namespace LibItsCam__TestSystem {
return;
}
loggers::get_instance().log("UpperTesterPort_Cam::receive_msg: %s", p_ind.get_descriptor()->name);
if (std::string(p_ind.get_descriptor()->name).compare("@LibItsCam_TypesAndValues.UtCamResults") == 0) { // TODO To be refined
incoming_message((LibItsCam__TypesAndValues::UtCamResults&)p_ind);
} // TODO Implement UtCamEventInd part
incoming_message(static_cast<const LibItsCam__TypesAndValues::UtCamResults&>(p_ind));
} else if (std::string(p_ind.get_descriptor()->name).compare("@LibItsCam_TypesAndValues.UtCamEventInd") == 0) {
incoming_message(static_cast<const LibItsCam__TypesAndValues::UtCamEventInd&>(p_ind));
} else {
loggers::get_instance().warning("UpperTesterPort_Cam::receive_msg: Message not processed: %s", p_ind.get_descriptor()->name);
}
}
} /* end of namespace */
ccsrc/Ports/LibIts_ports/DENM_ports/UpperTesterPort_DENM.partC
View file @
4be56b48
...
...
@@ -149,10 +149,13 @@ namespace LibItsDenm__TestSystem {
return;
}
loggers::get_instance().log("UpperTesterPort_Denm::receive_msg: %s", p_ind.get_descriptor()->name);
if (std::string(p_ind.get_descriptor()->name).compare("@LibItsDenm_TypesAndValues.UtDenmResults") == 0) { // TODO To be refined
incoming_message((LibItsDenm__TypesAndValues::UtDenmResults&)p_ind);
} // TODO Implement UtDenmEventInd part
incoming_message(static_cast<const LibItsDenm__TypesAndValues::UtDenmResults&>(p_ind));
} else if (std::string(p_ind.get_descriptor()->name).compare("@LibItsDenm_TypesAndValues.UtDenmEventInd") == 0) {
incoming_message(static_cast<const LibItsDenm__TypesAndValues::UtDenmEventInd&>(p_ind));
} else {
loggers::get_instance().warning("UpperTesterPort_Denm::receive_msg: Message not processed: %s", p_ind.get_descriptor()->name);
}
}
} /* end of namespace */
ccsrc/Ports/LibIts_ports/GN_ports/UpperTesterPort_GN.partC
View file @
4be56b48
...
...
@@ -130,9 +130,12 @@ namespace LibItsGeoNetworking__TestSystem {
return;
}
//loggers::get_instance().log("UpperTesterPort_Gn::receive_msg: %s", p_ind.get_descriptor()->name);
if (std::string(p_ind.get_descriptor()->name).compare("@LibItsGeoNetworking_TypesAndValues.UtGnResults") == 0) { // TODO To be refined
incoming_message((LibItsGeoNetworking__TypesAndValues::UtGnResults&)p_ind);
} else if (std::string(p_ind.get_descriptor()->name).compare("@LibItsGeoNetworking_TypesAndValues.UtGnEventInd") == 0) {
incoming_message(static_cast<const LibItsGeoNetworking__TypesAndValues::UtGnEventInd&>(p_ind));
} else {
loggers::get_instance().warning("UpperTesterPort_Gn::receive_msg: Message not processed: %s", p_ind.get_descriptor()->name);
}
}
...
...
ccsrc/Protocols/UpperTester/uppertester_cam_codec.cc
View file @
4be56b48
...
...
@@ -222,8 +222,11 @@ std::unique_ptr<Base_Type> uppertester_cam_codec::decode (const OCTETSTRING& dat
const
unsigned
char
*
ptr
=
static_cast
<
const
unsigned
char
*>
(
data
);
if
(
*
ptr
!=
uppertester_cam_codec
::
c_utCamEventInd
)
{
LibItsCam__TypesAndValues
::
UtCamResults
res
;
decode
(
data
,
res
,
params
);
result
.
reset
((
Base_Type
*
)
res
.
clone
());
if
(
decode
(
data
,
res
,
params
)
==
0
)
{
result
.
reset
((
Base_Type
*
)
res
.
clone
());
}
else
{
result
.
reset
(
nullptr
);
}
}
else
{
LibItsCam__TypesAndValues
::
UtCamEventInd
ind
;
decode
(
data
,
ind
,
params
);
...
...
@@ -245,7 +248,8 @@ int uppertester_cam_codec::decode (const OCTETSTRING& data, LibItsCam__TypesAndV
}
else
if
(
*
ptr
==
uppertester_cam_codec
::
c_utCamTriggerResult
)
{
msg
.
utCamTriggerResult
()
=
BOOLEAN
(
*
(
ptr
+
1
)
==
0x01
);
}
else
{
TTCN_warning
(
"uppertester_cam_codec::decode: Unsupported result"
);
loggers
::
get_instance
().
warning
(
"uppertester_cam_codec::decode: Unsupported result"
);
return
-
1
;
}
loggers
::
get_instance
().
log_msg
(
"<<< uppertester_cam_codec::decode"
,
msg
);
...
...
@@ -254,22 +258,22 @@ int uppertester_cam_codec::decode (const OCTETSTRING& data, LibItsCam__TypesAndV
int
uppertester_cam_codec
::
decode
(
const
OCTETSTRING
&
data
,
LibItsCam__TypesAndValues
::
UtCamEventInd
&
msg
,
params
*
params
)
{
loggers
::
get_instance
().
log_to_hexa
(
">>> uppertester_cam_codec::decode: decoding_buffer="
,
data
);
loggers
::
get_instance
().
log_to_hexa
(
">>> uppertester_cam_codec::decode
(1)
: decoding_buffer="
,
data
);
const
unsigned
char
*
ptr
=
static_cast
<
const
unsigned
char
*>
(
data
)
+
1
;
OCTETSTRING
os
(
2
,
ptr
);
const
unsigned
int
length
=
(
const
unsigned
int
)((
*
ptr
<<
8
&
0xff00
)
|
*
(
ptr
+
1
));
ptr
+=
2
;
loggers
::
get_instance
().
log
(
"uppertester_cam_codec::decode: CAM message length=%d"
,
length
);
loggers
::
get_instance
().
log
(
"uppertester_cam_codec::decode
(1)
: CAM message length=%d"
,
length
);
if
(
data
.
lengthof
()
-
3
!=
(
const
int
)
length
)
{
loggers
::
get_instance
().
warning
(
"uppertester_cam_codec::decode (4): Wrong payload length: %d"
,
length
);
loggers
::
get_instance
().
warning
(
"uppertester_cam_codec::decode
(1)
(4): Wrong payload length: %d"
,
length
);
return
-
1
;
}
os
=
OCTETSTRING
(
length
,
ptr
);
loggers
::
get_instance
().
log_to_hexa
(
"uppertester_cam_codec::decode: CAM message="
,
os
);
loggers
::
get_instance
().
log_to_hexa
(
"uppertester_cam_codec::decode
(1)
: CAM message="
,
os
);
cam_codec
codec
;
codec
.
decode
(
os
,
msg
.
camMsg
(),
params
);
loggers
::
get_instance
().
log_msg
(
"<<< uppertester_cam_codec::decode"
,
msg
);
loggers
::
get_instance
().
log_msg
(
"<<< uppertester_cam_codec::decode
(1)
"
,
msg
);
return
0
;
}
ccsrc/Protocols/UpperTester/uppertester_denm_codec.cc
View file @
4be56b48
...
...
@@ -284,7 +284,7 @@ int uppertester_denm_codec::decode (const OCTETSTRING& data, LibItsDenm__TypesAn
r
.
actionId
().
sequenceNumber
()
=
oct2int
(
os
);
msg
.
utDenmUpdateResult
()
=
r
;
}
else
{
TTCN_
warning
(
"uppertester_denm_codec::decode: Unsupported result"
);
loggers
::
get_instance
().
warning
(
"uppertester_denm_codec::decode: Unsupported result"
);
}
loggers
::
get_instance
().
log_msg
(
"<<< uppertester_denm_codec::decode"
,
msg
);
...
...
@@ -293,18 +293,18 @@ int uppertester_denm_codec::decode (const OCTETSTRING& data, LibItsDenm__TypesAn
int
uppertester_denm_codec
::
decode
(
const
OCTETSTRING
&
data
,
LibItsDenm__TypesAndValues
::
UtDenmEventInd
&
msg
,
params
*
params
)
{
loggers
::
get_instance
().
log_to_hexa
(
">>> uppertester_denm_codec::decode: decoding_buffer="
,
data
);
loggers
::
get_instance
().
log_to_hexa
(
">>> uppertester_denm_codec::decode
(1)
: decoding_buffer="
,
data
);
const
unsigned
char
*
ptr
=
static_cast
<
const
unsigned
char
*>
(
data
)
+
1
;
OCTETSTRING
os
(
2
,
ptr
);
ptr
+=
2
;
unsigned
int
length
=
oct2int
(
os
);
loggers
::
get_instance
().
log
(
"uppertester_denm_codec::decode: DENM message length=%d"
,
length
);
loggers
::
get_instance
().
log
(
"uppertester_denm_codec::decode
(1)
: DENM message length=%d"
,
length
);
os
=
OCTETSTRING
(
length
,
ptr
);
loggers
::
get_instance
().
log_to_hexa
(
"uppertester_denm_codec::decode: DENM message="
,
os
);
loggers
::
get_instance
().
log_to_hexa
(
"uppertester_denm_codec::decode
(1)
: DENM message="
,
os
);
denm_codec
codec
;
codec
.
decode
(
os
,
msg
.
denMsg
(),
params
);
loggers
::
get_instance
().
log_msg
(
"<<< uppertester_denm_codec::decode"
,
msg
);
loggers
::
get_instance
().
log_msg
(
"<<< uppertester_denm_codec::decode
(1)
"
,
msg
);
return
0
;
}
etc/AtsCAM/AtsCAM.cfg
View file @
4be56b48
...
...
@@ -89,7 +89,7 @@ LogEventTypes:= Yes
# time_offset : Time offset, used to skip packets with time offset < time_offset
# save_mode : Set to 1 to save sent packet, 0 otherwise
system.camPort.params := "CAM(next_header=btpB,header_type=tsb,header_sub_type=sh)/BTP/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1)/ETH(mac_src=080027500f9b)/PCAP(mac_src=080027500f9b,nic=tap0)"
system.camPort.params := "CAM(next_header=btpB,header_type=tsb,header_sub_type=sh)/BTP/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device_mode=1)/ETH(mac_src=080027500f9b)/PCAP(mac_src=080027500f9b,nic=tap0
,filter=and ether proto 0x8947
)"
# CAM UpperTester port based on UDP
system.utPort.params := "UT_CAM/UDP(dst_ip=172.23.0.1,dst_port=8000)"
...
...
@@ -115,7 +115,7 @@ system.utPort.params := "UT_CAM/UDP(dst_ip=172.23.0.1,dst_port=8000)"
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_13
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_14
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_15
ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_16
#
ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_16
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_17
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_18
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_19
...
...
@@ -142,7 +142,7 @@ ItsCam_TestCases.TC_CAM_MSD_INA_BV_01_16
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_06
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_07
#ItsCam_TestCases.TC_CAM_MSD_INA_BV_08
#
ItsCam_TestCases.TC_CAM_MSP_BV_01
ItsCam_TestCases.TC_CAM_MSP_BV_01
[MAIN_CONTROLLER]
# The options herein control the behavior of MC.
...
...
etc/AtsDENM/AtsDENM.cfg
View file @
4be56b48
...
...
@@ -93,7 +93,7 @@ LogEventTypes:= Yes
# time_offset : Time offset, used to skip packets with time offset < time_offset
# save_mode : Set to 1 to save sent packet, 0 otherwise
system.denmPort.params := "DENM(next_header=btpB,header_type=tsb)/BTP(dst_port=2002)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device
M
ode=1)/ETH(mac_src=080027500f9b)/PCAP(mac_src=080027500f9b,nic=tap0)"
system.denmPort.params := "DENM(next_header=btpB,header_type=tsb)/BTP(dst_port=2002)/GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730,distanceA=1500,distanceB=1500,angle=0,device
_m
ode=1)/ETH(mac_src=080027500f9b)/PCAP(mac_src=080027500f9b,nic=tap0
,filter=and ether proto 0x8947
)"
# DENM UpperTester port based on UDP (ETSI Wlan)
system.utPort.params := "UT_DENM/UDP(dst_ip=172.23.0.1,dst_port=8000)"
...
...
etc/AtsGeoNetworking/AtsGeoNetworking.cfg
View file @
4be56b48
...
...
@@ -100,13 +100,13 @@ LogEventTypes:= Yes
# save_mode : Set to 1 to save sent packet, 0 otherwise
# Single GeoNetworking component port
system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730)/ETH(mac_src=080027500f9b)/PCAP(mac_src=080027500f9b,nic=tap0)"
system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EA,latitude=43551050,longitude=10298730)/ETH(mac_src=080027500f9b)/PCAP(mac_src=080027500f9b,nic=tap0
,filter=and ether proto 0x8947
)"
# Multiple GeoNetworking component portN
NodeA.geoNetworkingPort.params := "GN(ll_address=F8CAB808391A,latitude=43551050,longitude=10298730)/ETH(mac_src=080027500f9a)/PCAP(mac_src=080027500f9a,nic=tap0)"
odeB.geoNetworkingPort.params := "GN(ll_address=F8CAB808391B,latitude=43551050,longitude=10298730)/ETH(mac_src=080027500f9b)/PCAP(mac_src=080027500f9b,nic=tap0)"
NodeC.geoNetworkingPort.params := "GN(ll_address=F8CAB808391C,latitude=43551050,longitude=10298730)/ETH(mac_src=080027500f9c)/PCAP(mac_src=080027500f9c,nic=tap0)"
NodeD.geoNetworkingPort.params := "GN(ll_address=F8CAB808391D,latitude=43551050,longitude=10298730)/ETH(mac_src=080027500f9d)/PCAP(mac_src=080027500f9d,nic=tap0)"
NodeA.geoNetworkingPort.params := "GN(ll_address=F8CAB808391A,latitude=43551050,longitude=10298730)/ETH(mac_src=080027500f9a)/PCAP(mac_src=080027500f9a,nic=tap0
,filter=and ether proto 0x8947
)"
odeB.geoNetworkingPort.params := "GN(ll_address=F8CAB808391B,latitude=43551050,longitude=10298730)/ETH(mac_src=080027500f9b)/PCAP(mac_src=080027500f9b,nic=tap0
,filter=and ether proto 0x8947
)"
NodeC.geoNetworkingPort.params := "GN(ll_address=F8CAB808391C,latitude=43551050,longitude=10298730)/ETH(mac_src=080027500f9c)/PCAP(mac_src=080027500f9c,nic=tap0
,filter=and ether proto 0x8947
)"
NodeD.geoNetworkingPort.params := "GN(ll_address=F8CAB808391D,latitude=43551050,longitude=10298730)/ETH(mac_src=080027500f9d)/PCAP(mac_src=080027500f9d,nic=tap0
,filter=and ether proto 0x8947
)"
# UpperTester port based on UDP
#system.utPort.params := "UT_GN/UDP(dst_ip=192.168.2.2)"
...
...
etc/AtsRSUsSimulator/AtsRSUSimulator.cfg
View file @
4be56b48
...
...
@@ -9,9 +9,9 @@ LibItsGeoNetworking_Pics.PICS_GN_LOCAL_GN_ADDR := {
}
# GeoNetwoking only, no facility layer
#
LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_any
LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_any
# With facility layer
LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB
#
LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB
# Indicate which RSU to simulate
ItsRSUsSimulator_Pixits.PX_RSU_ID := 8;
...
...
@@ -27,8 +27,8 @@ ItsRSUsSimulator_Pixits.PX_ETSI_USE_CASE_ID := 6
# Indicate which zone to simulate
ItsRSUsSimulator_Pixits.PX_ETSI_ZONE_ID := 1
ItsRSUsSimulator_Pixits.PICS_GENERATE_BEACON :=
fals
e
ItsRSUsSimulator_Pixits.PICS_GENERATE_CAM :=
tru
e
ItsRSUsSimulator_Pixits.PICS_GENERATE_BEACON :=
tru
e
ItsRSUsSimulator_Pixits.PICS_GENERATE_CAM :=
fals
e
ItsRSUsSimulator_Pixits.PICS_GENERATE_DENM := false
ItsRSUsSimulator_Pixits.PICS_GENERATE_IVIM := false
ItsRSUsSimulator_Pixits.PICS_GENERATE_MAPEM := false
...
...
@@ -40,14 +40,15 @@ ItsRSUsSimulator_Pics.PICS_CAM_FREQUENCY := 1.0
ItsRSUsSimulator_Pics.PICS_DENM_FREQUENCY := 1.0
ItsRSUsSimulator_Pics.PICS_SEND_CAM_INDICATION := false
[LOGGING]
# In this section you can specify the name of the log file and the classes of events
# you want to log into the file or display on console (standard error).
LogFile := "../logs/%e.%h-%r.%s"
#
FileMask := LOG_ALL | USER | DEBUG | MATCHING
#
ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING
FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP
ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP
FileMask := LOG_ALL | USER | DEBUG | MATCHING
ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING
#
FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP
#
ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP
LogSourceInfo := Stack
LogEntityName:= Yes
LogEventTypes:= Yes
...
...
@@ -122,10 +123,10 @@ LogEventTypes:= Yes
# save_mode : Set to 1 to save sent packet, 0 otherwise
# Single GeoNetworking component port
system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,
beaconing=0,device_mode=0,expiry=500,
its_aid=37,secured_mode=
0
,encrypted_mode=0,certificate=CERT_IUT_F_AT,peer_certificate=CERT_TS_F_AT,sec_db_path=/home/
ubu
nt
u
/tmp/
test_01
)/ETH(mac_src=080027
f44e7d,mac_bc=FFFFFFFFFFFF,eth_type=8947
)/PCAP(mac_src=080027
f44e7d
,nic=eth2,filter=and ether proto 0x8947)"
system.geoNetworkingPort.params := "GN(ll_address=4C5E0C14D2EB,latitude=43551050,longitude=10298730,its_aid=37,secured_mode=
1
,encrypted_mode=0,certificate=CERT_IUT_F_AT,peer_certificate=CERT_TS_F_AT,sec_db_path=/home/
vagra
nt/tmp/
asn1c_cert
)/ETH(mac_src=080027
500f9b
)/PCAP(mac_src=080027
500f9b
,nic=eth2,filter=and ether proto 0x8947)"
# Config port based on UDP
system.cfPort.params := "CF(ut=cam)/UDP(dst_ip=192.168.2.2
,dst_port=12345
)"
system.cfPort.params := "CF(ut=cam)/UDP(dst_ip=192.168.2.2)"
[EXECUTE]
ItsRSUsSimulator_TestCases.TC_RSUSIMU_BV_01
...
...
@@ -133,7 +134,6 @@ ItsRSUsSimulator_TestCases.TC_RSUSIMU_BV_01
[MAIN_CONTROLLER]
# The options herein control the behavior of MC.
KillTimer := 10.0
TCPPort := 0
LocalAddress := 127.0.0.1
TCPPort := 12000
NumHCs := 1
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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