/** draft 001 of the IVIM-PDU-Descriptions module for TS 103 301 V2.2.1 integrating:
* initial revision based on ASN.1 files of [ISO TS 19091] and [SAE J2735]
*/
-- Note: the above information will be deleted before publication

 --! @options: no-fields-header

IVIM-PDU-Descriptions {
    itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts103301 (103301) ivim (2) major-version-2 (2) minor-version-1 (1)
}

DEFINITIONS AUTOMATIC TAGS ::=

BEGIN

IMPORTS

IviStructure
FROM IVI {
  iso (1) standard (0) ivi (19321) major-version-3 (3) minor-version-1 (1)
}
WITH SUCCESSORS

ItsPduHeader
FROM ETSI-ITS-CDD {
  itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) 102894 cdd (2) major-version-4 (4) minor-version-1 (1)
}
WITH SUCCESSORS;

/**
* In vehicle information Message Message
* This DF includes DEs for the IVIM protocolVersion, the IVI message type identifier `messageID`,
* the station identifier `stationID` of the originating ITS-S and the IVI data from ISO TS 19321.
*
* @field header: The DE `protocolVersion` is used to select the appropriate protocol decoder at the receiving ITS-S. 
*                It shall be set to 2.
*                The DE `messageID` shall be ivim(6).
* @field ivi:    contains the IVI data as defined in ISO TS 19321.
* 
* @category: Basic Information
* @revision: V1.3.1
*/
IVIM ::= SEQUENCE {
    header  ItsPduHeader,
    ivi     IviStructure
}

END

IVI {iso (1) standard (0) ivi (19321) major-version-3 (3) minor-version-1 (1)}

-- note: the extensions are indicated with: V1 = TS 19321:2015, V2 = TS 19321:2020 and V3.1 = TS 19321: 2024

DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS

ActionIdList, Altitude, DangerousGoodsBasic , DeltaLatitude, DeltaLongitude, DeltaReferencePosition, Direction, EuVehicleCategoryCode, Heading, HeadingValue, 
Identifier1B, Iso3833VehicleType, Latitude, LanePosition, LaneType, LaneWidth, Longitude, MapReference, ReferencePosition, RoadType, SpecialTransportType, Speed, 
SpeedValue, StandardLength9b, StationType, TimestampIts, VarLengthNumber, VehicleRole, Provider
FROM ETSI-ITS-CDD {itu-t (0) identified-organization (4) etsi (0) itsDomain (5) wg1 (1) ts (102894) cdd (2) major-version-4 (4) minor-version-1 (1)} WITH SUCCESSORS

AxleWeightLimits, DieselEmissionValues, ExhaustEmissionValues, EngineCharacteristics, EnvironmentalCharacteristics, PassengerCapacity, SoundLevel, VehicleDimensions,  VehicleWeightLimits
FROM EfcDataDictionary {iso(1) standard(0) 17573 dd(3) version1(1) minorVersion2(2)} WITH SUCCESSORS

InternationalSign-applicablePeriod, InternationalSign-exemptedApplicablePeriod, InternationalSign-directionalFlowOfLane, InternationalSign-applicableVehicleDimensions, InternationalSign-speedLimits, InternationalSign-rateOfIncline, InternationalSign-distanceBetweenVehicles, InternationalSign-destinationInformation
FROM GDD {iso (1) standard (0) gdd(14823) version1 (0)}

InfrastructureSupportSet
FROM IVI-IS;


IviStructure::= SEQUENCE{
   mandatory   IviManagementContainer, 
   optional    IviContainers OPTIONAL 
} 

IviContainers ::= SEQUENCE (SIZE (1..8,...,9..32)) OF IviContainer --size extension in V3.1

--Definition of Containers

IviContainer::= CHOICE {
   glc	    GeographicLocationContainer,
   giv	    GeneralIviContainer,
   rcc	    RoadConfigurationContainer,
   tc	    TextContainer,
   lac	    LayoutContainer,
   ...,	-- original extension indicator of V1
[[ 
   avc	    AutomatedVehicleContainer,	
   mlc	    MapLocationContainer, 
   rsc	    RoadSurfaceContainer ]], -- Extension in V2
   isc      InfrastructureSupportContainer  -- Extension in V3.1
}

IviManagementContainer::= SEQUENCE {
   serviceProviderId            Provider, 
   iviIdentificationNumber      IviIdentificationNumber,
   timeStamp                    TimestampIts OPTIONAL,
   validFrom                    TimestampIts OPTIONAL,
   validTo                      TimestampIts OPTIONAL,
   connectedIviStructures       IviIdentificationNumbers OPTIONAL,
   iviStatus                    IviStatus,
   ...,                         -- original extension indicator of V1
   connectedDenms               ActionIdList OPTIONAL -- Extension in V2
}
	
GeographicLocationContainer::= SEQUENCE {
   referencePosition            ReferencePosition,
   referencePositionTime        TimestampIts OPTIONAL,
   referencePositionHeading     Heading OPTIONAL, 
   referencePositionSpeed       Speed OPTIONAL,
   parts                        GlcParts, 
   ...
}

GlcParts ::= SEQUENCE (SIZE (1..16,...)) OF GlcPart

GlcPart::= SEQUENCE {
   zoneId          Zid, 
   laneNumber      LanePosition OPTIONAL,
   zoneExtension   INTEGER (0..255) OPTIONAL,
   zoneHeading     HeadingValue OPTIONAL,
   zone            Zone OPTIONAL,
   ... 
}

GeneralIviContainer::= SEQUENCE (SIZE (1..16,...)) OF GicPart  

