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
39200759
Commit
39200759
authored
Aug 03, 2016
by
garciay
Browse files
Validate RSUsimulator against AtsDenm in secured mode
parent
f46b81d6
Changes
7
Show whitespace changes
Inline
Side-by-side
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Functions.ttcn
View file @
39200759
...
...
@@ -11,6 +11,11 @@ module ItsRSUsSimulator_Functions {
import
from
ITS_Container
language
"ASN.1:1997"
all
;
import
from
CAM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
DENM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
MAPEM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
SPATEM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
IVIM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
SREM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
SSEM_PDU_Descriptions
language
"ASN.1:1997"
all
;
// LibItsCommon
import
from
LibItsCommon_Functions
all
;
...
...
@@ -52,9 +57,10 @@ module ItsRSUsSimulator_Functions {
var
template
(
value
)
DenmParmContainers
v_denmParmContainers
;
var
template
(
omit
)
DENMs
v_denms
:=
omit
;
var
template
(
omit
)
CAM
v_cam
:=
omit
;
// var template (omit) MAPEM v_mapem := omit;
// var template (omit) SPATEMs v_spatems := omit;
// var template (omit) SSEM v_ssem := omit;
var
template
(
omit
)
MAPEM
v_mapem
:=
omit
;
var
template
(
omit
)
SPATEMs
v_spatems
:=
omit
;
var
template
(
omit
)
IVIM
v_ivim
:=
omit
;
var
template
(
omit
)
SSEM
v_ssem
:=
omit
;
var
integer
v_counter
;
// Map
...
...
@@ -79,9 +85,11 @@ module ItsRSUsSimulator_Functions {
if
(
PICS_GENERATE_DENM
)
{
// Build the list of the DENM events
for
(
v_counter
:=
0
;
v_counter
<
lengthof
(
PICS_DENM_EVENTS_RSU
[
PX_RSU_ID
-
1
]);
v_counter
:=
v_counter
+
1
)
{
// Build DENM with dynamic values
v_denmParmContainers
:=
m_denmParmContainers
(
PICS_RSU_PARAMS
[
PX_RSU_ID
-
1
].
stationID
,
f_getDenmSequenceNumber
(),
PICS_DENM_REPETITION_INTERVAL
,
PICS_DENM_EVENTS_RSU
[
PX_RSU_ID
-
1
][
v_counter
].
eventPosition
,
PICS_DENM_EVENTS_RSU
[
PX_RSU_ID
-
1
][
v_counter
].
causeCodeType
,
PICS_DENM_EVENTS_RSU
[
PX_RSU_ID
-
1
][
v_counter
].
eventHistory
...
...
@@ -93,6 +101,9 @@ module ItsRSUsSimulator_Functions {
v_denmParmContainers
.
situationContainer
,
v_denmParmContainers
.
locationContainer
)));
if
(
ispresent
(
PICS_DENM_EVENTS_RSU
[
PX_RSU_ID
-
1
][
v_counter
].
roadWorksContainerExtended
))
{
v_denms
[
v_counter
].
denm
.
alacarte
:=
m_alacarte
(
PICS_DENM_EVENTS_RSU
[
PX_RSU_ID
-
1
][
v_counter
].
roadWorksContainerExtended
);
}
}
// End of 'for' loop
}
if
(
PICS_GENERATE_CAM
)
{
...
...
@@ -109,14 +120,15 @@ module ItsRSUsSimulator_Functions {
);
}
// Build the messages value list for this RSU
vc_rsuMessagesValueList
[
PX_RSU_ID
-
1
]
:=
valueof
(
vc_rsuMessagesValueList
[
PX_RSU_ID
-
1
]
:=
m_rsuProfile
(
v_cam
,
v_denms
/*
,
v_denms
,
v_mapem
,
v_spatems
v_ssem*/
));
v_spatems
,
v_ivim
,
v_ssem
);
if
(
PICS_RSU_PARAMS
[
PX_RSU_ID
-
1
].
geoShape
==
e_geoCircle
)
{
vc_geoArea
:=
f_computeCircularArea
(
vc_longPosVectorRsu
,
PICS_RSU_PARAMS
[
PX_RSU_ID
-
1
].
geoParms
.
radius
);
}
else
{
...
...
@@ -129,6 +141,8 @@ module ItsRSUsSimulator_Functions {
function
f_cf01Down
()
runs
on
ItsRSUsSimulator
{
vc_rsuMessagesValueList
:=
{};
f_uninitialiseSecuredMode
();
// Unmap
...
...
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Pics.ttcn
View file @
39200759
...
...
@@ -105,6 +105,11 @@ module ItsRSUsSimulator_Pics {
altitudeConfidence
:=
unavailable
}
// End of PICS_DENM_ALTITUDE
/**
* @desc DENM repetition interval, in ms
*/
modulepar
TransmissionInterval
PICS_DENM_REPETITION_INTERVAL
:=
1000
;
}
// End of group denmCommonParams
group
denmZone1
{
...
...
@@ -136,6 +141,24 @@ module ItsRSUsSimulator_Pics {
eventDeltaTime
:=
omit
,
informationQuality
:=
0
}
},
roadWorksContainerExtended
:=
{
lightBarSirenInUse
:=
omit
,
closedLanes
:=
{
hardShoulderStatus
:=
availableForDriving
,
drivingLaneStatus
:=
'0001'B
},
restriction
:=
omit
,
speedLimit
:=
30
,
incidentIndication
:=
omit
,
recommendedPath
:=
omit
,
startingPointSpeedLimit
:=
{
deltaLatitude
:=
0
,
deltaLongitude
:=
0
,
deltaAltitude
:=
0
},
trafficFlowRule
:=
passToRight
,
referenceDenms
:=
omit
}
}
// End of PICS_Z1_D1_EP
...
...
@@ -166,6 +189,24 @@ module ItsRSUsSimulator_Pics {
eventDeltaTime
:=
omit
,
informationQuality
:=
0
}
},
roadWorksContainerExtended
:=
{
lightBarSirenInUse
:=
omit
,
closedLanes
:=
{
hardShoulderStatus
:=
availableForDriving
,
drivingLaneStatus
:=
'0011'B
},
restriction
:=
omit
,
speedLimit
:=
30
,
incidentIndication
:=
omit
,
recommendedPath
:=
omit
,
startingPointSpeedLimit
:=
{
deltaLatitude
:=
0
,
deltaLongitude
:=
0
,
deltaAltitude
:=
0
},
trafficFlowRule
:=
passToRight
,
referenceDenms
:=
omit
}
}
// End of PICS_Z1_D2_EP
...
...
@@ -196,6 +237,24 @@ module ItsRSUsSimulator_Pics {
eventDeltaTime
:=
omit
,
informationQuality
:=
0
}
},
roadWorksContainerExtended
:=
{
lightBarSirenInUse
:=
omit
,
closedLanes
:=
{
hardShoulderStatus
:=
closed
,
drivingLaneStatus
:=
'01'B
},
restriction
:=
omit
,
speedLimit
:=
30
,
incidentIndication
:=
omit
,
recommendedPath
:=
omit
,
startingPointSpeedLimit
:=
{
deltaLatitude
:=
0
,
deltaLongitude
:=
0
,
deltaAltitude
:=
0
},
trafficFlowRule
:=
passToRight
,
referenceDenms
:=
omit
}
}
// End of PICS_Z1_D3_EP
...
...
@@ -305,7 +364,7 @@ module ItsRSUsSimulator_Pics {
/**
* @desc DENM frequency timer
*/
modulepar
float
PICS_DENM_FREQUENY
:=
0.
1
;
modulepar
float
PICS_DENM_FREQUENY
:=
int2float
(
PICS_DENM_REPETITION_INTERVAL
)
/
100
0.
0
;
/**
* @desc MAPEM frequency timer
...
...
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Templates.ttcn
View file @
39200759
...
...
@@ -10,7 +10,6 @@ module ItsRSUsSimulator_Templates {
import
from
MAPEM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
SPATEM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
IVIM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
SREM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
SSEM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
DSRC
language
"ASN.1:1997"
all
;
...
...
@@ -45,16 +44,17 @@ module ItsRSUsSimulator_Templates {
import
from
ItsRSUsSimulator_Pics
all
;
template
(
omit
)
RsuMessagesValue
m_rsuProfile
(
in
template
(
value
)
CAM
p_cam
,
in
template
(
value
)
DENMs
p_denms
,
in
template
(
omit
)
CAM
p_cam
:=
omit
,
in
template
(
omit
)
DENMs
p_denms
:=
omit
,
in
template
(
omit
)
MAPEM
p_mapem
:=
omit
,
in
template
(
omit
)
SPATEM
p_spatem
:=
omit
,
in
template
(
omit
)
IVIM
p_ivim
:=
omit
in
template
(
omit
)
SPATEMs
p_spatems
:=
omit
,
in
template
(
omit
)
IVIM
p_ivim
:=
omit
,
in
template
(
omit
)
SSEM
p_ssem
:=
omit
)
:=
{
cam
:=
p_cam
,
denms
:=
p_denms
,
mapem
:=
p_mapem
,
spatem
:=
p_spatem
,
spatem
s
:=
p_spatem
s
,
ivim
:=
p_ivim
}
// End of template RsuMessagesValue
...
...
@@ -170,9 +170,24 @@ module ItsRSUsSimulator_Templates {
group
denmTemplates
{
/**
* @desc Send template for Alacarte Container including lanePosition
*/
template
(
omit
)
AlacarteContainer
m_alacarte
(
in
template
(
omit
)
RoadWorksContainerExtended
p_roadWorksContainerExtended
)
:=
{
lanePosition
:=
omit
,
impactReduction
:=
omit
,
externalTemperature
:=
omit
,
roadWorks
:=
p_roadWorksContainerExtended
,
positioningSolution
:=
omit
,
stationaryVehicle
:=
omit
}
template
(
value
)
DenmParmContainers
m_denmParmContainers
(
in
template
(
value
)
StationID
p_originatingStationID
,
in
template
(
value
)
SequenceNumber
p_sequenceNumber
,
in
template
(
value
)
TransmissionInterval
p_repetitionInterval
,
in
template
(
value
)
ReferencePosition
p_eventPosition
,
in
template
(
value
)
CauseCodeType
p_causeCodeType
,
in
template
(
value
)
EventHistory
p_eventHistory
,
...
...
@@ -184,14 +199,14 @@ module ItsRSUsSimulator_Templates {
originatingStationID
:=
p_originatingStationID
,
sequenceNumber
:=
p_sequenceNumber
},
detectionTime
:=
f_getCurrentTime
()
,
referenceTime
:=
0
,
detectionTime
:=
0
,
referenceTime
:=
f_getCurrentTime
(),
// FIXME To be checked
termination
:=
omit
,
eventPosition
:=
p_eventPosition
,
relevanceDistance
:=
p_relevanceDistance
,
relevanceTrafficDirection
:=
omit
,
validityDuration
:=
p_validityDuration
,
transmissionInterval
:=
omit
,
transmissionInterval
:=
p_repetitionInterval
,
stationType
:=
StationType_roadSideUnit_
},
// End of field managementContainer
situationContainer
:=
{
...
...
@@ -220,7 +235,6 @@ module ItsRSUsSimulator_Templates {
},
roadType
:=
omit
}
// End of field locationContainer
}
// End of template m_denmParm
}
// End of group denmTemplates
...
...
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_TestCases.ttcn
View file @
39200759
...
...
@@ -38,19 +38,19 @@ module ItsRSUsSimulator_TestCases {
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_success
);
// Test Body
if
(
is
bound
(
vc_rsuMessagesValueList
[
PX_RSU_ID
-
1
].
cam
))
{
if
(
is
present
(
vc_rsuMessagesValueList
[
PX_RSU_ID
-
1
].
cam
))
{
tc_cam
.
start
;
}
if
(
is
bound
(
vc_rsuMessagesValueList
[
PX_RSU_ID
-
1
].
denms
))
{
if
(
is
present
(
vc_rsuMessagesValueList
[
PX_RSU_ID
-
1
].
denms
))
{
tc_denm
.
start
;
}
if
(
is
bound
(
vc_rsuMessagesValueList
[
PX_RSU_ID
-
1
].
mapem
))
{
if
(
is
present
(
vc_rsuMessagesValueList
[
PX_RSU_ID
-
1
].
mapem
))
{
tc_mapem
.
start
;
}
if
(
is
bound
(
vc_rsuMessagesValueList
[
PX_RSU_ID
-
1
].
spatem
))
{
if
(
is
present
(
vc_rsuMessagesValueList
[
PX_RSU_ID
-
1
].
spatem
s
))
{
tc_spatem
.
start
;
}
if
(
is
bound
(
vc_rsuMessagesValueList
[
PX_RSU_ID
-
1
].
ivim
))
{
if
(
is
present
(
vc_rsuMessagesValueList
[
PX_RSU_ID
-
1
].
ivim
))
{
tc_ivim
.
start
;
}
alt
{
...
...
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_TestControl.ttcn
View file @
39200759
...
...
@@ -2,6 +2,7 @@ module ItsRSUsSimulator_TestControl {
// AtsRSUsSimulator
import
from
ItsRSUsSimulator_TestCases
all
;
import
from
LibItsGeoNetworking_Templates
all
;
control
{
...
...
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_TestSystem.ttcn
View file @
39200759
...
...
@@ -15,7 +15,7 @@ module ItsRSUsSimulator_TestSystem {
var
LongPosVector
vc_longPosVectorRsu
:=
{};
var
GeoArea
vc_geoArea
:=
{};
var
RsuMessagesValueList
vc_rsuMessagesValueList
:=
{};
var
template
(
value
)
RsuMessagesValueList
vc_rsuMessagesValueList
:=
{};
var
integer
vc_denmEventCounter
:=
0
;
timer
tc_cam
:=
PICS_CAM_FREQUENY
;
...
...
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_TypesAndValues.ttcn
View file @
39200759
...
...
@@ -10,7 +10,6 @@ module ItsRSUsSimulator_TypesAndValues {
import
from
MAPEM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
SPATEM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
IVIM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
SREM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
SSEM_PDU_Descriptions
language
"ASN.1:1997"
all
;
// LibItsGeoNetworking
...
...
@@ -26,17 +25,23 @@ module ItsRSUsSimulator_TypesAndValues {
*/
type
record
of
DENM
DENMs
;
/**
* @desc This is the list of SPATEM events hosted by a single RSU
*/
type
record
of
SPATEM
SPATEMs
;
/**
* @desc Defines the list of messages to be sent by a single RSU
* @member cam CAM message that a RSU shall send
* @member denms List of DENM events that a RSU shall send
*/
type
record
RsuMessagesValue
{
CAM
cam
,
DENMs
denms
,
CAM
cam
optional
,
DENMs
denms
optional
,
MAPEM
mapem
optional
,
SPATEM
spatem
optional
,
IVIM
ivim
optional
SPATEMs
spatems
optional
,
IVIM
ivim
optional
,
SSEM
ssem
optional
}
// End of type RsuMessagesValue
/**
...
...
@@ -48,7 +53,7 @@ module ItsRSUsSimulator_TypesAndValues {
ManagementContainer
managementContainer
,
SituationContainer
situationContainer
,
LocationContainer
locationContainer
}
// End of type DenmParm
}
// End of type DenmParm
Containers
/**
* @desc This is the list of DENM dynamic parameters for the different events hosted by a single RSU
...
...
@@ -122,7 +127,8 @@ module ItsRSUsSimulator_TypesAndValues {
type
record
DenmParm
{
ReferencePosition
eventPosition
,
CauseCodeType
causeCodeType
,
EventHistory
eventHistory
EventHistory
eventHistory
,
RoadWorksContainerExtended
roadWorksContainerExtended
optional
}
// End of type DenmParm
/**
...
...
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