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
e32e9c1e
Commit
e32e9c1e
authored
Jul 21, 2016
by
filatov
Browse files
LibItsCAM, LibItsDENM: add templates for SSP and security checks
parent
e20fc08e
Changes
5
Hide whitespace changes
Inline
Side-by-side
ttcn/CAM/LibItsCam_Functions.ttcn
View file @
e32e9c1e
...
...
@@ -301,9 +301,13 @@ module LibItsCam_Functions {
* @desc Initialize the IUT
* @remark No specific actions specified in the base standard
*/
function
f_prInitialState
(
Scenario
p_scenario
:=
e_staticPosition
,
boolean
p_awaitInitialCAM
:=
true
)
runs
on
ItsCam
{
function
f_prInitialState
(
Scenario
p_scenario
:=
e_staticPosition
,
boolean
p_awaitInitialCAM
:=
true
,
template
(
value
)
UtInitialize
p_init
:=
m_camInitialize
)
runs
on
ItsCam
{
f_utInitializeIut
(
m_camInitialize
);
f_utInitializeIut
(
p_init
);
f_prDefault
();
...
...
ttcn/CAM/LibItsCam_Templates.ttcn
View file @
e32e9c1e
...
...
@@ -623,6 +623,49 @@ module LibItsCam_Templates {
}
};
template
(
value
)
CAM
m_camMsg_publicTransport
(
StationID
p_stationId
,
GenerationDeltaTime
p_generationTime
,
template
(
value
)
ReferencePosition
p_referencePosition
)
modifies
m_camMsg_vehicle
:=
{
cam
:=
{
camParameters
:=
{
lowFrequencyContainer
:=
{
basicVehicleContainerLowFrequency
:=
{
vehicleRole
:=
publicTransport
}
},
specialVehicleContainer
:=
{
publicTransportContainer
:=
{
embarkationStatus
:=
true
,
ptActivation
:=
omit
}
}
}
}
};
template
(
value
)
CAM
m_camMsg_specialTransport
(
StationID
p_stationId
,
GenerationDeltaTime
p_generationTime
,
template
(
value
)
ReferencePosition
p_referencePosition
)
modifies
m_camMsg_vehicle
:=
{
cam
:=
{
camParameters
:=
{
lowFrequencyContainer
:=
{
basicVehicleContainerLowFrequency
:=
{
vehicleRole
:=
specialTransport
}
},
specialVehicleContainer
:=
{
specialTransportContainer
:=
{
specialTransportType
:=
'1000'B
length
(
4
),
// heavyLoad
lightBarSirenInUse
:=
'11'B
length
(
2
)
// siren and lightBar
}
}
}
}
};
}
// end camAnyVehicle
group
camAccelerationControlTemplates
{
...
...
ttcn/DENM/LibItsDenm_Functions.ttcn
View file @
e32e9c1e
...
...
@@ -391,10 +391,12 @@ module LibItsDenm_Functions {
* @desc Brings the IUT into an initial state.
* @return FncRetCode
*/
function
f_prInitialState
(
Scenario
p_scenario
:=
e_staticPosition
)
runs
on
ItsDenm
return
FncRetCode
{
function
f_prInitialState
(
Scenario
p_scenario
:=
e_staticPosition
,
template
(
value
)
UtInitialize
p_denmInitialize
:=
m_denmInitialize
)
runs
on
ItsDenm
return
FncRetCode
{
var
FncRetCode
v_ret
:=
e_success
;
f_utInitializeIut
(
m
_denmInitialize
);
f_utInitializeIut
(
p
_denmInitialize
);
f_acLoadScenario
(
valueof
(
p_scenario
));
f_acStartScenario
();
...
...
ttcn/DENM/LibItsDenm_Templates.ttcn
View file @
e32e9c1e
...
...
@@ -808,4 +808,31 @@ module LibItsDenm_Templates {
}
// end alacarteTemplates
group
sspTemplates
{
template
(
present
)
DenmInd
mw_denmInd_SSP
(
template
(
present
)
DENM
p_denMsg
,
template
(
present
)
bitstring
p_SSP
:=
?
)
:=
{
msgIn
:=
p_denMsg
,
gnNextHeader
:=
*
,
gnHeaderType
:=
*
,
gnHeaderSubtype
:=
*
,
gnLifetime
:=
*
,
gnTrafficClass
:=
*
,
btpDestinationPort
:=
*
,
btpInfo
:=
*
,
// TODO: add support for SSP
// ssp := p_SSP,
ssp
:=
*
,
// TODO: add support for ItsAid
// its_aid := c_denmItsAid
its_aid
:=
*
}
template
(
present
)
bitstring
mw_sspTrafficCondition
:=
'
*
1
'
B
;
template
(
present
)
bitstring
mw_sspAccident
:=
'
*
1
?
'
B
;
template
(
present
)
bitstring
mw_sspRoadworks
:=
'
*
1
??
'
B
;
}
// end sspTemplates
}
// end LibItsDenmTemplates
\ No newline at end of file
ttcn/DENM/LibItsDenm_TypesAndValues.ttcn
View file @
e32e9c1e
...
...
@@ -49,6 +49,8 @@ module LibItsDenm_TypesAndValues {
const
TransmissionInterval
c_interval_5sec
:=
5000
;
const
TransmissionInterval
c_interval_10sec
:=
10000
;
const
integer
c_denmItsAid
:=
37
;
}
// end group denmConstants
group
utPrimitives
{
...
...
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