GicPart::= SEQUENCE {
   detectionZoneIds         ZoneIds OPTIONAL, 
   its-Rrid                 VarLengthNumber OPTIONAL,
   relevanceZoneIds         ZoneIds OPTIONAL, 
   direction                Direction OPTIONAL,
   driverAwarenessZoneIds   ZoneIds OPTIONAL, 
   minimumAwarenessTime	    INTEGER (0..255) OPTIONAL,
   applicableLanes          LanePositions OPTIONAL,
   iviType                  IviType,
   iviPurpose               IviPurpose OPTIONAL,
   laneStatus               LaneStatus OPTIONAL,	
   vehicleCharacteristics   VehicleCharacteristicsList OPTIONAL,
   driverCharacteristics    DriverCharacteristics OPTIONAL,
   layoutId                 INTEGER(1..4,...) OPTIONAL,
   preStoredlayoutId        INTEGER(1..64,...) OPTIONAL,
   roadSignCodes            RoadSignCodes,
   extraText                ConstraintTextLines1 OPTIONAL,
   ...
}

InfrastructureSupportContainer::= SEQUENCE (SIZE (1..16,...)) OF IscPart 

IscPart::= SEQUENCE{
   detectionZoneIds         ZoneIds OPTIONAL, 
   relevanceZoneIds         ZoneIds, 
   direction                Direction OPTIONAL,
   infrastructureSupport    InfrastructureSupportInformation,
   ...
}

RoadConfigurationContainer::= SEQUENCE (SIZE (1..16,...)) OF RccPart

RccPart::= SEQUENCE{
   relevanceZoneIds    ZoneIds,
   roadType            RoadType, 
   laneConfiguration   LaneConfiguration,
   ...
}

RoadSurfaceContainer::= SEQUENCE (SIZE (1..16,...)) OF RscPart
	 
RscPart::= SEQUENCE{
   detectionZoneIds                    ZoneIds OPTIONAL,
   relevanceZoneIds                    ZoneIds,
   direction                           Direction OPTIONAL,
   roadSurfaceStaticCharacteristics    RoadSurfaceStaticCharacteristics OPTIONAL,
   roadSurfaceDynamicCharacteristics   RoadSurfaceDynamicCharacteristics OPTIONAL
} 
  (WITH COMPONENTS {..., roadSurfaceStaticCharacteristics PRESENT} |
   WITH COMPONENTS {..., roadSurfaceDynamicCharacteristics PRESENT})

TextContainer::= SEQUENCE (SIZE (1..16,...)) OF TcPart

TcPart::= SEQUENCE {
   detectionZoneIds         ZoneIds OPTIONAL, 
   relevanceZoneIds         ZoneIds, 
   direction                Direction OPTIONAL, 
   driverAwarenessZoneIds   ZoneIds OPTIONAL, 
   minimumAwarenessTime     INTEGER (0..255) OPTIONAL,
   applicableLanes          LanePositions OPTIONAL,
   layoutId                 INTEGER(1..4,...) OPTIONAL,
   preStoredlayoutId        INTEGER(1..64,...) OPTIONAL,
   text                     TextLines OPTIONAL,
   data	                    OCTET STRING,
   ...,
[[ --extension in V2
   iviType                  IviType, 
   laneStatus               LaneStatus OPTIONAL,	
   vehicleCharacteristics   VehicleCharacteristicsList OPTIONAL ]]
}

LayoutContainer::=SEQUENCE{
   layoutId           INTEGER(1..4,...),
   height             INTEGER(10..73) OPTIONAL, 
   width              INTEGER(10..265) OPTIONAL,
   layoutComponents   LayoutComponents,
   ...  
}

AutomatedVehicleContainer::= SEQUENCE (SIZE (1..16,...)) OF AvcPart -- new container in V2

AvcPart::= SEQUENCE { -- new container part in V2
   detectionZoneIds        ZoneIds OPTIONAL, 
   relevanceZoneIds        ZoneIds, 
   direction               Direction OPTIONAL,
   applicableLanes         LanePositions OPTIONAL,
   vehicleCharacteristics  VehicleCharacteristicsList OPTIONAL,
   automatedVehicleRules   AutomatedVehicleRules OPTIONAL,
   platooningRules         PlatooningRules OPTIONAL,	
   ...
} (WITH COMPONENTS {..., automatedVehicleRules PRESENT} |
   WITH COMPONENTS {..., platooningRules PRESENT})

MapLocationContainer::=SEQUENCE{ -- new container in V2
   reference   MapReference, 
   parts       MlcParts 
}

MlcParts::= SEQUENCE (SIZE (1..16,...)) OF MlcPart -- new container part in V2

MlcPart::= SEQUENCE{ -- new container part in V2
   zoneId    Zid,
   laneIds   LaneIds OPTIONAL
} 
	
-- Definition of data frames which are lists of data frames
-- note: those definitions are to avoid "implicit type definitions" but are bit compatible with V1

AbsolutePositions ::= SEQUENCE (SIZE (1..8,...)) OF AbsolutePosition

AbsolutePositionsWAltitude ::= SEQUENCE (SIZE (1..8,...)) OF AbsolutePositionWAltitude

AutomatedVehicleRules::= SEQUENCE (SIZE (1..5)) OF AutomatedVehicleRule  -- new DF in V2

DeltaPositions ::= SEQUENCE (SIZE (1..32,...,33..100)) OF DeltaPosition --size extension corrected in V3.1

DeltaReferencePositions ::= SEQUENCE (SIZE (1..32,...,33..100)) OF DeltaReferencePosition --size extension corrected in V3.1

ConstraintTextLines1 ::= SEQUENCE (SIZE (1..4),...) OF Text (WITH COMPONENTS {layoutComponentId, language, textContent (SIZE(1..32))})

ConstraintTextLines2::= SEQUENCE (SIZE (1..4),...) OF Text (WITH COMPONENTS {..., textContent (SIZE(1..32))})

