LibItsIvim_Templates.ttcn 55.3 KB
Newer Older
 *  @author      ETSI / STF517 / TTF002
Yann Garcia's avatar
Yann Garcia committed
 *  @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 $
garciay's avatar
garciay committed
 *  @desc        Module containing base template definitions for IVIM
 *  @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.
 *
 */
module LibItsIvim_Templates {
    
    // LibCommon
    import from LibCommon_BasicTypesAndValues all;
    import from LibCommon_DataStrings all;
    
    // LibIts
    import from ITS_Container language "ASN.1:1997" all;
    import from IVIM_PDU_Descriptions language "ASN.1:1997" all;
    import from IVI language "ASN.1:1997" all;
    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;
    import from LibItsCommon_Functions all;
    import from LibItsCommon_Pixits all;
    import from LibItsCommon_ASN1_NamedNumbers all;
    
    // LibItsIvim
    import from LibItsIvim_TestSystem all;
    import from LibItsIvim_TypesAndValues all;
YannGarcia's avatar
YannGarcia committed
    import from LibItsIvim_Pixits all;
    import from LibItsIvim_ASN1_IVInamedNumbers all;
    
    group asn1Constants {
    } // End of group asn1Constants 
    
    group primitivesTemplates {
        
        /**
         * @desc    Send template for IVI Message (IvimPort Primitive)
         * @param   p_iviMsg    The IVI Message to be sent
         */
        template (value) IvimReq m_ivimReq(
                                           in template (value) IVIM p_iviMsg
        ) := {
            msgOut := p_iviMsg
        
        /**
         * @desc    Receive template for IVI Message (IvimPort Primitive)
         * @param   p_iviMsg    The expected IVI Message
         */
        template (present) IvimInd mw_ivimInd(
YannGarcia's avatar
YannGarcia committed
                                              template (present) IVIM p_iviMsg := ?
Yann Garcia's avatar
Yann Garcia committed
            recvTime            := ?,
            gnNextHeader        := *,
            gnHeaderType        := *,
            gnHeaderSubtype     := *,
            gnLifetime          := *,
            gnTrafficClass      := *,
            btpDestinationPort  := *,
            btpInfo             := *,
            ssp                 := *,
            its_aid             := *
        } // End of template mw_ivimInd

        /**
         * @desc    Receive template for IVI Message (IvimPort Primitive)
         * @param   p_iviMsg            The expected IVI Message
         * @param   p_gnNextHeader      GN next header value
         * @param   p_gnHeaderType      GN header type value
         * @param   p_gnHeaderSubtype   GN header subtype value
         * @param   p_gnLifetime        GN packet lifetime value (ms)
         * @param   p_gnTrafficClass    GN traffic class value
         */
YannGarcia's avatar
YannGarcia committed
        template IvimInd mw_ivimIndWithGnParameters(
                                                    template (present) IVIM p_iviMsg := ?,
                                                     in template UInt8 p_gnNextHeader := *,
                                                     in template UInt8 p_gnHeaderType := *,
                                                     in template UInt8 p_gnHeaderSubtype := *,
                                                     in template UInt32 p_gnLifetime := *,
                                                     in template UInt8 p_gnTrafficClass := *
        ) modifies mw_ivimInd := { 
            gnNextHeader    := p_gnNextHeader,
            gnHeaderType    := p_gnHeaderType,
            gnHeaderSubtype := p_gnHeaderSubtype,
            gnLifetime      := p_gnLifetime,
            gnTrafficClass  := p_gnTrafficClass
        } // End of template mw_ivimIndWithGnParameters
        
        /**
         * @desc    Receive template for IVI Message (IvimPort Primitive)
         * @param   p_iviMsg                The expected IVI Message
         * @param   p_btpDestinationPort    BTP destination port value
         * @param   p_btpInfo               BTP destination port info value (if BTP-B) or BTP source port value (if BTP-A)
         */
YannGarcia's avatar
YannGarcia committed
        template IvimInd mw_ivimIndWithBtpParameters(
                                                     template (present) IVIM p_iviMsg := ?,
garciay's avatar
garciay committed
                                                      template UInt16 p_btpDestinationPort := *,
                                                      template UInt16 p_btpInfo := *
        ) modifies mw_ivimInd := { 
            btpDestinationPort  := p_btpDestinationPort,
            btpInfo             := p_btpInfo
        } // End of template mw_ivimIndWithBtpParameters
        
        /**
         * @desc    Receive 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
         */
YannGarcia's avatar
YannGarcia committed
        template IvimInd mw_ivimIndWithSecurityParameters(
                                                          template (present) IVIM p_iviMsg := ?,
                                                           template Bit256 p_ssp := *,
        ) modifies mw_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(
Yann Garcia's avatar
Yann Garcia committed
                                                                        in HashedId8 p_hashedId8 := '0000000000000000'O
                                                                       ) := {
Yann Garcia's avatar
Yann Garcia committed
                hashedId8 := p_hashedId8
            } // End of template m_ivimStructureInitialize
            
            /**
             * @desc    Send template for Upper Tester Trigger event
garciay's avatar
garciay committed
             * @param   p_repetitionInterval        Repetition interval (Default: 4 seconds)
             * @param   p_validFrom                 Valid From value (Default: omit)
             * @param   p_validTo                   Valid To value (Default: omit)
             * @param   p_connectedIviStructures    List of ConnectedIviStructure (Default: omit)
             * @param   p_optional_                 Optional field (Default: omit)
             */
            template (value) UtIvimTrigger m_utTriggerEvent(
garciay's avatar
garciay committed
                                                            template (omit) TimestampIts p_repetitionInterval := c_duration_4sec,
                                                            template (omit) TimestampIts p_validFrom := omit,
                                                            template (omit) TimestampIts p_validTo := omit,
                                                            template (omit) ZidList p_zoneIds := omit,
                                                            template (omit) LanePosition p_laneNumber := omit,
                                                            template (omit) RelavanceZidList p_relavanceZoneIds := omit,
                                                            template (omit) DetectionZidList p_detectionZoneIds := omit,
                                                            template (omit) DriverAwarenesZidList p_driverAwarenesZoneIds := omit,
                                                            template (omit) VarLengthNumber p_itsRrid := omit,
                                                            template (omit) Direction p_directionGic := omit,
                                                            template (omit) integer p_layoutId := omit
garciay's avatar
garciay committed
                validTo                 := p_validTo,
                repetitionInterval      := p_repetitionInterval,
                zoneIds                 := p_zoneIds,
                laneNumber              := p_laneNumber,
                relavanceZoneIds        := p_relavanceZoneIds,
                detectionZoneIds        := p_detectionZoneIds,
                driverAwarenesZoneIds   := p_driverAwarenesZoneIds,
                itsRrid                 := p_itsRrid,
                directionGic            := p_directionGic,
                layoutId                := p_layoutId
            } // End of template m_utTriggerEvent
            
            /**
             * @desc Send template for Upper Tester event update
             * @param   p_iviIdentificationNumber   The p_iviIVI identification number
garciay's avatar
garciay committed
             * @param   p_timeStamp                 Time stamp value (Default: 2 seconds)
             * @param   p_validFrom                 Valid From value (Default: omit)
             * @param   p_validTo                   Valid To value (Default: omit)
             * @param   p_connectedIviStructures    List of ConnectedIviStructure (Default: omit)
YannGarcia's avatar
YannGarcia committed
            template (omit) UtIvimUpdate m_utIvimUpdateEvent(
                                                              template (value) IviIdentificationNumber p_iviIdentificationNumber,
                                                              template (omit) TimestampIts p_timeStamp := c_duration_2sec,
                                                              template (omit) TimestampIts p_validFrom := omit,
                                                              template (omit) TimestampIts p_validTo := omit,
Yann Garcia's avatar
Yann Garcia committed
                                                              template (omit) IVIManagementContainer.connectedIviStructures p_connectedIviStructures := omit
            ) := {
                iviIdentificationNumber := p_iviIdentificationNumber,
                validFrom               := p_validFrom,
                validTo                 := p_validTo,
Yann Garcia's avatar
Yann Garcia committed
                timeStamp               := p_timeStamp,
Yann Garcia's avatar
Yann Garcia committed
                connectedIviStructures  := p_connectedIviStructures
            } // End of template m_utIvimUpdateEvent
            
            /**
             * @desc    Send template for Upper Tester event cancellation
             * @param   p_actionId  The action id
             */
            template (value) UtIvimTermination m_utEventCancellation(
                                                                     template (value) IviIdentificationNumber p_iviIdentificationNumber
            ) := {
                iviIdentificationNumber := p_iviIdentificationNumber
            } // End of template m_utEventCancellation
            
        } // End of group utPrimitives
      
    } // End of group primitivesTemplates
    
