Commit 29998f2b authored by berge's avatar berge
Browse files

Changed 'with encode' statements. Modif

parent 22399a1e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ module LibItsBtp_TypesAndValues {
	        type boolean UtResult;
        }
        with {
            encode "LibItsCommon_TypesAndValues"
            encode "LibItsCommon"
        }
                
        /**
@@ -170,5 +170,5 @@ module LibItsBtp_TypesAndValues {
    
}
with {
    encode "LibItsBtp_TypesAndValues"
    encode "LibItsBtp"
}
+5 −5
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@ module LibItsCam_Functions {
    import from LibItsCam_Templates all;
    import from LibItsCam_TypesAndValues all;
    import from LibItsCommon_Functions all;
    import from LibItsCommon_TypesAndValues all;
    import from ITS_Container language "ASN.1:1997" all;
    import from CAM_PDU_Descriptions language "ASN.1:1997" all;
    import from DENM_PDU_Descriptions language "ASN.1:1997" all;    
@@ -55,10 +56,9 @@ module LibItsCam_Functions {
         * @desc    Triggers event from the application layer
         * @param   p_event The event to trigger.
         */
        function f_utTriggerEvent(template (value) UtEvent p_event) runs on ItsCam {
            var template (value) UtTrigger v_utMsg := { p_event };
        function f_utTriggerEvent(template (value) UtCamTrigger p_event) runs on ItsCam {
           
            utPort.send(v_utMsg);
            utPort.send(p_event);
            alt {
                [] utPort.receive(UtResult:true) {
                    tc_wait.stop;
@@ -79,7 +79,7 @@ module LibItsCam_Functions {
         * @param p_event The event to check.
         * @param   p_discard The event should not appear. Default value: FALSE.
         */
        function f_utCheckEvent(template (value) UtEvent p_event, boolean p_discard := false) runs on ItsCam {
        function f_utCheckEvent(template (value) UtCamTrigger p_event, boolean p_discard := false) runs on ItsCam {
            var template (value) UtCheck v_utMsg := { p_event };
            
            utPort.send(v_utMsg);
+19 −38
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ module LibItsCam_Templates {

    // LibIts
    import from LibItsCommon_Functions all;
    import from LibItsCommon_TypesAndValues all;
    import from LibItsCam_TestSystem all;
    import from LibItsCam_TypesAndValues all;
    import from ITS_Container language "ASN.1:1997" all;
@@ -43,99 +44,79 @@ module LibItsCam_Templates {
             * @desc Initializes the CAM IUT. 
             */
            template (value) UtInitialize m_camInitialize := {
                utCamInitialize := {
                }
            }
            
            /**
             * @desc Change the curvature
             * @param p_offset The curvature value offset
             */
            template (value) UtEvent m_changeCurvature(CurvatureValue p_offset) := {
                utCamEvent := {
            template (value) UtCamTrigger m_changeCurvature(CurvatureValue p_offset) := {
                changeCurvature := p_offset
            }
            }
            
            /**
             * @desc Change the speed
             * @param p_offset The speed value offset
             */
            template (value) UtEvent m_changeSpeed(SpeedValue p_offset) := {
                utCamEvent := {
            template (value) UtCamTrigger m_changeSpeed(SpeedValue p_offset) := {
                changeSpeed := p_offset
            }
            }
            
            /**
             * @desc Set the acceleration control status
             * @param p_status The status to set
             */
            template (value) UtEvent m_setAccelerationControlStatus(AccelerationControl p_status) := {
                utCamEvent := {
            template (value) UtCamTrigger m_setAccelerationControlStatus(AccelerationControl p_status) := {
                setAccelerationControlStatus := p_status
            }
            }
            
            /**
             * @desc Set the exterior lights status
             * @param p_status The status to set
             */
            template (value) UtEvent m_setExteriorLightsStatus(ExteriorLights p_status) := {
                utCamEvent := {
            template (value) UtCamTrigger m_setExteriorLightsStatus(ExteriorLights p_status) := {
                setExteriorLightsStatus := p_status
            }
            }
            
            /**
             * @desc Change the heading
             * @param p_offset The heading value offset
             */
            template (value) UtEvent m_changeHeading(HeadingValue p_offset) := {
                utCamEvent := {
            template (value) UtCamTrigger m_changeHeading(HeadingValue p_offset) := {
                changeHeading := p_offset
            }
            }
            
            /**
             * @desc Set the drive direction
             * @param p_driveDirection The drive direction
             */
            template (value) UtEvent m_setDriveDirection(DriveDirection p_driveDirection) := {
                utCamEvent := {
            template (value) UtCamTrigger m_setDriveDirection(DriveDirection p_driveDirection) := {
                setDriveDirection := p_driveDirection
            }
            }
            
            /**
             * @desc Change the yaw rate
             * @param p_offset The yaw rate value offset
             */
            template (value) UtEvent m_changeYawRate(YawRateValue p_offset) := {
                utCamEvent := {
            template (value) UtCamTrigger m_changeYawRate(YawRateValue p_offset) := {
                changeYawRate := p_offset
            }
            }
            
            /**
             * @desc Change the position in the direction of the current heading
             * @param p_offset Offset to the current position in meter
             */
            template (value) UtEvent m_changePosition(integer p_offset) := {
                utCamEvent := {
            template (value) UtCamTrigger m_changePosition(integer p_offset) := {
                changePosition := p_offset
            }
            }
            
            /**
             * @desc Checks the receive of a message at LDM
             * @param p_message The CAM message to check
             */
            template (value) UtEvent m_checkLdm(CAM p_message) := {
                utCamEvent := {
            template (value) UtCamTrigger m_checkLdm(CAM p_message) := {
                checkLdm := p_message
            }
            }
            
        } // end utPrimitives
        
+3 −2
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ module LibItsCam_TestSystem {

    // LibIts
    import from LibItsCommon_TestSystem all;
    import from LibItsCommon_TypesAndValues all;    
    import from LibItsCam_TypesAndValues all;
    
    import from CAM_PDU_Descriptions language "ASN.1:1997" all;
@@ -25,9 +26,9 @@ module LibItsCam_TestSystem {
         */
        type port UpperTesterPort message {
            out 
                UtInitialize, UtTrigger, UtCheck;
                UtInitialize, UtCamTrigger, UtCheck;
            in 
                UtResult;
                UtInitializeResult, UtResult;
        } // end UpperTesterPort
        
    } // end portDefinitions
+12 −34
Original line number Diff line number Diff line
@@ -31,32 +31,11 @@ module LibItsCam_TypesAndValues {

        group utCommonPrimitives {
                    
            /**
             * @desc Upper Tester message to initialize IUT 
             */
            type union UtInitialize {
                UtCamInitialize utCamInitialize
            }
    
            /**
             * @desc Upper Tester message describing an action/event 
             */
            type union UtEvent {
                UtCamEvent utCamEvent
            }
                    
            /**
             * @desc Upper Tester message to trigger an action on IUT 
             */
            type record UtTrigger {
                UtEvent utEvent
            }
            
            /**
             * @desc Upper Tester message to check event/status on IUT 
             */    
            type record UtCheck {
                UtEvent utEvent
            type record UtCheck { /* FIXME: change this as in DENM */
                UtCamTrigger utEvent
            }
            
            /**
@@ -65,13 +44,7 @@ module LibItsCam_TypesAndValues {
            type boolean UtResult;
        }
        with {
            encode "LibItsCommon_TypesAndValues"
        }
            
        /**
         * @desc Trigger to initialize the IUT.
         */
        type record UtCamInitialize {
            encode "LibItsCommon"
        }
        
        /**
@@ -86,7 +59,7 @@ module LibItsCam_TypesAndValues {
         * @member changePosition Changes the position in the direction of the current heading in meters.
         * @member checkLdm Checks that the received CAM was provided at LDM.
         */
        type union UtCamEvent {
        type union UtCamTrigger {
            CurvatureValue changeCurvature,
            SpeedValue changeSpeed,
            AccelerationControl setAccelerationControlStatus,
@@ -94,12 +67,17 @@ module LibItsCam_TypesAndValues {
            HeadingValue changeHeading,
            DriveDirection setDriveDirection,
            YawRateValue changeYawRate,
            integer changePosition,
            CAM checkLdm
            integer changePosition, /* FIXME: use UtChangePosition */
            CAM checkLdm /* FIXME: obselete, to be removed */
        }

        /**
         * @desc Upper Tester result message of request of triggering of an event at IUT 
         */        
        type boolean UtCamTriggerResult;
        
    } // end utPrimitives
}
with {
    encode "LibItsCam_TypesAndValues"
    encode "LibItsCam"
}
Loading