IviIdentificationNumbers ::= SEQUENCE (SIZE(1..8)) OF IviIdentificationNumber

ISO14823Attributes::= SEQUENCE (SIZE(1..8),...) OF ISO14823Attribute

LaneConfiguration ::= SEQUENCE (SIZE (1..16,...)) OF LaneInformation

LaneIds::= SEQUENCE (SIZE (1..16,...)) OF Identifier1B

LanePositions ::= SEQUENCE (SIZE (1..8,...)) OF LanePosition

LayoutComponents ::= SEQUENCE SIZE (1..4,...) OF LayoutComponent

PlatooningRules::= SEQUENCE (SIZE (1..5)) OF PlatooningRule -- new DF in V2

RoadSignCodes ::= SEQUENCE (SIZE (1..4),...) OF RSCode

TextLines::= SEQUENCE (SIZE (1..4),...) OF Text

TrailerCharacteristicsList ::= SEQUENCE (SIZE (1..3)) OF TrailerCharacteristics

TrailerCharacteristicsFixValuesList ::= SEQUENCE (SIZE (1..4,...)) OF  VehicleCharacteristicsFixValues (WITH COMPONENTS {..., euroAndCo2value ABSENT, engineCharacteristics ABSENT})

TrailerCharacteristicsRangesList ::= SEQUENCE (SIZE (1..4,...)) OF  VehicleCharacteristicsRanges (WITH COMPONENTS {comparisonOperator, limits (WITH COMPONENTS {..., exhaustEmissionValues ABSENT, dieselEmissionValues ABSENT, soundLevel ABSENT})})  

SaeAutomationLevels::= SEQUENCE (SIZE (1..5)) OF SaeAutomationLevel -- new DF in V2

SupportItems::= SEQUENCE (SIZE (1..128,...)) OF SupportItem -- new DF in V3.1

VehicleCharacteristicsFixValuesList ::= SEQUENCE (SIZE (1..4,...)) OF  VehicleCharacteristicsFixValues

VehicleCharacteristicsList ::= SEQUENCE (SIZE (1..8, ...)) OF CompleteVehicleCharacteristics

VehicleCharacteristicsRangesList ::= SEQUENCE (SIZE (1..4,...)) OF  VehicleCharacteristicsRanges

ValidityPeriods ::= SEQUENCE (SIZE (1..8),...) OF InternationalSign-applicablePeriod

ZoneIds ::= SEQUENCE (SIZE (1..8,..., 9..16)) OF Zid -- Extension in V3.1

--  Definition of Data Frames

AbsolutePosition::= SEQUENCE{
   latitude Latitude,
   longitude Longitude
}

AbsolutePositionWAltitude::= SEQUENCE{
   latitude Latitude,
   longitude Longitude,
   altitude Altitude 
}

AnyCatalogue::=SEQUENCE{
   owner            Provider,
   version          INTEGER(0..255),
   pictogramCode    INTEGER(0..65535),
   value            INTEGER (0..65535) OPTIONAL, 
   unit	            RSCUnit OPTIONAL,
   attributes       ISO14823Attributes OPTIONAL
}	

AutomatedVehicleRule::= SEQUENCE { -- new DF in V2
   priority                              PriorityLevel,
   allowedSaeAutomationLevels            SaeAutomationLevels,
   minGapBetweenVehicles                 GapBetweenVehicles OPTIONAL,
   recGapBetweenVehicles                 GapBetweenVehicles OPTIONAL,
   automatedVehicleMaxSpeedLimit         SpeedValue OPTIONAL,
   automatedVehicleMinSpeedLimit         SpeedValue OPTIONAL,
   automatedVehicleSpeedRecommendation   SpeedValue OPTIONAL,
   roadSignCodes                         RoadSignCodes OPTIONAL,
   extraText                             ConstraintTextLines2 OPTIONAL,
   ...
}

CompleteVehicleCharacteristics::= SEQUENCE{
   tractor      TractorCharacteristics OPTIONAL,
   trailer      TrailerCharacteristicsList OPTIONAL,
   train        TrainCharacteristics OPTIONAL
}

ComputedSegment::= SEQUENCE {
   zoneId           Zid, 
   laneNumber       LanePosition,  
   laneWidth        LaneWidth, -- in V3.1 of type LaneWidth instead of IviLaneWidth
   offsetDistance   INTEGER (-32768..32767) OPTIONAL, 
   offsetPosition   DeltaReferencePosition 	OPTIONAL 
}

CONTENT-TYPE ::= CLASS {
   &id   ContentId,
   &Content
} WITH SYNTAX {&Content IDENTIFIED BY &id}

DeltaPosition::=SEQUENCE{
   deltaLatitude   DeltaLatitude,
   deltaLongitude  DeltaLongitude
}

InformationContainer {CONTENT-TYPE: ContentTypes} ::= SEQUENCE {
   id       CONTENT-TYPE.&id({ContentTypes}),
   content  CONTENT-TYPE.&Content({ContentTypes}{@.id})
}

InfrastructureSupportInformation::= SEQUENCE{
   baseOid         RELATIVE-OID OPTIONAL,
   supportList     SupportItems,
   ...
}

ISO14823Attribute::= CHOICE{
   dtm InternationalSign-applicablePeriod, -- Date/Time/Period
   edt InternationalSign-exemptedApplicablePeriod,-- Exemption status of Date/Time/Period
   dfl InternationalSign-directionalFlowOfLane,-- Directional Flow of Lane
   ved InternationalSign-applicableVehicleDimensions,-- Vehicle Dimensions
   spe InternationalSign-speedLimits,-- Speed
   roi InternationalSign-rateOfIncline,-- Rate of Incline
   dbv InternationalSign-distanceBetweenVehicles,-- Distance Between Vehicles
   ddd InternationalSign-destinationInformation-- Destination/Direction/Distance
}

