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
44d1384d
Commit
44d1384d
authored
Mar 28, 2020
by
Yann Garcia
Browse files
Unify STF525 TTCN-3 code
parent
8b379cad
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
.TITAN_properties
View file @
44d1384d
...
...
@@ -134,14 +134,14 @@
</FolderProperties>
</FolderResource>
<FolderResource>
<FolderPath>
ttcn/Ats
IICP
</FolderPath>
<FolderPath>
ttcn/Ats
GenCert
</FolderPath>
<FolderProperties>
<CentralStorage>
false
</CentralStorage>
<ExcludeFromBuild>
true
</ExcludeFromBuild>
</FolderProperties>
</FolderResource>
<FolderResource>
<FolderPath>
ttcn/AtsI
Pv6OverGeoNetworking
</FolderPath>
<FolderPath>
ttcn/AtsI
ICP
</FolderPath>
<FolderProperties>
<CentralStorage>
false
</CentralStorage>
<ExcludeFromBuild>
true
</ExcludeFromBuild>
...
...
@@ -273,6 +273,13 @@
<ExcludeFromBuild>
true
</ExcludeFromBuild>
</FolderProperties>
</FolderResource>
<FolderResource>
<FolderPath>
ttcn/TestCodec
</FolderPath>
<FolderProperties>
<CentralStorage>
false
</CentralStorage>
<ExcludeFromBuild>
true
</ExcludeFromBuild>
</FolderProperties>
</FolderResource>
</FolderProperties>
<FileProperties>
<FileResource>
...
...
ttcn/AtsGenCert/ItsGenCert_Functions.ttcn
View file @
44d1384d
...
...
@@ -24,9 +24,9 @@ module ItsGenCert_Functions {
if
(
p_certificate_params
.
curve
==
e_nist_p256
)
{
f_generate_key_pair_nistp256
(
p_certificate_details
.
private_key
,
p_certificate_details
.
public_key_x
,
p_certificate_details
.
public_key_y
,
p_certificate_details
.
public_key_compressed
,
p_certificate_details
.
public_key_compressed_mode
);
}
else
if
(
p_certificate_params
.
curve
==
e_brainpool_p256
)
{
f_generate_key_pair_brainpoolp256
(
p_certificate_details
.
private_key
,
p_certificate_details
.
public_key_x
,
p_certificate_details
.
public_key_y
,
p_certificate_details
.
public_key_compressed
,
p_certificate_details
.
public_key_compressed_mode
);
f_generate_key_pair_brainpoolp256
r1
(
p_certificate_details
.
private_key
,
p_certificate_details
.
public_key_x
,
p_certificate_details
.
public_key_y
,
p_certificate_details
.
public_key_compressed
,
p_certificate_details
.
public_key_compressed_mode
);
}
else
if
(
p_certificate_params
.
curve
==
e_brainpool_p384
)
{
f_generate_key_pair_brainpoolp384
(
p_certificate_details
.
private_key
,
p_certificate_details
.
public_key_x
,
p_certificate_details
.
public_key_y
,
p_certificate_details
.
public_key_compressed
,
p_certificate_details
.
public_key_compressed_mode
);
f_generate_key_pair_brainpoolp384
r1
(
p_certificate_details
.
private_key
,
p_certificate_details
.
public_key_x
,
p_certificate_details
.
public_key_y
,
p_certificate_details
.
public_key_compressed
,
p_certificate_details
.
public_key_compressed_mode
);
}
else
{
log
(
"f_generate_signing_keys: Unsupported curve"
);
return
-
1
;
...
...
@@ -36,7 +36,7 @@ module ItsGenCert_Functions {
if
(
p_certificate_params
.
encryption_curve
==
e_nist_p256
)
{
f_generate_key_pair_nistp256
(
p_certificate_details
.
private_enc_key
,
p_certificate_details
.
public_enc_key_x
,
p_certificate_details
.
public_enc_key_y
,
p_certificate_details
.
public_enc_key_compressed
,
p_certificate_details
.
public_enc_key_compressed_mode
);
}
else
if
(
p_certificate_params
.
encryption_curve
==
e_brainpool_p256
)
{
f_generate_key_pair_brainpoolp256
(
p_certificate_details
.
private_enc_key
,
p_certificate_details
.
public_enc_key_x
,
p_certificate_details
.
public_enc_key_y
,
p_certificate_details
.
public_enc_key_compressed
,
p_certificate_details
.
public_enc_key_compressed_mode
);
f_generate_key_pair_brainpoolp256
r1
(
p_certificate_details
.
private_enc_key
,
p_certificate_details
.
public_enc_key_x
,
p_certificate_details
.
public_enc_key_y
,
p_certificate_details
.
public_enc_key_compressed
,
p_certificate_details
.
public_enc_key_compressed_mode
);
}
else
{
log
(
"f_generate_signing_keys: Unsupported encryption curve"
);
return
-
1
;
...
...
@@ -273,10 +273,10 @@ module ItsGenCert_Functions {
// Calculate the whole HashedId8 as defined in IEEE Std 1609.2-20XX Clause 6.4.3 CertificateBase
if
(
p_certificate_params
.
hash_algorithm
==
sha256
)
{
p_certificate_details
.
hash
:=
f_hashWithSha256
(
p_certificate_details
.
enc_cert
);
// Hash of the whole certificate
p_certificate_details
.
hashid8
:=
f_
H
ashedId8FromSha256
(
p_certificate_details
.
hash
);
p_certificate_details
.
hashid8
:=
f_
h
ashedId8FromSha256
(
p_certificate_details
.
hash
);
}
else
{
p_certificate_details
.
hash
:=
f_hashWithSha384
(
p_certificate_details
.
enc_cert
);
// Hash of the whole certificate
p_certificate_details
.
hashid8
:=
f_
H
ashedId8FromSha384
(
p_certificate_details
.
hash
);
p_certificate_details
.
hashid8
:=
f_
h
ashedId8FromSha384
(
p_certificate_details
.
hash
);
}
if
(
p_certificate_params
.
certificate_id
==
p_certificate_params
.
signed_by
)
{
// Root certificate
log
(
"f_finalyse_certificate: Root certificate"
);
...
...
ttcn/AtsGenCert/ItsGenCert_TestCases.ttcn
View file @
44d1384d
...
...
@@ -127,6 +127,7 @@ module ItsGencert_TestCases {
}
}
else
{
var
EtsiTs103097Certificate
v_issuing_certificate
;
var
charstring
v_certificate_id
;
var
HashedId8
v_issuer
;
if
(
ischosen
(
v_certificate
.
issuer
.
sha256AndDigest
))
{
...
...
@@ -137,7 +138,7 @@ module ItsGencert_TestCases {
setverdict
(
fail
,
"Unsupported issuer"
);
stop
;
}
if
(
f_getCertificateFromDigest
(
v_issuer
,
v_issuing_certificate
)
==
false
)
{
if
(
f_getCertificateFromDigest
(
v_issuer
,
v_issuing_certificate
,
v_certificate_id
)
==
false
)
{
setverdict
(
fail
,
"Failed to get certificate from digest "
,
v_issuer
);
stop
;
}
...
...
ttcn/AtsIPv6OverGeoNetworking/ItsIpv6OverGeoNetworking_TestCases.ttcn
View file @
44d1384d
/**
* @author ETSI / STF405 / STF449
* @version $U
RL
$
* $Id$
* @version $U
rl: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsIPv6OverGeoNetworking/ItsIpv6OverGeoNetworking_TestCases.ttcn
$
* $Id
: ItsIpv6OverGeoNetworking_TestCases.ttcn 2655 2017-01-26 10:46:08Z filatov
$
* @desc Testcases for IPv6 over GeoNetworking Protocol (TP version: 0.0.4)
*
*/
module
ItsIpv6OverGeoNetworking_TestCases
{
// LibCommon
//
import from LibCommon_BasicTypesAndValues all;
import
from
LibCommon_BasicTypesAndValues
all
;
import
from
LibCommon_Sync
all
;
import
from
LibCommon_Time
all
;
//
import from LibCommon_VerdictControl all;
import
from
LibCommon_VerdictControl
all
;
import
from
LibCommon_Time
all
;
// LibIts
...
...
@@ -118,7 +118,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
)
)
),
mw_ipv6Payload
(
v_ipv6Packet
)
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
)
)
{
tc_ac
.
stop
;
...
...
@@ -225,7 +225,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
)
)
),
mw_ipv6Payload
(
v_ipv6Packet
)
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
)
)
{
tc_ac
.
stop
;
...
...
@@ -331,7 +331,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
)
)
),
mw_ipv6Payload
(
v_ipv6Packet
)
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
)
)
{
tc_ac
.
stop
;
...
...
@@ -443,7 +443,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
)
)
),
mw_ipv6Payload
(
v_ipv6Packet
)
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
)
)
{
tc_ac
.
stop
;
...
...
@@ -461,7 +461,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
)
)
),
mw_ipv6Payload
(
v_ipv6Packet
)
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
)
)
{
tc_ac
.
stop
;
...
...
@@ -574,7 +574,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
)
)
),
mw_ipv6Payload
(
v_ipv6Packet
)
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
)
)
{
tc_ac
.
stop
;
...
...
@@ -592,7 +592,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
)
)
),
mw_ipv6Payload
(
v_ipv6Packet
)
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
)
)
{
tc_ac
.
stop
;
...
...
@@ -712,7 +712,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
)
)
),
mw_ipv6Payload
(
v_ipv6Packet
)
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
)
)
{
tc_ac
.
stop
;
...
...
@@ -730,7 +730,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
)
)
),
mw_ipv6Payload
(
v_ipv6Packet
)
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
)
)
{
tc_ac
.
stop
;
...
...
@@ -845,7 +845,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
)
)
),
mw_ipv6Payload
(
v_ipv6Packet
)
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
)
)
{
tc_ac
.
stop
;
...
...
@@ -863,7 +863,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
)
)
),
mw_ipv6Payload
(
v_ipv6Packet
)
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
)
)
{
tc_ac
.
stop
;
...
...
@@ -972,7 +972,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
)
)
),
mw_ipv6Payload
(
v_ipv6Packet
)
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
)
)
{
tc_ac
.
stop
;
...
...
@@ -990,7 +990,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
)
)
),
mw_ipv6Payload
(
v_ipv6Packet
)
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
)
)
{
tc_ac
.
stop
;
...
...
@@ -1084,7 +1084,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
// Test Body
f_sendGeoNetMessageWithPayload
(
valueof
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwPdu
(
m_geoNwBroadcastPacket
(
v_longPosVectorNodeA
,
...
...
@@ -1092,8 +1092,8 @@ module ItsIpv6OverGeoNetworking_TestCases {
f_getGeoBroadcastArea
(
vc_gvlTable
[
c_gvl1
].
area
)
)
)
)
),
m_ipv6Payload
(
v_ipv6Packet
)
),
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
);
tc_ac
.
start
;
...
...
@@ -1190,7 +1190,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
// Test Body
f_sendGeoNetMessageWithPayload
(
valueof
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwPdu
(
m_geoNwBroadcastPacket
(
v_longPosVectorNodeA
,
...
...
@@ -1198,8 +1198,8 @@ module ItsIpv6OverGeoNetworking_TestCases {
f_getGeoBroadcastArea
(
vc_gvlTable
[
c_gvl2
].
area
)
)
)
)
),
m_ipv6Payload
(
v_ipv6Packet
)
),
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
);
tc_ac
.
start
;
...
...
@@ -1289,7 +1289,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
// Test Body
f_sendGeoNetMessageWithPayload
(
valueof
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwPdu
(
m_geoNwAnycastPacket
(
v_longPosVectorNodeA
,
...
...
@@ -1297,8 +1297,8 @@ module ItsIpv6OverGeoNetworking_TestCases {
f_getGeoAnycastArea
(
vc_gvlTable
[
c_gvl1
].
area
)
)
)
)
),
m_ipv6Payload
(
v_ipv6Packet
)
),
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
);
tc_ac
.
start
;
...
...
@@ -1394,7 +1394,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
// Test Body
f_sendGeoNetMessageWithPayload
(
valueof
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwPdu
(
m_geoNwBroadcastPacket
(
v_longPosVectorNodeA
,
...
...
@@ -1402,8 +1402,8 @@ module ItsIpv6OverGeoNetworking_TestCases {
f_getGeoBroadcastArea
(
vc_gvlTable
[
c_gvl1
].
area
)
)
)
)
),
m_ipv6Payload
(
v_ipv6Packet
)
),
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
);
tc_ac
.
start
;
...
...
@@ -1507,7 +1507,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
// Test Body
f_sendGeoNetMessageWithPayload
(
valueof
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwPdu
(
m_geoNwBroadcastPacket
(
v_longPosVectorNodeA
,
...
...
@@ -1515,8 +1515,8 @@ module ItsIpv6OverGeoNetworking_TestCases {
f_getGeoBroadcastArea
(
vc_gvlTable
[
c_gvl3
].
area
)
)
)
)
),
m_ipv6Payload
(
v_ipv6Packet
)
),
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
);
f_sleep
(
PX_T_BUILD_CONFIG
);
...
...
@@ -1614,7 +1614,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
// Test Body
f_sendGeoNetMessageWithPayload
(
valueof
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwPdu
(
m_geoNwUnicastPacket
(
v_longPosVectorNodeA
,
...
...
@@ -1622,8 +1622,8 @@ module ItsIpv6OverGeoNetworking_TestCases {
vc_localSeqNumber
)
)
)
),
m_ipv6Payload
(
v_ipv6Packet
)
),
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
);
tc_ac
.
start
;
...
...
@@ -1722,7 +1722,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
// Test Body
f_sendGeoNetMessageWithPayload
(
valueof
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwPdu
(
m_geoNwUnicastPacket
(
v_longPosVectorNodeB
,
...
...
@@ -1730,8 +1730,8 @@ module ItsIpv6OverGeoNetworking_TestCases {
vc_localSeqNumber
)
)
)
),
m_ipv6Payload
(
v_ipv6Packet
)
),
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
);
tc_ac
.
start
;
...
...
@@ -1829,7 +1829,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
// Test Body
f_sendGeoNetMessageWithPayload
(
valueof
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwPdu
(
m_geoNwUnicastPacket
(
v_longPosVectorNodeB
,
...
...
@@ -1837,8 +1837,8 @@ module ItsIpv6OverGeoNetworking_TestCases {
vc_localSeqNumber
)
)
)
),
m_ipv6Payload
(
v_ipv6Packet
)
),
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
);
tc_ac
.
start
;
...
...
@@ -1937,7 +1937,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
// Test Body
f_sendGeoNetMessageWithPayload
(
valueof
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwPdu
(
m_geoNwUnicastPacket
(
v_longPosVectorNodeB
,
...
...
@@ -1945,8 +1945,8 @@ module ItsIpv6OverGeoNetworking_TestCases {
vc_localSeqNumber
)
)
)
),
m_ipv6Payload
(
v_ipv6Packet
)
),
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
);
tc_ac
.
start
;
...
...
@@ -2047,7 +2047,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
// Test Body
f_sendGeoNetMessageWithPayload
(
valueof
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwPdu
(
m_geoNwUnicastPacket
(
v_longPosVectorNodeB
,
...
...
@@ -2055,8 +2055,8 @@ module ItsIpv6OverGeoNetworking_TestCases {
vc_localSeqNumber
)
)
)
),
m_ipv6Payload
(
v_ipv6Packet
)
),
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
);
tc_ac
.
start
;
...
...
@@ -2152,15 +2152,15 @@ module ItsIpv6OverGeoNetworking_TestCases {
// Test Body
f_sendGeoNetMessageWithPayload
(
valueof
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwPdu
(
m_geoNwTsbPacket
(
vc_localSeqNumber
,
v_longPosVectorIut
)
)
)
),
m_ipv6Payload
(
v_ipv6Packet
)
),
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
);
tc_ac
.
start
;
...
...
@@ -2265,7 +2265,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
// Test Body
f_sendGeoNetMessageWithPayload
(
valueof
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwPdu
(
m_geoNwBroadcastPacket
(
v_longPosVectorNodeA
,
...
...
@@ -2273,8 +2273,8 @@ module ItsIpv6OverGeoNetworking_TestCases {
f_getGeoBroadcastArea
(
vc_gvlTable
[
c_gvl3
].
area
)
)
)
)
),
m_ipv6Payload
(
v_ipv6Packet
)
),
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
);
f_sleep
(
PX_T_BUILD_CONFIG
);
...
...
@@ -2360,7 +2360,7 @@ module ItsIpv6OverGeoNetworking_TestCases {
);
f_sendGeoNetMessageWithPayload
(
valueof
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwReq_linkLayerBroadcast
(
m_geoNwPdu
(
m_geoNwBroadcastPacket
(
v_longPosVectorNodeA
,
...
...
@@ -2368,8 +2368,8 @@ module ItsIpv6OverGeoNetworking_TestCases {
f_getGeoBroadcastArea
(
vc_gvlTable
[
c_gvl3
].
area
)
)
)
)
),
m_ipv6Payload
(
v_ipv6Packet
)
),
bit2oct
(
encvalue
(
v_ipv6Packet
)
)
);
f_sleep
(
PX_T_BUILD_CONFIG
);
...
...
ttcn/AtsIPv6OverGeoNetworking/ItsIpv6OverGeoNetworking_TestControl.ttcn
View file @
44d1384d
/**
* @author ETSI / STF405 /STF449
* @version $U
RL
$
* $Id$
* @version $U
rl: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsIPv6OverGeoNetworking/ItsIpv6OverGeoNetworking_TestControl.ttcn
$
* $Id
: ItsIpv6OverGeoNetworking_TestControl.ttcn 1423 2014-05-22 13:59:50Z filatov
$
* @desc Test Control file for IPv6 over GeoNetworking Protocol
*
*/
...
...
ttcn/AtsIVIM/ItsIvim_TestCases.ttcn
View file @
44d1384d
/**
* @author ETSI / STF517
* @version $U
RL
$
* $Id$
* @version $U
rl: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsIVIM/ItsIvim_TestCases.ttcn
$
* $Id
: ItsIvim_TestCases.ttcn 2648 2017-01-03 09:02:30Z garciay
$
* @desc Testcases for IVI Service
* @reference ETSI TS 103 301 v1.1.1
* @copyright ETSI Copyright Notification
...
...
ttcn/AtsIVIM/ItsIvim_TestControl.ttcn
View file @
44d1384d
/**
* @author ETSI / STF517
* @version $U
RL
$
* $Id$
* @version $U
rl: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsIVIM/ItsIvim_TestControl.ttcn
$
* $Id
: ItsIvim_TestControl.ttcn 2648 2017-01-03 09:02:30Z garciay
$
* @desc Test Control file for IVIM
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
...
...
ttcn/AtsIVIM/ItsIvim_TpFunctions.ttcn
View file @
44d1384d
/**
* @author ETSI STF517 / STF525
* @version $U
RL
$
* $Id$
* @version $U
rl: https://oldforge.etsi.org/svn/ITS/tags/20170222_STF527_Final/ttcn/AtsIVIM/ItsIvim_TpFunctions.ttcn
$
* $Id
: ItsIvim_TpFunctions.ttcn,v 1.7 2019/01/07 08:56:01 dte Exp
$
* @desc IVIM TP functions
* @copyright ETSI Copyright Notification
* No part may be reproduced except as authorized by written permission.
...
...
@@ -47,6 +47,7 @@ module ItsIvim_TpFunctions {
function
f_IS_IVI_MSGF_BV_01
()
runs
on
ItsIvim
{
// Local variables
var
IviIdentificationNumber
v_iviIdentificationNumber
;
// Test control
if
(
not
PICS_IVIM_GENERATION
)
{
...
...
@@ -65,6 +66,7 @@ module ItsIvim_TpFunctions {
f_selfOrClientSyncAndVerdictPreamble
(
c_prDone
,
e_success
);
// Test Body
v_iviIdentificationNumber
:=
f_utTriggerEvent
(
valueof
(
m_utTriggerEvent
()));
tc_ac
.
start
;
alt
{
[]
ivimPort
.
receive
(
...
...
@@ -83,7 +85,7 @@ module ItsIvim_TpFunctions {
}
// Postamble
f_po
Default
(
);
f_po
CancelEvent
(
e_iut
,
v_iviIdentificationNumber
);
f_cfDown
();
}
// End of function f_IVIM_MSD_FMT_BV_01
...
...
@@ -547,7 +549,7 @@ module ItsIvim_TpFunctions {
// Test Body
v_validTo
:=
f_getCurrentTime
()
+
1000
*
3600
;
// Current ITS time + one hour
f_utUpdateEvent
(
m_utIvimUpdateEvent
(
v_iviIdentificationNumber
,
-
,
v_validTo
));
f_utUpdateEvent
(
m_utIvimUpdateEvent
(
v_iviIdentificationNumber
,
-
,
-
,
v_validTo
));
tc_ac
.
start
;
alt
{
...
...
@@ -843,8 +845,9 @@ module ItsIvim_TpFunctions {
const
TimestampIts
c_repetitionInterval
:=
c_duration_4sec
;
var
integer
v_counter
:=
0
;
var
boolean
v_ivimReceived
:=
false
;
timer
t_minTransInterval
:=
int2float
(
c_repetitionInterval
)
*
0.90
;
timer
t_maxTransInterval
:=
int2float
(
c_repetitionInterval
)
*
1.10
;
const
float
c_minTransInterval
:=
int2float
(
c_repetitionInterval
)
*
0.90
;
const
float
c_maxTransInterval
:=
int2float
(
c_repetitionInterval
)
*
1.10
;
var
Times
v_times
:=
{};
var
IviIdentificationNumber
v_iviIdentificationNumber
;
var
IvimInd
v_rcvdMsg
;
...
...
@@ -880,7 +883,7 @@ module ItsIvim_TpFunctions {
// Test Body
f_utUpdateEvent
(
m_utIvimUpdateEvent
(
v_iviIdentificationNumber
,
c_duration_4sec
));
tc_ac
.
start
;
tc_ac
.
start
(
60.0
)
;
ivimPort
.
clear
;
alt
{
[]
ivimPort
.
receive
(
...
...
@@ -893,38 +896,30 @@ module ItsIvim_TpFunctions {
v_iviIdentificationNumber
,
IviStatus_update_
)))))
{
tc_ac
.
stop
;
v_ivimReceived
:=
true
;
tc_ac
.
start
;
}
[]
t_minTransInterval
.
timeout
{
if
(
v_ivimReceived
==
true
)
{
log
(
"*** "
&
testcasename
()
&
": FAIL: IVIM received BEFORE expiry of the minimum generation timer interval. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_error
);
}
else
{
repeat
;
}
}
[]
t_maxTransInterval
.
timeout
{
if
(
v_ivimReceived
==
false
)
{
log
(
"*** "
&
testcasename
()
&
": FAIL: IVIM received AFTER expiry of the maximum generation timer interval. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_error
);
}
else
{
v_times
[
v_counter
]
:=
tc_ac
.
read
;
v_counter
:=
v_counter
+
1
;
if
(
v_counter
<
c_maxLoopValue
)
{
v_ivimReceived
:=
false
;
t_minTransInterval
.
start
;
t_maxTransInterval
.
start
;
repeat
;
}
else
{
log
(
"*** "
&
testcasename
()
&
": PASS: Generation of IVIMs was successful ***"
);
}
}
[]
tc_ac
.
timeout
{
log
(
"*** "
&
testcasename
()
&
": FAIL: Timeout while awaiting the reception of a message. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_success
);
}
}
if
(
v_counter
==
c_maxLoopValue
)
{
for
(
v_counter
:=
1
;
v_counter
<
c_maxLoopValue
;
v_counter
:=
v_counter
+
1
)
{
var
float
v_timeDiff
:=
v_times
[
v_counter
]
-
v_times
[
v_counter
-
1
];
if
(
not
match
(
v_timeDiff
,
(
c_minTransInterval
..
c_maxTransInterval
)))
{
log
(
"*** "
&
testcasename
()
&
": FAIL: IUT did NOT send IVIM with respect to the 'repetition interval' RI_1. ***"
);
f_selfOrClientSyncAndVerdict
(
c_tbDone
,
e_error
);
break
;
}
[]
tc_ac
.
timeout
{
log
(
"*** "
&
testcasename