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
bfa0371b
Commit
bfa0371b
authored
Nov 12, 2020
by
Bostjan Pintar
Browse files
Updates due to new IVI tests
parent
628fdb38
Changes
6
Hide whitespace changes
Inline
Side-by-side
ttcn/Common/LibItsCommon_ASN1_NamedNumbers.ttcn
View file @
bfa0371b
...
...
@@ -58,6 +58,9 @@ module LibItsCommon_ASN1_NamedNumbers {
const
ItsPduHeader
.
messageID
ItsPduHeader_messageID_evcsn_
:=
11
;
const
ItsPduHeader
.
messageID
ItsPduHeader_messageID_saem_
:=
12
;
const
ItsPduHeader
.
messageID
ItsPduHeader_messageID_rtcmem_
:=
13
;
const
LanePosition
LanePosition_offTheRoad_
:=
-
1
;
const
LanePosition
LanePosition_innerHardShoulder_
:=
0
;
const
LongitudinalAccelerationValue
LongitudinalAccelerationValue_unavailable_
:=
161
;
...
...
ttcn/IVIM/LibItsIvim_ASN1_IVInamedNumbers.ttcn
View file @
bfa0371b
...
...
@@ -5,6 +5,11 @@ module LibItsIvim_ASN1_IVInamedNumbers {
import
from
IVI
language
"ASN.1:1997"
all
;
group
IVI_constants
{
const
Direction
Direction_sameDirection_
:=
0
;
const
Direction
Direction_oppositeDirection_
:=
1
;
const
Direction
Direction_bothDirections_
:=
2
;
const
Direction
Direction_valueNotUsed_
:=
3
;
const
IviStatus
IviStatus_new_
:=
0
;
const
IviStatus
IviStatus_update_
:=
1
;
...
...
@@ -16,7 +21,35 @@ import from IVI language "ASN.1:1997" all;
const
IviType
IviType_trafficRelatedInformationMessages_
:=
2
;
const
IviType
IviType_pollutionMessages_
:=
3
;
const
IviType
IviType_notTrafficRelatedInformationMessages_
:=
4
;
const
LaneType
LaneType_traffic_
:=
0
;
const
LaneType
LaneType_through_
:=
1
;
const
LaneType
LaneType_reversible_
:=
2
;
const
LaneType
LaneType_acceleration_
:=
3
;
const
LaneType
LaneType_deceleration_
:=
4
;
const
LaneType
LaneType_leftHandTurning_
:=
5
;
const
LaneType
LaneType_rightHandTurning_
:=
6
;
const
LaneType
LaneType_dedicatedVehicle_
:=
7
;
const
LaneType
LaneType_bus_
:=
8
;
const
LaneType
LaneType_taxi_
:=
9
;
const
LaneType
LaneType_hov_
:=
10
;
const
LaneType
LaneType_hot_
:=
11
;
const
LaneType
LaneType_pedestrian_
:=
12
;
const
LaneType
LaneType_bikeLane_
:=
13
;
const
LaneType
LaneType_median_
:=
14
;
const
LaneType
LaneType_striping_
:=
15
;
const
LaneType
LaneType_trackedVehicle_
:=
16
;
const
LaneType
LaneType_parking_
:=
17
;
const
LaneType
LaneType_emergency_
:=
18
;
const
LaneType
LaneType_verge_
:=
19
;
const
LaneStatus
LaneStatus_open_
:=
0
;
const
LaneStatus
LaneStatus_closed_
:=
1
;
const
LaneStatus
LaneStatus_mergeR_
:=
2
;
const
LaneStatus
LaneStatus_mergeL_
:=
3
;
const
LaneStatus
LaneStatus_mergeLR_
:=
4
;
const
LaneStatus
LaneStatus_provisionallyOpen_
:=
5
;
const
LaneStatus
LaneStatus_diverging_
:=
6
;
}
// end IVI_constants
...
...
ttcn/IVIM/LibItsIvim_Functions.ttcn
View file @
bfa0371b
/**
* @author ETSI / STF517
* @author ETSI / STF517
/ TTF002
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/IVIM/LibItsIvim_Functions.ttcn $
* $Id: LibItsIvim_Functions.ttcn,v 1.2 2018/05/31 15:57:12 dte Exp $
* @desc Module containing functions for IVIM
...
...
@@ -28,6 +28,10 @@ module LibItsIvim_Functions {
import
from
IVI
language
"ASN.1:1997"
all
;
import
from
EfcDsrcGeneric
language
"ASN.1:1997"
all
;
import
from
EfcDsrcApplication
language
"ASN.1:1997"
all
;
import
from
IEEE1609dot2BaseTypes
language
"ASN.1:1997"
all
;
// LibItsSecurity
import
from
LibItsSecurity_Functions
all
;
// LibItsIvim
import
from
LibItsIvim_TestSystem
all
;
...
...
@@ -334,13 +338,35 @@ module LibItsIvim_Functions {
* @desc Brings the IUT into an initial state.
* @return FncRetCode
*/
function
f_prInitialState
(
Scenario
p_scenario
:=
e_staticPosition
)
runs
on
ItsIvim
return
FncRetCode
{
// function f_prInitialState(Scenario p_scenario := e_staticPosition) runs on ItsIvim return FncRetCode {
// var FncRetCode v_ret := e_success;
//
// f_utInitializeIut(m_ivimStructureInitialize);
//
// f_prDefault();
//
// return v_ret;
// }
function
f_prInitialState
(
Scenario
p_scenario
:=
e_staticPosition
,
in
charstring
p_certificate_id
:=
""
)
runs
on
ItsIvim
return
FncRetCode
{
var
FncRetCode
v_ret
:=
e_success
;
f_utInitializeIut
(
m_ivimStructureInitialize
);
// Initialize IUT with given certificate
if
(
p_certificate_id
!=
""
)
{
// Initialize IUT with given certificate
var
HashedId8
v_hashedId8
:=
'0000000000000000'O
;
fx_readCertificateDigest
(
"CERT_IVI_SSP_NONE"
,
v_hashedId8
);
if
(
'0000000000000000'O
==
v_hashedId8
)
{
// Certificate not found
log
(
"*** "
&
testcasename
()
&
": Required IUT certificate is not found on the test system ***"
);
return
e_timeout
;
}
f_utInitializeIut
(
m_ivimStructureInitialize
(
v_hashedId8
));
}
else
{
f_utInitializeIut
(
m_ivimStructureInitialize
);
}
f_prDefault
();
return
v_ret
;
}
...
...
ttcn/IVIM/LibItsIvim_Pixits.ttcn
View file @
bfa0371b
/**
* @author ETSI / STF517
* @author ETSI / STF517
/ TTF002
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/IVIM/LibItsIvim_Pixits.ttcn $
* $Id: LibItsIvim_Pixits.ttcn 1315 2016-12-15 13:25:41Z garciay $
* @desc IVIM PIXITS
...
...
@@ -83,4 +83,13 @@ module LibItsIvim_Pixits {
*/
modulepar
integer
PX_LAYOUTID
:=
1
/**
* @desc IUT RScode integer variant
* see TpFunction to set the correct value
* used in f_IS_IVI_RCV_SSP_BO_03 and f_IS_IVI_RCV_SSP_BO_04
* //add others if needed
* @see ETSI TS 103 191-3 Table B.8
*/
modulepar
integer
PX_RSCODE_VA
:=
1
}
// End of module LibItsIvim_Pixits
\ No newline at end of file
ttcn/IVIM/LibItsIvim_Templates.ttcn
View file @
bfa0371b
/**
* @author ETSI / STF517
* @author ETSI / STF517
/ TTF002
* @version $Url: https://oldforge.etsi.org/svn/LibIts/tags/20170222_STF527_Final/ttcn/IVIM/LibItsIvim_Templates.ttcn $
* $Id: LibItsIvim_Templates.ttcn 1316 2017-01-03 09:03:43Z garciay $
* @desc Module containing base template definitions for IVIM
...
...
@@ -22,6 +22,7 @@ module LibItsIvim_Templates {
import
from
EfcDsrcApplication
language
"ASN.1:1997"
all
;
import
from
AVIAEINumberingAndDataStructures
language
"ASN.1:1997"
all
;
import
from
CITSapplMgmtIDs
language
"ASN.1:1997"
all
;
import
from
IEEE1609dot2BaseTypes
language
"ASN.1:1997"
all
;
// LibItsCommon
import
from
LibItsCommon_TypesAndValues
all
;
...
...
@@ -68,6 +69,25 @@ module LibItsIvim_Templates {
ssp
:=
*
,
its_aid
:=
*
}
// End of template mw_ivimInd
/**
* @desc Send template for IVI Message (IvimPort Primitive)
* @param p_iviMsg The expected IVI Message
*/
template
(
value
)
IvimInd
m_ivimInd
(
template
(
value
)
IVIM
p_iviMsg
)
:=
{
msgIn
:=
p_iviMsg
,
gnNextHeader
:=
omit
,
gnHeaderType
:=
omit
,
gnHeaderSubtype
:=
omit
,
gnLifetime
:=
omit
,
gnTrafficClass
:=
omit
,
btpDestinationPort
:=
omit
,
btpInfo
:=
omit
,
ssp
:=
omit
,
its_aid
:=
omit
}
// End of template m_ivimInd
/**
* @desc Receive template for IVI Message (IvimPort Primitive)
...
...
@@ -123,12 +143,29 @@ module LibItsIvim_Templates {
its_aid
:=
p_its_aid
}
// End of template mw_ivimIndWithSecurityParameters
/**
* @desc Send template for IVI Message (IvimPort Primitive)
* @param p_iviMsg The expected IVI Message
* @param p_ssp SSP security parameter
* @param p_its_aid ITS-AID value
*/
template
IvimInd
m_ivimIndWithSecurityParameters
(
template
(
value
)
IVIM
p_iviMsg
,
template
Bit256
p_ssp
:=
omit
,
template
UInt32
p_its_aid
:=
omit
)
modifies
m_ivimInd
:=
{
ssp
:=
p_ssp
,
its_aid
:=
p_its_aid
}
// End of template mw_ivimIndWithSecurityParameters
group
utPrimitives
{
/**
* @desc Send template for Upper Tester event initialization
*/
template
(
value
)
UtIvimInitialize
m_ivimStructureInitialize
:=
{
template
(
value
)
UtIvimInitialize
m_ivimStructureInitialize
(
in
HashedId8
p_hashedId8
:=
'0000000000000000'O
)
:=
{
hashedId8
:=
'0000000000000000'O
}
// End of template m_ivimStructureInitialize
...
...
@@ -506,6 +543,18 @@ module LibItsIvim_Templates {
tc
:=
p_tc
}
// End of template mw_iviContainer_textContainer
template
(
value
)
IviContainer
m_iviContainer_layoutContainer
(
in
template
(
value
)
LayoutContainer
p_lac
)
:=
{
lac
:=
p_lac
}
// End of template m_iviContainer_layoutContainer
template
(
present
)
IviContainer
mw_iviContainer_layoutContainer
(
template
(
present
)
LayoutContainer
p_lac
:=
?
)
:=
{
lac
:=
p_lac
}
// End of template mw_iviContainer_layoutContainer
}
// End of group iviContainerGroup
group
geographicLocationContainerGroup
{
...
...
@@ -591,6 +640,42 @@ module LibItsIvim_Templates {
}
}
// End of template m_referencePosition
template
Zone
m_zone_segment
(
template
(
value
)
Segment
p_segment
:=
m_segment
)
:=
{
segment
:=
p_segment
}
// End of template m_zone_segment
template
Zone
m_zone_polygonalLine
(
template
(
value
)
PolygonalLine
p_area
:=
m_polygonalLine_deltaPositions
)
:=
{
area
:=
p_area
}
// End of template m_zone_polygonalLine
template
Segment
m_segment
(
template
(
value
)
PolygonalLine
p_line
:=
m_polygonalLine_deltaPositions
,
template
(
omit
)
IVILaneWidth
p_laneWidth
:=
omit
)
:=
{
line
:=
p_line
,
laneWidth
:=
p_laneWidth
}
// End of template m_segment
template
PolygonalLine
m_polygonalLine_deltaPositions
(
template
(
value
)
PolygonalLine
.
deltaPositions
p_deltaPositions
:=
{
m_deltaPosition
}
)
:=
{
deltaPositions
:=
p_deltaPositions
}
// End of template m_segment
template
DeltaPosition
m_deltaPosition
(
template
(
value
)
DeltaLatitude
p_deltaLatitude
:=
9997
,
template
(
value
)
DeltaLongitude
p_deltaLongitude
:=
9998
)
:=
{
deltaLatitude
:=
p_deltaLatitude
,
deltaLongitude
:=
p_deltaLongitude
}
// End of template m_segment
}
// End of group geographicLocationContainerGroup
group
generalIviContainerGroup
{
...
...
@@ -627,6 +712,30 @@ module LibItsIvim_Templates {
roadSignCodes
:=
p_roadSignCodes
}
// End of template m_gicPart_relavanceZoneId
template
(
value
)
GicPart
m_gicPart_relavanceZoneId_detectionZoneId_direction
(
in
template
(
value
)
IviType
p_iviType
:=
IviType_regulatoryMessages_
,
in
template
(
value
)
GicPart
.
roadSignCodes
p_roadSignCodes
:=
{
m_rSCode_itisCodes
},
in
template
(
value
)
GicPart
.
relevanceZoneIds
p_relevanceZoneIds
:=
{
PX_RELAVANCE_ZONEID
},
in
template
(
value
)
GicPart
.
detectionZoneIds
p_detectionZoneIds
:=
{
PX_DETECTION_ZONEID
},
in
template
(
value
)
GicPart
.
direction
p_direction
:=
Direction_sameDirection_
)
modifies
m_gicPart_basic
:=
{
detectionZoneIds
:=
p_detectionZoneIds
,
relevanceZoneIds
:=
p_relevanceZoneIds
,
direction
:=
p_direction
,
iviType
:=
p_iviType
,
roadSignCodes
:=
p_roadSignCodes
}
// End of template m_gicPart_relavanceZoneId_detectionZoneId_direction
template
(
value
)
GicPart
m_gicPart_laneStatus
(
in
template
(
value
)
IviType
p_iviType
:=
IviType_regulatoryMessages_
,
in
template
(
value
)
GicPart
.
roadSignCodes
p_roadSignCodes
:=
{
m_rSCode_itisCodes
},
in
template
(
value
)
GicPart
.
laneStatus
p_laneStatus
:=
LaneStatus_open_
)
modifies
m_gicPart_basic
:=
{
iviType
:=
p_iviType
,
laneStatus
:=
p_laneStatus
,
roadSignCodes
:=
p_roadSignCodes
}
// End of template m_gicPart_relavanceZoneId
template
(
present
)
GicPart
mw_gicPart_basic
(
template
(
present
)
IviType
p_iviType
:=
?
,
template
(
present
)
GicPart
.
roadSignCodes
p_roadSignCodes
:=
?
...
...
@@ -724,8 +833,115 @@ module LibItsIvim_Templates {
}
}
// End of template m_rSCode_itisCodes
template
(
value
)
RSCode
m_rSCode_viennaConvention
:=
{
layoutComponentId
:=
omit
,
code
:=
{
viennaConvention
:=
{
roadSignClass
:=
1
,
// classB (1),
roadSignCode
:=
2
,
//INTEGER (1..64),
vcOption
:=
1
,
//a(1),
validity
:=
omit
,
value_
:=
omit
,
unit
:=
omit
}
}
}
// End of template m_rSCode_viennaConvention
template
(
value
)
RSCode
m_rSCode_iso14823_trafficSignPictogram
(
template
(
value
)
RSCode
.
code
.
iso14823
.
pictogramCode
.
serviceCategoryCode
.
trafficSignPictogram
p_trafficSignPictogram
:=
dangerWarning
)
:=
{
layoutComponentId
:=
omit
,
code
:=
{
iso14823
:=
{
pictogramCode
:=
{
countryCode
:=
omit
,
serviceCategoryCode
:=
{
trafficSignPictogram
:=
p_trafficSignPictogram
},
pictogramCategoryCode
:=
{
nature
:=
2
,
serialNumber
:=
3
}
},
attributes
:=
omit
}
}
}
// End of template m_rSCode_iso14823_trafficSignPictogram
template
(
value
)
RSCode
m_rSCode_iso14823_publicFacilitiesPictogram
:=
{
layoutComponentId
:=
omit
,
code
:=
{
iso14823
:=
{
pictogramCode
:=
{
countryCode
:=
omit
,
serviceCategoryCode
:=
{
publicFacilitiesPictogram
:=
publicFacilities
},
pictogramCategoryCode
:=
{
nature
:=
2
,
serialNumber
:=
3
}
},
attributes
:=
omit
}
}
}
// End of template m_rSCode_iso14823_publicFacilitiesPictogram
template
(
value
)
RSCode
m_rSCode_iso14823_ambientOrRoadConditionPictogram
(
template
(
value
)
RSCode
.
code
.
iso14823
.
pictogramCode
.
serviceCategoryCode
.
ambientOrRoadConditionPictogram
p_ambientOrRoadConditionPictogram
:=
ambientCondition
)
:=
{
layoutComponentId
:=
omit
,
code
:=
{
iso14823
:=
{
pictogramCode
:=
{
countryCode
:=
omit
,
serviceCategoryCode
:=
{
ambientOrRoadConditionPictogram
:=
p_ambientOrRoadConditionPictogram
},
pictogramCategoryCode
:=
{
nature
:=
2
,
serialNumber
:=
3
}
},
attributes
:=
omit
}
}
}
// End of template m_rSCode_iso14823_ambientOrRoadConditionPictogram
}
// End of group generalIviContainerGroup
group
layoutContainerGroup
{
template
(
value
)
LayoutContainer
m_layoutContainer
(
in
template
(
value
)
LayoutContainer
.
layoutComponents
p_layoutComponents
:=
{
m_layoutComponent
}
)
:=
{
layoutId
:=
1
,
height
:=
omit
,
width
:=
omit
,
layoutComponents
:=
p_layoutComponents
}
// End of template m_tcPart_basic
template
(
present
)
LayoutContainer
mw_layoutContainer
(
template
(
present
)
LayoutContainer
.
layoutComponents
p_layoutComponents
:=
?
)
:=
{
layoutId
:=
?
,
height
:=
*
,
width
:=
*
,
layoutComponents
:=
p_layoutComponents
}
// End of template mw_tcPart_basic
template
(
value
)
LayoutComponent
m_layoutComponent
:=
{
layoutComponentId
:=
1
,
height
:=
10
,
width
:=
11
,
x
:=
12
,
y
:=
13
,
textScripting
:=
1
}
// End of template m_layoutComponent
}
//end group layoutContainerGroup
group
roadConfigurationContainerGroup
{
template
(
value
)
RccPart
m_rccPart
(
...
...
@@ -750,10 +966,12 @@ module LibItsIvim_Templates {
template
(
present
)
LaneInformation
mw_laneInformation
(
template
(
present
)
LanePosition
p_lanePosition
:=
?
,
template
(
present
)
Direction
p_direction
:=
?
,
template
(
present
)
LaneType
p_laneType
:=
?
,
template
(
present
)
LaneStatus
p_laneStatus
:=
?
)
:=
{
laneNumber
:=
p_lanePosition
,
direction
:=
p_direction
,
validity
:=
*
,
//DTM
laneType
:=
p_laneType
,
laneTypeQualifier
:=
*
,
//CompleteVehicleCharacteristics
...
...
@@ -761,6 +979,21 @@ module LibItsIvim_Templates {
laneWidth
:=
*
//IVILaneWidth
}
template
(
value
)
LaneInformation
m_laneInformation
(
template
(
value
)
LanePosition
p_lanePosition
:=
LanePosition_innerHardShoulder_
,
template
(
value
)
Direction
p_direction
:=
Direction_sameDirection_
,
template
(
value
)
LaneType
p_laneType
:=
LaneType_traffic_
,
template
(
value
)
LaneStatus
p_laneStatus
:=
LaneStatus_open_
)
:=
{
laneNumber
:=
p_lanePosition
,
direction
:=
p_direction
,
validity
:=
omit
,
//DTM
laneType
:=
p_laneType
,
laneTypeQualifier
:=
omit
,
//CompleteVehicleCharacteristics
laneStatus
:=
p_laneStatus
,
laneWidth
:=
omit
//IVILaneWidth
}
}
// End of group roadConfigurationContainerGroup
group
textContainerGroup
{
...
...
ttcn/IVIM/LibItsIvim_TestSystem.ttcn
View file @
bfa0371b
...
...
@@ -61,7 +61,7 @@ module LibItsIvim_TestSystem {
* @desc FA1 IVIM Port (IVIM/BTP/GeoNet/G5)
*/
type
port
IvimPort
message
{
in
IvimInd
;
in
out
IvimInd
;
//changed form in to inout in TTF002 due to TP_IS_IVI_RCV_SSP_* tests
out
IvimReq
;
}
// End of port IvimPort
...
...
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