ISO14823Code ::= SEQUENCE{
   pictogramCode           SEQUENCE {  
        countryCode             OCTET STRING (SIZE (2)) OPTIONAL, 
        serviceCategoryCode     CHOICE { 
            trafficSignPictogram                  ENUMERATED {dangerWarning, regulatory, informative,...},
            publicFacilitiesPictogram             ENUMERATED {publicFacilities, ...},  
            ambientOrRoadConditionPictogram       ENUMERATED {ambientCondition, roadCondition,...},
            ...,
            supplementaryPanel                    ENUMERATED {supplementaryPanelAndAdditionalPanel,...}
        },
        pictogramCategoryCode   SEQUENCE {
                  nature            INTEGER (1..9),
                  serialNumber      INTEGER (0..99)
        }
   },
   attributes        ISO14823Attributes OPTIONAL 
}

LaneInformation::= SEQUENCE{
   laneNumber         LanePosition, 
   direction          Direction,
   validity           InternationalSign-applicablePeriod OPTIONAL,
   laneType           LaneType, 
   laneTypeQualifier  CompleteVehicleCharacteristics OPTIONAL,
   laneStatus         LaneStatus, 	 
   laneWidth          LaneWidth OPTIONAL, -- in V3.1 of type LaneWidth instead of IviLaneWidth     
   ...,
[[ --extension in V2
   detectionZoneIds                    ZoneIds OPTIONAL,
   relevanceZoneIds                    ZoneIds OPTIONAL,
   laneCharacteristics                 LaneCharacteristics	 OPTIONAL, 
   laneSurfaceStaticCharacteristics    RoadSurfaceStaticCharacteristics OPTIONAL,
   laneSurfaceDynamicCharacteristics   RoadSurfaceDynamicCharacteristics OPTIONAL ]]
}

LaneCharacteristics::= SEQUENCE{
   zoneDefinitionAccuracy       DefinitionAccuracy,
   existinglaneMarkingStatus    LaneMarkingStatus, 
   newlaneMarkingColour         MarkingColour,
   laneDelimitationLeft         LaneDelimitation,
   laneDelimitationRight        LaneDelimitation,
   mergingWith                  Zid  
}

LayoutComponent::=SEQUENCE{
   layoutComponentId  INTEGER(1..8,...),
   height             INTEGER(10..73), 
   width              INTEGER(10..265), 
   x                  INTEGER(10..265),
   y                  INTEGER(10..73), 
   textScripting      INTEGER {horizontal (0),  vertical (1)}(0..1)
} 

LoadType::= SEQUENCE{
   goodsType              GoodsType,
   dangerousGoodsType     DangerousGoodsBasic,
   specialTransportType   SpecialTransportType
}

PlatooningRule::= SEQUENCE {	-- new DF in V2
   priority                         PriorityLevel,
   allowedSaeAutomationLevels       SaeAutomationLevels,
   maxNoOfVehicles                  MaxNoOfVehicles OPTIONAL,
   maxLenghtOfPlatoon               MaxLenghtOfPlatoon OPTIONAL,
   minGapBetweenVehicles            GapBetweenVehicles OPTIONAL,
   platoonMaxSpeedLimit	            SpeedValue OPTIONAL,
   platoonMinSpeedLimit             SpeedValue OPTIONAL,
   platoonSpeedRecommendation       SpeedValue OPTIONAL,
   roadSignCodes                    RoadSignCodes OPTIONAL,
   extraText                        ConstraintTextLines2 OPTIONAL,
   ...
}

PolygonalLine::= CHOICE {
   deltaPositions                  DeltaPositions, 
   deltaPositionsWithAltitude      DeltaReferencePositions, 	
   absolutePositions               AbsolutePositions, 
   absolutePositionsWithAltitude   AbsolutePositionsWAltitude, 
   ...
}

RoadSurfaceDynamicCharacteristics::= SEQUENCE{
   condition         Condition,
   temperature       Temperature,
   iceOrWaterDepth   Depth,
   treatment         TreatmentType
}

RoadSurfaceStaticCharacteristics::= SEQUENCE{
   frictionCoefficient   FrictionCoefficient,
   material              MaterialType,
   wear                  WearLevel,
   avBankingAngle        BankingAngle
}
	
RSCode::= SEQUENCE{
   layoutComponentId     INTEGER(1..4,...) OPTIONAL,
   code                  CHOICE {
      viennaConvention	VcCode, -- see Vienna Convention Annex A
      iso14823          ISO14823Code, 
      itisCodes         INTEGER (0..65535), -- see SAE J2540
      anyCatalogue      AnyCatalogue,
      ...
   }
}

Segment::= SEQUENCE {
   line        PolygonalLine,
   laneWidth   LaneWidth OPTIONAL -- in V3.1 of type LaneWidth instead of IviLaneWidth
}

SegmentExtended::= SEQUENCE {
   segmentReferencePosition    Zid OPTIONAL, 
   line                        PolygonalLine,
   segmentWidthLeft            StandardLength9b OPTIONAL,
   segmentWidthRight           StandardLength9b OPTIONAL,
   ...
}  ((WITH COMPONENTS {..., segmentWidthLeft ABSENT, segmentWidthRight ABSENT}) |
    (WITH COMPONENTS {..., segmentWidthLeft PRESENT, segmentWidthRight ABSENT}) |
    (WITH COMPONENTS {..., segmentWidthLeft PRESENT, segmentWidthRight PRESENT}))

SupportItem ::= InformationContainer{{InfrastructureSupportSet}}

Text::= SEQUENCE {
   layoutComponentId   INTEGER(1..4,...) OPTIONAL,
   language            BIT STRING (SIZE(10)), 	
   textContent         UTF8String
}

