Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TTCN-3 Libraries
LibIts
Commits
4cd830a5
Commit
4cd830a5
authored
Nov 18, 2014
by
garciay
Browse files
Updated ITS-Container.asn to correct version
Add UtChangePseudonym trigger
parent
b39aa3cd
Changes
5
Hide whitespace changes
Inline
Side-by-side
ttcn/CAM/LibItsCam_Templates.ttcn
View file @
4cd830a5
...
...
@@ -241,10 +241,12 @@ module LibItsCam_Templates {
curvatureCalculationMode
:=
?
,
yawRate
:=
?
,
accelerationControl
:=
*
,
lanePosition
:=
*
,
steeringWheelAngle
:=
*
,
lateralAcceleration
:=
*
,
verticalAcceleration
:=
*
,
performanceClass
:=
*
performanceClass
:=
*
,
cenDsrcTollingZone
:=
*
}
/**
...
...
@@ -531,10 +533,12 @@ module LibItsCam_Templates {
yawRateConfidence
:=
unavailable
},
accelerationControl
:=
omit
,
lanePosition
:=
omit
,
steeringWheelAngle
:=
omit
,
lateralAcceleration
:=
omit
,
verticalAcceleration
:=
omit
,
performanceClass
:=
omit
performanceClass
:=
omit
,
cenDsrcTollingZone
:=
omit
}
},
lowFrequencyContainer
:=
omit
,
...
...
ttcn/Common/LibItsCommon_TypesAndValues.ttcn
View file @
4cd830a5
...
...
@@ -36,6 +36,18 @@ module LibItsCommon_TypesAndValues {
* @desc Upper Tester result message of change position request of IUT
*/
type
boolean
UtChangePositionResult
;
/**
* @desc Upper Tester message to change the pseudonym of the DENM IUT
*/
type
record
UtChangePseudonym
{
// empty on purpose
}
/**
* @desc Upper Tester result message of the change pseudonym request
*/
type
boolean
UtChangePseudonymResult
;
}
with
{
encode
"UpperTester"
...
...
ttcn/DENM/LibItsDenm_Functions.ttcn
View file @
4cd830a5
...
...
@@ -14,9 +14,12 @@ module LibItsDenm_Functions {
modulepar
PX_TNOAC
;
function
f_sleep
};
// LibIts
// LibIts
Common
import
from
LibItsCommon_TypesAndValues
all
;
import
from
LibItsCommon_Functions
all
;
// LibIts
import
from
LibItsDenm_TestSystem
all
;
import
from
LibItsDenm_TypesAndValues
all
;
import
from
LibItsDenm_Templates
all
;
...
...
@@ -48,6 +51,29 @@ module LibItsDenm_Functions {
}
}
/**
* @desc Requests to change the IUT with a new pseudonym
* @param p_change The change to trigger.
*/
function
f_utChangePseudonym
(
template
(
value
)
UtChangePseudonym
p_change
)
runs
on
ItsDenm
{
utPort
.
send
(
p_change
);
tc_wait
.
start
;
alt
{
[]
utPort
.
receive
(
UtChangePseudonymResult
:
true
)
{
tc_wait
.
stop
;
log
(
"*** "
&
testcasename
()
&
": INFO: IUT pseudonym changed ***"
);
}
[]
tc_wait
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": INFO: Could not receive expected UT message from IUT in time ***"
);
f_selfOrClientSyncAndVerdict
(
"error"
,
e_timeout
);
}
[
else
]
{
// Shortcut defaults
repeat
;
}
}
}
/**
* @desc Triggers an event from the application layer
* @param p_event The event to trigger.
...
...
@@ -62,10 +88,9 @@ module LibItsDenm_Functions {
[]
utPort
.
receive
(
UtDenmTriggerResult
:?
)
->
value
v_result
{
tc_wait
.
stop
;
v_actionId
:=
v_result
.
actionId
;
if
(
not
v_result
.
result
)
{
f_selfOrClientSyncAndVerdict
(
"DENM Trigger failed"
,
e_error
);
}
[]
utPort
.
receive
{
tc_wait
.
stop
;
f_selfOrClientSyncAndVerdict
(
"DENM Trigger failed"
,
e_timeout
);
}
[]
tc_wait
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": INFO: Could not receive expected UT message from IUT in time ***"
);
...
...
@@ -276,9 +301,7 @@ module LibItsDenm_Functions {
var
FncRetCode
v_ret
:=
e_success
;
if
(
valueof
(
p_trigger
)
==
e_ets
)
{
f_sendDenMessage
(
m_denmCancellation
(
p_actionId
)
);
f_sendDenMessage
(
m_denmCancellation
(
p_actionId
,
f_getTsStationId
(
)
)
);
f_sleep
(
PX_TNOAC
);
}
else
{
...
...
ttcn/DENM/LibItsDenm_Templates.ttcn
View file @
4cd830a5
...
...
@@ -66,6 +66,12 @@ module LibItsDenm_Templates {
template
(
value
)
UtInitialize
m_denmInitialize
:=
{
}
/**
* @desc Send template for Upper Tester event changePseudonym
*/
template
(
value
)
UtChangePseudonym
m_utChangePseudonym
:=
{
}
/**
* @desc Send template for Upper Tester Trigger event
* @param p_situation The Situation Container
...
...
@@ -287,8 +293,7 @@ module LibItsDenm_Templates {
* @desc Send template for the position confidence
* @param p_semiMajorConfidence The major confidence (Default: 1cm)
* @param p_semiMinorConfidence The minor confidence (Default: 1cm)
* @param p_semiMajorOrientation The major orientation (Default: m_direction)
* @see m_direction
* @param p_semiMajorOrientation The major orientation (Default: HeadingValue_wgs84North)
*/
template
(
value
)
PosConfidenceEllipse
m_posConfidenceEllipse
(
template
(
value
)
SemiAxisLength
p_semiMajorConfidence
:=
c_semiAxisLengthOneCentimeter
,
...
...
@@ -370,9 +375,10 @@ module LibItsDenm_Templates {
* @param p_actionID The action id
*/
template
(
value
)
DecentralizedEnvironmentalNotificationMessage
m_denmCancellation
(
template
(
value
)
ActionID
p_actionID
template
(
value
)
ActionID
p_actionID
,
template
(
value
)
StationType
p_stationType
)
:=
{
management
:=
m_denmMgmtCon
(
p_actionID
,
-
,
true
),
management
:=
m_denmMgmtCon
(
p_actionID
,
p_stationType
,
-
,
-
),
situation
:=
omit
,
location
:=
omit
,
alacarte
:=
omit
...
...
@@ -394,23 +400,31 @@ module LibItsDenm_Templates {
*/
template
(
value
)
ManagementContainer
m_denmMgmtCon
(
template
(
value
)
ActionID
p_actionID
,
template
(
value
)
boolean
p_isNegation
:=
false
,
template
(
value
)
boolean
p_isCancellation
:=
false
,
template
(
omit
)
ValidityDuration
p_validityDuration
:=
omit
,
template
(
omit
)
TransmissionInterval
p_transmissionInterval
:=
omit
,
template
(
value
)
StationType
p_stationType
:=
f_getTsStationId
(),
template
(
value
)
ValidityDuration
p_validityDuration
:=
c_defaultValidity
,
template
(
value
)
TimestampIts
p_detectionTime
:=
f_getCurrentTime
(),
template
(
value
)
TimestampIts
p_referenceTime
:=
f_getCurrentTime
()
)
:=
{
actionID
:=
p_actionID
,
detectionTime
:=
p_detectionTime
,
referenceTime
:=
p_referenceTime
,
isNegation
:=
p_isNegation
,
isCancellation
:=
p_isCancellation
,
termination
:=
omit
,
eventPosition
:=
m_tsPosition
,
relevanceDistance
:=
lessThan50m
,
relevanceTrafficDirection
:=
allTrafficDirections
,
validityDuration
:=
p_validityDuration
,
transmissionInterval
:=
p_transmissionInterval
transmissionInterval
:=
omit
,
stationType
:=
p_stationType
}
template
(
value
)
ManagementContainer
m_denmMgmtConTermination
(
template
(
value
)
ActionID
p_actionID
,
template
(
value
)
StationType
p_stationType
:=
f_getTsStationId
(),
template
(
value
)
ValidityDuration
p_validityDuration
:=
c_defaultValidity
,
template
(
value
)
TimestampIts
p_detectionTime
:=
f_getCurrentTime
(),
template
(
value
)
TimestampIts
p_referenceTime
:=
f_getCurrentTime
(),
template
(
value
)
Termination
p_termination
)
modifies
m_denmMgmtCon
:=
{
termination
:=
p_termination
}
/**
...
...
@@ -424,22 +438,22 @@ module LibItsDenm_Templates {
*/
template
(
present
)
ManagementContainer
mw_denmMgmtCon
(
template
(
present
)
ActionID
p_actionID
,
template
(
present
)
StationType
p_stationType
:=
f_getTsStationId
(),
template
(
present
)
TimestampIts
p_referenceTime
:=
?
,
template
(
present
)
boolean
p_isNegation
:=
false
,
template
(
present
)
boolean
p_isCancellation
:=
false
,
template
ValidityDuration
p_validityDuration
:=
*
,
template
TransmissionInterval
p_transmissionInterval
:=
*
template
ValidityDuration
p_validityDuration
:=
?
,
template
TransmissionInterval
p_transmissionInterval
:=
*
,
template
Termination
p_termination
:=
*
)
:=
{
actionID
:=
p_actionID
,
detectionTime
:=
?
,
referenceTime
:=
p_referenceTime
,
isNegation
:=
p_isNegation
,
isCancellation
:=
p_isCancellation
,
termination
:=
p_termination
,
eventPosition
:=
?
,
relevanceDistance
:=
?
,
relevanceTrafficDirection
:=
?
,
validityDuration
:=
p_validityDuration
,
transmissionInterval
:=
p_transmissionInterval
transmissionInterval
:=
p_transmissionInterval
,
stationType
:=
p_stationType
}
/**
...
...
@@ -460,13 +474,13 @@ module LibItsDenm_Templates {
actionID
:=
?
,
detectionTime
:=
?
,
referenceTime
:=
?
,
isNegation
:=
?
,
isCancellation
:=
?
,
termination
:=
*
,
eventPosition
:=
?
,
relevanceDistance
:=
?
,
relevanceTrafficDirection
:=
?
,
validityDuration
:=
*
,
transmissionInterval
:=
*
validityDuration
:=
?
,
transmissionInterval
:=
*
,
stationType
:=
?
}
/**
...
...
@@ -496,7 +510,7 @@ module LibItsDenm_Templates {
*/
template
(
value
)
ActionID
m_actionId
(
template
(
value
)
SequenceNumber
p_sequenceNumber
,
template
(
value
)
StationID
p_originatorStationID
:=
f_getIutStationId
()
template
(
value
)
ITS_Container
.
StationID
p_originatorStationID
:=
f_getIutStationId
()
)
:=
{
originatingStationID
:=
p_originatorStationID
,
sequenceNumber
:=
p_sequenceNumber
...
...
@@ -508,7 +522,7 @@ module LibItsDenm_Templates {
* @param p_sequenceNumber The expected sequence number (Default: any)
*/
template
(
present
)
ActionID
mw_actionId
(
template
(
present
)
StationID
p_originatorStationID
:=
?
,
template
(
present
)
ITS_Container
.
StationID
p_originatorStationID
:=
?
,
template
(
present
)
SequenceNumber
p_sequenceNumber
:=
?
)
:=
{
originatingStationID
:=
p_originatorStationID
,
...
...
@@ -542,7 +556,8 @@ module LibItsDenm_Templates {
causeCode
:=
p_cause
,
subCauseCode
:=
p_subCause
},
linkedCause
:=
omit
linkedCause
:=
omit
,
eventHistory
:=
omit
}
/**
...
...
@@ -561,7 +576,8 @@ module LibItsDenm_Templates {
causeCode
:=
p_cause
,
subCauseCode
:=
p_subCause
},
linkedCause
:=
*
linkedCause
:=
*
,
eventHistory
:=
*
}
/**
...
...
@@ -624,15 +640,76 @@ module LibItsDenm_Templates {
group
alacarteTemplates
{
/**
* @desc Send template for Alacarte Container including lane
count
* @desc Send template for Alacarte Container including lane
Position
*/
template
(
value
)
AlacarteContainer
m_alacarteConLaneCount
:=
{
lanePosition
:=
0
,
impactReduction
:=
omit
,
externalTemperature
:=
omit
,
roadWorks
:=
omit
,
positioningSolution
:=
omit
,
stationaryVehicle
:=
omit
}
/**
* @desc Send template for Alacarte Container including impactReduction
*/
template
(
value
)
AlacarteContainer
m_alacarteConImpactReduction
:=
{
lanePosition
:=
omit
,
impactReduction
:=
m_impactReduction
,
externalTemperature
:=
omit
,
roadWorks
:=
omit
,
positioningSolution
:=
omit
,
stationaryVehicle
:=
omit
}
/**
* @desc Send template for ImpactReduction Container
*/
template
(
value
)
ImpactReductionContainer
m_impactReduction
:=
{
heightLonCarrLeft
:=
100
,
heightLonCarrRight
:=
100
,
posLonCarrLeft
:=
127
,
posLonCarrRight
:=
127
,
positionOfPillars
:=
{
30
},
posCentMass
:=
63
,
wheelBaseVehicle
:=
127
,
turningRadius
:=
255
,
posFrontAx
:=
20
,
positionOfOccupants
:=
'00000000000000000000'B
,
vehicleMass
:=
1024
,
requestResponseIndication
:=
request
}
/**
* @desc Receive template for Alacarte Container including impactReduction
*/
template
(
present
)
AlacarteContainer
mw_alacarteConImpactReduction
:=
{
lanePosition
:=
*
,
impactReduction
:=
mw_impactReduction
,
externalTemperature
:=
*
,
roadWorks
:=
*
,
positioningSolution
:=
*
,
stationaryVehicle
:=
*
}
/**
* @desc Receive template for ImpactReductio nContainer
*/
template
(
present
)
ImpactReductionContainer
mw_impactReduction
:=
{
heightLonCarrLeft
:=
?
,
heightLonCarrRight
:=
?
,
posLonCarrLeft
:=
?
,
posLonCarrRight
:=
?
,
positionOfPillars
:=
?
,
posCentMass
:=
?
,
wheelBaseVehicle
:=
?
,
turningRadius
:=
?
,
posFrontAx
:=
?
,
positionOfOccupants
:=
?
,
vehicleMass
:=
?
,
requestResponseIndication
:=
response
}
}
// end alacarteTemplates
...
...
ttcn/DENM/LibItsDenm_TestSystem.ttcn
View file @
4cd830a5
...
...
@@ -29,9 +29,10 @@ module LibItsDenm_TestSystem {
*/
type
port
UpperTesterPort
message
{
out
UtInitialize
,
UtDenmTrigger
,
UtDenmUpdate
,
UtDenmTermination
,
UtChangePosition
;
UtInitialize
,
UtDenmTrigger
,
UtDenmUpdate
,
UtDenmTermination
,
UtChangePosition
,
UtChangePseudonym
;
in
UtInitializeResult
,
UtDenmTriggerResult
,
UtDenmUpdateResult
,
UtDenmTerminationResult
,
UtChangePositionResult
,
UtDenmEventInd
;
UtInitializeResult
,
UtDenmTriggerResult
,
UtDenmUpdateResult
,
UtDenmTerminationResult
,
UtChangePositionResult
,
UtChangePseudonymResult
,
UtDenmEventInd
;
}
// end UpperTesterPort
}
// end portDefinitions
...
...
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