    group headerTemplates {
        
        /**
         * @desc    Default send template for ITS PDU header
         * @param   p_stationID         The source station ID (Default: test system station id)
         * @param   p_protocolVersion   The protocol version (Default: current IVI protocol version)
         * @param   p_messageID         The message Id (Default: IVI message id)
         */
        template (value) ItsPduHeader m_itsPduHeader(
                                                     template (value) StationID p_stationID := f_getTsStationId(),
                                                     template (value) ItsPduHeader.protocolVersion p_protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
                                                     template (value) ItsPduHeader.messageID p_messageID := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageID_ivim_
        ) := {
            protocolVersion := p_protocolVersion,
            messageID       := p_messageID,
            stationID       := p_stationID
        } // End of template m_itsPduHeader
        
        /**
         * @desc    Default receive template for ITS PDU header
         * @param   p_stationID         The expected station id (Default: any)
         * @param   p_protocolVersion   The expected protocol version (Default: current IVI protocol version)
         * @param   p_messageID         The expected message id (Default: IVI message id)
         */
YannGarcia's avatar
YannGarcia committed
        template (present) ItsPduHeader mw_itsPduHeader(
                                              template (present) StationID p_stationID := ?,
                                              template (present) ItsPduHeader.protocolVersion p_protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
                                              template (present) ItsPduHeader.messageID p_messageID := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageID_ivim_
        ) := {
            protocolVersion := p_protocolVersion,
            messageID       := p_messageID,
            stationID       := p_stationID
        } // End of template mw_itsPduHeader
        
        template (present) StationID mw_anyStationId := ?;
        
    } // End of group headerTemplates
    