TractorCharacteristics::=SEQUENCE{
   equalTo      VehicleCharacteristicsFixValuesList OPTIONAL,
   notEqualTo   VehicleCharacteristicsFixValuesList OPTIONAL, 
   ranges       VehicleCharacteristicsRangesList OPTIONAL
}
    
TrailerCharacteristics::=SEQUENCE{
   equalTo      TrailerCharacteristicsFixValuesList OPTIONAL,
   notEqualTo   TrailerCharacteristicsFixValuesList OPTIONAL,
   ranges       TrailerCharacteristicsRangesList  OPTIONAL
}

TrainCharacteristics::= TractorCharacteristics

VcCode::= SEQUENCE {
   roadSignClass   VcClass,  -- see Vienna Convention 
   roadSignCode	   INTEGER (1..64),
   vcOption        VcOption, -- e.g. the "a" in H, 3a
   validity        ValidityPeriods OPTIONAL, 
   value           INTEGER (0..65535) OPTIONAL, 
   unit            RSCUnit OPTIONAL			
}

VehicleCharacteristicsFixValues::= CHOICE{
   simpleVehicleType          StationType,	
   euVehicleCategoryCode      EuVehicleCategoryCode,
   iso3833VehicleType         Iso3833VehicleType,
   euroAndCo2value            EnvironmentalCharacteristics,
   engineCharacteristics      EngineCharacteristics,
   loadType                   LoadType,
   usage                      VehicleRole,
   ...
}

VehicleCharacteristicsRanges::= SEQUENCE{
   comparisonOperator	ComparisonOperator,
   limits				CHOICE{
      numberOfAxles             INTEGER(0..7),
      vehicleDimensions         VehicleDimensions,
      vehicleWeightLimits       VehicleWeightLimits,
      axleWeightLimits          AxleWeightLimits,
      passengerCapacity         PassengerCapacity, 
      exhaustEmissionValues     ExhaustEmissionValues,
      dieselEmissionValues      DieselEmissionValues,
      soundLevel                SoundLevel, 
      ...
      }
}

Zone::= CHOICE {
   segment-carriagewayOrLane   Segment,
   area                        PolygonalLine,
   computedSegment             ComputedSegment,
   ...,
   segment-setOfLanes          SegmentExtended -- extension in V3.1
}

-- Defition of IVI specific data elements 

BankingAngle::=INTEGER (-20..21)

ComparisonOperator ::= INTEGER {
   greaterThan            (0),
   greaterThanOrEqualTo   (1),
   lessThan               (2),
   lessThanOrEqualTo      (3)
} (0..3)

Condition::=INTEGER{
   dry                  (0),
   moist                (1),
   wet                  (2),
   standingWater        (3),	
   frost                (4),
   ice                  (5),
   snow                 (6),
   slush                (7),
   unvailable           (8)
-- values 9 to 15 reserved for future use  
} (0..15, ...)

ContentId::= INTEGER(0..127,...)

DefinitionAccuracy::= INTEGER{
   oneCm         (0),
   twoCm         (1),
   fiveCm        (2),
   tenCm         (3),
   twentyCm      (4),
   fiftyCm       (5),
   oneMeter      (6),
   unavailable   (7)
} (0..7, ...)

Depth::= INTEGER (0..255)

DriverCharacteristics::= INTEGER{
   unexperiencedDrivers   (0),
   experiencedDrivers     (1),
   rfu1                   (2),	
   rfu2                   (3)
} (0..3)

FrictionCoefficient::= INTEGER (0..101) 

GapBetweenVehicles::= INTEGER (0..255) -- new DE in V2

GoodsType::= INTEGER {
   ammunition                   (0),
   chemicals                    (1),
   empty                        (2),
   fuel                         (3),
   glass                        (4),
   dangerous                    (5),
   liquid                       (6),
   liveStock                    (7),
   dangerousForPeople           (8),
   dangerousForTheEnvironment   (9),
   dangerousForWater            (10),
   perishableProducts           (11),
   pharmaceutical               (12),
   vehicles                     (13)
   -- other values  reserved for future use
} (0..15,...)

IviIdentificationNumber::= INTEGER(1..32767,..., 32768..8388607)  -- extension in V3.1

IviPurpose::= INTEGER { 
   safety             (0), 
   environmental      (1), 
   trafficManagement  (2)
} (0..3) 

IviStatus::= INTEGER {
   new           (0),	
   update        (1),	
   cancellation  (2),	
   negation      (3)	
-- other values  reserved for future use
}(0..7)

IviType::= INTEGER {
   immediateDangerWarningMessages            (0),
   regulatoryMessages                        (1),
   trafficRelatedInformationMessages         (2), 
   pollutionMessages                         (3),
   notTrafficRelatedInformationMessages      (4),
   machineReadableMessages                   (5)
-- other values  reserved for future use
} (0..7)

LaneDelimitation::=INTEGER {
   noDelimitation       (0),
   lowLaneSeparator     (1),
   highLaneSeparator    (2),
   wall                 (3),
   curb                 (4),
   unpaved              (5),
   guardrail            (6)
	-- value 7 reserved for future use 
} (0..7, ...)

LaneMarkingStatus::= BOOLEAN

LaneStatus::= INTEGER {
   open                 (0),
   closed               (1),
   mergeR               (2),
   mergeL               (3),
   mergeLR              (4),
   provisionallyOpen 	(5),
   diverging            (6)	
	-- value 7 reserved for future use 
} (0..7, ...)

MarkingColour::=INTEGER {
   white          (0),
   yellow         (1),
   orange         (2),
   red            (3),
   blue           (4),
   unavailable    (7)
   -- value 5,6 reserved for future use 
} (0..7, ...)

