Commit af98e480 authored by tepelmann's avatar tepelmann
Browse files

Added test case for the following groups:

- TC_DEN_MSGF_BV_xx
- TC_DEN_EVGN_BV_xx
parent 1a8d6f40
Loading
Loading
Loading
Loading
+21 −8
Original line number Original line Diff line number Diff line
/**
/**
 *    @author     ETSI / STF405
 *    @author     ETSI / STF449
 *    @version    $URL$
 *    @version    $URL$
 *                $Id$
 *                $Id$
 *    @desc       Module containing common functions for ITS
 *    @desc       Module containing common functions for ITS
@@ -14,6 +14,7 @@ module LibItsCommon_Functions {
    
    
    // LibIts
    // LibIts
    import from LibItsCommon_Pixits all;
    import from LibItsCommon_Pixits all;
    import from ITS_Container language "ASN.1:1997" all;


    
    
    group generalFunctions {
    group generalFunctions {
@@ -88,8 +89,8 @@ module LibItsCommon_Functions {
         * @desc    Gets the current time
         * @desc    Gets the current time
         * @return  Timestamp - current time in Epoch format
         * @return  Timestamp - current time in Epoch format
         */
         */
        function f_getCurrentTime() return integer {
        function f_getCurrentTime() return TimestampIts {
            var integer v_timeStamp := 0;
            var TimestampIts v_timeStamp := 0;
            
            
            log("*** f_getCurrentTime: INFO: calling fx_getCurrentTime() ***");
            log("*** f_getCurrentTime: INFO: calling fx_getCurrentTime() ***");
            v_timeStamp := fx_getCurrentTime();
            v_timeStamp := fx_getCurrentTime();
@@ -101,13 +102,25 @@ module LibItsCommon_Functions {
       
       
    group itsFunctions { 
    group itsFunctions { 


        /** 
         * @desc    Gets the station identifier of implementation under test (IUT)
         * @return  IUT's station ID
         * @see     PX_IUT_STATION_ID
         */
        function f_getIutStationId()
        return StationID {
            
            return PX_IUT_STATION_ID;
                
        } // end f_getIutStationId
        
        /** 
        /** 
         * @desc    Gets the station identifier of test system
         * @desc    Gets the station identifier of test system
         * @return  Test system's station ID
         * @return  Test system's station ID
         * @see     PX_TESTER_STATION_ID
         * @see     PX_TESTER_STATION_ID
         */
         */
        function f_getTsStationId()
        function f_getTsStationId()
        return integer {
        return StationID {
            
            
            return PX_TESTER_STATION_ID;
            return PX_TESTER_STATION_ID;
                
                
@@ -117,7 +130,7 @@ module LibItsCommon_Functions {
         * @desc    Gets the current latitude of test system
         * @desc    Gets the current latitude of test system
         * @return  Test system's latitude
         * @return  Test system's latitude
         */
         */
        function f_getTsLatitude() return integer {
        function f_getTsLatitude() return Latitude {
            
            
            return PX_TS_LATITUDE;
            return PX_TS_LATITUDE;
            
            
@@ -127,7 +140,7 @@ module LibItsCommon_Functions {
         * @desc    Gets the current longitude of test system
         * @desc    Gets the current longitude of test system
         * @return  Test system's latitude
         * @return  Test system's latitude
         */
         */
        function f_getTsLongitude() return integer {
        function f_getTsLongitude() return Longitude {
            
            
            return PX_TS_LONGITUDE;
            return PX_TS_LONGITUDE;
            
            
@@ -141,7 +154,7 @@ module LibItsCommon_Functions {
         * @desc    This external function gets the current time
         * @desc    This external function gets the current time
         * @return  Timestamp - current time in Epoch format
         * @return  Timestamp - current time in Epoch format
         */
         */
        external function fx_getCurrentTime() return integer;
        external function fx_getCurrentTime() return TimestampIts;
        
        
    } // end externalFunctions
    } // end externalFunctions


+7 −1
Original line number Original line Diff line number Diff line
/**
/**
 *  @author   ETSI / STF405
 *  @author   ETSI / STF449
 *  @version  $URL$
 *  @version  $URL$
 *            $Id$
 *            $Id$
 *  @desc     Common PIXITS
 *  @desc     Common PIXITS
@@ -7,6 +7,12 @@
 */
 */
module LibItsCommon_Pixits {
module LibItsCommon_Pixits {
    
    
    /**
     * @desc IUT Station Id
     *       Station Id used in CAM/DENM messages sent by the tester
     */
    modulepar integer PX_IUT_STATION_ID := 1;
    
    /**
    /**
     * @desc Tester Station Id
     * @desc Tester Station Id
     *       Station Id used in CAM/DENM messages sent by the tester
     *       Station Id used in CAM/DENM messages sent by the tester
+120 −11
Original line number Original line Diff line number Diff line
@@ -47,10 +47,9 @@ module LibItsDenm_Templates {
            }
            }
            
            
            /**
            /**
             * @desc    Send template for Upper Tester event
             * @desc    Send template for Upper Tester Trigger event
             * @param   p_situation Situation
             */
             */
            template (value) UtTrigger m_utEvent(
            template (value) UtTrigger m_utTriggerEvent(
                template (value) SituationContainer p_situation,
                template (value) SituationContainer p_situation,
                template (value) LocationContainer p_location,
                template (value) LocationContainer p_location,
                template (omit) TransmissionInterval p_transmissionInterval := omit,
                template (omit) TransmissionInterval p_transmissionInterval := omit,
@@ -97,6 +96,18 @@ module LibItsDenm_Templates {
            denm := p_denm
            denm := p_denm
        }
        }
        
        
        /**
         * @desc    Receive template for DENM PDU
         * @param   p_denm  DEN Message 
         */
        template DENM mw_anyDenmPdu(
            in template (present) ItsPduHeader p_itsPduHeader := ?,
            in template (present) DecentralizedEnvironmentalNotificationMessage p_denm := ?
        ) := {
            header := p_itsPduHeader,
            denm := p_denm
        }
        
        /**
        /**
         * @desc    Receive template for DENM PDU
         * @desc    Receive template for DENM PDU
         * @param   p_denm  DEN Message 
         * @param   p_denm  DEN Message 
@@ -223,10 +234,12 @@ module LibItsDenm_Templates {
         */
         */
        template DecentralizedEnvironmentalNotificationMessage mw_denm(
        template DecentralizedEnvironmentalNotificationMessage mw_denm(
            template (present) ManagementContainer p_mgmt := ?,
            template (present) ManagementContainer p_mgmt := ?,
            template SituationContainer p_sit := *
            template SituationContainer p_sit := *,
            template LocationContainer p_loc := *
            ) modifies mw_anyDenm := {
            ) modifies mw_anyDenm := {
            management := p_mgmt, 
            management := p_mgmt, 
            situation := p_sit
            situation := p_sit, 
            location := p_loc
        }
        }
        
        
        /**
        /**
@@ -261,7 +274,7 @@ module LibItsDenm_Templates {
        
        
    } // end group decentralizedEnvironmentalNotificationMessageTemplates
    } // end group decentralizedEnvironmentalNotificationMessageTemplates
    
    
    group decentralizedSituationManagementTemplates {
    group decentralizedManagementTemplates {
        
        
        /**
        /**
         * @desc    Send template for Decentralized Situation Management
         * @desc    Send template for Decentralized Situation Management
@@ -272,8 +285,8 @@ module LibItsDenm_Templates {
            template (value) ActionID p_actionID,
            template (value) ActionID p_actionID,
            template (value) DataVersion p_dataVersion,
            template (value) DataVersion p_dataVersion,
            template (value) boolean p_isNegation := false,
            template (value) boolean p_isNegation := false,
            template (value) ValidityDuration p_validityDuration := omit,
            template (omit) ValidityDuration p_validityDuration := omit,
            template (value) TransmissionInterval p_transmissionInterval := omit
            template (omit) TransmissionInterval p_transmissionInterval := omit
            ) := {
            ) := {
            actionID := p_actionID,
            actionID := p_actionID,
            dataVersion := p_dataVersion,
            dataVersion := p_dataVersion,
@@ -294,7 +307,62 @@ module LibItsDenm_Templates {
            sequenceNumber := 0
            sequenceNumber := 0
        }
        }
        
        
    } // end group decentralizedSituationManagementTemplates
        /**
         * @desc    Receive template for Management Container
         */
        template ManagementContainer mw_anyDenmMgmtCon := {
            actionID := ?,
            dataVersion := ?,
            detectionTime := ?,
            isNegation := ?,
            eventPosition := ?,
            relevanceDistance := ?,
            relevanceTrafficDirection := ?,
            validityDuration := ?,
            transmissionInterval := *
        }
        
        /**
         * @desc    Receive template for Management Container
         */
        template ManagementContainer mw_denmMgmtConWithActionID(
            in template (present) ActionID p_actionId := ?
        ) modifies mw_anyDenmMgmtCon := {
            actionID := p_actionId
        }
        
        /**
         * @desc    Receive template for Management Container
         */
        template ManagementContainer mw_denmMgmtConWithDataVersion(
            in template (present) DataVersion p_dataVersion := ?
        ) modifies mw_anyDenmMgmtCon := {
            dataVersion := p_dataVersion
        }
        
        /**
         * @desc    Receive template for ActionID
         */
        template (value) ActionID m_actionId(
            in template (value) SequenceNumber p_sequenceNumber,
            in template (value) ITS_Container.StationID p_originatorStationID := f_getIutStationId()
        ) := {
            originatorStationID := p_originatorStationID,
            sequenceNumber := p_sequenceNumber
        }
        
        /**
         * @desc    Receive template for ActionID
         */
        template ActionID mw_actionId(
            in template (present) ITS_Container.StationID p_originatorStationID := ?,
            in template (present) SequenceNumber p_sequenceNumber := ?
        ) := {
            originatorStationID := p_originatorStationID,
            sequenceNumber := p_sequenceNumber
        }
        
    } // end group decentralizedManagementTemplates
    
    
    group decentralizedSituationTemplates {
    group decentralizedSituationTemplates {
        
        
@@ -318,11 +386,30 @@ module LibItsDenm_Templates {
                linkedCause := omit
                linkedCause := omit
            }
            }
            
            
            /**
             * @desc    Receive template for situation
             * @param   p_cause     Cause code
             * @param   p_subCause  Sub-cause code
             * @param   p_informationQuality Information quality
             */
            template (present) SituationContainer mw_situation(
                template (present) CauseCodeType p_cause, 
                template (present) SubCauseCodeType p_subCause,
                template (present) InformationQuality p_informationQuality := ?
                ) := {
                informationQuality := p_informationQuality,
                eventType := {
                    causeCode := p_cause,
                    subCauseCode := p_subCause
                },
                linkedCause := *
            }
            
        } // end group situationTemplates
        } // end group situationTemplates
        
        
    } // end group decentralizedSituationTemplates
    } // end group decentralizedSituationTemplates
    
    
    group decentralizedSituationLocationTemplates {
    group decentralizedLocationTemplates {
        
        
        /**
        /**
         * @desc    Send template for location
         * @desc    Send template for location
@@ -345,6 +432,28 @@ module LibItsDenm_Templates {
            roadClass := omit 
            roadClass := omit 
        }
        }
        
        
    } // end group decentralizedSituationLocationTemplates
        /**
         * @desc    Receive template for location
         */
        template (present) LocationContainer mw_anyDenmLocation := {
            eventSpeed := *,
            eventPositionHeading := *,
            traces := ?,
            roadClass := *
        }
        
        /**
         * @desc    Receive template for location
         */
        template (present) LocationContainer mw_denmLocationWithTrace(
            in template (present) Traces p_traces
        ) := {
            eventSpeed := *,
            eventPositionHeading := *,
            traces := p_traces,
            roadClass := *
        }
        
    } // end group decentralizedLocationTemplates
    
    
} // end LibItsDenmTemplates
} // end LibItsDenmTemplates
 No newline at end of file
+1 −0
Original line number Original line Diff line number Diff line
@@ -25,6 +25,7 @@ module LibItsDenm_TypesAndValues {
    
    
    group denmConstants {
    group denmConstants {
        
        
        const DataVersion c_dataVersionFirst := 0;
        const DataVersion c_dataVersionCancellation := 255;
        const DataVersion c_dataVersionCancellation := 255;
        
        
        const ValidityDuration c_defaultValidity := 600; 
        const ValidityDuration c_defaultValidity := 600;