Commit 95ed727c authored by Yann Garcia's avatar Yann Garcia
Browse files

Create send/receive TTCN-3 templates for all CDD types to be re-used in all ATSs

parent 615fdfc2
Loading
Loading
Loading
Loading
+62 −61

File changed.

Preview size limit exceeded, changes collapsed.

+16 −49
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ module LibItsIvim_Templates {
    import from LibItsCommon_Functions all;
    import from LibItsCommon_Pixits all;
    import from LibItsCommon_ASN1_NamedNumbers all;
    import from LibItsCommon_CddTemplates all;
    
    // LibItsIvim
    import from LibItsIvim_TypesAndValues all;
@@ -157,7 +158,7 @@ module LibItsIvim_Templates {
                                                            template (omit) DetectionZidList p_detectionZoneIds := omit,
                                                            template (omit) DriverAwarenesZidList p_driverAwarenesZoneIds := omit,
                                                            template (omit) ETSI_ITS_CDD.VarLengthNumber p_itsRrid := omit,
                                                            template (omit) Direction p_directionGic := omit,
                                                            template (omit) ETSI_ITS_CDD.Direction p_directionGic := omit,
                                                            template (omit) integer p_layoutId := omit
                                                            ) := {
                validFrom               := p_validFrom,
@@ -209,44 +210,6 @@ module LibItsIvim_Templates {
      
    } // 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)
         */
        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 {
        
        /**
@@ -256,7 +219,11 @@ module LibItsIvim_Templates {
        template (value) IVIM m_ivimStructurePdu(
                                                 template (value) IviStructure p_ivim
        ) := {
            header  := m_itsPduHeader,
            header  := m_its_pdu_header(
                                        f_getTsStationId(),
                                        -,
                                        LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_ivim_
                                        ),
            ivi     := p_ivim
        } // End of template m_ivimStructurePdu
        
@@ -286,7 +253,7 @@ module LibItsIvim_Templates {
                                           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),
            header  := mw_its_pdu_header(p_stationId, p_protocolVersion, p_messageId),
            ivi     := p_ivim
        } // End of template mw_ivimPdu
        
@@ -449,7 +416,7 @@ module LibItsIvim_Templates {
         * @param p_countryCode         Country code value
         * @param p_providerIdentifier  Provider Identifier value
         */
        template (present) EfcDsrcApplication.Provider mw_provider(
        template (present) EfcDsrcApplication.Provider mw_provider_efc_dsrc_application(
                                                                                        template (present) AVIAEINumberingAndDataStructures.CountryCode p_countryCode := ?,
                                                                                        template (present) AVIAEIIssuerIdentifier p_providerIdentifier := ? 
        ) := {
@@ -687,7 +654,7 @@ module LibItsIvim_Templates {
                                                 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_
                                                 in template (value) GicPart.direction p_direction := LibItsCommon_ASN1_NamedNumbers.Direction_sameDirection_
        ) modifies m_gicPart_basic:= {
            detectionZoneIds        := p_detectionZoneIds,
            relevanceZoneIds        := p_relevanceZoneIds,
@@ -742,7 +709,7 @@ module LibItsIvim_Templates {
                                                    template GicPart.detectionZoneIds p_detectionZoneIds := *,
                                                    template ETSI_ITS_CDD.VarLengthNumber p_varLengthNumber := *,
                                                    template GicPart.relevanceZoneIds p_relevanceZoneIds := *,
                                                    template Direction p_direction := *,
                                                    template ETSI_ITS_CDD.Direction p_direction := *,
                                                    template GicPart.driverAwarenessZoneIds p_driverAwarenessZoneIds := *
        ) modifies mw_gicPart_basic := {
            detectionZoneIds        := p_detectionZoneIds,
@@ -936,8 +903,8 @@ module LibItsIvim_Templates {
        
        template (value) LaneInformation m_laneInformation(
                                                           in template (value) LanePosition p_lanePosition := LanePosition_innerHardShoulder_,
                                                           in template (value) Direction p_direction := Direction_sameDirection_,
                                                           in template (value) LaneType p_laneType := LaneType_traffic_,
                                                           in template (value) ETSI_ITS_CDD.Direction p_direction := LibItsCommon_ASN1_NamedNumbers.Direction_sameDirection_,
                                                           in template (value) ETSI_ITS_CDD.LaneType p_laneType := LibItsCommon_ASN1_NamedNumbers.LaneType_traffic_,
                                                           in template (value) LaneStatus p_laneStatus := LaneStatus_open_
        ) := {
            laneNumber                        := p_lanePosition,
@@ -956,7 +923,7 @@ module LibItsIvim_Templates {
        
        template (present) LaneInformation mw_laneInformation(
                                                              template (present) LanePosition p_lanePosition := ?,
                                                              template (present) Direction p_direction := ?,
                                                              template (present) ETSI_ITS_CDD.Direction p_direction := ?,
                                                              template (present) LaneType p_laneType := ?,
                                                              template (present) LaneStatus p_laneStatus := ?
        ) := {
+5 −77
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ module LibItsMapemSpatem_Templates {
    import from LibItsCommon_TypesAndValues all;
    import from LibItsCommon_ASN1_NamedNumbers all;
    import from LibItsCommon_ASN1_ISDSRC_NamedNumbers all;
    import from LibItsCommon_CddTemplates all;
    
    // LibItsMapemSpatem
    import from LibItsMapemSpatem_TypesAndValues all;
@@ -245,7 +246,7 @@ module LibItsMapemSpatem_Templates {
        template (value) MAPEM m_mapemPdu(
                                          in template (value) MapData p_map
        ) := {
            header  := m_itsPduHeader( - , - ,LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_mapem_ ),
            header  := m_its_pdu_header(f_getTsStationId(), -, LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_mapem_ ),
            map_    := p_map
        }
        
@@ -256,7 +257,7 @@ module LibItsMapemSpatem_Templates {
        template (present) MAPEM mw_mapemPdu(
                                             template (present) MapData p_map := ?
        ) := {
            header  := mw_itsPduHeaderMapem,
            header  := mw_its_pdu_header(-, -, LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_mapem_),
            map_    := p_map
        }
        
@@ -267,7 +268,7 @@ module LibItsMapemSpatem_Templates {
        template (value) SPATEM m_spatemPdu(
                                            in template (value) SPAT p_spat
        ) := {
            header  := m_itsPduHeader( - , - , LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_spatem_ ),
            header  := m_its_pdu_header(f_getTsStationId(), -, LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_spatem_ ),
            spat    := p_spat
        }
        
@@ -278,85 +279,12 @@ module LibItsMapemSpatem_Templates {
        template (present) SPATEM mw_spatemPdu(
                                               template (present) SPAT p_spat := ?
        ) := {
            header  := mw_itsPduHeaderSpatem,
            header  := mw_its_pdu_header(-, -, LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_spatem_ ),
            spat    := p_spat
        }
        
    } // End of group mapSpatPduTemplates
    
    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 MAPEM SPATEM protocol version)
         * @param   p_messageId         The message Id (Default: MAPEM SPATEM id)
         */
        template (value) ItsPduHeader m_itsPduHeader(
                                                     in template (value) StationId p_stationId := f_getTsStationId(),
                                                     in template (value) ItsPduHeader.protocolVersion p_protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
                                                     in template (value) ItsPduHeader.messageId p_messageId
        ) := {
            protocolVersion := p_protocolVersion,
            messageId       := p_messageId,
            stationId       := p_stationId
        }
        
        /**
         * @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 MAPEM SPATEM protocol version)
         * @param   p_messageId         The expected message id (Default: MAPEM SPATEM message id)
         */
        template 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 := ?
        ) := {
            protocolVersion := p_protocolVersion,
            messageId       := p_messageId,
            stationId       := p_stationId
        }
        
        /**
         * @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 MAPEM SPATEM protocol version)
         * @param   p_messageId         The expected message id (Default: MAPEM id)
         */
        template (present) ItsPduHeader mw_itsPduHeaderMapem(
                                                             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_mapem_
        ) := {
            protocolVersion := p_protocolVersion,
            messageId       := p_messageId,
            stationId       := p_stationId
        }
        
        /**
         * @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 MAPEM SPATEM protocol version)
         * @param   p_messageId         The expected message id (Default: SPATEM id)
         */
        template (present) ItsPduHeader mw_itsPduHeaderSpatem(
                                                              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_spatem_
        ) := {
            protocolVersion := p_protocolVersion,
            messageId := p_messageId,
            stationId := p_stationId
        }
        
        /**
         * @desc    Default receive template for the station id
         */
        template (present) StationId mw_anyStationId := ?;
        
    } // End of group headerTemplates

    group mapemSpatemTemplates {
        
        template (omit) IntersectionReferenceID m_intersectionReferenceID(
+3 −59
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ module LibItsRtcmem_Templates {
    import from LibItsCommon_TypesAndValues all;
    import from LibItsCommon_Functions all;
    import from LibItsCommon_ASN1_NamedNumbers all;
    import from LibItsCommon_CddTemplates all;
    
    // LibItsRtcmem
    import from LibItsRtcmem_TypesAndValues all;
@@ -158,7 +159,7 @@ module LibItsRtcmem_Templates {
        template (value) RTCMEM m_rtcmemPdu(
                                            in template (value) RTCMcorrections p_rtcmc
        ) := {
            header  := m_itsPduHeader( - , - ,LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_rtcmem_),
            header  := m_its_pdu_header(f_getTsStationId(), -, LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_rtcmem_),
            rtcmc   := p_rtcmc
        }
        
@@ -169,69 +170,12 @@ module LibItsRtcmem_Templates {
        template (present) RTCMEM mw_rtcmemPdu(
                                               template (present) RTCMcorrections p_rtcmc := ?
        ) := {
            header  := mw_itsPduHeaderRtcmem,
            header  := mw_its_pdu_header(-, -, LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_rtcmem_),
            rtcmc   := p_rtcmc
        }
        
    } // End of group rtcmemPduTemplates
    
    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 RTCMEM protocol version)
         * @param   p_messageId         The message Id (Default: RTCMEM id)
         */
        template (value) ItsPduHeader m_itsPduHeader(
                                                     in template (value) StationId p_stationId := f_getTsStationId(),
                                                     in template (value) ItsPduHeader.protocolVersion p_protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
                                                     in template (value) ItsPduHeader.messageId p_messageId
        ) := {
            protocolVersion := p_protocolVersion,
            messageId       := p_messageId,
            stationId       := p_stationId
        }
        
        /**
         * @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 RTCMEM protocol version)
         * @param   p_messageId         The expected message id (Default: RTCMEM message id)
         */
        template 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 := ?
        ) := {
            protocolVersion := p_protocolVersion,
            messageId       := p_messageId,
            stationId       := p_stationId
        }
        
        /**
         * @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 RTCMEM protocol version)
         * @param   p_messageId         The expected message id (Default: SREM id)
         */
        template ItsPduHeader mw_itsPduHeaderRtcmem(
                                                   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_rtcmem_
        ) := {
            protocolVersion := p_protocolVersion,
            messageId := p_messageId,
            stationId := p_stationId
        }
        
        /**
         * @desc    Default receive template for the station id
         */
        template (present) StationId mw_anyStationId := ?;
        
    } // End of group headerTemplates
    
    group rtcmemTemplatesSend {
        
        /**
+5 −77
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ module LibItsSremSsem_Templates {
    import from LibItsCommon_TypesAndValues all;
    import from LibItsCommon_Functions all;
    import from LibItsCommon_ASN1_NamedNumbers all;
    import from LibItsCommon_CddTemplates all;
    
    // LibItsSremSsem
    import from LibItsSremSsem_TypesAndValues all;
@@ -256,7 +257,7 @@ module LibItsSremSsem_Templates {
        template (value) SREM m_sremPdu(
                                          in template (value) SignalRequestMessage p_srm
        ) := {
            header  := m_itsPduHeader( - , - ,LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_srem_ ),
            header  := m_its_pdu_header(f_getTsStationId(), -, LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_srem_ ),
            srm    := p_srm
        }
        
@@ -267,7 +268,7 @@ module LibItsSremSsem_Templates {
        template (present) SREM mw_sremPdu(
                                            template (present) SignalRequestMessage p_srm := ?
        ) := {
            header  := mw_itsPduHeaderSrem,
            header  := mw_its_pdu_header(-, -, LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_srem_),
            srm     := p_srm
        }
        
@@ -278,7 +279,7 @@ module LibItsSremSsem_Templates {
        template (value) SSEM m_ssemPdu(
                                        in template (value) SignalStatusMessage p_ssm
        ) := {
            header  := m_itsPduHeader( - , - , LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_ssem_),
            header  := m_its_pdu_header(f_getTsStationId(), -, LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_ssem_),
            ssm     := p_ssm
        }
        
@@ -289,85 +290,12 @@ module LibItsSremSsem_Templates {
        template (present) SSEM mw_ssemPdu(
                                           template (present) SignalStatusMessage p_ssm := ?
        ) := {
            header  := mw_itsPduHeaderSsem,
            header  := mw_its_pdu_header(-, -, LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_messageId_ssem_),
            ssm     := p_ssm
        }
        
    } // End of group sremSsemPduTemplates
    
    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 SREM SSEM protocol version)
         * @param   p_messageId         The message Id (Default: SREM SSEM id)
         */
        template (value) ItsPduHeader m_itsPduHeader(
                                                     in template (value) StationId p_stationId := f_getTsStationId(),
                                                     in template (value) ItsPduHeader.protocolVersion p_protocolVersion := LibItsCommon_ASN1_NamedNumbers.ItsPduHeader_protocolVersion_currentVersion_,
                                                     in template (value) ItsPduHeader.messageId p_messageId
        ) := {
            protocolVersion := p_protocolVersion,
            messageId       := p_messageId,
            stationId       := p_stationId
        }
        
        /**
         * @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 SREM SSEM protocol version)
         * @param   p_messageId         The expected message id (Default: SREM SSEM message id)
         */
        template 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 := ?
        ) := {
            protocolVersion := p_protocolVersion,
            messageId       := p_messageId,
            stationId       := p_stationId
        }
        
        /**
         * @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 SREM SSEM protocol version)
         * @param   p_messageId         The expected message id (Default: SREM id)
         */
        template ItsPduHeader mw_itsPduHeaderSrem(
                                                   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_srem_
        ) := {
            protocolVersion := p_protocolVersion,
            messageId := p_messageId,
            stationId := p_stationId
        }
        
        /**
         * @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 SREM SSEM protocol version)
         * @param   p_messageId         The expected message id (Default: SSEM id)
         */
        template (present) ItsPduHeader mw_itsPduHeaderSsem(
                                                            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_ssem_
        ) := {
            protocolVersion := p_protocolVersion,
            messageId       := p_messageId,
            stationId       := p_stationId
        }
        
        /**
         * @desc    Default receive template for the station id
         */
        template (present) StationId mw_anyStationId := ?;
        
    } // End of group headerTemplates

    group sremSsemTemplates {
        
        template (omit) IntersectionReferenceID m_intersectionReferenceID(