MaterialType::=INTEGER {
   asphalt         (0),
   concrete        (1),
   cobblestone     (2),
   gravel          (3),
   unavailable     (7)
-- value 4, 5,6 reserved for future use 
} (0..7, ...)

MaxLenghtOfPlatoon::= INTEGER (1..64) -- new DE in V2

MaxNoOfVehicles::= INTEGER (2..64) -- new DE in V2

PriorityLevel::=INTEGER (0..2) -- new DE in V2

RSCUnit::= INTEGER {
   kmperh           (0),
   milesperh        (1),
   kilometer        (2),
   meter            (3),
   decimeter        (4),
   centimeter       (5),
   mile	            (6),
   yard	            (7),
   foot             (8),
   minutesOfTime    (9),
   tonnes           (10), --1000 kg, not Ton!
   hundredkg        (11),
   pound            (12), --lbs
   rateOfIncline    (13)
   -- other value reserved for future use
} (0..15)

SaeAutomationLevel::= INTEGER (0..5) -- new DE in V2

Temperature::=INTEGER (-100..151)

TreatmentType ::= INTEGER {
   no            (0),
   antiskid      (1),
   anti-icing    (2),
   de-icing      (3),
   unavailable   (7)
-- value 4 to 6 reserved for future use
} (0..7)

VcClass::= INTEGER {
   classA 	(0),
   classB	(1),
   classC	(2),
   classD	(3),
   classE	(4),
   classF	(5),
   classG	(6),
   classH	(7)
} (0..7)

VcOption::= INTEGER {
   none 	(0),
   a 		(1),
   b		(2),
   c		(3),
   d		(4),
   e		(5),
   f		(6),
   g		(7)
} (0..7)

WearLevel::=INTEGER {
   new           (0),
   good	         (1),
   bad           (2),
   hasPotholes   (3),
   unavailable   (7)
-- value 4, 5,6 reserved for future use 
} (0..7, ...)

Zid::= INTEGER {
   noZone (32)
}
(1..32,...,33..127) -- size extension in V3.1

END

-- Excerpt of https://standards.iso.org/iso/17573/-3/ed-1/en/ISO17573-3(2023)EfcDataDictionaryV1.3.asn
-- only containing values which are actually used by IVI {iso (1) standard (0) ivi (19321) major-version-3 (3) minor-version-1 (1)}

EfcDataDictionary {iso(1) standard(0) 17573 dd(3) version1(1) minorVersion3(3)}
DEFINITIONS AUTOMATIC TAGS
::= BEGIN EXPORTS ALL;

-- useful subtypes (with no semantics associated)

Int1Unsigned ::= INTEGER (0..255)

-- Int1Signed ::= INTEGER (-128..127)

Int2Unsigned ::= INTEGER (0..65535)

-- Int2Signed ::=	INTEGER (-32768..32767)

-- Int3Unsigned ::= INTEGER (0..16777215)

-- Int4Unsigned ::= INTEGER (0..4294967295)

-- Int4Signed ::= INTEGER (-2147483648..2147483647)

-- 5.2	Subtypes of simple data types

CopValue ::= INTEGER {
	noEntry			(0),
	co2Class1		(1),
	co2Class2		(2),
	co2Class3		(3),
	co2Class4		(4),
	co2Class5		(5),
	co2Class6		(6),
	co2Class7		(7)
	-- (8-15) are reserved for future CEN and ISO use
} (0..15)

EmissionUnit ::= INTEGER {
	mgPerKm		(0),
	mgPerKwh	(1)
} (0..1)

EngineCharacteristics ::= INTEGER {
	noEntry										(0),
	noEngine									(1),
	petrolUnleaded								(2),
	petrolLeaded								(3),
	diesel										(4),
	lpg											(5),
	battery										(6),
	solar										(7),
	hybrid										(8),
	hydrogen									(9),
	multiFuel									(10),
	bivalentPetrolLpg							(11),
	bivalentPetrolCng							(12),
	combinedPetrolElectric						(13),
	cng											(14),
	lng											(15),
	combinedDieselElectric						(16),
	combinedHydrogenElectric					(17),
	bivalentHydrogenPetrol						(18),
	bivalentHydrogenPetrolElectricEngine		(19),
	fuelCellHydrogen							(20),
	fuelCellPetrol								(21),
	fuelCellMethanol							(22),
	fuelCellEthanol								(23),
	fuelCellDiesel								(24),
	combinedMultiFuelElectricEngine				(25),
	combinedCngElectricEngine					(26),
	combinedLngElectricEngine					(27),
	petrolEthanol								(28),
	combinedLpgElectricEngine					(29),
	hybridPetrolExternalBattery					(30),
	hybridDieselExternalBattery					(31),
	hybridLpgExternalBattery					(32),
	hybridHydrogenExternalBattery				(33),
	hybridMultiFuelExternalBattery				(34),
	hybridCngExternalBattery					(35),
	hybridLngExternalBattery					(36),
	hybridBivalentHydrogenPetrolExternalBattery (37),
	hydrogenCng									(38),
	hydrogenLng									(39),
	hybridHydrogenCngExternalBattery			(40),
	hybridHydrogenLngExternalBattery			(41),
	ethanol										(42),
	hybridFuelCellHydrogen						(43),
	hybridFuelCellHydrogenExternalBattery		(44),
	dualFuelLngDiesel							(45),
	electricExternal							(46),
	biogas										(47),
	bioDiesel									(48),
	bioPetrol									(49),
	bivalentPetrolBiogas						(50),
	combinedBiogasElectricEngine				(51),
	dualFuelCngDiesel							(52),
	-- (53-254) are reserved for future CEN and ISO use
	other										(255)
} (0..255)

EuroValue ::= INTEGER {
	noEntry		(0),
	euro1		(1),
	euro2		(2),
	euro3		(3),
	euro4		(4),
	euro5		(5),
	euro6		(6),
	euro7		(7),
	-- (8-14) are reserved for future CEN and ISO use
	eev		(15)
}(0..15)

