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
f79013a0
Commit
f79013a0
authored
Jul 22, 2016
by
garciay
Browse files
Change SSP & ITS-AID types for transferring from lower layer to upper layer
parent
7e49401d
Changes
16
Hide whitespace changes
Inline
Side-by-side
ttcn/CAM/LibItsCam_Templates.ttcn
View file @
f79013a0
...
...
@@ -77,8 +77,8 @@ module LibItsCam_Templates {
*/
template
CamInd
mw_camIndWithSecurityParameters
(
template
(
present
)
CAM
p_camMsg
,
template
Oct16
p_ssp
:=
*
,
template
Oct16
p_its_aid
:=
*
template
Bit128
p_ssp
:=
*
,
template
UInt32
p_its_aid
:=
*
)
modifies
mw_camInd
:=
{
ssp
:=
p_ssp
,
its_aid
:=
p_its_aid
...
...
ttcn/CAM/LibItsCam_TestSystem.ttcn
View file @
f79013a0
...
...
@@ -126,8 +126,8 @@ module LibItsCam_TestSystem {
UInt8
gnTrafficClass
optional
,
UInt16
btpDestinationPort
optional
,
UInt16
btpInfo
optional
,
Oct16
ssp
optional
,
Oct16
its_aid
optional
Bit128
ssp
optional
,
UInt32
its_aid
optional
}
with
{
encode
(
msgIn
)
"LibItsCam_asn1"
...
...
ttcn/DENM/LibItsDenm_Templates.ttcn
View file @
f79013a0
...
...
@@ -102,8 +102,8 @@ module LibItsDenm_Templates {
*/
template
DenmInd
mw_denmIndWithSecurityParameters
(
template
(
present
)
DENM
p_denMsg
,
template
Oct16
p_ssp
:=
*
,
template
Oct16
p_its_aid
:=
*
template
Bit128
p_ssp
:=
*
,
template
UInt32
p_its_aid
:=
*
)
modifies
mw_denmInd
:=
{
ssp
:=
p_ssp
,
its_aid
:=
p_its_aid
...
...
@@ -809,29 +809,29 @@ 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) 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
...
...
ttcn/DENM/LibItsDenm_TestSystem.ttcn
View file @
f79013a0
...
...
@@ -131,8 +131,8 @@ module LibItsDenm_TestSystem {
UInt8
gnTrafficClass
optional
,
UInt16
btpDestinationPort
optional
,
UInt16
btpInfo
optional
,
Oct16
ssp
optional
,
Oct16
its_aid
optional
Bit128
ssp
optional
,
UInt32
its_aid
optional
}
with
{
encode
(
msgIn
)
"LibItsDenm_asn1"
...
...
ttcn/GeoNetworking/LibItsGeoNetworking_TestSystem.ttcn
View file @
f79013a0
...
...
@@ -10,10 +10,8 @@ module LibItsGeoNetworking_TestSystem {
// LibCommon
import
from
LibCommon_Time
{
modulepar
all
};
import
from
LibCommon_Sync
all
;
import
from
LibCommon_BasicTypesAndValues
{
type
UInt16
;
const
c_uInt16Max
};
import
from
LibCommon_BasicTypesAndValues
all
;
import
from
LibCommon_DataStrings
all
;
// LibItsCommon
import
from
LibItsCommon_TestSystem
all
;
...
...
@@ -142,8 +140,8 @@ module LibItsGeoNetworking_TestSystem {
type
record
GeoNetworkingInd
{
GeoNetworkingPdu
msgIn
,
MacAddress
macDestinationAddress
,
octetstring
ssp
optional
,
octetstring
its_aid
optional
Bit128
ssp
optional
,
UInt32
its_aid
optional
}
/**
...
...
ttcn/IVIM/LibItsIvim_Functions.ttcn
View file @
f79013a0
...
...
@@ -43,7 +43,7 @@ module LibItsIvim_Functions {
return
PX_PROVIDER
;
}
//
e
nd f_getProvider
}
//
E
nd
of function
f_getProvider
}
// End of group itsFunction
...
...
@@ -213,7 +213,7 @@ module LibItsIvim_Functions {
if
(
PICS_GNSS_SCENARIO_SUPPORT
==
true
)
{
f_acTriggerGnssEvent
(
m_loadScenario
(
p_scenario
));
}
}
//
e
nd f_acLoadScenario
}
//
E
nd
of function
f_acLoadScenario
/**
* @desc Starts a loaded scenario
...
...
@@ -224,7 +224,7 @@ module LibItsIvim_Functions {
f_acTriggerGnssEvent
(
m_startScenario
);
vc_scenarioStarted
:=
true
;
}
}
//
e
nd f_acStartScenario
}
//
E
nd
of function
f_acStartScenario
/**
* @desc Stops a loaded scenario
...
...
@@ -235,7 +235,7 @@ module LibItsIvim_Functions {
f_acTriggerGnssEvent
(
m_stopScenario
);
vc_scenarioStarted
:=
false
;
}
}
//
e
nd f_acStopScenario
}
//
E
nd
of function
f_acStopScenario
function
f_acAwaitDistanceCovered
(
float
p_distanceToCover
)
runs
on
ItsIvim
return
FncRetCode
{
var
FncRetCode
v_ret
:=
e_success
;
...
...
@@ -261,7 +261,7 @@ module LibItsIvim_Functions {
}
return
v_ret
;
}
//
e
nd f_acAwaitDistanceCovered
}
//
E
nd
of function
f_acAwaitDistanceCovered
}
// End of group adapterControl
...
...
@@ -277,7 +277,7 @@ module LibItsIvim_Functions {
map
(
self
:
ivimPort
,
system
:
ivimPort
);
f_connect4SelfOrClientSync
();
}
//
e
nd f_cfUp
}
//
E
nd
of function
f_cfUp
/**
* @desc Deletes default configuration
...
...
@@ -289,9 +289,9 @@ module LibItsIvim_Functions {
unmap
(
self
:
ivimPort
,
system
:
ivimPort
);
f_disconnect4SelfOrClientSync
();
}
//
e
nd f_cfDown
}
//
E
nd
of function
f_cfDown
}
//
end
ivimConfigurationFunctions
}
//
End of group
ivimConfigurationFunctions
group
altsteps
{
...
...
@@ -421,7 +421,7 @@ module LibItsIvim_Functions {
in
template
(
value
)
IviStructure
p_ivim
)
runs
on
ItsIvim
{
ivimPort
.
send
(
m_ivim
Structure
Req
(
m_ivimReq
(
m_ivimStructurePdu
(
p_ivim
)
...
...
@@ -429,7 +429,7 @@ module LibItsIvim_Functions {
);
}
}
//
e
nd sendFunctions
}
//
E
nd
of group
sendFunctions
group
receiveFunctions
{
...
...
@@ -452,7 +452,7 @@ module LibItsIvim_Functions {
}
}
}
//
e
nd receiveFunctions
}
//
E
nd
of group
receiveFunctions
group
miscellaneousFunctions
{
...
...
ttcn/IVIM/LibItsIvim_Templates.ttcn
View file @
f79013a0
...
...
@@ -37,11 +37,11 @@ module LibItsIvim_Templates {
* @desc Send template for IVI Message (IvimPort Primitive)
* @param p_iviMsg The IVI Message to be sent
*/
template
(
value
)
IvimReq
m_ivim
Structure
Req
(
template
(
value
)
IvimReq
m_ivimReq
(
in
template
(
value
)
IVIM
p_iviMsg
)
:=
{
msgOut
:=
p_iviMsg
}
// End of template m_ivim
Structure
Req
}
// End of template m_ivimReq
/**
* @desc Receive template for IVI Message (IvimPort Primitive)
...
...
@@ -109,8 +109,8 @@ module LibItsIvim_Templates {
*/
template
IvimInd
mw_ivimIndWithSecurityParameters
(
template
(
present
)
IVIM
p_iviMsg
,
template
Oct16
p_ssp
:=
*
,
template
Oct16
p_its_aid
:=
*
template
Bit128
p_ssp
:=
*
,
template
UInt32
p_its_aid
:=
*
)
modifies
mw_ivimInd
:=
{
ssp
:=
p_ssp
,
its_aid
:=
p_its_aid
...
...
@@ -231,7 +231,7 @@ module LibItsIvim_Templates {
* @param p_ivim The IVI Message
*/
template
(
value
)
IVIM
m_ivimStructurePdu
(
template
(
value
)
IviStructure
p_ivim
template
(
value
)
IviStructure
p_ivim
)
:=
{
header
:=
m_itsPduHeader
,
ivi
:=
p_ivim
...
...
ttcn/IVIM/LibItsIvim_TestSystem.ttcn
View file @
f79013a0
...
...
@@ -109,8 +109,6 @@ module LibItsIvim_TestSystem {
var
UtIvimEventIndList
vc_utEvents
:=
{};
var
UtIvimActionIDList
vc_utActionIDs
:=
{};
}
// End of component ItsIvim
group
facilityPrimitives
{
...
...
@@ -131,8 +129,8 @@ module LibItsIvim_TestSystem {
UInt8
gnTrafficClass
optional
,
UInt16
btpDestinationPort
optional
,
UInt16
btpInfo
optional
,
Oct16
ssp
optional
,
Oct16
its_aid
optional
Bit128
ssp
optional
,
UInt32
its_aid
optional
}
with
{
encode
(
msgIn
)
"LibItsIvim_asn1"
...
...
ttcn/IVIM/LibItsIvim_TypesAndValues.ttcn
View file @
f79013a0
...
...
@@ -7,7 +7,7 @@
*/
module
LibItsIvim_TypesAndValues
{
//LibIts
//
LibIts
import
from
IVIM_PDU_Descriptions
language
"ASN.1:1997"
all
;
import
from
IVI
language
"ASN.1:1997"
all
;
import
from
ITS_Container
language
"ASN.1:1997"
all
;
...
...
ttcn/MapemSpatem/LibItsMapemSpatem_Functions.ttcn
View file @
f79013a0
...
...
@@ -132,16 +132,16 @@ module LibItsMapemSpatem_Functions {
* @desc The default for handling upper tester messages.
*/
altstep
a_utDefault
()
runs
on
ItsMapemSpatem
{
var
UtMapemEventInd
v_mapevent
;
var
UtSpatemEventInd
v_spatevent
;
[]
utPort
.
receive
(
UtMapemEventInd
:?
)
->
value
v_mapevent
{
var
UtMapemEventInd
v_mape
me
vent
;
var
UtSpatemEventInd
v_spate
me
vent
;
[]
utPort
.
receive
(
UtMapemEventInd
:?
)
->
value
v_mape
me
vent
{
//store every upper tester indication received
vc_utMapemEvents
[
lengthof
(
vc_utMapemEvents
)]
:=
v_mapevent
;
vc_utMapemEvents
[
lengthof
(
vc_utMapemEvents
)]
:=
v_mape
me
vent
;
repeat
;
}
[]
utPort
.
receive
(
UtSpatemEventInd
:?
)
->
value
v_spatevent
{
[]
utPort
.
receive
(
UtSpatemEventInd
:?
)
->
value
v_spate
me
vent
{
//store every upper tester indication received
vc_utSpatemEvents
[
lengthof
(
vc_utSpatemEvents
)]
:=
v_spatevent
;
vc_utSpatemEvents
[
lengthof
(
vc_utSpatemEvents
)]
:=
v_spate
me
vent
;
repeat
;
}
[]
utPort
.
receive
{
...
...
ttcn/MapemSpatem/LibItsMapemSpatem_Templates.ttcn
View file @
f79013a0
...
...
@@ -104,8 +104,8 @@ module LibItsMapemSpatem_Templates {
*/
template
(
present
)
MapemInd
mw_mapemIndWithSecurityParameters
(
template
(
present
)
MAPEM
p_mapemMsg
,
template
Oct16
p_ssp
:=
*
,
template
Oct16
p_its_aid
:=
*
template
Bit128
p_ssp
:=
*
,
template
UInt32
p_its_aid
:=
*
)
modifies
mw_mapemInd
:=
{
ssp
:=
p_ssp
,
its_aid
:=
p_its_aid
...
...
@@ -187,8 +187,8 @@ module LibItsMapemSpatem_Templates {
*/
template
(
present
)
SpatemInd
mw_spatemIndWithSecurityParameters
(
template
(
present
)
SPATEM
p_spatemMsg
,
template
Oct16
p_ssp
:=
*
,
template
Oct16
p_its_aid
:=
*
template
Bit128
p_ssp
:=
*
,
template
UInt32
p_its_aid
:=
*
)
modifies
mw_spatemInd
:=
{
ssp
:=
p_ssp
,
its_aid
:=
p_its_aid
...
...
ttcn/MapemSpatem/LibItsMapemSpatem_TestSystem.ttcn
View file @
f79013a0
...
...
@@ -93,8 +93,8 @@ module LibItsMapemSpatem_TestSystem {
UInt8
gnTrafficClass
optional
,
UInt16
btpDestinationPort
optional
,
UInt16
btpInfo
optional
,
Oct16
ssp
optional
,
Oct16
its_aid
optional
Bit128
ssp
optional
,
UInt32
its_aid
optional
}
with
{
encode
(
msgIn
)
"LibItsMapemSpatem_asn1"
...
...
@@ -109,8 +109,8 @@ module LibItsMapemSpatem_TestSystem {
UInt8
gnTrafficClass
optional
,
UInt16
btpDestinationPort
optional
,
UInt16
btpInfo
optional
,
Oct16
ssp
optional
,
Oct16
its_aid
optional
Bit128
ssp
optional
,
UInt32
its_aid
optional
}
with
{
encode
(
msgIn
)
"LibItsMapemSpatem_asn1"
...
...
ttcn/SremSsem/LibItsSremSsem_Functions.ttcn
View file @
f79013a0
...
...
@@ -132,16 +132,16 @@ module LibItsSremSsem_Functions {
* @desc The default for handling upper tester messages.
*/
altstep
a_utDefault
()
runs
on
ItsSremSsem
{
var
UtSremEventInd
v_
map
event
;
var
UtSsemEventInd
v_s
pat
event
;
[]
utPort
.
receive
(
UtSremEventInd
:?
)
->
value
v_
map
event
{
var
UtSremEventInd
v_
srem
event
;
var
UtSsemEventInd
v_s
sem
event
;
[]
utPort
.
receive
(
UtSremEventInd
:?
)
->
value
v_
srem
event
{
//store every upper tester indication received
vc_utSremEvents
[
lengthof
(
vc_utSremEvents
)]
:=
v_
map
event
;
vc_utSremEvents
[
lengthof
(
vc_utSremEvents
)]
:=
v_
srem
event
;
repeat
;
}
[]
utPort
.
receive
(
UtSsemEventInd
:?
)
->
value
v_s
pat
event
{
[]
utPort
.
receive
(
UtSsemEventInd
:?
)
->
value
v_s
sem
event
{
//store every upper tester indication received
vc_utSsemEvents
[
lengthof
(
vc_utSsemEvents
)]
:=
v_s
pat
event
;
vc_utSsemEvents
[
lengthof
(
vc_utSsemEvents
)]
:=
v_s
sem
event
;
repeat
;
}
[]
utPort
.
receive
{
...
...
@@ -218,47 +218,25 @@ module LibItsSremSsem_Functions {
}
}
// End of group postambles
group
receiveFunctions
{
/**
* @desc Awaits a SPATE message and returns it
* @param p_rcvMsg The expected message to be received.
* @param p_rcvdMsg The received message - OUT.
*/
function
f_awaitSpateMessage
(
in
template
(
present
)
SsemInd
p_rcvMsg
,
out
SsemInd
p_rcvdMsg
)
runs
on
ItsSremSsem
{
tc_ac
.
start
;
alt
{
[]
sremSsemPort
.
receive
(
p_rcvMsg
)
->
value
p_rcvdMsg
{
tc_ac
.
stop
;
}
[]
tc_ac
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": INFO: Timeout while awaiting the reception of a message ***"
);
f_selfOrClientSyncAndVerdict
(
"error"
,
e_timeout
);
}
}
}
group
sendFunctions
{
/**
* @desc
Awaits a SREM message and returns it
* @param p_
rcv
Msg The
expected
message to
be receive
d.
* @param p_
rcvdMsg The received message - OUT.
* @desc
Sends a IVI message
* @param p_
send
Msg The
IVI
message to
sen
d.
* @param p_
overrideSeqNo Overrides the sequence number with the stored one.
*/
function
f_awaitMapeMessage
(
in
template
(
present
)
SremInd
p_rcvMsg
,
out
SremInd
p_rcvdMsg
)
runs
on
ItsSremSsem
{
tc_ac
.
start
;
alt
{
[]
sremSsemPort
.
receive
(
p_rcvMsg
)
->
value
p_rcvdMsg
{
tc_ac
.
stop
;
}
[]
tc_ac
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": INFO: Timeout while awaiting the reception of a message ***"
);
f_selfOrClientSyncAndVerdict
(
"error"
,
e_timeout
);
}
}
function
f_sendSseMessage
(
in
template
(
value
)
SignalRequestMessage
p_signalRequestMessage
)
runs
on
ItsSremSsem
{
sremSsemPort
.
send
(
m_ssemReq
(
m_ssemPdu
(
m_ssem
(
p_signalRequestMessage
))));
}
}
// End of
receive
Functions
}
// End of
group send
Functions
}
// End of module LibItsSremSsem_Functions
\ No newline at end of file
ttcn/SremSsem/LibItsSremSsem_Templates.ttcn
View file @
f79013a0
...
...
@@ -104,8 +104,8 @@ module LibItsSremSsem_Templates {
*/
template
(
present
)
SremInd
mw_sremIndWithSecurityParameters
(
template
(
present
)
SREM
p_sremMsg
,
template
Oct16
p_ssp
:=
*
,
template
Oct16
p_its_aid
:=
*
template
Bit128
p_ssp
:=
*
,
template
UInt32
p_its_aid
:=
*
)
modifies
mw_sremInd
:=
{
ssp
:=
p_ssp
,
its_aid
:=
p_its_aid
...
...
@@ -380,7 +380,42 @@ module LibItsSremSsem_Templates {
second
:=
PX_SECOND
,
sequenceNumber
:=
omit
,
status
:=
{
PX_STATUS
},
regional
:=
omit
regional
:=
omit
}
/**
* @desc Send template for SignalStatusMessage Message
*/
template
(
value
)
SignalStatusMessage
m_ssem
(
in
SignalRequestMessage
p_signalRequestMessage
)
modifies
m_defaultSsem
:=
{
second
:=
p_signalRequestMessage
.
second
,
status
:=
{
m_signalStatus
(
p_signalRequestMessage
.
requests
[
0
].
request
)
},
regional
:=
omit
}
template
(
value
)
SignalStatus
m_signalStatus
(
in
SignalRequest
p_signalRequest
)
:=
{
sequenceNumber
:=
1
,
// FIXME To be reviewed
id
:=
p_signalRequest
.
id
,
sigStatus
:=
{
m_signalStatusPackage
},
regional
:=
omit
}
template
(
value
)
SignalStatusPackage
m_signalStatusPackage
:=
{
requester
:=
omit
,
inboundOn
:=
{
approach
:=
0
},
outboundOn
:=
omit
,
minute
:=
omit
,
second
:=
omit
,
duration
:=
omit
,
status
:=
processing
,
regional
:=
omit
}
/**
...
...
ttcn/SremSsem/LibItsSremSsem_TestSystem.ttcn
View file @
f79013a0
...
...
@@ -93,8 +93,8 @@ module LibItsSremSsem_TestSystem {
UInt8
gnTrafficClass
optional
,
UInt16
btpDestinationPort
optional
,
UInt16
btpInfo
optional
,
Oct16
ssp
optional
,
Oct16
its_aid
optional
Bit128
ssp
optional
,
UInt32
its_aid
optional
}
with
{
encode
(
msgIn
)
"LibItsSremSsem_asn1"
...
...
@@ -109,8 +109,8 @@ module LibItsSremSsem_TestSystem {
UInt8
gnTrafficClass
optional
,
UInt16
btpDestinationPort
optional
,
UInt16
btpInfo
optional
,
Oct16
ssp
optional
,
Oct16
its_aid
optional
Bit128
ssp
optional
,
UInt32
its_aid
optional
}
with
{
encode
(
msgIn
)
"LibItsSremSsem_asn1"
...
...
ttcn/SremSsem/LibItsSremSsem_TypesAndValues.ttcn
View file @
f79013a0
...
...
@@ -33,12 +33,10 @@ module LibItsSremSsem_TypesAndValues {
Event
event
}
type
enumerated
Event
{
startTLCService
(
0
),
stopTLCService
(
1
),
ssemNewContent
(
2
),
sremNewContent
(
3
),
sremRepL10s
(
4
),
sremRepG10s
(
5
)
ssemNewContent
(
0
),
sremNewContent
(
1
),
sremRepL10s
(
2
),
sremRepG10s
(
3
)
}
/**
* @desc Upper Tester result message of request of triggering of an event at IUT
...
...
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