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
c80c1861
Commit
c80c1861
authored
Jul 22, 2016
by
garciay
Browse files
Change SSP & ITS-AID types for transferring from lower layer to upper layer
parent
9f2b70df
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
ttcn/AtsDENM/ItsDenm_TpFunctions.ttcn
View file @
c80c1861
This diff is collapsed.
Click to expand it.
ttcn/AtsIVIM/ItsIvim_TestCases.ttcn
View file @
c80c1861
...
...
@@ -740,6 +740,37 @@ module ItsIvim_TestCases {
group
iviMessageReception
{
/**
* @desc Check that content of received IVIM is transmitted to
* applications and other facilities.
* <pre>
* Pics Selection: PICS_IVIM_RECEPTION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having receive a valid IVIM
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives a valid IVIM
* }
* then {
* the IUT forwards the IVIM content to upper layers
* and the IUT forwards the IVIM content to other facilities
* }
* }
* </pre>
*
* @version 1.0.4
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_IVI_MSGF_BV_02
*/
testcase
TC_IVIM_MSP_BV_01
()
runs
on
ItsIvim
system
ItsIvimSystem
{
f_IS_IVI_MSGF_BV_02
();
}
// end TC_IVIM_MSP_BV_01
}
// End of group iviMessageReception
}
// End of module ItsIvim_TestCases
ttcn/AtsIVIM/ItsIvim_TpFunctions.ttcn
View file @
c80c1861
...
...
@@ -1532,6 +1532,66 @@ module ItsIvim_TpFunctions {
group
iviMessageReception
{
/**
* @desc TP Function for TC_IS_IVI_MSGF_BV_02
*/
function
f_IS_IVI_MSGF_BV_02
()
runs
on
ItsIvim
{
// Local variables
var
IvimReq
v_ivimReq
;
var
integer
i
;
// Test control
if
(
not
PICS_IVIM_RECEPTION
)
{
log
(
"*** "
&
testcasename
()
&
": PICS_IVIM_RECEPTION required for executing the TC ***"
);
setverdict
(
inconc
);
stop
;
}
// Test component configuration
f_cfUp
();
// Test adapter configuration
// Preamble
f_prInitialState
();
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_success
);
// Test Body
v_ivimReq
:=
valueof
(
m_ivimReq
(
m_ivimStructurePdu
(
m_ivimStructure
(
m_iviManagementContainer
(
f_getProvider
(),
1
,
IviStatus_new_
)
)
)
)
);
ivimPort
.
send
(
v_ivimReq
);
f_sleep
(
PX_TNOAC
);
for
(
i
:=
0
;
i
<
lengthof
(
vc_utEvents
)
and
not
match
(
v_ivimReq
.
msgOut
,
vc_utEvents
[
i
].
iviMsg
);
i
:=
i
+
1
)
{
// empty on purpose
}
if
(
i
<
lengthof
(
vc_utEvents
))
{
log
(
"*** "
&
testcasename
()
&
": PASS: IVIM was transmitted to upper layer ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
else
{
log
(
"*** "
&
testcasename
()
&
": FAIL: IVIM was not transmitted to upper layer ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_error
);
}
// Postamble
f_poDefault
();
f_cfDown
();
}
// End of function f_IS_IVI_MSGF_BV_02
}
// End of group iviMessageReception
}
// End of module ItsIvim_TpFunctions
ttcn/AtsMapemSpatem/ItsMapem_TestCases.ttcn
View file @
c80c1861
...
...
@@ -274,7 +274,7 @@ module ItsMapem_TestCases {
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT
sending
MAPEM
* and the IUT
having receive a valid
MAPEM
* }
* Expected behaviour:
* ensure that {
...
...
ttcn/AtsMapemSpatem/ItsMapem_TpFunctions.ttcn
View file @
c80c1861
...
...
@@ -212,6 +212,7 @@ module ItsMapem_TpFunctions {
function
f_IS_RLT_COMM_BV_01
()
runs
on
ItsMapemSpatem
{
// Local variables
var
boolean
v_tlmServiceStarted
:=
false
;
// Test control
if
(
not
PICS_RSU
or
not
PICS_MAPEM_GENERATION
or
not
PICS_SPATEM_GENERATION
)
{
...
...
@@ -229,7 +230,7 @@ module ItsMapem_TpFunctions {
// Test Body
tc_ac
.
start
;
alt
{
[]
mapemSpatemPort
.
receive
(
[
v_tlmServiceStarted
==
false
]
mapemSpatemPort
.
receive
(
mw_mapemInd
(
mw_mapemPdu
(
mw_mapemWellFormatted
...
...
@@ -300,7 +301,7 @@ module ItsMapem_TpFunctions {
log
(
"*** "
&
testcasename
()
&
": FAIL: Expected MAPEM received, but not encapsulated in BTP-B packet ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_error
);
}
[]
tc_ac
.
timeout
{
[]
tc_ac
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": INCONC: Timeout while awaiting the reception of a message. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_timeout
);
}
...
...
@@ -344,7 +345,7 @@ module ItsMapem_TpFunctions {
log
(
"*** "
&
testcasename
()
&
": FAIL: Expected MAPEM received, but not addressed to the correct destination port. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_error
);
}
[]
tc_ac
.
timeout
{
[]
tc_ac
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": INCONC: Timeout while awaiting the reception of a message. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_timeout
);
}
...
...
@@ -405,9 +406,9 @@ module ItsMapem_TpFunctions {
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_error
);
}
[]
mapemSpatemPort
.
receive
(
mw_
spat
emInd
(
mw_
spat
emPdu
(
mw_
spat
emWellFormatted
mw_
map
emInd
(
mw_
map
emPdu
(
mw_
map
emWellFormatted
)))
{
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": FAIL: Expected MAPEM received, but not encapsulated in GBC packet. ***"
);
...
...
@@ -420,7 +421,6 @@ module ItsMapem_TpFunctions {
}
// Postamble
f_utTriggerEvent
(
m_utTriggerEvent
(
stopTLMService
));
f_poDefault
();
f_cfDown
();
...
...
ttcn/AtsMapemSpatem/ItsSpatem_TestCases.ttcn
View file @
c80c1861
...
...
@@ -326,7 +326,7 @@ module ItsSpatem_TestCases {
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT
sending
SPATEM
* and the IUT
having receive a valid
SPATEM
* }
* Expected behaviour:
* ensure that {
...
...
ttcn/AtsSremSsem/ItsSrem_TestCases.ttcn
View file @
c80c1861
...
...
@@ -14,46 +14,160 @@ module ItsSrem_TestCases {
// ItsMapemSpatem
import
from
ItsSrem_TpFunctions
all
;
group
sreMessageDissemination
{
group
iTS_SRole
{
group
sreMessage
Format
{
group
sreMessage
Dissemination
{
/**
* @desc Check that protocolVersion is set to 1 and messageID is set to 9 (ITS-S)
group
sreMessageFormat
{
/**
* @desc Check that protocolVersion is set to 1 and messageID is set to 9 (ITS-S)
* <pre>
* Pics Selection: not PICS_RSU and PICS_SREM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT is requested to generate a new SREM
* }
* then {
* the IUT sends a valid SREM
* containing ITS PDU header
* containing protocolVersion
* indicating value '1'
* and containing messageID
* indicating value '9'
* }
* }
* </pre>
*
* @version 1.0.4
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_RLT_MSGF_BV_01
* @reference ETSI TS 103 301 V1.0.4 Clause 6.3
*/
testcase
TP_IS_TLC_MSGF_BV_01
()
runs
on
ItsSremSsem
system
ItsSremSsemSystem
{
f_IS_TLC_MSGF_BV_01
();
}
// End of testcase TP_IS_TLC_MSGF_BV_01
}
// End of group sreMessageFormat
group
sreCommunication
{
/**
* @desc Check that SREM uses BTP_B packet
* <pre>
* Pics Selection: not PICS_RSU and PICS_SREM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT sending SREM
* }
* Expected behaviour:
* ensure that {
* when {
* a SREM is generated
* }
* then {
* the IUT sends a valid SREM
* encapsulated in a BTP-B packet
* }
* }
* </pre>
*
* @version 1.0.4
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_TLC_COMM_BV_01_01
* @reference ETSI TS 103 301 V1.0.4 Clause 6.4.3.2
*/
testcase
TC_IS_TLC_COMM_BV_01_01
()
runs
on
ItsSremSsem
system
ItsSremSsemSystem
{
f_IS_TLC_COMM_BV_01_01
();
}
// End of testcase TC_IS_TLC_COMM_BV_01_01
/**
* @desc Check that the destination port for SREM is set to 2007
* <pre>
* Pics Selection: not PICS_RSU and PICS_SREM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT sending SREM
* }
* Expected behaviour:
* ensure that {
* when {
* a SREM is generated
* }
* then {
* the IUT sends a valid SREM
* encapsulated in a BTP packet
* containing a destination port value set to 2007
* and containing a destination port info value set to 0
* }
* }
* </pre>
*
* @version 1.0.4
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_TLC_COMM_BV_01_02
* @reference ETSI TS 103 301 V1.0.4 Clause 6.4.3.2
*/
testcase
TC_IS_TLC_COMM_BV_01_02
()
runs
on
ItsSremSsem
system
ItsSremSsemSystem
{
f_IS_TLC_COMM_BV_01_02
();
}
// End of testcase TC_IS_TLC_COMM_BV_01_02
}
// End of group sreCommunication
}
// End of group sreMessageDissemination
group
sreMessageProcessing
{
/**
* @desc Check that the IUT can successfully process all mandatory fields of SSEM received (ITS-S)
* <pre>
* Pics Selection: PICS_RSU and PICS_SREM_
GENERA
TION
* Pics Selection:
not
PICS_RSU and PICS_SREM_
RECEP
TION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having receive a valid SREM
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT
is requested to generate a new
SREM
* the IUT
receives a valid
SREM
* }
* then {
* the IUT sends a valid MAPEM
* containing ITS PDU header
* containing protocolVersion
* indicating value '1'
* and containing messageID
* indicating value '9'
* the IUT forwards the SREM content to upper layers
* and the IUT forwards the SREM content to other facilities
* }
* }
* </pre>
*
* @version 1.0.4
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_
RLT
_MSGF_BV_0
1
* @reference ETSI TS 103 301 V1.0.4 Clause
6
.3
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_
TLC
_MSGF_BV_0
3
* @reference ETSI TS 103 301 V1.0.4 Clause
8
.3
*/
testcase
T
P
_IS_TLC_MSGF_BV_0
1
()
runs
on
ItsSremSsem
system
ItsSremSsemSystem
{
testcase
T
C
_IS_TLC_MSGF_BV_0
3
()
runs
on
ItsSremSsem
system
ItsSremSsemSystem
{
f_IS_TLC_MSGF_BV_0
1
();
f_IS_TLC_MSGF_BV_0
3
();
}
// End of testcase T
P
_IS_TLC_MSGF_BV_0
1
}
// End of testcase T
C
_IS_TLC_MSGF_BV_0
3
}
// End of group sreMessageFormat
}
// End of group sreMessageProcessing
}
// End of group iTS_SRole
group
rsuRole
{
}
// End of group
sreMessageDissemination
}
// End of group
rsuRole
}
// End of module ItsSrem_TestCases
\ No newline at end of file
ttcn/AtsSremSsem/ItsSrem_TpFunctions.ttcn
View file @
c80c1861
...
...
@@ -31,24 +31,273 @@ module ItsSrem_TpFunctions {
import
from
LibItsSremSsem_TypesAndValues
all
;
import
from
LibItsSremSsem_Pics
all
;
group
mapeMessageDissemination
{
group
iTS_SRole
{
group
mapeMessageFormat
{
group
sreMessageDissemination
{
group
sreMessageFormat
{
/**
* @desc TP Function for TC_IS_TLC_MSGF_BV_01
*/
function
f_IS_TLC_MSGF_BV_01
()
runs
on
ItsSremSsem
{
// Local variables
var
SremInd
v_sremInd
;
// Test control
if
(
PICS_RSU
or
not
PICS_SREM_GENERATION
)
{
log
(
"*** "
&
testcasename
()
&
": not PICS_RSU and PICS_SREM_GENERATION required for executing the TC ***"
);
setverdict
(
inconc
);
stop
;
}
// Test component configuration
f_cfUp
();
// Preamble
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_success
);
// Test Body
f_utTriggerEvent
(
m_utTriggerEvent
(
ssemNewContent
));
tc_ac
.
start
;
alt
{
[]
sremSsemPort
.
receive
(
mw_sremInd
(
mw_sremPdu
))
->
value
v_sremInd
{
tc_ac
.
stop
;
// Send SSEM
f_sendSseMessage
(
v_sremInd
.
msgIn
.
srm
);
log
(
"*** "
&
testcasename
()
&
": PASS: Successfully received SREM PDU header. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
[]
tc_ac
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": INCONC: Timeout while awaiting the reception of a message. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_timeout
);
}
}
// Postamble
f_poDefault
();
f_cfDown
();
}
// End of function f_IS_TLC_MSGF_BV_01
}
// End of group sreMessageFormat
group
sreCommunication
{
/**
* @desc TP Function for TC_IS_TLC_COMM_BV_01_01
*/
function
f_IS_TLC_COMM_BV_01_01
()
runs
on
ItsSremSsem
{
// Local variables
const
UInt8
c_gnNhBtpB
:=
2
;
var
SremInd
v_sremInd
;
// Test component configuration
f_cfUp
();
// Preamble
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_success
);
// Test Body
f_utTriggerEvent
(
m_utTriggerEvent
(
ssemNewContent
));
tc_ac
.
start
;
alt
{
[]
sremSsemPort
.
receive
(
mw_sremIndWithGnParameters
(
mw_sremPdu
(
mw_sremWellFormatted
),
c_gnNhBtpB
))
->
value
v_sremInd
{
tc_ac
.
stop
;
// Send SSEM
f_sendSseMessage
(
v_sremInd
.
msgIn
.
srm
);
log
(
"*** "
&
testcasename
()
&
": PASS: Expected SREM encapsultated in BTP-B packet received. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
[]
sremSsemPort
.
receive
(
mw_sremIndWithGnParameters
(
mw_sremPdu
(
mw_sremWellFormatted
),
omit
))
->
value
v_sremInd
{
tc_ac
.
stop
;
// Send SSEM
f_sendSseMessage
(
v_sremInd
.
msgIn
.
srm
);
log
(
"*** "
&
testcasename
()
&
": INCONC: no GN NH information in SremInd ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_timeout
);
}
[]
sremSsemPort
.
receive
(
mw_sremInd
(
mw_sremPdu
(
mw_defaultSrem
)))
->
value
v_sremInd
{
tc_ac
.
stop
;
// Send SSEM
f_sendSseMessage
(
v_sremInd
.
msgIn
.
srm
);
log
(
"*** "
&
testcasename
()
&
": FAIL: Expected SREM received, but not encapsulated in BTP-B packet ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_error
);
}
[]
tc_ac
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": INCONC: Timeout while awaiting the reception of a message. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_timeout
);
}
}
// Postamble
f_poDefault
();
f_cfDown
();
}
// End of function f_IS_TLC_COMM_BV_01_01
/**
* @desc TP Function for TC_IS_TLC_COMM_BV_01_02
*/
function
f_IS_TLC_COMM_BV_01_02
()
runs
on
ItsSremSsem
{
// Local variables
const
UInt16
c_gnNhBtpBPort
:=
2007
;
var
SremInd
v_sremInd
;
// Test component configuration
f_cfUp
();
// Preamble
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_success
);
// Test Body
f_utTriggerEvent
(
m_utTriggerEvent
(
ssemNewContent
));
tc_ac
.
start
;
alt
{
[]
sremSsemPort
.
receive
(
mw_sremIndWithBtpParameters
(
mw_sremPdu
,
c_gnNhBtpBPort
,
0
))
->
value
v_sremInd
{
tc_ac
.
stop
;
// Send SSEM
f_sendSseMessage
(
v_sremInd
.
msgIn
.
srm
);
log
(
"*** "
&
testcasename
()
&
": PASS: Expected SREM encapsultated in BTP packet with port value 2003 received. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
[]
sremSsemPort
.
receive
(
mw_sremInd
(
mw_sremPdu
(
mw_defaultSrem
)))
->
value
v_sremInd
{
tc_ac
.
stop
;
// Send SSEM
f_sendSseMessage
(
v_sremInd
.
msgIn
.
srm
);
log
(
"*** "
&
testcasename
()
&
": FAIL: Expected SREM received, but not addressed to the correct destination port. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_error
);
}
[]
tc_ac
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": INCONC: Timeout while awaiting the reception of a message. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_timeout
);
}
}
// Postamble
f_poDefault
();
f_cfDown
();
}
// End of function f_IS_TLC_COMM_BV_01_02
/**
* @desc TP Function for TC_IS_TLC_COMM_BV_03
*/
function
f_IS_TLC_COMM_BV_03
()
runs
on
ItsSremSsem
{
// Local variables
const
UInt8
c_gnHtGbc
:=
4
;
var
SremInd
v_sremInd
;
// Test control
if
(
PICS_RSU
or
not
PICS_SREM_GENERATION
)
{
log
(
"*** "
&
testcasename
()
&
": not PICS_RSU and PICS_SREM_GENERATION required for executing the TC ***"
);
setverdict
(
inconc
);
stop
;
}
// Test component configuration
f_cfUp
();
// Preamble
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_success
);
// Test Body
f_utTriggerEvent
(
m_utTriggerEvent
(
ssemNewContent
));
tc_ac
.
start
;
alt
{
[]
sremSsemPort
.
receive
(
mw_sremIndWithGnParameters
(
mw_sremPdu
(
mw_sremWellFormatted
),
-
,
c_gnHtGbc
))
->
value
v_sremInd
{
tc_ac
.
stop
;
// Send SSEM
f_sendSseMessage
(
v_sremInd
.
msgIn
.
srm
);
log
(
"*** "
&
testcasename
()
&
": PASS: Expected SREM encapsulated in GBC packet received. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
[]
sremSsemPort
.
receive
(
mw_sremIndWithGnParameters
(
mw_sremPdu
(
mw_sremWellFormatted
),
-
,
omit
))
->
value
v_sremInd
{
tc_ac
.
stop
;
// Send SSEM
f_sendSseMessage
(
v_sremInd
.
msgIn
.
srm
);
log
(
"*** "
&
testcasename
()
&
": FAIL: no GN HT information in SremInd. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_error
);
}
[]
sremSsemPort
.
receive
(
mw_sremInd
(
mw_sremPdu
(
mw_sremWellFormatted
)))
->
value
v_sremInd
{
tc_ac
.
stop
;
// Send SSEM
f_sendSseMessage
(
v_sremInd
.
msgIn
.
srm
);
log
(
"*** "
&
testcasename
()
&
": FAIL: Expected SREM received, but not encapsulated in GBC packet. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_error
);
}
[]
tc_ac
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": INCONC: Timeout while awaiting the reception of a message. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_timeout
);
}
}
// Postamble
f_poDefault
();