-- Clause 5.3	Single level data types

AxleWeightLimits ::= SEQUENCE {
	maxLadenWeightOnAxle1		Int2Unsigned,
	maxLadenWeightOnAxle2		Int2Unsigned,
	maxLadenWeightOnAxle3		Int2Unsigned,
	maxLadenWeightOnAxle4		Int2Unsigned,
	maxLadenWeightOnAxle5		Int2Unsigned
}

DieselEmissionValues ::= SEQUENCE {
	particulate			Particulate,
	absorptionCoeff		Int2Unsigned
}

ExhaustEmissionValues ::= SEQUENCE {
	unitType		EmissionUnit,
	emissionCo		INTEGER (0..32767),
	emissionHc		Int2Unsigned,
	emissionNox		Int2Unsigned,
	emissionHcNox	Int2Unsigned
}

Particulate ::= SEQUENCE {
	unitType	EmissionUnit,
	value		INTEGER (0..32767)
}

PassengerCapacity ::= SEQUENCE {
	numberOfSeats			Int1Unsigned,
	numberOfStandingPlaces	Int1Unsigned
}

SoundLevel ::= SEQUENCE {
	soundStationary		Int1Unsigned,
	soundDriveBy		Int1Unsigned
}

-- Clause 5.4	Two level data types

EnvironmentalCharacteristics::= SEQUENCE {
	euroValue	EuroValue,
	copValue	CopValue
}

VehicleDimensions ::= SEQUENCE {
	vehicleLengthOverall	Int1Unsigned,
	vehicleHeightOverall	Int1Unsigned,
	vehicleWidthOverall		Int1Unsigned
}

VehicleWeightLimits ::= SEQUENCE {
	vehicleMaxLadenWeight		Int2Unsigned,
	vehicleTrainMaximumWeight	Int2Unsigned,
	vehicleWeightUnladen		Int2Unsigned
}

END

-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ISO TS 14823
--
-- This ASN.1 was generated: 30.08.2016
--
-- This document contains only the data element needed for the encoding of an IVI message
-- as defined in ISO TS 19321(2020)
--
-- Published version location (yet missing there):
-- https://standards.iso.org/iso/ts/14823/
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

GDD {iso (1) standard (0) gdd(14823) version1 (0)}

DEFINITIONS AUTOMATIC TAGS::=
BEGIN

--Definition of GDD Structure

GddStructure::= SEQUENCE{
   pictogramCode           SEQUENCE {
	countryCode             OCTET STRING (SIZE (2)) OPTIONAL,
	serviceCategoryCode     CHOICE {
		trafficSignPictogram       		ENUMERATED {dangerWarning, regulatory, informative,...},
		publicFacilitiesPictogram       	ENUMERATED {publicFacilities, ...},
		ambientOrRoadConditionPictogram   ENUMERATED {ambientCondition, roadCondition,...},
      ...},
	pictogramCategoryCode   SEQUENCE {
		nature            INTEGER (1..9),
		serialNumber       INTEGER (0..99)
}},
   attributes        GddAttributes OPTIONAL
}

-- Definition of the single ISO 14823 Attributes
GddAttributes::= SEQUENCE (SIZE(1..8),...) OF GddAttribute

GddAttribute::= CHOICE{
   dtm InternationalSign-applicablePeriod, -- Date/Time/Period
   edt InternationalSign-exemptedApplicablePeriod,-- Exemption status of Date/Time/Period
   dfl InternationalSign-directionalFlowOfLane,-- Directional Flow of Lane
   ved InternationalSign-applicableVehicleDimensions,-- Vehicle Dimensions
   spe InternationalSign-speedLimits,-- Speed
   roi InternationalSign-rateOfIncline,-- Rate of Incline
   dbv InternationalSign-distanceBetweenVehicles,-- Distance Between Vehicles
   ddd InternationalSign-destinationInformation,-- Destination/Direction/Distance
   set InternationalSign-section,  -- Section
   nol InternationalSign-numberOfLane  -- Number of Lanes
   }

InternationalSign-applicablePeriod::= SEQUENCE {
   year   SEQUENCE { -- contains yearRangeStartYear and yearRangeEndYear
      yearRangeStartYear    INTEGER(2000..2127,...),
      yearRangeEndYear      INTEGER(2000..2127,...)
      } OPTIONAL,
   month-day  SEQUENCE { -- contains dateRangeStartMonth&Date and dateRangeEndMonth&Date
      dateRangeStartMonthDay   MonthDay,
      dateRangeEndMonthDay     MonthDay
      } OPTIONAL,
   repeatingPeriodDayTypes RepeatingPeriodDayTypes OPTIONAL,
   hourMinutes  SEQUENCE { -- contains timeRangeStartTime and timeRangeEndTime
      timeRangeStartTime  HoursMinutes,
      timeRangeEndTime    HoursMinutes
      } OPTIONAL,
   dateRangeOfWeek       DayOfWeek OPTIONAL,
   durationHourMinute   HoursMinutes OPTIONAL
}

InternationalSign-exemptedApplicablePeriod::= InternationalSign-applicablePeriod

InternationalSign-directionalFlowOfLane::= INTEGER {
   sDL   (1),-- Straight Direction Only
   sLT   (2),-- Straight and Left Turn Only
   sRT   (3),-- Straight and Right Turn Only
   lTO   (4),-- Left Turn Only
   rTO   (5),-- Right Turn Only
   cLL   (6),-- Convergence from the Left Lane
   cRI   (7),-- Convergence from the Right Lane
   oVL   (8) -- Oncoming Vehicles Lane
    } (1..8)