    group ivimPduTemplates {
        
        /**
         * @desc    Send template for IVIM PDU
         * @param   p_ivim  The IVI Message
         */
        template (value) IVIM m_ivimStructurePdu(
                                                 template (value) IviStructure p_ivim
        ) := {
            header  := m_itsPduHeader,
            ivi     := p_ivim
        } // End of template m_ivimStructurePdu
        
        /**
         * @desc    Default receive template for IVIM PDU
         * @param   p_itsPduHeader  The expected ITS PDU header (Default: any)
         * @param   p_ivim          The expected IVI Message (Default: any)
         */
        template (present) IVIM mw_anyIvimPdu(
                                              template (present) ItsPduHeader p_itsPduHeader := ?,
                                              template (present) IviStructure p_ivim := ?
        ) := {
            header  := p_itsPduHeader,
            ivi     := p_ivim
        } // End of template mw_anyIvimPdu
        
        /**
         * @desc    Receive template for IVIM PDU
         * @param   p_ivim              The expected IVI Message 
         * @param   p_stationID         The expected station id (Default: any)
         * @param   p_protocolVersion   The expected protocol version (Default: current IVI protocol version)
         * @param   p_messageID         The expected message id (Default: IVI message id)
         */
        template (present) IVIM mw_ivimPdu(
YannGarcia's avatar
YannGarcia committed
                                           template (present) IviStructure p_ivim := ?,
                                           template (present) StationID p_stationID := ?,
                                           template (present) ItsPduHeader.protocolVersion p_protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
                                           template (present) ItsPduHeader.messageID p_messageID := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageID_ivim_
        ) := {
            header  := mw_itsPduHeader(p_stationID, p_protocolVersion, p_messageID),
            ivi     := p_ivim
        } // End of template mw_ivimPdu
        
    } // End of group ivimPduTemplates
    
