Loading ttcn/CAM/LibItsCam_Templates.ttcn +6 −2 Original line number Diff line number Diff line Loading @@ -241,10 +241,12 @@ module LibItsCam_Templates { curvatureCalculationMode := ?, yawRate := ?, accelerationControl := *, lanePosition := *, steeringWheelAngle := *, lateralAcceleration := *, verticalAcceleration := *, performanceClass := * performanceClass := *, cenDsrcTollingZone := * } /** Loading Loading @@ -531,10 +533,12 @@ module LibItsCam_Templates { yawRateConfidence := unavailable }, accelerationControl := omit, lanePosition := omit, steeringWheelAngle := omit, lateralAcceleration := omit, verticalAcceleration := omit, performanceClass := omit performanceClass := omit, cenDsrcTollingZone := omit } }, lowFrequencyContainer := omit, Loading ttcn/Common/LibItsCommon_TypesAndValues.ttcn +12 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,18 @@ module LibItsCommon_TypesAndValues { * @desc Upper Tester result message of change position request of IUT */ 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 { encode "UpperTester" Loading ttcn/DENM/LibItsDenm_Functions.ttcn +31 −8 Original line number Diff line number Diff line Loading @@ -15,8 +15,11 @@ module LibItsDenm_Functions { function f_sleep }; // LibIts // LibItsCommon import from LibItsCommon_TypesAndValues all; import from LibItsCommon_Functions all; // LibIts import from LibItsDenm_TestSystem all; import from LibItsDenm_TypesAndValues all; import from LibItsDenm_Templates all; Loading Loading @@ -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 * @param p_event The event to trigger. Loading @@ -62,10 +88,9 @@ module LibItsDenm_Functions { [] utPort.receive(UtDenmTriggerResult:?) -> value v_result { tc_wait.stop; 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 { log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***"); Loading Loading @@ -276,9 +301,7 @@ module LibItsDenm_Functions { var FncRetCode v_ret := e_success; if (valueof(p_trigger) == e_ets) { f_sendDenMessage( m_denmCancellation(p_actionId) ); f_sendDenMessage( m_denmCancellation ( p_actionId , f_getTsStationId( ) ) ); f_sleep(PX_TNOAC); } else { Loading ttcn/DENM/LibItsDenm_Templates.ttcn +104 −27 Original line number Diff line number Diff line Loading @@ -66,6 +66,12 @@ module LibItsDenm_Templates { 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 * @param p_situation The Situation Container Loading Loading @@ -287,8 +293,7 @@ module LibItsDenm_Templates { * @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 * @param p_semiMajorOrientation The major orientation (Default: HeadingValue_wgs84North) */ template (value) PosConfidenceEllipse m_posConfidenceEllipse( template (value) SemiAxisLength p_semiMajorConfidence := c_semiAxisLengthOneCentimeter, Loading Loading @@ -370,9 +375,10 @@ module LibItsDenm_Templates { * @param p_actionID The action id */ 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, location := omit, alacarte := omit Loading @@ -394,23 +400,31 @@ module LibItsDenm_Templates { */ template (value) ManagementContainer m_denmMgmtCon( template (value) ActionID p_actionID, template (value) boolean p_isNegation := false, template (value) boolean p_isCancellation := false, template (omit) ValidityDuration p_validityDuration := omit, template (omit) TransmissionInterval p_transmissionInterval := omit, 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() ) := { actionID := p_actionID, detectionTime := p_detectionTime, referenceTime := p_referenceTime, isNegation := p_isNegation, isCancellation := p_isCancellation, termination := omit, eventPosition := m_tsPosition, relevanceDistance := lessThan50m, relevanceTrafficDirection := allTrafficDirections, 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 } /** Loading @@ -424,22 +438,22 @@ module LibItsDenm_Templates { */ template (present) ManagementContainer mw_denmMgmtCon( template (present) ActionID p_actionID, template (present) StationType p_stationType := f_getTsStationId(), template (present) TimestampIts p_referenceTime := ?, template (present) boolean p_isNegation := false, template (present) boolean p_isCancellation := false, template ValidityDuration p_validityDuration := *, template TransmissionInterval p_transmissionInterval := * template ValidityDuration p_validityDuration := ?, template TransmissionInterval p_transmissionInterval := *, template Termination p_termination := * ) := { actionID := p_actionID, detectionTime := ?, referenceTime := p_referenceTime, isNegation := p_isNegation, isCancellation := p_isCancellation, termination := p_termination, eventPosition := ?, relevanceDistance := ?, relevanceTrafficDirection := ?, validityDuration := p_validityDuration, transmissionInterval := p_transmissionInterval transmissionInterval := p_transmissionInterval, stationType := p_stationType } /** Loading @@ -460,13 +474,13 @@ module LibItsDenm_Templates { actionID := ?, detectionTime := ?, referenceTime := ?, isNegation := ?, isCancellation := ?, termination := *, eventPosition := ?, relevanceDistance := ?, relevanceTrafficDirection := ?, validityDuration := *, transmissionInterval := * validityDuration := ?, transmissionInterval := *, stationType := ? } /** Loading Loading @@ -496,7 +510,7 @@ module LibItsDenm_Templates { */ template (value) ActionID m_actionId( template (value) SequenceNumber p_sequenceNumber, template (value) StationID p_originatorStationID := f_getIutStationId() template (value) ITS_Container.StationID p_originatorStationID := f_getIutStationId() ) := { originatingStationID := p_originatorStationID, sequenceNumber := p_sequenceNumber Loading @@ -508,7 +522,7 @@ module LibItsDenm_Templates { * @param p_sequenceNumber The expected sequence number (Default: any) */ template (present) ActionID mw_actionId( template (present) StationID p_originatorStationID := ?, template (present) ITS_Container.StationID p_originatorStationID := ?, template (present) SequenceNumber p_sequenceNumber := ? ) := { originatingStationID := p_originatorStationID, Loading Loading @@ -542,7 +556,8 @@ module LibItsDenm_Templates { causeCode := p_cause, subCauseCode := p_subCause }, linkedCause := omit linkedCause := omit, eventHistory := omit } /** Loading @@ -561,7 +576,8 @@ module LibItsDenm_Templates { causeCode := p_cause, subCauseCode := p_subCause }, linkedCause := * linkedCause := *, eventHistory := * } /** Loading Loading @@ -624,9 +640,10 @@ module LibItsDenm_Templates { group alacarteTemplates { /** * @desc Send template for Alacarte Container including lane count * @desc Send template for Alacarte Container including lanePosition */ template (value) AlacarteContainer m_alacarteConLaneCount := { lanePosition := 0, impactReduction := omit, externalTemperature := omit, roadWorks := omit, Loading @@ -634,6 +651,66 @@ module LibItsDenm_Templates { 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 LibItsDenmTemplates No newline at end of file ttcn/DENM/LibItsDenm_TestSystem.ttcn +3 −2 Original line number Diff line number Diff line Loading @@ -29,9 +29,10 @@ module LibItsDenm_TestSystem { */ type port UpperTesterPort message { out UtInitialize, UtDenmTrigger, UtDenmUpdate, UtDenmTermination, UtChangePosition; UtInitialize, UtDenmTrigger, UtDenmUpdate, UtDenmTermination, UtChangePosition, UtChangePseudonym; in UtInitializeResult, UtDenmTriggerResult, UtDenmUpdateResult, UtDenmTerminationResult, UtChangePositionResult, UtDenmEventInd; UtInitializeResult, UtDenmTriggerResult, UtDenmUpdateResult, UtDenmTerminationResult, UtChangePositionResult, UtChangePseudonymResult, UtDenmEventInd; } // end UpperTesterPort } // end portDefinitions Loading Loading
ttcn/CAM/LibItsCam_Templates.ttcn +6 −2 Original line number Diff line number Diff line Loading @@ -241,10 +241,12 @@ module LibItsCam_Templates { curvatureCalculationMode := ?, yawRate := ?, accelerationControl := *, lanePosition := *, steeringWheelAngle := *, lateralAcceleration := *, verticalAcceleration := *, performanceClass := * performanceClass := *, cenDsrcTollingZone := * } /** Loading Loading @@ -531,10 +533,12 @@ module LibItsCam_Templates { yawRateConfidence := unavailable }, accelerationControl := omit, lanePosition := omit, steeringWheelAngle := omit, lateralAcceleration := omit, verticalAcceleration := omit, performanceClass := omit performanceClass := omit, cenDsrcTollingZone := omit } }, lowFrequencyContainer := omit, Loading
ttcn/Common/LibItsCommon_TypesAndValues.ttcn +12 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,18 @@ module LibItsCommon_TypesAndValues { * @desc Upper Tester result message of change position request of IUT */ 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 { encode "UpperTester" Loading
ttcn/DENM/LibItsDenm_Functions.ttcn +31 −8 Original line number Diff line number Diff line Loading @@ -15,8 +15,11 @@ module LibItsDenm_Functions { function f_sleep }; // LibIts // LibItsCommon import from LibItsCommon_TypesAndValues all; import from LibItsCommon_Functions all; // LibIts import from LibItsDenm_TestSystem all; import from LibItsDenm_TypesAndValues all; import from LibItsDenm_Templates all; Loading Loading @@ -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 * @param p_event The event to trigger. Loading @@ -62,10 +88,9 @@ module LibItsDenm_Functions { [] utPort.receive(UtDenmTriggerResult:?) -> value v_result { tc_wait.stop; 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 { log("*** " & testcasename() & ": INFO: Could not receive expected UT message from IUT in time ***"); Loading Loading @@ -276,9 +301,7 @@ module LibItsDenm_Functions { var FncRetCode v_ret := e_success; if (valueof(p_trigger) == e_ets) { f_sendDenMessage( m_denmCancellation(p_actionId) ); f_sendDenMessage( m_denmCancellation ( p_actionId , f_getTsStationId( ) ) ); f_sleep(PX_TNOAC); } else { Loading
ttcn/DENM/LibItsDenm_Templates.ttcn +104 −27 Original line number Diff line number Diff line Loading @@ -66,6 +66,12 @@ module LibItsDenm_Templates { 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 * @param p_situation The Situation Container Loading Loading @@ -287,8 +293,7 @@ module LibItsDenm_Templates { * @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 * @param p_semiMajorOrientation The major orientation (Default: HeadingValue_wgs84North) */ template (value) PosConfidenceEllipse m_posConfidenceEllipse( template (value) SemiAxisLength p_semiMajorConfidence := c_semiAxisLengthOneCentimeter, Loading Loading @@ -370,9 +375,10 @@ module LibItsDenm_Templates { * @param p_actionID The action id */ 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, location := omit, alacarte := omit Loading @@ -394,23 +400,31 @@ module LibItsDenm_Templates { */ template (value) ManagementContainer m_denmMgmtCon( template (value) ActionID p_actionID, template (value) boolean p_isNegation := false, template (value) boolean p_isCancellation := false, template (omit) ValidityDuration p_validityDuration := omit, template (omit) TransmissionInterval p_transmissionInterval := omit, 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() ) := { actionID := p_actionID, detectionTime := p_detectionTime, referenceTime := p_referenceTime, isNegation := p_isNegation, isCancellation := p_isCancellation, termination := omit, eventPosition := m_tsPosition, relevanceDistance := lessThan50m, relevanceTrafficDirection := allTrafficDirections, 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 } /** Loading @@ -424,22 +438,22 @@ module LibItsDenm_Templates { */ template (present) ManagementContainer mw_denmMgmtCon( template (present) ActionID p_actionID, template (present) StationType p_stationType := f_getTsStationId(), template (present) TimestampIts p_referenceTime := ?, template (present) boolean p_isNegation := false, template (present) boolean p_isCancellation := false, template ValidityDuration p_validityDuration := *, template TransmissionInterval p_transmissionInterval := * template ValidityDuration p_validityDuration := ?, template TransmissionInterval p_transmissionInterval := *, template Termination p_termination := * ) := { actionID := p_actionID, detectionTime := ?, referenceTime := p_referenceTime, isNegation := p_isNegation, isCancellation := p_isCancellation, termination := p_termination, eventPosition := ?, relevanceDistance := ?, relevanceTrafficDirection := ?, validityDuration := p_validityDuration, transmissionInterval := p_transmissionInterval transmissionInterval := p_transmissionInterval, stationType := p_stationType } /** Loading @@ -460,13 +474,13 @@ module LibItsDenm_Templates { actionID := ?, detectionTime := ?, referenceTime := ?, isNegation := ?, isCancellation := ?, termination := *, eventPosition := ?, relevanceDistance := ?, relevanceTrafficDirection := ?, validityDuration := *, transmissionInterval := * validityDuration := ?, transmissionInterval := *, stationType := ? } /** Loading Loading @@ -496,7 +510,7 @@ module LibItsDenm_Templates { */ template (value) ActionID m_actionId( template (value) SequenceNumber p_sequenceNumber, template (value) StationID p_originatorStationID := f_getIutStationId() template (value) ITS_Container.StationID p_originatorStationID := f_getIutStationId() ) := { originatingStationID := p_originatorStationID, sequenceNumber := p_sequenceNumber Loading @@ -508,7 +522,7 @@ module LibItsDenm_Templates { * @param p_sequenceNumber The expected sequence number (Default: any) */ template (present) ActionID mw_actionId( template (present) StationID p_originatorStationID := ?, template (present) ITS_Container.StationID p_originatorStationID := ?, template (present) SequenceNumber p_sequenceNumber := ? ) := { originatingStationID := p_originatorStationID, Loading Loading @@ -542,7 +556,8 @@ module LibItsDenm_Templates { causeCode := p_cause, subCauseCode := p_subCause }, linkedCause := omit linkedCause := omit, eventHistory := omit } /** Loading @@ -561,7 +576,8 @@ module LibItsDenm_Templates { causeCode := p_cause, subCauseCode := p_subCause }, linkedCause := * linkedCause := *, eventHistory := * } /** Loading Loading @@ -624,9 +640,10 @@ module LibItsDenm_Templates { group alacarteTemplates { /** * @desc Send template for Alacarte Container including lane count * @desc Send template for Alacarte Container including lanePosition */ template (value) AlacarteContainer m_alacarteConLaneCount := { lanePosition := 0, impactReduction := omit, externalTemperature := omit, roadWorks := omit, Loading @@ -634,6 +651,66 @@ module LibItsDenm_Templates { 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 LibItsDenmTemplates No newline at end of file
ttcn/DENM/LibItsDenm_TestSystem.ttcn +3 −2 Original line number Diff line number Diff line Loading @@ -29,9 +29,10 @@ module LibItsDenm_TestSystem { */ type port UpperTesterPort message { out UtInitialize, UtDenmTrigger, UtDenmUpdate, UtDenmTermination, UtChangePosition; UtInitialize, UtDenmTrigger, UtDenmUpdate, UtDenmTermination, UtChangePosition, UtChangePseudonym; in UtInitializeResult, UtDenmTriggerResult, UtDenmUpdateResult, UtDenmTerminationResult, UtChangePositionResult, UtDenmEventInd; UtInitializeResult, UtDenmTriggerResult, UtDenmUpdateResult, UtDenmTerminationResult, UtChangePositionResult, UtChangePseudonymResult, UtDenmEventInd; } // end UpperTesterPort } // end portDefinitions Loading