InternationalSign-applicableVehicleDimensions::= SEQUENCE{
   vehicleHeight   Distance OPTIONAL,
   vehicleWidth    Distance OPTIONAL,
   vehicleLength   Distance OPTIONAL,
   vehicleWeight   Weight 	OPTIONAL
   }

InternationalSign-speedLimits::= SEQUENCE{
   speedLimitMax   INTEGER(0..250) OPTIONAL,
   speedLimitMin   INTEGER(0..250) OPTIONAL,
   unit   			Code-Units (0..1)
   }

InternationalSign-rateOfIncline::= INTEGER(1..32)

InternationalSign-distanceBetweenVehicles::= Distance

InternationalSign-destinationInformation::= SEQUENCE{
   junctionDirection         INTEGER(1..128) OPTIONAL,
   roundaboutCwDirection     INTEGER(1..128)OPTIONAL,
   roundaboutCcwDirection    INTEGER(1..128)OPTIONAL,
   ioList                    DDD-IO-LIST
   }

InternationalSign-section::= SEQUENCE{
	startingPointLength   Distance OPTIONAL,
	continuityLength      Distance OPTIONAL
   }

InternationalSign-numberOfLane::= INTEGER(0..99)

-- Definition of data elements used in ISO 14823 attributes

Code-Units::= INTEGER {
   kmperh                  (0),
   milesperh               (1),
   kilometre               (2),
   metre                   (3),
   decimetre               (4),
   centimetre              (5),
   mile                    (6),
   yard                    (7),
   foot                    (8),
   minutesOfTime           (9),
   tonnes                  (10),--1000 kg, not Ton!
   hundredkg               (11),
   pound                   (12),--lbs
   rateOfIncline           (13),
   durationinminutes       (14)
   -- value  15 reserved for future use
   } (0..15)

DayOfWeek::= BIT STRING {unused(0), monday(1), tuesday(2), wednesday(3), thursday(4), friday(5), saturday(6), sunday(7)} (SIZE (8))

DDD-IO-LIST ::= SEQUENCE (SIZE (1..8,...)) OF DDD-IO

DDD-IO::= SEQUENCE{
   arrowDirection                 INTEGER(0..7),
   destPlace                      DestinationPlaces OPTIONAL,
   destRoad                       DestinationRoads OPTIONAL,
   roadNumberIdentifier           INTEGER(1..999) OPTIONAL,
   streetName                     INTEGER(1..999) OPTIONAL,
   streetNameText                 UTF8String OPTIONAL,
   distanceToDivergingPoint       DistanceOrDuration OPTIONAL,
   distanceToDestinationPlace     DistanceOrDuration OPTIONAL
   }

DestinationPlace::= SEQUENCE{
   destType   					DestinationType,
   destRSCode  					GddStructure (WITH COMPONENTS {..., attributes ABSENT}) OPTIONAL,
   destBlob   					OCTET STRING OPTIONAL,
   placeNameIdentification   	INTEGER(1..999) OPTIONAL,
   placeNameText   				UTF8String OPTIONAL
   }

DestinationPlaces ::= SEQUENCE (SIZE (1..4,...)) OF DestinationPlace

DestinationRoad::= SEQUENCE{
   derType   				DestinationRoadType,
   roadNumberIdentifier   	INTEGER(1..999) OPTIONAL,
   roadNumberText   		UTF8String OPTIONAL
   }

DestinationRoads ::= SEQUENCE (SIZE (1..4,...)) OF DestinationRoad

DestinationRoadType::= INTEGER {
   none                   (0),
   nationalHighway        (1),
   localHighway           (2),
   tollExpresswayMotorway (3),
   internationalHighway   (4),
   highway                (5),
   expressway             (6),
   nationalRoad           (7),
   regionalProvincialRoad (8),
   localRoad              (9),
   motorwayJunction       (10),
   diversion              (11),
   rfu1                   (12),
   rfu2                   (13),
   rfu3                   (14),
   rfu4                   (15)
   } (0..15, ...)

DestinationType::= INTEGER {
   none   (0),
   importantArea         (1),
   principalArea         (2),
   generalArea           (3),
   wellKnownPoint        (4),
   country               (5),
   city                  (6),
   street                (7),
   industrialArea        (8),
   historicArea          (9),
   touristicArea         (10),
   culturalArea          (11),
   touristicRoute        (12),
   recommendedRoute      (13),
   touristicAttraction   (14),
   geographicArea        (15)
   } (0..15, ...)

Distance::= SEQUENCE{
   value    INTEGER(1..16384),
   unit     Code-Units(2..4|6..8)
	}

DistanceOrDuration::= SEQUENCE {
	value INTEGER(1..16384),
	unit Code-Units (2..9)
	}

HoursMinutes::= SEQUENCE {
   hours      INTEGER (0..23),-- number of hours after midnight
   mins       INTEGER (0..59) -- number of minutes after the hour
   }

MonthDay::= SEQUENCE {
   month INTEGER    (1..12),
   day INTEGER      (1..31)
   }

RepeatingPeriodDayTypes::= BIT STRING {national-holiday (0), even-days(1), odd-days(2), market-day(3) } (SIZE (4))

Weight::= SEQUENCE {
	value 	INTEGER(1..16384),
	unit 	Code-Units (10..12)
	}

END

IVI-IS DEFINITIONS AUTOMATIC TAGS ::= BEGIN

IMPORTS CONTENT-TYPE, ContentId
FROM IVI {iso (1) standard (0) ivi (19321) major-version-3 (3) minor-version-1 (1)} WITH SUCCESSORS;

   dummyId    ContentId ::= 0
   test1      ContentId ::= 1

InfrastructureSupportSet CONTENT-TYPE ::= {
   {NULL  IDENTIFIED BY dummyId} |
   {INTEGER  IDENTIFIED BY test1}
 , ...
}


END

