Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ITS - Intelligent Transport Systems
ITS
Commits
a5579b4e
Commit
a5579b4e
authored
Dec 09, 2020
by
Yann Garcia
Browse files
Merge Titan & TTwb branches
parent
58fa59c0
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4072 additions
and
10293 deletions
+4072
-10293
ttcn/AtsCAM/ItsCam_TpFunctions.ttcn
ttcn/AtsCAM/ItsCam_TpFunctions.ttcn
+39
-24
ttcn/AtsSecurity/ItsSecurity_Pics.ttcn
ttcn/AtsSecurity/ItsSecurity_Pics.ttcn
+0
-70
ttcn/AtsSecurity/ItsSecurity_TestCases.ttcn
ttcn/AtsSecurity/ItsSecurity_TestCases.ttcn
+4032
-10198
ttcn/LibIts
ttcn/LibIts
+1
-1
No files found.
ttcn/AtsCAM/ItsCam_TpFunctions.ttcn
View file @
a5579b4e
...
...
@@ -2381,6 +2381,8 @@ module ItsCam_TpFunctions {
var
integer
v_N_GenCam
:=
3
;
var
integer
v_i
;
var
CamInd
v_camInd
;
// Test control
if
(
not
PICS_CAM_GENERATION
or
PICS_RSU
or
(
PICS_RADIO_COMM
==
e_lte_cv2x
))
{
log
(
"*** "
&
testcasename
()
&
": PICS_CAM_GENERATION and not PICS_RSU and ITS-G5 comm. required for executing the TC ***"
);
...
...
@@ -2398,10 +2400,11 @@ module ItsCam_TpFunctions {
tc_ac
.
start
;
alt
{
[]
camPort
.
receive
(
mw_camInd
(
mw_camMsg_any
)){
t_interval_1_measure
.
start
;
[]
camPort
.
receive
(
mw_camInd
(
mw_camMsg_any
))
->
value
v_camInd
{
v_receiveTime
:=
int2float
(
v_camInd
.
recvTime
)
/
1000.0
;
tc_ac
.
stop
;
log
(
"*** "
&
testcasename
()
&
": INFO: Initial conditions: First CAM message received ***"
);
log
(
"*** "
&
testcasename
()
&
": DEBUG: v_receiveTime="
,
v_receiveTime
,
" ***"
);
}
[]
tc_ac
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": INCONC: Initial conditions: CAM message not received ***"
);
...
...
@@ -2411,12 +2414,13 @@ module ItsCam_TpFunctions {
f_changeSpeed
(
1000
);
tc_ac
.
start
;
alt
{
[]
camPort
.
receive
(
mw_camInd
(
mw_camMsg_any
)){
var
float
v_measured
:=
t_interval_1_measure
.
read
;
log
(
"Elapsed time since last CAM: "
,
v_measured
);
[]
camPort
.
receive
(
mw_camInd
(
mw_camMsg_any
))
->
value
v_camInd
{
tc_ac
.
stop
;
v_interval_1_min
:=
v_measured
*
0.8
;
v_interval_1_max
:=
v_measured
*
1.2
;
v_interval_1_measured
:=
int2float
(
v_camInd
.
recvTime
)
/
1000.0
-
v_receiveTime
;
v_receiveTime
:=
int2float
(
v_camInd
.
recvTime
)
/
1000.0
;
log
(
"*** "
&
testcasename
()
&
": DEBUG: Elapsed time since last CAM: v_interval_1_measured="
,
v_interval_1_measured
,
" ***"
);
log
(
"*** "
&
testcasename
()
&
": DEBUG: Elapsed time since last CAM: new v_receiveTime = "
,
v_receiveTime
,
" ***"
);
log
(
"*** "
&
testcasename
()
&
": INFO: Initial conditions: Condition 1 CAM message received ***"
);
}
[]
tc_ac
.
timeout
{
...
...
@@ -2425,22 +2429,30 @@ module ItsCam_TpFunctions {
}
}
for
(
v_i
:=
1
;
v_i
<=
v_N_GenCam
;
v_i
:=
v_i
+
1
)
{
t_interval_1_min
.
start
(
v_interval_1_min
)
;
t
_interval_1_max
.
start
(
v_interval_1_m
ax
);
var
float
v_measured
;
t
c_ac
.
start
(
v_interval_1_m
easured
*
2.0
);
alt
{
[]
camPort
.
receive
(
mw_camInd
(
mw_camMsg_any
)){
if
(
t_interval_1_min
.
running
)
{
[]
camPort
.
receive
(
mw_camInd
(
mw_camMsg_any
))
->
value
v_camInd
{
tc_ac
.
stop
;
v_measured
:=
int2float
(
v_camInd
.
recvTime
)
/
1000.0
-
v_receiveTime
;
v_receiveTime
:=
int2float
(
v_camInd
.
recvTime
)
/
1000.0
;
log
(
"*** "
&
testcasename
()
&
": DEBUG: In loop, v_measured="
,
v_measured
,
" compared to "
,
v_interval_1_measured
*
0.9
,
" ***"
);
log
(
"*** "
&
testcasename
()
&
": DEBUG: In loop, new v_receiveTime = "
,
v_receiveTime
,
" ***"
);
if
(
v_measured
<
v_interval_1_measured
*
0.9
)
{
log
(
"*** "
&
testcasename
()
&
": INCONC: Initial conditions: Condition 2 CAM#"
,
v_i
,
" message received BEFORE INTERVAL_1 expired ***"
);
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_timeout
);
}
t_interval_1_max
.
stop
;
else
if
(
v_measured
>
v_interval_1_measured
*
1.10
)
{
log
(
"*** "
&
testcasename
()
&
": INCONC: Initial conditions: Condition 2 CAM#"
,
v_i
,
" message not received in time ***"
);
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_timeout
);
}
else
{
log
(
"*** "
&
testcasename
()
&
": INFO: Initial conditions: Condition 2 CAM#"
,
v_i
,
" message received ***"
);
}
[]
t_interval_1_min
.
timeout
{
repeat
;
}
[]
t
_interval_1_max
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": INCONC: Initial conditions: Condition 2 CAM#"
,
v_i
,
" message not received ***"
);
[]
t
c_ac
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": INCONC: Initial conditions: Condition 2 CAM#"
,
v_i
,
" message not received
in time
***"
);
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_timeout
);
}
}
...
...
@@ -2448,22 +2460,25 @@ module ItsCam_TpFunctions {
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_success
);
// Test Body
t_maxTransInterval_min
.
start
;
t_maxTransInterval_max
.
start
;
tc_ac
.
start
(
PICS_T_GENCAMMAX
*
2.0
);
alt
{
[]
camPort
.
receive
(
mw_camInd
(
mw_camMsg_any
)){
if
(
t_maxTransInterval_min
.
running
)
{
[]
camPort
.
receive
(
mw_camInd
(
mw_camMsg_any
))
->
value
v_camInd
{
var
float
v_measured
:=
int2float
(
v_camInd
.
recvTime
)
/
1000.0
-
v_receiveTime
;
log
(
"*** "
&
testcasename
()
&
": DEBUG: v_measured="
,
v_measured
,
" ***"
);
if
(
v_measured
<
PICS_T_GENCAMMAX
*
0.90
)
{
log
(
"*** "
&
testcasename
()
&
": FAIL: Next CAM message received BEFORE T_GenCamMax expired ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_error
);
}
t_maxTransInterval_max
.
stop
;
else
if
(
v_measured
>
PICS_T_GENCAMMAX
*
1.10
)
{
log
(
"*** "
&
testcasename
()
&
": FAIL: Next CAM message not received AFTER T_GenCamMax expired ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_error
);
}
else
{
log
(
"*** "
&
testcasename
()
&
": PASS: Next CAM message received AFTER T_GenCamMax expired ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
[]
t_maxTransInterval_min
.
timeout
{
repeat
;
}
[]
t
_maxTransInterval_max
.
timeout
{
[]
t
c_ac
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": FAIL: Next CAM message not received AFTER T_GenCamMax expired ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_error
);
}
...
...
ttcn/AtsSecurity/ItsSecurity_Pics.ttcn
deleted
100644 → 0
View file @
58fa59c0
/**
* @author ETSI / STF481 / STF507 / STF517 / STF538 / STF545
* @version $Url: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsSecurity/ItsSecurity_Pics.ttcn $
* $Id: ItsSecurity_Pics.ttcn 2655 2017-01-26 10:46:08Z filatov $
* @desc Module containing Pics for Security ATS
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
* The copyright and the foregoing restriction extend to reproduction in all media.
* All rights reserved.
*
*/
/* 0*/
module
ItsSecurity_Pics
{
// LibIts
import
from
IEEE1609dot2BaseTypes
language
"ASN.1:1997"
all
;
import
from
IEEE1609dot2
language
"ASN.1:1997"
all
;
import
from
EtsiTs103097Module
language
"ASN.1:1997"
all
;
// LibItsSecurity
import
from
LibItsSecurity_TypesAndValues
all
;
type
record
certificates_foi
{
charstring
certificate_id
,
HashAlgorithm
hashAlgorithm
,
HashedId8
issuer
,
HashedId8
hashedId8
,
GeographicRegion
region
optional
}
// End of type certificates_foi
type
record
of
certificates_foi
certificates_fois
;
modulepar
certificates_fois
PX_CERTFICATES_FOI
:=
{
/* 0*/
{
cc_iutCert_A
,
sha256
,
'
C9779926F6177F62
'
O
,
'
F4D2FA773D9C6E63
'
O
,
omit
},
// CERT_IUT_A_AT
/* 1*/
{
cc_iutCert_A_B
,
sha256
,
'
F28ADDDA81B01F8D
'
O
,
'
A36502318051A71C
'
O
,
omit
},
// CERT_IUT_A_B_AT
/* 2*/
{
cc_iutCert_A_N
,
sha256
,
'
F28ADDDA81B01F8D
'
O
,
'
A36502318051A71C
'
O
,
omit
},
// CERT_IUT_A_N_AT
/* 3*/
{
cc_iutCert_A_B_N
,
sha256
,
'
F28ADDDA81B01F8D
'
O
,
'
4
A357209218677EF
'
O
,
omit
},
// CERT_IUT_A_B_N_AT
/* 4*/
{
cc_iutCert_A_B3
,
sha384
,
'
F28ADDDA81B01F8D
'
O
,
'
623
F3CE451FA1A04
'
O
,
omit
},
// CERT_IUT_A_B3_AT
/* 5*/
{
cc_iutCert_A_B3_N
,
sha256
,
'
F28ADDDA81B01F8D
'
O
,
'
E390E79D9A7DB454
'
O
,
omit
},
// CERT_IUT_A_B3_N_AT
/* 6*/
{
cc_iutCert_A_AA
,
sha256
,
'
F8945B67D4EBA414
'
O
,
'
C9779926F6177F62
'
O
,
omit
},
// CERT_IUT_A_AA
/* 7*/
{
cc_iutCert_C1
,
sha256
,
'
45
DC8C75476D0E5B
'
O
,
'
6854
E0E0956DC14D
'
O
,
omit
},
// CERT_IUT_C1_AT
/* 8*/
{
cc_iutCert_CA2
,
sha256
,
'
A5E743E075BDDECB
'
O
,
'
F86E387105A8733D
'
O
,
omit
},
// CERT_IUT_CA2_AT
/* 9*/
{
cc_iutCert_C3
,
sha256
,
'
65
CFAAF67625462B
'
O
,
'
0
B1AD5674BB4FE85
'
O
,
omit
},
// CERT_IUT_C3_AA
/*10*/
{
cc_iutCert_CA3
,
sha256
,
'
0
B1AD5674BB4FE85
'
O
,
'
1
D421A5719013B52
'
O
,
omit
},
// CERT_IUT_CA3_AT
/*11*/
{
cc_iutCert_A1
,
sha256
,
'
C9779926F6177F62
'
O
,
'
EC46A154A581C6EA
'
O
,
omit
},
// CERT_IUT_A1_AT
/*12*/
{
cc_iutCert_A2
,
sha256
,
'
C9779926F6177F62
'
O
,
'
8
C20D11A3FF76E64
'
O
,
omit
},
// CERT_IUT_A2_AT
/*12*/
{
cc_iutCert_A3
,
sha256
,
'
C9779926F6177F62
'
O
,
'
C15CB85A9DA26C21
'
O
,
omit
},
// CERT_IUT_A3_AT
/*13*/
{
cc_iutCert_A4
,
sha256
,
'
C9779926F6177F62
'
O
,
'
4
E1D74DC4327831F
'
O
,
omit
},
// CERT_IUT_A4_AT
/*14*/
{
cc_iutCert_B
,
sha256
,
'
C9779926F6177F62
'
O
,
'
240
F58161F950F49
'
O
,
{
circularRegion
:=
{
center
:=
{
436169490
,
70533080
},
radius
:=
5000
}
}
},
// CERT_IUT_B_AT
/*15*/
{
cc_iutCert_C
,
sha256
,
'
C9779926F6177F62
'
O
,
'
17
B93E3345D509A9
'
O
,
{
rectangularRegion
:=
{
{
northWest
:=
{
latitude
:=
436618657
,
longitude
:=
70083912
},
southEast
:=
{
latitude
:=
435720322
,
longitude
:=
70982247
}
}
}
}
},
// CERT_IUT_C_AT
/*16*/
{
cc_iutCert_D
,
sha256
,
'
C9779926F6177F62
'
O
,
'
761779
BB8F281F1D
'
O
,
{
polygonalRegion
:=
{
{
latitude
:=
436618657
,
longitude
:=
70083912
},
{
latitude
:=
436618657
,
longitude
:=
70982247
},
{
latitude
:=
435720322
,
longitude
:=
70982247
},
{
latitude
:=
435720322
,
longitude
:=
70083912
}
}
}
},
// CERT_IUT_D_AT
/*17*/
{
cc_iutCert_E
,
sha256
,
'
C9779926F6177F62
'
O
,
'
70820
EA96D75652A
'
O
,
{
identifiedRegion
:=
{
{
countryOnly
:=
250
}
}
}
},
// CERT_IUT_E_AT
/*18*/
{
cc_iutCert_CA_AA
,
sha256
,
'
65
CFAAF67625462B
'
O
,
'
A5E743E075BDDECB
'
O
,
omit
},
// CERT_IUT_CA_AA
/*19*/
{
cc_iutCert_CC_AA
,
sha256
,
'
65
CFAAF67625462B
'
O
,
'
45
DC8C75476D0E5B
'
O
,
omit
}
// CERT_IUT_CC_AA
}
/**
* @desc Certificate identifier to be used for X_CERTFICATE variant
*/
modulepar
integer
PX_CERTFICATES_VAR
:=
0
;
}
// End of module ItsSecurity_Pics
ttcn/AtsSecurity/ItsSecurity_TestCases.ttcn
View file @
a5579b4e
This diff is collapsed.
Click to expand it.
LibIts
@
2edfaf56
Compare
7484e42e
...
2edfaf56
Subproject commit
7484e42e47f32555eebd2af4f27ead826e75c34
8
Subproject commit
2edfaf564426d4636ca954e157de3bdce0923fe
8
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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