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
1df5d671
Commit
1df5d671
authored
Oct 21, 2016
by
garciay
Browse files
Changes applied for UC3:
1)ETSI CTI Plugtests Guide V0.0.5 2)NodeXY X/Y inversion
parent
ec7108c8
Changes
5
Hide whitespace changes
Inline
Side-by-side
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Functions.ttcn
View file @
1df5d671
...
...
@@ -484,50 +484,63 @@ module ItsRSUsSimulator_Functions {
var
template
(
omit
)
SPATEM
v_spatem
:=
p_spatem
;
// Make a copy
var
TimeMark
v_currentTimeMark
:=
f_getCurrentTimeMark
();
if
(
vc_currentPhaseStartTime
==
36001
)
{
if
(
vc_currentPhaseStartTime
==
36001
)
{
// First call
vc_currentPhaseStartTime
:=
v_currentTimeMark
;
vc_endPhaseStartTime
:=
f_computeEndPhaseStartTime
(
vc_currentPhaseStartTime
,
vc_repitition_duration
[
vc_spatemStatesId
]);
select
(
vc_spatemStatesId
)
{
case
(
0
)
{
vc_endPhaseStartTime
:=
f_computeEndPhaseStartTime
(
vc_currentPhaseStartTime
,
PICS_SPATEM_REPITITION_DURATION_STATE_30
);
}
case
(
1
)
{
vc_endPhaseStartTime
:=
f_computeEndPhaseStartTime
(
v_currentTimeMark
,
PICS_SPATEM_REPITITION_DURATION_STATE_30
);
}
case
(
2
)
{
vc_endPhaseStartTime
:=
f_computeEndPhaseStartTime
(
vc_currentPhaseStartTime
,
PICS_SPATEM_REPITITION_DURATION_STATE_30
);
}
}
// End of 'select' statement
}
if
(
v_currentTimeMark
>=
vc_endPhaseStartTime
)
{
vc_spatemStatesId
:=
(
vc_spatemStatesId
+
1
)
mod
vc_spatemStatesNum
;
// Change state
if
(
v_currentTimeMark
>=
vc_endPhaseStartTime
)
{
// Change state
vc_spatemStatesId
:=
(
vc_spatemStatesId
+
1
)
mod
vc_spatemStatesNum
;
vc_currentPhaseStartTime
:=
v_currentTimeMark
;
vc_endPhaseStartTime
:=
f_computeEndPhaseStartTime
(
vc_currentPhaseStartTime
,
vc_repitition_duration
[
vc_spatemStatesId
]
);
vc_endPhaseStartTime
:=
f_computeEndPhaseStartTime
(
vc_currentPhaseStartTime
,
PICS_SPATEM_REPITITION_DURATION_STATE_30
);
}
log
(
"vc_currentPhaseStartTime = "
,
vc_currentPhaseStartTime
);
log
(
"vc_endPhaseStartTime = "
,
vc_endPhaseStartTime
);
log
(
"v_currentTimeMark = "
,
v_currentTimeMark
);
log
(
"vc_endPhaseStartTime = "
,
vc_endPhaseStartTime
);
log
(
"vc_spatemStatesId = "
,
vc_spatemStatesId
);
log
(
"mintime#1 = "
,
vc_currentPhaseStartTime
+
vc_repitition_duration
[(
vc_spatemStatesId
+
1
)
mod
vc_spatemStatesNum
]);
log
(
"mintime#2 = "
,
vc_currentPhaseStartTime
+
vc_repitition_duration
[(
vc_spatemStatesId
+
2
)
mod
vc_spatemStatesNum
]);
// Rebuild SPATEM message
for
(
var
integer
v_intersection
:=
0
;
v_intersection
<
lengthof
(
v_spatem
.
spat
.
intersections
);
v_intersection
:=
v_intersection
+
1
)
{
var
template
(
omit
)
MovementList
v_states
:=
vc_states
[
vc_signalGroupParmId
][
v_intersection
];
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
0
]
:=
v_states
[
vc_spatemStatesId
];
select
(
vc_spatemStatesId
)
{
case
(
0
)
{
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
0
]
:=
v_states
[
0
];
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
1
]
:=
v_states
[
1
];
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
2
]
:=
v_states
[
2
];
//v_spatem.spat.intersections[v_intersection].states[2] := v_states[2];
// Update startTime & minEndTime
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
);
}
case
(
1
)
{
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
0
]
:=
v_states
[
1
];
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
1
]
:=
v_states
[
2
];
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
2
]
:=
v_states
[
0
];
//v_spatem.spat.intersections[v_intersection].states[2] := v_states[0];
// Update startTime & minEndTime
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
0
].
state_time_speed
[
0
].
timing
.
minEndTime
:=
f_computeEndPhaseStartTime
(
v_currentTimeMark
,
PICS_SPATEM_REPITITION_DURATION_STATE_10
);
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
1
].
state_time_speed
[
0
].
timing
.
startTime
:=
f_computeEndPhaseStartTime
(
vc_currentPhaseStartTime
,
PICS_SPATEM_REPITITION_DURATION_STATE_10
);
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
1
].
state_time_speed
[
0
].
timing
.
minEndTime
:=
f_computeEndPhaseStartTime
(
vc_currentPhaseStartTime
,
PICS_SPATEM_REPITITION_DURATION_STATE_30
);
}
case
(
2
)
{
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
0
]
:=
v_states
[
2
];
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
1
]
:=
v_states
[
0
];
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
2
]
:=
v_states
[
1
];
//v_spatem.spat.intersections[v_intersection].states[2] := v_states[1];
// Update startTime & minEndTime
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
);
}
case
else
{
}
}
// End of 'select' statement
// Update 'minEndTime' field
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
0
].
state_time_speed
[
0
].
timing
.
minEndTime
:=
vc_currentPhaseStartTime
;
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
1
].
state_time_speed
[
0
].
timing
.
minEndTime
:=
vc_currentPhaseStartTime
+
vc_repitition_duration
[(
vc_spatemStatesId
+
1
)
mod
vc_spatemStatesNum
];
v_spatem
.
spat
.
intersections
[
v_intersection
].
states
[
2
].
state_time_speed
[
0
].
timing
.
minEndTime
:=
vc_currentPhaseStartTime
+
vc_repitition_duration
[(
vc_spatemStatesId
+
2
)
mod
vc_spatemStatesNum
];
v_spatem
.
spat
.
intersections
[
v_intersection
].
timeStamp
:=
f_getCurrentTime
()
mod
65536
;
v_spatem
.
spat
.
intersections
[
v_intersection
].
moy
:=
f_getMinuteOfTheYear
();
}
// End of 'for' statement
log
(
"v_spatem.spat.intersections = "
,
v_spatem
.
spat
.
intersections
);
p_payload
:=
valueof
(
f_adaptPayload
(
...
...
@@ -677,7 +690,7 @@ module ItsRSUsSimulator_Functions {
valueof
(
p_payload
)
),
m_defaultLifetime
,
c_
defaultH
opLimit
c_
h
opLimit
1
));
}
else
{
v_geoNetworkingPdu
:=
valueof
(
m_geoNwPdu
(
// FIXME Use PIXIT parameter to get a fully configurable template
...
...
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Pics.ttcn
View file @
1df5d671
...
...
@@ -492,7 +492,7 @@ module ItsRSUsSimulator_Pics {
typeOfAddress
:=
e_manual
,
stationType
:=
e_bus
,
stationCountryCode
:=
39
,
mid
:=
'
00
0
ACCD
DEEEE
'
O
mid
:=
'
00
1
C6B0
DEEEE
'
O
}
// End of PICS_UC7_GN_ADDRESS
modulepar
RsuParm
PICS_UC7_LPV
:=
{
...
...
@@ -519,8 +519,8 @@ module ItsRSUsSimulator_Pics {
latitude
:=
435582150
,
longitude
:=
103065170
,
positionConfidenceEllipse
:=
{
semiMajorConfidence
:=
SemiAxisLength_oneCentimeter_
,
semiMinorConfidence
:=
SemiAxisLength_oneCentimeter_
,
semiMajorConfidence
:=
100
,
semiMinorConfidence
:=
100
,
semiMajorOrientation
:=
HeadingValue_wgs84North_
},
altitude
:=
{
...
...
@@ -2722,7 +2722,7 @@ module ItsRSUsSimulator_Pics {
modulepar
MapemParm
PICS_Z1_M1_SL
:=
{
intersections
:=
{
{
// Start of intersection #0
name
:=
"PICS_Z1_M1_SL
- RSU_11
"
,
name
:=
"PICS_Z1_M1_SL"
,
id
:=
PICS_Z1_M1_SL_IDX
,
revision
:=
0
,
refPoint
:=
PICS_Z1_M1_SL_RP
,
...
...
@@ -2878,7 +2878,7 @@ module ItsRSUsSimulator_Pics {
modulepar
MapemParm
PICS_Z2_M1_SL
:=
{
intersections
:=
{
{
// Start of intersection #0
name
:=
"PICS_Z2_M1_SL
- RSU_3
"
,
name
:=
"PICS_Z2_M1_SL"
,
id
:=
PICS_Z2_M1_SL_IDX
,
revision
:=
0
,
refPoint
:=
PICS_Z2_M1_SL_RP
,
...
...
@@ -3034,7 +3034,7 @@ module ItsRSUsSimulator_Pics {
modulepar
MapemParm
PICS_Z3_M1_SL
:=
{
intersections
:=
{
{
// Start of intersection #0
name
:=
"PICS_Z3_M1_SL
- RSU_12
"
,
name
:=
"PICS_Z3_M1_SL"
,
id
:=
PICS_Z3_M1_SL_IDX
,
revision
:=
0
,
refPoint
:=
PICS_Z3_M1_SL_RP
,
...
...
@@ -3190,7 +3190,7 @@ module ItsRSUsSimulator_Pics {
modulepar
MapemParm
PICS_Z4_M1_SL
:=
{
intersections
:=
{
{
// Start of intersection #0
name
:=
"PICS_Z4_M1_SL
- RSU_5
"
,
name
:=
"PICS_Z4_M1_SL"
,
id
:=
PICS_Z4_M1_SL_IDX
,
revision
:=
0
,
refPoint
:=
PICS_Z4_M1_SL_RP
,
...
...
@@ -3346,7 +3346,7 @@ module ItsRSUsSimulator_Pics {
modulepar
MapemParm
PICS_Z5_M1_SL
:=
{
intersections
:=
{
{
// Start of intersection #0
name
:=
"PICS_Z5_M1_SL
- RSU_4
"
,
name
:=
"PICS_Z5_M1_SL"
,
id
:=
PICS_Z5_M1_SL_IDX
,
revision
:=
0
,
refPoint
:=
PICS_Z5_M1_SL_RP
,
...
...
@@ -3502,7 +3502,7 @@ module ItsRSUsSimulator_Pics {
modulepar
MapemParm
PICS_Z6_M1_SL
:=
{
intersections
:=
{
{
// Start of intersection #0
name
:=
"PICS_Z6_M1_SL
- RSU_7
"
,
name
:=
"PICS_Z6_M1_SL"
,
id
:=
PICS_Z6_M1_SL_IDX
,
revision
:=
0
,
refPoint
:=
PICS_Z6_M1_SL_RP
,
...
...
@@ -3597,11 +3597,15 @@ module ItsRSUsSimulator_Pics {
modulepar
UInt32
PICS_SPATEM_ITS_AID
:=
137
;
modulepar
UInt32
PICS_SPATEM_REPITITION_DURATION_STATE_1
:=
3
0
*
10
;
// In units of 1/10th second
modulepar
UInt32
PICS_SPATEM_REPITITION_DURATION_STATE_1
0
:=
1
0
*
10
;
// In units of 1/10th second
modulepar
UInt32
PICS_SPATEM_REPITITION_DURATION_STATE_2
:=
3
0
*
10
;
// In units of 1/10th second
modulepar
UInt32
PICS_SPATEM_REPITITION_DURATION_STATE_2
0
:=
2
0
*
10
;
// In units of 1/10th second
modulepar
UInt32
PICS_SPATEM_REPITITION_DURATION_STATE_3
:=
30
*
10
;
// In units of 1/10th second
modulepar
UInt32
PICS_SPATEM_REPITITION_DURATION_STATE_30
:=
30
*
10
;
// In units of 1/10th second
modulepar
UInt32
PICS_SPATEM_REPITITION_DURATION_STATE_40
:=
40
*
10
;
// In units of 1/10th second
modulepar
UInt32
PICS_SPATEM_REPITITION_DURATION_STATE_50
:=
50
*
10
;
// In units of 1/10th second
}
// End of group spatemCommonParams
...
...
@@ -3611,7 +3615,7 @@ module ItsRSUsSimulator_Pics {
signalGroupID
:=
1
,
intersections
:=
{
{
name
:=
"PICS_SPATEM_PARMS_SG_
1 - RSU_11
"
,
name
:=
"PICS_SPATEM_PARMS_SG_
50
"
,
id
:=
PICS_Z1_M1_SL_IDX
,
revision
:=
0
,
status
:=
int2bit
(
0
,
16
),
...
...
@@ -3701,7 +3705,7 @@ module ItsRSUsSimulator_Pics {
signalGroupID
:=
1
,
intersections
:=
{
{
name
:=
"PICS_SPATEM_PARMS_SG_
1 - RSU_3
"
,
name
:=
"PICS_SPATEM_PARMS_SG_
50
"
,
id
:=
PICS_Z2_M1_SL_IDX
,
revision
:=
0
,
status
:=
int2bit
(
0
,
16
),
...
...
@@ -3791,7 +3795,7 @@ module ItsRSUsSimulator_Pics {
signalGroupID
:=
1
,
intersections
:=
{
{
name
:=
"PICS_SPATEM_PARMS_SG_
1 - RSU_12
"
,
name
:=
"PICS_SPATEM_PARMS_SG_
50
"
,
id
:=
PICS_Z3_M1_SL_IDX
,
revision
:=
0
,
status
:=
int2bit
(
0
,
16
),
...
...
@@ -3881,7 +3885,7 @@ module ItsRSUsSimulator_Pics {
signalGroupID
:=
1
,
intersections
:=
{
{
name
:=
"PICS_SPATEM_PARMS_SG_
1 - RSU_
5"
,
name
:=
"PICS_SPATEM_PARMS_SG_5
0
"
,
id
:=
PICS_Z4_M1_SL_IDX
,
revision
:=
0
,
status
:=
int2bit
(
0
,
16
),
...
...
@@ -3971,7 +3975,7 @@ module ItsRSUsSimulator_Pics {
signalGroupID
:=
1
,
intersections
:=
{
{
name
:=
"PICS_SPATEM_PARMS_SG_
1 - RSU_4
"
,
name
:=
"PICS_SPATEM_PARMS_SG_
50
"
,
id
:=
PICS_Z5_M1_SL_IDX
,
revision
:=
0
,
status
:=
int2bit
(
0
,
16
),
...
...
@@ -4061,7 +4065,7 @@ module ItsRSUsSimulator_Pics {
signalGroupID
:=
1
,
intersections
:=
{
{
name
:=
"PICS_SPATEM_PARMS_SG_
1 - RSU_4
"
,
name
:=
"PICS_SPATEM_PARMS_SG_
50
"
,
id
:=
PICS_Z6_M1_SL_IDX
,
revision
:=
0
,
status
:=
int2bit
(
0
,
16
),
...
...
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Pixits.ttcn
View file @
1df5d671
...
...
@@ -22,7 +22,7 @@ module ItsRSUsSimulator_Pixits {
/**
* @desc Indicate which RSU to simulate
*/
modulepar
integer
PX_RSU_ID
:=
2
;
modulepar
integer
PX_RSU_ID
:=
1
;
/**
* @desc Indicate which Use Case to simulate
...
...
@@ -32,6 +32,7 @@ module ItsRSUsSimulator_Pixits {
* UC6 (CAM only): PX_ETSI_USE_CASE_ID := 6 !! PX_RSU_ID 2
* UC7 (CAM only): PX_ETSI_USE_CASE_ID := 7 !! PX_RSU_ID 2
* UC9 (CAM only): PX_ETSI_USE_CASE_ID := 9 !! PX_RSU_ID 5
* @remark LibItsGeoNetworking_Pixits.PX_GN_UPPER_LAYER := e_btpB
*/
modulepar
integer
PX_ETSI_USE_CASE_ID
:=
3
;
...
...
@@ -39,7 +40,7 @@ module ItsRSUsSimulator_Pixits {
* @desc Indicate which zone to simulate
* @remark Used only for DENM
*/
modulepar
integer
PX_ETSI_ZONE_ID
:=
2
;
modulepar
integer
PX_ETSI_ZONE_ID
:=
1
;
modulepar
boolean
PICS_GENERATE_BEACON
:=
false
;
...
...
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_Templates.ttcn
View file @
1df5d671
...
...
@@ -423,7 +423,7 @@ module ItsRSUsSimulator_Templates {
termination
:=
omit
,
eventPosition
:=
p_eventPosition
,
relevanceDistance
:=
p_relevanceDistance
,
relevanceTrafficDirection
:=
omit
,
relevanceTrafficDirection
:=
upstreamTraffic
,
validityDuration
:=
p_validityDuration
,
transmissionInterval
:=
p_repetitionInterval
,
stationType
:=
StationType_roadSideUnit_
...
...
ttcn/AtsRSUsSimulator/ItsRSUsSimulator_TestSystem.ttcn
View file @
1df5d671
...
...
@@ -73,16 +73,14 @@ module ItsRSUsSimulator_TestSystem {
/**
* @desc Repetition duration times of SPATEM phases
*/
var
SpatemRepetionDuration
vc_repitition_duration
:=
{
/* TODO To be removed
* var SpatemRepetionDuration vc_repitition_duration := {
PICS_SPATEM_REPITITION_DURATION_STATE_1,
PICS_SPATEM_REPITITION_DURATION_STATE_2,
PICS_SPATEM_REPITITION_DURATION_STATE_3
};
/**
* @desc Number of SPATEM phases
*/
var
integer
vc_spatemStatesNum
:=
lengthof
(
vc_repitition_duration
);
*/
var
integer
vc_spatemStatesNum
:=
3
;
// Two states
var
boolean
vc_beacon
:=
PICS_GENERATE_BEACON
;
var
boolean
vc_cam
:=
PICS_GENERATE_CAM
;
...
...
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