Commit 4cd830a5 authored by garciay's avatar garciay
Browse files

Updated ITS-Container.asn to correct version

Add UtChangePseudonym trigger
parent b39aa3cd
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -241,10 +241,12 @@ module LibItsCam_Templates {
            curvatureCalculationMode := ?,
            curvatureCalculationMode := ?,
            yawRate := ?,
            yawRate := ?,
            accelerationControl := *,
            accelerationControl := *,
            lanePosition := *,
            steeringWheelAngle := *,
            steeringWheelAngle := *,
            lateralAcceleration := *,
            lateralAcceleration := *,
            verticalAcceleration := *,
            verticalAcceleration := *,
            performanceClass := *
            performanceClass := *,
            cenDsrcTollingZone := *
        }
        }
        
        
        /**
        /**
@@ -531,10 +533,12 @@ module LibItsCam_Templates {
                                yawRateConfidence := unavailable
                                yawRateConfidence := unavailable
                            },
                            },
                            accelerationControl := omit,
                            accelerationControl := omit,
                            lanePosition := omit,
                            steeringWheelAngle := omit,
                            steeringWheelAngle := omit,
                            lateralAcceleration := omit,
                            lateralAcceleration := omit,
                            verticalAcceleration := omit, 
                            verticalAcceleration := omit, 
                            performanceClass := omit
                            performanceClass := omit,
                            cenDsrcTollingZone := omit
                        }
                        }
                    },
                    },
                    lowFrequencyContainer := omit,
                    lowFrequencyContainer := omit,
+12 −0
Original line number Original line Diff line number Diff line
@@ -36,6 +36,18 @@ module LibItsCommon_TypesAndValues {
         * @desc Upper Tester result message of change position request of IUT 
         * @desc Upper Tester result message of change position request of IUT 
         */
         */
        type boolean UtChangePositionResult;
        type boolean UtChangePositionResult;
        
        /**
         * @desc Upper Tester message to change the pseudonym of the DENM IUT 
         */
        type record UtChangePseudonym {
            // empty on purpose
        }
        
        /**
         * @desc Upper Tester result message of the change pseudonym request 
         */
        type boolean UtChangePseudonymResult;
    }
    }
    with {
    with {
        encode "UpperTester"
        encode "UpperTester"
+31 −8
Original line number Original line Diff line number Diff line
@@ -15,8 +15,11 @@ module LibItsDenm_Functions {
        function f_sleep
        function f_sleep
    };
    };
    
    
    // LibIts
    // LibItsCommon
    import from LibItsCommon_TypesAndValues all;
    import from LibItsCommon_TypesAndValues all;
    import from LibItsCommon_Functions all;
    
    // LibIts
    import from LibItsDenm_TestSystem all;
    import from LibItsDenm_TestSystem all;
    import from LibItsDenm_TypesAndValues all; 
    import from LibItsDenm_TypesAndValues all; 
    import from LibItsDenm_Templates all; 
    import from LibItsDenm_Templates all; 
@@ -48,6 +51,29 @@ module LibItsDenm_Functions {
            }            
            }            
        }
        }
        
        
        /**
         * @desc    Requests to change the IUT with a new pseudonym
         * @param   p_change The change to trigger.
         */
        function f_utChangePseudonym ( template (value) UtChangePseudonym p_change ) runs on ItsDenm {
            
            utPort.send(p_change);
            tc_wait.start;
            alt {
                [] utPort.receive(UtChangePseudonymResult:true) {
                    tc_wait.stop;
                    log("*** " & testcasename() & ": INFO: IUT pseudonym changed ***");
                }
                [] tc_wait.timeout {
	                log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
	                f_selfOrClientSyncAndVerdict("error", e_timeout);
	            }
	            [else] { // Shortcut defaults
	                repeat; 
	            }
            }            
        }
        
        /**
        /**
         * @desc    Triggers an event from the application layer
         * @desc    Triggers an event from the application layer
         * @param   p_event The event to trigger.
         * @param   p_event The event to trigger.
@@ -62,10 +88,9 @@ module LibItsDenm_Functions {
                [] utPort.receive(UtDenmTriggerResult:?) -> value v_result {
                [] utPort.receive(UtDenmTriggerResult:?) -> value v_result {
                    tc_wait.stop;
                    tc_wait.stop;
                    v_actionId := v_result.actionId;
                    v_actionId := v_result.actionId;
                    if ( not v_result.result ) {
                    	f_selfOrClientSyncAndVerdict("DENM Trigger failed", e_error);
                }
                }
                [] utPort.receive {
                    tc_wait.stop;
                    f_selfOrClientSyncAndVerdict("DENM Trigger failed", e_timeout);
                }
                }
	            [] tc_wait.timeout {
	            [] tc_wait.timeout {
	                log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
	                log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***");
@@ -276,9 +301,7 @@ module LibItsDenm_Functions {
            var FncRetCode v_ret := e_success;
            var FncRetCode v_ret := e_success;
            
            
            if (valueof(p_trigger) == e_ets) {
            if (valueof(p_trigger) == e_ets) {
                f_sendDenMessage(
                f_sendDenMessage( m_denmCancellation ( p_actionId , f_getTsStationId( ) ) );
                     m_denmCancellation(p_actionId)
                );
                f_sleep(PX_TNOAC);
                f_sleep(PX_TNOAC);
            }
            }
            else {
            else {
+104 −27
Original line number Original line Diff line number Diff line
@@ -66,6 +66,12 @@ module LibItsDenm_Templates {
            template (value) UtInitialize m_denmInitialize := {
            template (value) UtInitialize m_denmInitialize := {
            }
            }
            
            
            /**
             * @desc    Send template for Upper Tester event changePseudonym
             */
            template (value) UtChangePseudonym m_utChangePseudonym := {
            }
            
            /**
            /**
             * @desc    Send template for Upper Tester Trigger event
             * @desc    Send template for Upper Tester Trigger event
             * @param   p_situation                     The Situation Container
             * @param   p_situation                     The Situation Container
@@ -287,8 +293,7 @@ module LibItsDenm_Templates {
         * @desc    Send template for the position confidence
         * @desc    Send template for the position confidence
         * @param   p_semiMajorConfidence   The major confidence (Default: 1cm)
         * @param   p_semiMajorConfidence   The major confidence (Default: 1cm)
         * @param   p_semiMinorConfidence   The minor confidence (Default: 1cm)
         * @param   p_semiMinorConfidence   The minor confidence (Default: 1cm)
         * @param   p_semiMajorOrientation  The major orientation (Default: m_direction)
         * @param   p_semiMajorOrientation  The major orientation (Default: HeadingValue_wgs84North)
         * @see     m_direction
         */
         */
        template (value) PosConfidenceEllipse m_posConfidenceEllipse(
        template (value) PosConfidenceEllipse m_posConfidenceEllipse(
            template (value) SemiAxisLength p_semiMajorConfidence := c_semiAxisLengthOneCentimeter,
            template (value) SemiAxisLength p_semiMajorConfidence := c_semiAxisLengthOneCentimeter,
@@ -370,9 +375,10 @@ module LibItsDenm_Templates {
         * @param   p_actionID  The action id
         * @param   p_actionID  The action id
         */
         */
        template (value) DecentralizedEnvironmentalNotificationMessage m_denmCancellation(
        template (value) DecentralizedEnvironmentalNotificationMessage m_denmCancellation(
            template (value) ActionID p_actionID
        	template (value) ActionID p_actionID,
            template (value) StationType p_stationType
        ) := {
        ) := {
            management := m_denmMgmtCon(p_actionID, -, true), 
            management := m_denmMgmtCon(p_actionID, p_stationType, -, -), 
            situation := omit, 
            situation := omit, 
            location := omit,
            location := omit,
            alacarte := omit
            alacarte := omit
@@ -394,23 +400,31 @@ module LibItsDenm_Templates {
         */
         */
        template (value) ManagementContainer m_denmMgmtCon(
        template (value) ManagementContainer m_denmMgmtCon(
            template (value) ActionID p_actionID,
            template (value) ActionID p_actionID,
            template (value) boolean p_isNegation := false,
            template (value) StationType p_stationType := f_getTsStationId(),
            template (value) boolean p_isCancellation := false,
            template (value) ValidityDuration p_validityDuration := c_defaultValidity,
            template (omit) ValidityDuration p_validityDuration := omit,
            template (omit) TransmissionInterval p_transmissionInterval := omit,
            template (value) TimestampIts p_detectionTime := f_getCurrentTime(),
            template (value) TimestampIts p_detectionTime := f_getCurrentTime(),
            template (value) TimestampIts p_referenceTime := f_getCurrentTime()
            template (value) TimestampIts p_referenceTime := f_getCurrentTime()
        ) := {
        ) := {
            actionID := p_actionID,
            actionID := p_actionID,
            detectionTime := p_detectionTime,
            detectionTime := p_detectionTime,
            referenceTime := p_referenceTime,
            referenceTime := p_referenceTime,
            isNegation := p_isNegation,
			termination	:= omit,
            isCancellation := p_isCancellation,
            eventPosition := m_tsPosition,
            eventPosition := m_tsPosition,
            relevanceDistance := lessThan50m,
            relevanceDistance := lessThan50m,
            relevanceTrafficDirection := allTrafficDirections,
            relevanceTrafficDirection := allTrafficDirections,
            validityDuration := p_validityDuration,
            validityDuration := p_validityDuration,
            transmissionInterval := p_transmissionInterval
            transmissionInterval := omit,
			stationType	:= p_stationType
        }
        template (value) ManagementContainer m_denmMgmtConTermination (
        	template (value) ActionID p_actionID,
            template (value) StationType p_stationType := f_getTsStationId(),
            template (value) ValidityDuration p_validityDuration := c_defaultValidity,
            template (value) TimestampIts p_detectionTime := f_getCurrentTime(),
            template (value) TimestampIts p_referenceTime := f_getCurrentTime(),
            template (value) Termination p_termination
        ) modifies m_denmMgmtCon := {
			termination	:= p_termination
        }
        }
        
        
        /**
        /**
@@ -424,22 +438,22 @@ module LibItsDenm_Templates {
         */
         */
        template (present) ManagementContainer mw_denmMgmtCon(
        template (present) ManagementContainer mw_denmMgmtCon(
            template (present) ActionID p_actionID,
            template (present) ActionID p_actionID,
            template (present) StationType p_stationType := f_getTsStationId(),
            template (present) TimestampIts p_referenceTime := ?,
            template (present) TimestampIts p_referenceTime := ?,
            template (present) boolean p_isNegation := false,
            template ValidityDuration p_validityDuration := ?,
            template (present) boolean p_isCancellation := false,
            template TransmissionInterval p_transmissionInterval := *,
            template ValidityDuration p_validityDuration := *,
            template Termination p_termination := *
            template TransmissionInterval p_transmissionInterval := *
        ) := {
        ) := {
            actionID := p_actionID,
            actionID := p_actionID,
            detectionTime := ?,
            detectionTime := ?,
            referenceTime := p_referenceTime,
            referenceTime := p_referenceTime,
            isNegation := p_isNegation,
			termination	:= p_termination,
            isCancellation := p_isCancellation,
            eventPosition := ?,
            eventPosition := ?,
            relevanceDistance := ?,
            relevanceDistance := ?,
            relevanceTrafficDirection := ?,
            relevanceTrafficDirection := ?,
            validityDuration := p_validityDuration,
            validityDuration := p_validityDuration,
            transmissionInterval := p_transmissionInterval
            transmissionInterval := p_transmissionInterval,
			stationType	:= p_stationType
        }
        }
        
        
        /**
        /**
@@ -460,13 +474,13 @@ module LibItsDenm_Templates {
            actionID := ?,
            actionID := ?,
            detectionTime := ?,
            detectionTime := ?,
            referenceTime := ?,
            referenceTime := ?,
            isNegation := ?,
			termination	:= *,
            isCancellation := ?,
            eventPosition := ?,
            eventPosition := ?,
            relevanceDistance := ?,
            relevanceDistance := ?,
            relevanceTrafficDirection := ?,
            relevanceTrafficDirection := ?,
            validityDuration := *,
            validityDuration := ?,
            transmissionInterval := *
            transmissionInterval := *,
			stationType	:= ?
        }
        }
        
        
        /**
        /**
@@ -496,7 +510,7 @@ module LibItsDenm_Templates {
         */
         */
        template (value) ActionID m_actionId(
        template (value) ActionID m_actionId(
            template (value) SequenceNumber p_sequenceNumber,
            template (value) SequenceNumber p_sequenceNumber,
            template (value) StationID p_originatorStationID := f_getIutStationId()
            template (value) ITS_Container.StationID p_originatorStationID := f_getIutStationId()
        ) := {
        ) := {
            originatingStationID := p_originatorStationID,
            originatingStationID := p_originatorStationID,
            sequenceNumber := p_sequenceNumber
            sequenceNumber := p_sequenceNumber
@@ -508,7 +522,7 @@ module LibItsDenm_Templates {
         * @param   p_sequenceNumber        The expected sequence number (Default: any)
         * @param   p_sequenceNumber        The expected sequence number (Default: any)
         */
         */
        template (present) ActionID mw_actionId(
        template (present) ActionID mw_actionId(
            template (present) StationID p_originatorStationID := ?,
            template (present) ITS_Container.StationID p_originatorStationID := ?,
            template (present) SequenceNumber p_sequenceNumber := ?
            template (present) SequenceNumber p_sequenceNumber := ?
        ) := {
        ) := {
            originatingStationID := p_originatorStationID,
            originatingStationID := p_originatorStationID,
@@ -542,7 +556,8 @@ module LibItsDenm_Templates {
                    causeCode := p_cause,
                    causeCode := p_cause,
                    subCauseCode := p_subCause
                    subCauseCode := p_subCause
                },
                },
                linkedCause := omit
                linkedCause := omit,
                eventHistory := omit
            }
            }
            
            
            /**
            /**
@@ -561,7 +576,8 @@ module LibItsDenm_Templates {
                    causeCode := p_cause,
                    causeCode := p_cause,
                    subCauseCode := p_subCause
                    subCauseCode := p_subCause
                },
                },
                linkedCause := *
                linkedCause := *,
                eventHistory := *
            }
            }
            
            
            /**
            /**
@@ -624,9 +640,10 @@ module LibItsDenm_Templates {
    group alacarteTemplates {
    group alacarteTemplates {
        
        
        /**
        /**
         * @desc    Send template for Alacarte Container including lane count
         * @desc    Send template for Alacarte Container including lanePosition
         */
         */
        template (value) AlacarteContainer m_alacarteConLaneCount := {
        template (value) AlacarteContainer m_alacarteConLaneCount := {
            lanePosition := 0,
            impactReduction := omit,
            impactReduction := omit,
            externalTemperature := omit,
            externalTemperature := omit,
            roadWorks := omit,
            roadWorks := omit,
@@ -634,6 +651,66 @@ module LibItsDenm_Templates {
            stationaryVehicle := omit
            stationaryVehicle := omit
        }
        }
         
         
        /**
         * @desc    Send template for Alacarte Container including impactReduction
         */
        template (value) AlacarteContainer m_alacarteConImpactReduction := {
            lanePosition := omit,
            impactReduction := m_impactReduction,
            externalTemperature := omit,
            roadWorks := omit,
            positioningSolution := omit,
            stationaryVehicle := omit
        }
        
        /**
         * @desc    Send template for ImpactReduction Container
         */
        template (value) ImpactReductionContainer m_impactReduction := {
            heightLonCarrLeft			:= 100,
            heightLonCarrRight			:= 100,
            posLonCarrLeft				:= 127,
            posLonCarrRight 			:= 127,
            positionOfPillars 			:= { 30 },
            posCentMass					:= 63,
            wheelBaseVehicle			:= 127,
            turningRadius				:= 255,
            posFrontAx					:= 20,
            positionOfOccupants			:= '00000000000000000000'B,
            vehicleMass					:= 1024,
            requestResponseIndication	:= request
        }
         
        /**
         * @desc    Receive template for Alacarte Container including impactReduction
         */
        template (present) AlacarteContainer mw_alacarteConImpactReduction := {
            lanePosition := *,
            impactReduction := mw_impactReduction,
            externalTemperature := *,
            roadWorks := *,
            positioningSolution := *,
            stationaryVehicle := *
        }
        
        /**
         * @desc    Receive template for ImpactReductio nContainer
         */
        template (present) ImpactReductionContainer mw_impactReduction := {
            heightLonCarrLeft			:= ?,
            heightLonCarrRight			:= ?,
            posLonCarrLeft				:= ?,
            posLonCarrRight 			:= ?,
            positionOfPillars 			:= ?,
            posCentMass					:= ?,
            wheelBaseVehicle			:= ?,
            turningRadius				:= ?,
            posFrontAx					:= ?,
            positionOfOccupants			:= ?,
            vehicleMass					:= ?,
            requestResponseIndication	:= response
        }
        
    } // end alacarteTemplates
    } // end alacarteTemplates
    
    
} // end LibItsDenmTemplates
} // end LibItsDenmTemplates
 No newline at end of file
+3 −2
Original line number Original line Diff line number Diff line
@@ -29,9 +29,10 @@ module LibItsDenm_TestSystem {
         */
         */
        type port UpperTesterPort message {
        type port UpperTesterPort message {
            out 
            out 
                UtInitialize, UtDenmTrigger, UtDenmUpdate, UtDenmTermination, UtChangePosition;
                UtInitialize, UtDenmTrigger, UtDenmUpdate, UtDenmTermination, UtChangePosition, UtChangePseudonym;
            in 
            in 
                UtInitializeResult, UtDenmTriggerResult, UtDenmUpdateResult, UtDenmTerminationResult, UtChangePositionResult, UtDenmEventInd;
                UtInitializeResult, UtDenmTriggerResult, UtDenmUpdateResult, UtDenmTerminationResult,
                UtChangePositionResult, UtChangePseudonymResult, UtDenmEventInd;
        } // end UpperTesterPort
        } // end UpperTesterPort
        
        
    } // end portDefinitions
    } // end portDefinitions