    group iviStructureTemplates {
        
        /**
         * @desc    Send template for IVI Message
         * @param   p_mandatory    The Management Container
         * @param   p_optional_    A list of IVI Container (Default: omit)
         */
        template (omit) IviStructure m_ivimStructure(
                                                     in template (value) IVIManagementContainer p_mandatory,
                                                     in template (omit) IviStructure.optional_ p_optional_ := omit
        ) := {
            mandatory   := p_mandatory,
            optional_   := p_optional_
        } // End of template m_ivimStructure
        
        /**
         * @desc    Receive template for IVI Message
         * @param   p_mandatory    The Management Container
         * @param   p_optional_    A list of IVI Container (Default: omit)
         */
Yann Garcia's avatar
Yann Garcia committed
        template (present) IviStructure mw_ivimStructure(
                                                         template (present) IVIManagementContainer p_mandatory := ?,
                                                         template IviStructure.optional_ p_optional_ := *
        ) := {
            mandatory   := p_mandatory,
            optional_   := p_optional_
        } // End of template mw_ivimStructure
        
        /**
         * @desc    Send template for DEN Message for event termination.
         * @param   p_iviIdentificationNumber  The IVIM identification number
         */
        template (value) IviStructure m_ivimStructureCancellation(
                                                                  in template (value) IviIdentificationNumber p_iviIdentificationNumber
YannGarcia's avatar
YannGarcia committed
            mandatory   := valueof(m_iviManagementContainer(f_getProvider(), valueof(p_iviIdentificationNumber), IviStatus_cancellation_)), 
            optional_   := omit
        } // End of template m_ivimStructureCancellation
        
    } // End of group iviStructureTemplates
    
