Commit 3169835d authored by tepelmann's avatar tepelmann
Browse files

Cleanup of templates.

Added T3doc where necessary.
parent 1ddfa74b
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -11,10 +11,6 @@ module LibItsCommon_TypesAndValues {
    
    group commonConstants {
        
        const ItsPduHeader.protocolVersion c_protocolVersionDenm := 1;
        
        const ItsPduHeader.messageID c_messageId := 1;
        
        const ElevationValue c_seaLevel := 0; 
        const ElevationValue c_oneMeter := 1; 
        
+176 −109
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ module LibItsDenm_Templates {
        
        /**
         * @desc    Send template for DEN Message (DenmPort Primitive)
         * @param   p_denMsg DEN Message to be sent
         * @param   p_denMsg    The DEN Message to be sent
         */
        template (value) DenmReq m_denmReq(
            template (value) DENM p_denMsg
@@ -29,9 +29,9 @@ module LibItsDenm_Templates {
        
        /**
         * @desc    Receive template for DEN Message (DenmPort Primitive)
         * @param   p_denMsg Expected DEN Message
         * @param   p_denMsg    The expected DEN Message
         */
        template DenmInd mw_denmInd(
        template (present) DenmInd mw_denmInd(
            template (present) DENM p_denMsg
        ) := {
            msgIn := p_denMsg,
@@ -41,13 +41,20 @@ module LibItsDenm_Templates {
        group utPrimitives {
            
            /**
             * @desc Initializes the DENM IUT. 
             * @desc    Send template for Upper Tester event initialization
             */
            template (value) UtInitialize m_denmInitialize := {
            }
            
            /**
             * @desc    Send template for Upper Tester Trigger event
             * @param   p_situation                     The Situation Container
             * @param   p_location                      The Location Container
             * @param   p_validityDuration              The validity duration (Default: omit)
             * @param   p_transmissionInterval          The transmission interval (Default: omit)
             * @param   p_repetitionDuration            The repetition duration (Default: omit)
             * @param   p_keepAliveForwardingRequest    The keep alive forwarding request flag (Default: omit)
             * @param   p_alacarte                      The Alacarte container (Default: omit)
             */
            template (value) UtTrigger m_utTriggerEvent(
                template (value) SituationContainer p_situation,
@@ -71,6 +78,19 @@ module LibItsDenm_Templates {
                keepAliveForwardingRequest := p_keepAliveForwardingRequest
            }
            
            /**
             * @desc Send template for Upper Tester event update
             * @param p_actionId                    The action id
             * @param p_situation                   The Situation Container (Default: omit)
             * @param p_location                    The Location Container (Default: omit)
             * @param p_validityDuration            The validity duration (Default: omit)
             * @param p_relevanceDistance           The relevance distance (Default: omit)
             * @param p_relevanceTrafficDirection   The relevance traffic direction (Default: omit)
             * @param p_trafficClass                The traffic class (Default: omit)
             * @param p_transmissionInterval        The transmission interval (Default: omit)
             * @param p_keepAliveForwardingRequest  The keep alive forwarding request flag (Default: omit)
             * @param p_alacarte                    The Alacarte Container (Default: omit)
             */
            template (value) UtUpdate m_utUpdateEvent(
                template (value) ActionID p_actionId,
                template (omit) SituationContainer p_situation := omit,
@@ -98,18 +118,24 @@ module LibItsDenm_Templates {
            
            /**
             * @desc    Send template for Upper Tester event cancellation
             * @param   p_actionId      Action ID of the event to be cancelled
             * @param   p_actionId  The action id
             */
            template (value) UtTermination m_utEventCancellation(
                in template (value) ActionID p_actionId
                template (value) ActionID p_actionId
            ) := {
                actionId := p_actionId
            }
            
            /**
             * @desc Send template for Upper Tester event change position
             * @param p_latitude    The new latitude
             * @param p_longitude   The new longitude
             * @param p_elevation   The new elevation (Default: 0)
             */
            template (value) UtChangePosition m_utChangePosition(
	            in template (value) integer p_latitude,
	            in template (value) integer p_longitude,
	            in template (value) integer p_elevation := 0
                template (value) integer p_latitude,
                template (value) integer p_longitude,
                template (value) integer p_elevation := 0
            ) := {
                latitude := p_latitude,
                longitude := p_longitude,
@@ -124,22 +150,23 @@ module LibItsDenm_Templates {
        
        /**
         * @desc    Send template for DENM PDU
         * @param   p_denm  DEN Message
         * @param   p_denm  The DEN Message
         */
        template (value) DENM m_denmPdu(
            in template (value) DecentralizedEnvironmentalNotificationMessage p_denm
            template (value) DecentralizedEnvironmentalNotificationMessage p_denm
        ) := {
            header := m_itsPduHeader,
            denm := p_denm
        }
        
        /**
         * @desc    Receive template for DENM PDU
         * @param   p_denm  DEN Message 
         * @desc    Default receive template for DENM PDU
         * @param   p_itsPduHeader  The expected ITS PDU header (Default: any)
         * @param   p_denm          The expected DEN Message (Default: any)
         */
        template DENM mw_anyDenmPdu(
            in template (present) ItsPduHeader p_itsPduHeader := ?,
            in template (present) DecentralizedEnvironmentalNotificationMessage p_denm := ?
            template (present) ItsPduHeader p_itsPduHeader := ?,
            template (present) DecentralizedEnvironmentalNotificationMessage p_denm := ?
        ) := {
            header := p_itsPduHeader,
            denm := p_denm
@@ -147,10 +174,13 @@ module LibItsDenm_Templates {
        
        /**
         * @desc    Receive template for DENM PDU
         * @param   p_denm  DEN Message 
         * @param   p_denm              The expected DEN Message 
         * @param   p_stationID         The expected station id (Default: any)
         * @param   p_protocolVersion   The expected protocol version (Default: current DEN protocol version)
         * @param   p_messageID         The expected message id (Default: DEN message id)
         */
        template DENM mw_denmPdu(
            in template (present) DecentralizedEnvironmentalNotificationMessage p_denm,
        template (present) DENM mw_denmPdu(
            template (present) DecentralizedEnvironmentalNotificationMessage p_denm,
            template (present) StationID p_stationID := ?,
            template (present) ItsPduHeader.protocolVersion p_protocolVersion := c_protocolVersionDenm,
            template (present) ItsPduHeader.messageID p_messageID := c_messageId
@@ -165,9 +195,9 @@ module LibItsDenm_Templates {
        
        /**
         * @desc    Default send template for ITS PDU header
         * @param   p_stationID Source station ID
         * @param   p_protocolVersion Protocol version (Default: current DENM protocol version)
         * @param   p_messageID Message Id of DENM (Default: DENM message id)
         * @param   p_stationID         The source station ID (Default: test system station id)
         * @param   p_protocolVersion   The protocol version (Default: current DEN protocol version)
         * @param   p_messageID         The message Id (Default: DEN message id)
         */
        template (value) ItsPduHeader m_itsPduHeader(
            template (value) StationID p_stationID := f_getTsStationId(),
@@ -181,6 +211,9 @@ module LibItsDenm_Templates {
        
        /**
         * @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 DEN protocol version)
         * @param   p_messageID         The expected message id (Default: DEN message id)
         */
        template ItsPduHeader mw_itsPduHeader(
            template (present) StationID p_stationID := ?,
@@ -192,12 +225,22 @@ module LibItsDenm_Templates {
            stationID := p_stationID
        }
        
        /**
         * @desc    Default receive template for the station id
         */
        template (present) StationID mw_anyStationId := ?;
        
    } // end headerTemplates
    
    group positionTemplates {
        
        /**
         * @desc    Send template for the test system position
         * @param   p_longitude The longitude (Default: Test system's longitude)
         * @param   p_latitude  The latitude (Default: Test system's latitude)
         * @see     m_posConfidenceEllipse
         * @see     m_elevation
         */
        template (value) ReferencePosition m_tsPosition(
            template (value) Longitude p_longitude := f_getTsLongitude(),
            template (value) Latitude p_latitude := f_getTsLatitude()
@@ -208,6 +251,13 @@ module LibItsDenm_Templates {
            elevation := m_elevation
        }
        
        /**
         * @desc    Send template for the position confidence
         * @param   p_semiMajorConfidence   The major confidence (Default: 1cm)
         * @param   p_semiMinorConfidence   The minor confidence (Default: 1cm)
         * @param   p_semiMajorOrientation  The major orientation (Default: m_direction)
         * @see     m_direction
         */
        template (value) PosConfidenceEllipse m_posConfidenceEllipse(
            template (value) SemiAxisLength p_semiMajorConfidence := c_semiAxisLengthOneCentimeter,
            template (value) SemiAxisLength p_semiMinorConfidence := c_semiAxisLengthOneCentimeter,
@@ -218,11 +268,19 @@ module LibItsDenm_Templates {
            semiMajorOrientation := p_semiMajorOrientation
        }
        
        /**
         * @desc    Send template for north direction with 0.1 confidence
         */
        template (value) Direction m_direction := {
            directionValue := c_directionValueNorth,
            directionConfidence := c_directConfidenceWithinZeroPointOneDegree
        }
          
        /**
         * @desc    Send template for elevation
         * @param   p_elevationValue        The elevation (Default: Sea level)
         * @param   p_elevationConfidence   The confidence of the elevation (Default: within one meter)
         */
        template (value) Elevation m_elevation(
            template (value) ElevationValue p_elevationValue := c_seaLevel,
            template (value) ElevationConfidence p_elevationConfidence := c_withinOneMeter
@@ -237,26 +295,27 @@ module LibItsDenm_Templates {
        
        /**
         * @desc    Send template for DEN Message
         * @param   p_mgmt  Decentralized Situation Management  
         * @param   p_sit   Decentralized Situation
         * @param   p_loc   Decentralized Situation Location
         * @param   p_management    The Management Container
         * @param   p_situation     The Situation Container
         * @param   p_location      The Location Container
         * @param   p_alacarte      The Alacarte Container (Default: omit)
         */
        template (value) DecentralizedEnvironmentalNotificationMessage m_denm(
            template (value) ManagementContainer p_mgmt,
            template (omit) SituationContainer p_sit,
            template (omit) LocationContainer p_loc,
            template (value) ManagementContainer p_management,
            template (omit) SituationContainer p_situation,
            template (omit) LocationContainer p_location,
            template (omit) AlacarteContainer p_alacarte := omit
        ) := {
            management := p_mgmt, 
            situation := p_sit, 
            location := p_loc,
            management := p_management, 
            situation := p_situation, 
            location := p_location,
            alacarte := p_alacarte
        }
        
        /**
         * @desc    Default receive template for DEN Message
         */
        template DecentralizedEnvironmentalNotificationMessage mw_anyDenm := {
        template (present) DecentralizedEnvironmentalNotificationMessage mw_anyDenm := {
            management := ?, 
            situation := *, 
            location := *,
@@ -265,24 +324,26 @@ module LibItsDenm_Templates {
        
        /**
         * @desc    Receive template for DEN Message
         * @param   p_mgmt  Decentralized Situation Management 
         * @param   p_sit   Decentralized Situation
         * @see     mw_anyDenm    
         */
        template DecentralizedEnvironmentalNotificationMessage mw_denm(
            template (present) ManagementContainer p_mgmt := ?,
            template SituationContainer p_sit := *,
            template LocationContainer p_loc := *,
         * @param   p_management    The expected Management Container (Default: any)
         * @param   p_situation     The expected Situation Container (Default: any or omit)
         * @param   p_location      The expected location Container (Default: any or omit)
         * @param   p_alacarte      The expected Alacarte Container (Default: any or omit)
         */
        template (present) DecentralizedEnvironmentalNotificationMessage mw_denm(
            template (present) ManagementContainer p_management := ?,
            template SituationContainer p_situation := *,
            template LocationContainer p_location := *,
            template AlacarteContainer p_alacarte := *
        ) modifies mw_anyDenm := {
            management := p_mgmt, 
            situation := p_sit, 
            location := p_loc,
            management := p_management, 
            situation := p_situation, 
            location := p_location,
            alacarte := p_alacarte
        }
        
        /**
         * @desc    Send template for DEN Message for event termination.
         * @param   p_actionID  The action id
         */
        template (value) DecentralizedEnvironmentalNotificationMessage m_denmCancellation(
            template (value) ActionID p_actionID
@@ -293,27 +354,18 @@ module LibItsDenm_Templates {
            alacarte := omit
        }
        
        /**
         * @desc    Send template for DEN Message for event termination.
         */
        template (value) DecentralizedEnvironmentalNotificationMessage m_denmNegation(
            template (value) ActionID p_actionID,
            template (value) DataVersion p_dataVersion
            ) := {
            management := m_denmMgmtCon(p_actionID, p_dataVersion, true), 
            situation := omit, 
            location := omit,
            alacarte := omit
        }
        
    } // end group decentralizedEnvironmentalNotificationMessageTemplates
    
    group decentralizedManagementTemplates {
        
        /**
         * @desc    Send template for Decentralized Situation Management
         * @param   p_dataVersion   Data version
         * @param   p_stationId     Station ID of the source
         * @desc    Send template for Management Container
         * @param   p_actionID              The action id
         * @param   p_dataVersion           The data version
         * @param   p_isNegation            The negation flag (Default: false)
         * @param   p_validityDuration      The validity duration (Default: omit)
         * @param   p_transmissionInterval  The transmission interval (Default: omit)
         * @param   p_detectionTime         The detection time (Default: current time)
         */
        template (value) ManagementContainer m_denmMgmtCon(
            template (value) ActionID p_actionID,
@@ -335,11 +387,14 @@ module LibItsDenm_Templates {
        }
        
        /**
         * @desc    Reception template for Decentralized Situation Management
         * @param   p_dataVersion   Data version
         * @param   p_stationId     Station ID of the source
         * @desc    Receive template for Management Container
         * @param   p_actionID              The expected action id
         * @param   p_dataVersion           The expected data version (Default: any)
         * @param   p_isNegation            The expected negation flag (Default: false)
         * @param   p_validityDuration      The expected validity duration (Default: any or omit)
         * @param   p_transmissionInterval  The expected transmission interval (Default: any or omit)
         */
        template ManagementContainer mw_denmMgmtCon(
        template (present) ManagementContainer mw_denmMgmtCon(
            template (present) ActionID p_actionID,
            template (present) DataVersion p_dataVersion := ?,
            template (present) boolean p_isNegation := false,
@@ -359,18 +414,19 @@ module LibItsDenm_Templates {
        
        /**
         * @desc    Send template for Test system ActionID
         * @param   p_sequenceNumber    The sequence number (Default: 0)
         */
        template (value) ActionID m_tsActionId(
            in template (value) SequenceNumber p_sequenceNumber := 0
            template (value) SequenceNumber p_sequenceNumber := 0
        ) := {
        	originatorStationID := f_getTsStationId(),
            sequenceNumber := p_sequenceNumber
        }
        
        /**
         * @desc    Receive template for Management Container
         * @desc    Default receive template for Management Container
         */
        template ManagementContainer mw_anyDenmMgmtCon := {
        template (present) ManagementContainer mw_anyDenmMgmtCon := {
            actionID := ?,
            dataVersion := ?,
            detectionTime := ?,
@@ -383,29 +439,33 @@ module LibItsDenm_Templates {
        }
        
        /**
         * @desc    Receive template for Management Container
         * @desc    Receive template for Management Container with the given action id
         * @param   p_actionId  The expected action id (Default: any)
         */
        template ManagementContainer mw_denmMgmtConWithActionID(
            in template (present) ActionID p_actionId := ?
        template (present) ManagementContainer mw_denmMgmtConWithActionID(
            template (present) ActionID p_actionId := ?
        ) modifies mw_anyDenmMgmtCon := {
            actionID := p_actionId
        }
        
        /**
         * @desc    Receive template for Management Container
         * @desc    Receive template for Management Container with the given data version
         * @param   p_dataVersion   The expected data version (Default: any)
         */
        template ManagementContainer mw_denmMgmtConWithDataVersion(
            in template (present) DataVersion p_dataVersion := ?
        template (present) ManagementContainer mw_denmMgmtConWithDataVersion(
            template (present) DataVersion p_dataVersion := ?
        ) modifies mw_anyDenmMgmtCon := {
            dataVersion := p_dataVersion
        }
        
        /**
         * @desc    Receive template for ActionID
         * @desc    Send template for ActionID
         * @param   p_sequenceNumber        The sequence number
         * @param   p_originatorStationID   The originator station id (Default: IUT's station id)
         */
        template (value) ActionID m_actionId(
            in template (value) SequenceNumber p_sequenceNumber,
            in template (value) ITS_Container.StationID p_originatorStationID := f_getIutStationId()
            template (value) SequenceNumber p_sequenceNumber,
            template (value) ITS_Container.StationID p_originatorStationID := f_getIutStationId()
        ) := {
            originatorStationID := p_originatorStationID,
            sequenceNumber := p_sequenceNumber
@@ -413,17 +473,19 @@ module LibItsDenm_Templates {
        
        /**
         * @desc    Receive template for ActionID
         * @param   p_originatorStationID   The expected originator station id (Default: any)
         * @param   p_sequenceNumber        The expected sequence number (Default: any)
         */
        template (present) ActionID mw_actionId(
            in template (present) ITS_Container.StationID p_originatorStationID := ?,
            in template (present) SequenceNumber p_sequenceNumber := ?
            template (present) ITS_Container.StationID p_originatorStationID := ?,
            template (present) SequenceNumber p_sequenceNumber := ?
        ) := {
            originatorStationID := p_originatorStationID,
            sequenceNumber := p_sequenceNumber
        }
        
        /**
         * @desc    Receive template for any ActionID
         * @desc    Default receive template for any ActionID
         */
        template (present) ActionID mw_anyActionId := ?;
        
@@ -434,9 +496,10 @@ module LibItsDenm_Templates {
        group situationTemplates {
            
            /**
             * @desc    Send template for situation
             * @param   p_cause     Cause code
             * @param   p_subCause  Sub-cause code
             * @desc    Send template for Situation Container
             * @param   p_cause                 The cause code
             * @param   p_subCause              The sub-cause code
             * @param   p_informationQuality    The information quality (Default: 0)
             */
            template (value) SituationContainer m_situation(
                template (value) CauseCodeType p_cause, 
@@ -452,10 +515,10 @@ module LibItsDenm_Templates {
            }
            
            /**
             * @desc    Receive template for situation
             * @param   p_cause     Cause code
             * @param   p_subCause  Sub-cause code
             * @param   p_informationQuality Information quality
             * @desc    Receive template for Situation Container
             * @param   p_cause                 The expected cause code
             * @param   p_subCause              The expected sub-cause code
             * @param   p_informationQuality    The expected information quality (Default: any)
             */
            template (present) SituationContainer mw_situation(
                template (present) CauseCodeType p_cause, 
@@ -471,9 +534,9 @@ module LibItsDenm_Templates {
            }
            
            /**
             * @desc    Default receive template for any decentralized situation
             * @desc    Default receive template for Situation Container
             */
            template SituationContainer mw_anySitutation := ?;
            template (present) SituationContainer mw_anySitutation := ?;
            
        } // end group situationTemplates
        
@@ -482,7 +545,7 @@ module LibItsDenm_Templates {
    group decentralizedLocationTemplates {
        
        /**
         * @desc    Send template for location
         * @desc    Send template for Location Container where no delta is given
         */
        template (value) LocationContainer m_denmLocation_zeroDelta := {
            eventSpeed := omit,
@@ -503,7 +566,7 @@ module LibItsDenm_Templates {
        }
        
        /**
         * @desc    Receive template for location
         * @desc    Default receive template for Location Container
         */
        template (present) LocationContainer mw_anyDenmLocation := {
            eventSpeed := *,
@@ -513,10 +576,11 @@ module LibItsDenm_Templates {
        }
        
        /**
         * @desc    Receive template for location
         * @desc    Receive template for Location Container with the given traces
         * @param   p_traces    The expected traces.
         */
        template (present) LocationContainer mw_denmLocationWithTrace(
            in template (present) Traces p_traces
            template (present) Traces p_traces
        ) := {
            eventSpeed := *,
            eventPositionHeading := *,
@@ -528,7 +592,10 @@ module LibItsDenm_Templates {
    
    group alacateTemplates {
        
        template AlacarteContainer m_alacarteConLaneCount := {
        /**
         * @desc    Send template for Alacarte Container including lane count
         */
        template (value) AlacarteContainer m_alacarteConLaneCount := {
            laneCount := {
                laneNumber := 2,
                laneNumberConfidence := 100
+4 −0
Original line number Diff line number Diff line
@@ -25,6 +25,10 @@ module LibItsDenm_TypesAndValues {
    
    group denmConstants {
        
        const ItsPduHeader.protocolVersion c_protocolVersionDenm := 1;
        
        const ItsPduHeader.messageID c_messageId := 1;
        
        const DataVersion c_dataVersionFirst := 0;
        const DataVersion c_dataVersionCancellation := 255;