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
125c349d
Commit
125c349d
authored
Jul 28, 2016
by
garciay
Browse files
Add AcSecPrimitive support for IS
parent
f4b960ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
ttcn/AtsSremSsem/ItsSrem_TestCases.ttcn
View file @
125c349d
...
...
@@ -20,7 +20,7 @@ module ItsSrem_TestCases {
group
sreMessageFormat
{
/**
/**
* @desc Check that protocolVersion is set to 1 and messageID is set to 9
* <pre>
* Pics Selection: not PICS_RSU and PICS_SREM_GENERATION
...
...
@@ -58,7 +58,7 @@ module ItsSrem_TestCases {
group
sreEventGeneration
{
/**
/**
* @desc Check that IVI Service generates a new SREM on reception of a valid AppSREM_Trigger request
* <pre>
* Pics Selection: not PICS_RSU and PICS_SREM_GENERATION
...
...
@@ -87,7 +87,7 @@ module ItsSrem_TestCases {
}
// End of testcase TC_IS_TLC_EVGN_BV_01
/**
/**
* @desc Check that the IUT identifies SREM with a unique request identifier
* <pre>
* Pics Selection: not PICS_RSU and PICS_SREM_GENERATION
...
...
@@ -123,6 +123,54 @@ module ItsSrem_TestCases {
}
// End of group sreEventGeneration
group
sreEventUpdate
{
/**
* @desc Check that the IUT increments the sequenceNumber when a SREM update is generated
* <pre>
* Pics Selection: not PICS_RSU and PICS_SREM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* and the IUT having generate a SREM
* containing srm
* containing sequenceNumber
* indicating SREM_SN_1
* and containing requests[0]
* containing request
* containing requestID
* indicating SREM_RID_1
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT receives an AppSREM_update request
* }
* then {
* the IUT sends a valid SREM
* containing ssm
* containing sequenceNumber
* indicating SREM_SN_1+ 1
* and containing requests[0]
* containing request
* containing requestID
* indicating SREM_RID_1
* }
* }
* </pre>
*
* @version 1.0.4
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_TLC_EVUP_BV_01
* @reference ETSI TS 103 301 V1.0.4 Clause 8.4.1
*/
testcase
TC_IS_TLC_EVUP_BV_01
()
runs
on
ItsSremSsem
system
ItsSremSsemSystem
{
f_IS_TLC_EVUP_BV_01
();
}
// End of testcase TC_IS_TLC_EVUP_BV_01
}
// End of group sreEventUpdate
group
sreCommunication
{
/**
...
...
@@ -236,7 +284,7 @@ module ItsSrem_TestCases {
group
sreMessageFormatRsu
{
/**
/**
* @desc Check that protocolVersion is set to 1 and messageID is set to 10 (TLC-S)
* <pre>
* Pics Selection: PICS_RSU and PICS_SSEM_GENERATION
...
...
@@ -280,36 +328,36 @@ module ItsSrem_TestCases {
group
sreMessageProcessing
{
/**
* @desc Check that the IUT can successfully process all mandatory fields of SREM received (TLC-S)
* <pre>
* Pics Selection: PICS_RSU and PICS_SREM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT having receive a valid SREM
* }
* then {
* the IUT forwards the SSEM content to upper layers
* and the IUT forwards the SSEM content to other facilities
* }
* }
* </pre>
*
* @version 1.0.4
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_TLC_MSGF_BV_02
* @reference ETSI TS 103 301 V1.0.4 Clause 6.3
*/
testcase
TC_IS_TLC_MSGF_BV_02
()
runs
on
ItsSremSsem
system
ItsSremSsemSystem
{
f_IS_TLC_MSGF_BV_02
();
}
// End of testcase TP_IS_TLC_MSGF_BV_02
/**
* @desc Check that the IUT can successfully process all mandatory fields of SREM received (TLC-S)
* <pre>
* Pics Selection: PICS_RSU and PICS_SREM_GENERATION
* Initial conditions:
* with {
* the IUT being in the "initial state"
* }
* Expected behaviour:
* ensure that {
* when {
* the IUT having receive a valid SREM
* }
* then {
* the IUT forwards the SSEM content to upper layers
* and the IUT forwards the SSEM content to other facilities
* }
* }
* </pre>
*
* @version 1.0.4
* @see ETSI TS 103 191-2 v0.0.1 TP_IS_TLC_MSGF_BV_02
* @reference ETSI TS 103 301 V1.0.4 Clause 6.3
*/
testcase
TC_IS_TLC_MSGF_BV_02
()
runs
on
ItsSremSsem
system
ItsSremSsemSystem
{
f_IS_TLC_MSGF_BV_02
();
}
// End of testcase TP_IS_TLC_MSGF_BV_02
}
// End of group sreMessageProcessing
}
// End of group rsuRole
...
...
ttcn/AtsSremSsem/ItsSrem_TpFunctions.ttcn
View file @
125c349d
...
...
@@ -153,7 +153,7 @@ module ItsSrem_TpFunctions {
m_utTriggerEvent
(
PX_BASICEVEHICLEROLE
,
PX_REQUESTIMPORTANCELEVEL
)
}
var
boolean
v_success
:=
true
;
var
RequestIDList
v_requestIDList
s
;
var
RequestIDList
v_requestIDList
;
var
SremInds
v_sremInds
:=
{};
var
integer
i
;
...
...
@@ -172,7 +172,7 @@ module ItsSrem_TpFunctions {
for
(
i
:=
0
;
i
<
lengthof
(
v_utTriggers
)
-
1
;
i
:=
i
+
1
)
{
f_utTriggerEvent
(
v_utTriggers
[
i
]);
f_awaitSreMessage
(
mw_sremInd
(
mw_sremPdu
(
mw_sremWellFormatted
)),
v_sremInds
[
i
]);
v_requestIDList
s
[
i
]
:=
v_sremInds
[
i
].
msgIn
.
srm
.
requests
[
0
].
request
.
requestID
;
v_requestIDList
[
i
]
:=
v_sremInds
[
i
].
msgIn
.
srm
.
requests
[
0
].
request
.
requestID
;
}
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_success
);
...
...
@@ -181,11 +181,11 @@ module ItsSrem_TpFunctions {
f_utTriggerEvent
(
v_utTriggers
[
lengthof
(
v_utTriggers
)
-
1
]);
f_awaitSreMessage
(
mw_sremInd
(
mw_sremPdu
(
mw_sremWellFormatted
)),
v_sremInds
[
i
]);
v_requestIDList
s
[
lengthof
(
v_requestIDList
s
)
-
1
]
:=
v_sremInds
[
i
].
msgIn
.
srm
.
requests
[
0
].
request
.
requestID
;
v_requestIDList
[
lengthof
(
v_requestIDList
)
-
1
]
:=
v_sremInds
[
i
].
msgIn
.
srm
.
requests
[
0
].
request
.
requestID
;
//check the action id
for
(
i
:=
0
;
i
<
lengthof
(
v_requestIDList
s
)
-
1
;
i
:=
i
+
1
)
{
if
(
v_requestIDList
s
[
lengthof
(
v_requestIDList
s
)
-
1
]
==
v_requestIDList
s
[
i
])
{
for
(
i
:=
0
;
i
<
lengthof
(
v_requestIDList
)
-
1
;
i
:=
i
+
1
)
{
if
(
v_requestIDList
[
lengthof
(
v_requestIDList
)
-
1
]
==
v_requestIDList
[
i
])
{
v_success
:=
false
;
}
}
...
...
@@ -210,6 +210,74 @@ module ItsSrem_TpFunctions {
}
// End of group sreEventGeneration
group
sreEventUpdate
{
/**
* @desc TP Function for TC_IS_TLC_EVUP_BV_01
*/
function
f_IS_TLC_EVUP_BV_01
()
runs
on
ItsSremSsem
{
// Local variables
var
SremInd
v_sremInd
;
var
RequestID
v_requestID
;
var
MsgCount
v_sequenceNumber
;
// Test control
if
(
PICS_RSU_ROLE
or
not
PICS_SREM_GENERATION
)
{
log
(
"*** "
&
testcasename
()
&
": not PICS_RSU_ROLE and PICS_SREM_GENERATION required for executing the TC ***"
);
setverdict
(
inconc
);
stop
;
}
// Test component configuration
f_cfUp
();
// Preamble
f_prInitialState
();
f_utTriggerEvent
(
m_utTriggerEvent
(
PX_BASICEVEHICLEROLE
,
PX_REQUESTIMPORTANCELEVEL
));
f_awaitSreMessage
(
mw_sremInd
(
mw_sremPdu
(
mw_sremWellFormatted
)),
v_sremInd
);
f_sendSseMessage
(
v_sremInd
.
msgIn
.
srm
);
v_requestID
:=
v_sremInd
.
msgIn
.
srm
.
requests
[
0
].
request
.
requestID
;
v_sequenceNumber
:=
v_sremInd
.
msgIn
.
srm
.
sequenceNumber
;
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_success
);
// Test Body
f_utUpdateEvent
(
m_utUpdateEvent
(
v_requestID
,
PX_BASICEVEHICLEROLE
,
PX_REQUESTIMPORTANCELEVEL
));
tc_ac
.
start
;
alt
{
[]
sremSsemPort
.
receive
(
mw_sremInd
(
mw_sremPdu
(
mw_srem_sequenceNumber
(
(
v_sequenceNumber
+
1
)
mod
128
// See MsgCount declaration
)
)))
->
value
v_sremInd
{
tc_ac
.
stop
;
// Send SSEM
f_sendSseMessage
(
v_sremInd
.
msgIn
.
srm
);
if
(
not
match
(
v_requestID
,
v_sremInd
.
msgIn
.
srm
.
requests
[
0
].
request
.
requestID
))
{
log
(
"*** "
&
testcasename
()
&
": FAIL: requestID mismatch. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_error
);
}
else
{
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_EVUP_BV_01
}
// End of group sreEventUpdate
group
sreCommunication
{
/**
...
...
@@ -455,7 +523,7 @@ module ItsSrem_TpFunctions {
}
// End of group sreMessageProcessing
}
// End of group iTS_SRole
}
// End of group iTS_SRole
group
rsuRole
{
...
...
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