    group iviManagementContainerGroup {
        
        /**
         * @desc Send template for IVIManagement container
         * @param p_serviceProviderId       The IUT provider description
         * @param p_iviIdentificationNumber The IVIM identification number
         * @param p_iviStatus               The IVIM status
         */
garciay's avatar
garciay committed
        template (omit) IVIManagementContainer m_iviManagementContainer(
                                                                        in template (value) Provider p_serviceProviderId, 
                                                                        in template (value) IviIdentificationNumber p_iviIdentificationNumber,
garciay's avatar
garciay committed
                                                                        in template (value) IviStatus p_iviStatus,
                                                                        in template (omit) IVIManagementContainer.connectedIviStructures p_connectedIviStructures := omit,
                                                                        in template (omit) IVIManagementContainer.timeStamp p_timeStamp := f_getCurrentTime()
        ) := {
            serviceProviderId       := p_serviceProviderId, 
            iviIdentificationNumber := p_iviIdentificationNumber,
            timeStamp               := p_timeStamp,
garciay's avatar
garciay committed
            connectedIviStructures  := p_connectedIviStructures,
            iviStatus               := p_iviStatus
        } // End of template m_iviManagementContainer
        
        /**
         * @desc Receive template for IVIManagement container
         * @param p_serviceProviderId       The IUT provider description
         * @param p_iviIdentificationNumber The IVIM identification number
         * @param p_iviStatus               The IVIM status
         */
        template (present) IVIManagementContainer mw_iviManagementContainer(
                                                                            template (present) Provider p_serviceProviderId := ?, 
                                                                            template (present) IviIdentificationNumber p_iviIdentificationNumber := ?,
                                                                            template (present) IviStatus p_iviStatus := ?
        ) := {
            serviceProviderId       := p_serviceProviderId, 
            iviIdentificationNumber := p_iviIdentificationNumber,
            timeStamp               := *,
garciay's avatar
garciay committed
            validFrom               := *,
            validTo                 := *,
            connectedIviStructures  := *,
            iviStatus               := p_iviStatus
        } // End of template mw_iviManagementContainer
        
        /**
         * @desc Receive template for IVIManagement container
         * @param p_serviceProviderId       The IUT provider description
         * @param p_iviIdentificationNumber The IVIM identification number
         * @param p_iviStatus               The IVIM status
garciay's avatar
garciay committed
         * @param p_timeStamp               Time stamp value
garciay's avatar
garciay committed
        template (present) IVIManagementContainer mw_iviManagementContainer_timestamp(
                                                                                      template (present) Provider p_serviceProviderId := ?, 
                                                                                      template (present) IviIdentificationNumber p_iviIdentificationNumber := ?,
                                                                                      template (present) IviStatus p_iviStatus := ?,
                                                                                      template (present) TimestampIts p_timeStamp := ?
        ) modifies mw_iviManagementContainer := {
            timeStamp               := p_timeStamp
garciay's avatar
garciay committed
        } // End of template mw_iviManagementContainer_timestamp
        
        /**
         * @desc Receive template for IVIManagement container
         * @param p_serviceProviderId       The IUT provider description
         * @param p_iviIdentificationNumber The IVIM identification number
         * @param p_iviStatus               The IVIM status
garciay's avatar
garciay committed
         * @param p_validTo                 Valid To value
         */
        template (present) IVIManagementContainer mw_iviManagementContainer_validTo(
                                                                                    template (present) Provider p_serviceProviderId := ?, 
                                                                                    template (present) IviIdentificationNumber p_iviIdentificationNumber := ?,
                                                                                    template (present) IviStatus p_iviStatus := ?,
garciay's avatar
garciay committed
                                                                                    template (present) TimestampIts p_validTo := ?
        ) modifies mw_iviManagementContainer := {
            validTo                 := p_validTo
        } // End of template mw_iviManagementContainer_validTo
        
        /**
         * @desc Receive template for IVIManagement container
         * @param p_serviceProviderId       The IUT provider description
         * @param p_iviIdentificationNumber The IVIM identification number
         * @param p_iviStatus               The IVIM status
garciay's avatar
garciay committed
         * @param p_validFrom               Valid From value
         */
        template (present) IVIManagementContainer mw_iviManagementContainer_validFrom(
                                                                                      template (present) Provider p_serviceProviderId := ?, 
                                                                                      template (present) IviIdentificationNumber p_iviIdentificationNumber := ?,
                                                                                      template (present) IviStatus p_iviStatus := ?,
garciay's avatar
garciay committed
                                                                                      template (present) TimestampIts p_validFrom := ?
        ) modifies mw_iviManagementContainer := {
            validFrom                 := p_validFrom
        } // End of template mw_iviManagementContainer_validFrom
        
        /**
         * @desc Receive template for IVIManagement container
         * @param p_serviceProviderId       The IUT provider description
         * @param p_iviIdentificationNumber The IVIM identification number
         * @param p_iviStatus               The IVIM status
         * @param p_connectedIviStructures  The IVIM connectedIviStructures
         */
        template (present) IVIManagementContainer mw_iviManagementContainer_connectedIviStructures(
                                                                            template (present) Provider p_serviceProviderId := ?, 
                                                                            template (present) IviIdentificationNumber p_iviIdentificationNumber := ?,
                                                                            template (present) IviStatus p_iviStatus := ?,
                                                                            template (present) IVIManagementContainer.connectedIviStructures p_connectedIviStructures  := ?
        ) modifies mw_iviManagementContainer := {
            connectedIviStructures  := p_connectedIviStructures
        } // End of template mw_iviManagementContainer
        
        /**
         * @desc Receive template for Porvide identifier
garciay's avatar
garciay committed
         * @param p_countryCode         Country code value
         * @param p_providerIdentifier  Provider Identifier value
         */
        template (present) Provider mw_provider(
                                                template (present) CountryCode p_countryCode := ?,
                                                template (present) AVIAEIIssuerIdentifier p_providerIdentifier := ? 
        ) := {
            countryCode         := p_countryCode,
            providerIdentifier  := p_providerIdentifier
        } // End of template mw_provider
        
    } // End of group iviManagementContainerGroup
    
    group connectedIviStructuresGroup {
        
    } // End of group connectedIviStructuresGroup
    
    group iviContainerGroup {
        
        template (value) IviContainer m_iviContainer_geographicLocationContainer(
                                                                                 in template (value) GeographicLocationContainer p_glc
        ) := {
            glc := p_glc
        } // End of template m_iviContainer_geographicLocationContainer
        
        template (present) IviContainer mw_iviContainer_geographicLocationContainer(
                                                                                    template (present) GeographicLocationContainer p_glc := ?
        ) := {
            glc := p_glc
        } // End of template mw_iviContainer_geographicLocationContainer
        
        template (value) IviContainer m_iviContainer_generalIviContainer(
                                                                         in template (value) GeneralIviContainer p_giv
        ) := {
            giv := p_giv
        } // End of template m_iviContainer_generalIviContainer
        
        template (present) IviContainer mw_iviContainer_generalIviContainer(
                                                                            template (present) GeneralIviContainer p_giv := ?
        ) := {
            giv := p_giv
        } // End of template mw_iviContainer_generalIviContainer
        
        template (value) IviContainer m_iviContainer_roadConfigurationContainer(
                                                                                in template (value) RoadConfigurationContainer p_rcc
        ) := {
            rcc := p_rcc
        } // End of template m_iviContainer_roadConfigurationContainer
        
        template (present) IviContainer mw_iviContainer_roadConfigurationContainer(
                                                                                   template (present) RoadConfigurationContainer p_rcc := ?
        ) := {
            rcc := p_rcc
        } // End of template mw_iviContainer_roadConfigurationContainer
        
        template (value) IviContainer m_iviContainer_textContainer(
                                                                                in template (value) TextContainer p_tc
        ) := {
            tc := p_tc
        } // End of template m_iviContainer_textContainer
        
        template (present) IviContainer mw_iviContainer_textContainer(
                                                                                   template (present) TextContainer p_tc := ?
        ) := {
            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 {
        
        template (value) GeographicLocationContainer m_geographicLocationContainer(
                                                                                   in template (value) ReferencePosition p_referencePosition,
                                                                                   in template (value) GeographicLocationContainer.parts p_parts
        ) := {
            referencePosition           := p_referencePosition,
            referencePositionTime       := omit,
            referencePositionHeading    := omit, 
            referencePositionSpeed      := omit,
            parts                       := p_parts 
        } // End of template m_geographicLocationContainer
        
        template (present) GeographicLocationContainer mw_geographicLocationContainer(
                                                                                      template (present) ReferencePosition p_referencePosition := ?,
                                                                                      template (present) GeographicLocationContainer.parts p_parts := ?
        ) := {
            referencePosition           := p_referencePosition,
            referencePositionTime       := *,
            referencePositionHeading    := *, 
            referencePositionSpeed      := *,
            parts                       := p_parts 
        } // End of template mw_geographicLocationContainer
        
        template (omit) GlcPart m_glcPart(
                                          in template (value) Zid p_zoneId, 
                                          in template (omit) LanePosition p_laneNumber := omit,
                                          in template (omit) GlcPart.zoneExtension p_zoneExtension := omit,
                                          in template (omit) HeadingValue p_zoneHeading := omit,
                                          in template (omit) Zone p_zone := omit
        ) := {
            zoneId          := p_zoneId, 
            laneNumber      := p_laneNumber,
            zoneExtension   := p_zoneExtension,
            zoneHeading     := p_zoneHeading,
            zone            := p_zone
        } // End of template m_glcPart
        
YannGarcia's avatar
YannGarcia committed
        template GlcPart mw_glcPart(
Yann Garcia's avatar
Yann Garcia committed
                                    template (present) Zid p_zoneId := ?, 
                                    template LanePosition p_laneNumber := *,
                                    template GlcPart.zoneExtension p_zoneExtension := *,
                                    template HeadingValue p_zoneHeading := *,
                                    template Zone p_zone := *
        ) := {
            zoneId          := p_zoneId, 
            laneNumber      := p_laneNumber,
            zoneExtension   := p_zoneExtension,
            zoneHeading     := p_zoneHeading,
            zone            := p_zone
        } // End of template mw_glcPart
        
        template (value) ReferencePosition m_referencePosition(
                                          in template (value) Latitude p_latitude := 10000, 
                                          in template (value) Longitude p_longitude := 10000,
                                          in template (value) PosConfidenceEllipse p_position,
                                          in template (value) Altitude p_altitude
        ) := {
            latitude                  := p_latitude,
            longitude                 := p_longitude,
            positionConfidenceEllipse := p_position,
            altitude                  := p_altitude
        } // End of template m_referencePosition
        
        template (value) ReferencePosition m_referencePosition_sample(
                                          in template (value) Latitude p_latitude := 10000, 
                                          in template (value) Longitude p_longitude := 10000
        ) := {
            latitude                  := p_latitude,
            longitude                 := p_longitude,
            positionConfidenceEllipse := 
            {
                semiMajorConfidence  := 1000,
                semiMinorConfidence  := 1000,
                semiMajorOrientation := 1000
            },
            altitude                  := 
            {
                altitudeValue      := 10000,
                altitudeConfidence := alt_000_01//unavailable
            }
        } // 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 {
        
        template (value) GicPart m_gicPart_basic(
                                                 in template (value) IviType p_iviType,
                                                 in template (value) GicPart.roadSignCodes p_roadSignCodes
        ) := {
            detectionZoneIds        := omit, 
            its_Rrid                := omit,
            relevanceZoneIds        := omit, 
            direction               := omit,
            driverAwarenessZoneIds  := omit, 
            minimumAwarenessTime    := omit,
            applicableLanes         := omit,
            iviType                 := p_iviType,
            iviPurpose              := omit,
            laneStatus              := omit,
            vehicleCharacteristics  := omit,
            driverCharacteristics   := omit,
            layoutId                := omit,
            preStoredlayoutId       := omit,
            roadSignCodes           := p_roadSignCodes,
            extraText               := omit
        } // End of template m_gicPart_basic
        
        template (value) GicPart m_gicPart_relavanceZoneId(
                                                 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}
        ) modifies m_gicPart_basic:= {
            relevanceZoneIds        := p_relevanceZoneIds, 
            iviType                 := p_iviType,
            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 := ?
        ) := {
            detectionZoneIds        := *, 
            its_Rrid                := *,
            relevanceZoneIds        := *, 
            direction               := *,
            driverAwarenessZoneIds  := *, 
            minimumAwarenessTime    := *,
            applicableLanes         := *,
            iviType                 := p_iviType,
            iviPurpose              := *,
            laneStatus              := *,
            vehicleCharacteristics  := *,
            driverCharacteristics   := *,
            layoutId                := *,
            preStoredlayoutId       := *,
            roadSignCodes           := p_roadSignCodes,
            extraText               := *
        } // End of template mw_gicPart
        
        template (present) GicPart mw_gicPart_layoutId(
                                                    template (present) IviType p_iviType := ?,
                                                    template (present) GicPart.roadSignCodes p_roadSignCodes := ?,
                                                    template (present) integer p_layoutId := ?
        ) modifies mw_gicPart_basic := {
            layoutId                := p_layoutId
        } // End of template mw_gicPart_layoutId
        
        template (present) GicPart mw_gicPart_allZoneIdsAndItsRridAndDirection(
                                                    template (present) IviType p_iviType := ?,
                                                    template (present) GicPart.roadSignCodes p_roadSignCodes := ?,
                                                    template GicPart.detectionZoneIds p_detectionZoneIds := *,
                                                    template VarLengthNumber p_varLengthNumber := *,
                                                    template GicPart.relevanceZoneIds p_relevanceZoneIds := *,
                                                    template Direction p_direction := *,
                                                    template GicPart.driverAwarenessZoneIds p_driverAwarenessZoneIds := *
        ) modifies mw_gicPart_basic := {
            detectionZoneIds        := p_detectionZoneIds,
            its_Rrid                := p_varLengthNumber,
            relevanceZoneIds        := p_relevanceZoneIds,
            direction               := p_direction,
            driverAwarenessZoneIds  := p_driverAwarenessZoneIds
        } // End of template mw_gicPart
        
        template (present) RSCode mw_rSCode(
                                                    template RSCode.layoutComponentId p_layoutComponentId := *,
                                                    template (present) RSCode.code p_code := ?
        )  := {
            layoutComponentId       := p_layoutComponentId,
            code                    := p_code
        } // End of template mw_rSCode
        
        template (present) RSCode mw_rSCode_viennaConvention(
                                                    template RSCode.layoutComponentId p_layoutComponentId := *
        )  := {
            layoutComponentId       := p_layoutComponentId,
            code                    := {
                viennaConvention := ?
            }
        } // End of template mw_rSCode_viennaConvention
        
        template (present) RSCode mw_rSCode_iso14823(
                                                    template RSCode.layoutComponentId p_layoutComponentId := *
        )  := {
            layoutComponentId       := p_layoutComponentId,
            code                    := {
                iso14823 := ?
            }
        } // End of template mw_rSCode_iso14823
        
        template (present) RSCode mw_rSCode_itisCodes(
                                                    template RSCode.layoutComponentId p_layoutComponentId := *
        )  := {
            layoutComponentId       := p_layoutComponentId,
            code                    := {
                itisCodes := ?
            }
        } // End of template mw_rSCode_itisCodes
        
        template (present) RSCode mw_rSCode_anyCatalogue(
                                                    template RSCode.layoutComponentId p_layoutComponentId := *
        )  := {
            layoutComponentId       := p_layoutComponentId,
            code                    := {
                anyCatalogue := ?
            }
        } // End of template mw_rSCode_anyCatalogue
        
        template (value) RSCode m_rSCode_itisCodes  := {
            layoutComponentId       := omit,
            code                    := {
                itisCodes := 100
            }
        } // 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(
                                           in template (value) RccPart.zoneIds p_zoneIds, 
                                           in template (value) RoadType p_roadType,
                                           in template (value) RccPart.laneConfiguration p_laneConfiguration
        ) := {
            zoneIds             := p_zoneIds, 
            roadType            := p_roadType,
            laneConfiguration   := p_laneConfiguration
        } // End of template m_rccPart
        
        template (present) RccPart mw_rccPart(
                                              template (present) RccPart.zoneIds p_zoneIds := ?, 
                                              template (present) RoadType p_roadType := ?,
                                              template (present) RccPart.laneConfiguration p_laneConfiguration := ?
        ) := {
            zoneIds              := p_zoneIds, 
            roadType             := p_roadType,
            laneConfiguration    := p_laneConfiguration
        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
            laneStatus           :=  p_laneStatus,
            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 {
        
        template (value) TcPart m_tcPart_basic(
                                                 in template (value) TcPart.relevanceZoneIds p_relevanceZoneIds,
                                                 in template (value) TcPart.data p_data
        ) := {
            detectionZoneIds        := omit,
            relevanceZoneIds        := p_relevanceZoneIds,
            direction               := omit,
            driverAwarenessZoneIds  := omit, 
            minimumAwarenessTime    := omit,
            applicableLanes         := omit,
            layoutId                := omit,
            preStoredlayoutId       := omit,
            text                    := omit,
            data                    := p_data
        } // End of template m_tcPart_basic
        
        template (present) TcPart mw_tcPart_basic(
                                                    template (present) TcPart.relevanceZoneIds p_relevanceZoneIds := ?,
                                                    template (present) TcPart.data p_data := ?
        ) := {
            detectionZoneIds        := *,
            relevanceZoneIds        := p_relevanceZoneIds, 
            direction               := *,
            driverAwarenessZoneIds  := *, 
            minimumAwarenessTime    := *,
            applicableLanes         := *,
            layoutId                := *,
            preStoredlayoutId       := *,
            text                    := *,
            data                    := p_data
        } // End of template mw_tcPart_basic
        
        template (present) TcPart mw_tcPart_allZoneIds(
                                                    template (present) TcPart.relevanceZoneIds p_relevanceZoneIds := ?,
                                                    template (present) TcPart.data p_data := ?,