Newer
Older
* @desc Module containing base template definitions for DENM
*
*/
// LibIts
import from ITS_Container language "ASN.1:1997" all;
import from DENM_PDU_Descriptions language "ASN.1:1997" all;
// LibItsCommon
import from LibItsCommon_Functions all;
import from LibItsCommon_Pixits all;
// LibItsDenm
import from LibItsDenm_TestSystem all;
import from LibItsDenm_TypesAndValues all;
group asn1Constants {
const integer HeadingValue_wgs84North := 0;
const integer HeadingValue_wgs84East := 900;
const integer HeadingValue_wgs84South := 1800;
const integer HeadingValue_wgs84West := 2700;
const integer HeadingValue_unavailable := 3600;
const integer HeadingConfidence_withinZeroPointOneDegree := 1;
const integer HeadingConfidence_withinOneDegree := 10;
const integer HeadingConfidence_outOfRange := 126;
const integer HeadingConfidence_unavailable := 127;
} // End of group asn1Constants
/**
* @desc Send template for DEN Message (DenmPort Primitive)
*/
template (value) DenmReq m_denmReq(
/**
* @desc Receive template for DEN Message (DenmPort Primitive)
* @desc Send template for Upper Tester event initialization
*/
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
* @param p_location The Location Container
* @param p_validityDuration The validity duration (Default: omit)
* @param p_repetitionDuration The repetition duration (Default: omit)
* @param p_repetitionInterval The repetition interval (Default: omit)
* @param p_transmissionInterval The transmission interval (Default: omit)
* @param p_alacarte The Alacarte container (Default: omit)
template (value) UtDenmTrigger m_utTriggerEvent(
template (value) SituationContainer p_situation,
template (value) LocationContainer p_location,
template (omit) ValidityDuration p_validityDuration := omit,
template (omit) ValidityDuration p_repetitionDuration := omit,
template (omit) TransmissionInterval p_repetitionInterval := omit,
template (omit) TransmissionInterval p_transmissionInterval := omit,
template (omit) AlacarteContainer p_alacarte := omit
) := {
detectionTime := f_getCurrentTime(),
validityDuration := c_duration_2sec,
situation := p_situation,
location := p_location,
relevanceDistance := lessThan50m,
relevanceTrafficDirection := allTrafficDirections,
trafficClass := 0,
transmissionInterval := p_transmissionInterval,
repetitionInterval := p_repetitionInterval,
alacarte := p_alacarte
/**
* @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_repetitionInterval The repetition interval (Default: omit)
* @param p_transmissionInterval The transmission interval (Default: omit)
* @param p_alacarte The Alacarte Container (Default: omit)
template (value) UtDenmUpdate m_utUpdateEvent(
template (value) ActionID p_actionId,
template (omit) SituationContainer p_situation := omit,
template (omit) LocationContainer p_location := omit,
template (omit) ValidityDuration p_validityDuration := omit,
template (omit) RelevanceDistance p_relevanceDistance := omit,
template (omit) RelevanceTrafficDirection p_relevanceTrafficDirection := omit,
template (omit) integer p_trafficClass := omit,
template (omit) ValidityDuration p_repetitionDuration := omit,
template (omit) TransmissionInterval p_repetitionInterval := omit,
template (omit) TransmissionInterval p_transmissionInterval := omit,
template (omit) AlacarteContainer p_alacarte := omit
) := {
actionId := p_actionId,
detectionTime := f_getCurrentTime(),
validityDuration := p_validityDuration,
situation := p_situation,
location := p_location,
relevanceDistance := p_relevanceDistance,
relevanceTrafficDirection := p_relevanceTrafficDirection,
trafficClass := p_trafficClass,
transmissionInterval := p_transmissionInterval,
repetitionInterval := p_repetitionInterval,
alacarte := p_alacarte
/**
* @desc Send template for Upper Tester event cancellation
template (value) UtDenmTermination m_utEventCancellation(
/**
* @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) integer p_latitude,
template (value) integer p_longitude,
template (value) integer p_elevation := 0
) := {
latitude := p_latitude,
longitude := p_longitude,
elevation := p_elevation
}
template (value) DecentralizedEnvironmentalNotificationMessage p_denm
) := {
header := m_itsPduHeader,
denm := p_denm
* @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(
template (present) ItsPduHeader p_itsPduHeader := ?,
template (present) DecentralizedEnvironmentalNotificationMessage p_denm := ?
) := {
header := p_itsPduHeader,
denm := p_denm
}
* @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 (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
) := {
header := mw_itsPduHeader(p_stationID, p_protocolVersion, p_messageID),
denm := p_denm
} // end denmPduTemplates
group headerTemplates {
* @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(),
template (value) ItsPduHeader.protocolVersion p_protocolVersion := c_protocolVersionDenm,
template (value) ItsPduHeader.messageID p_messageID := c_messageId
protocolVersion := p_protocolVersion,
messageID := p_messageID,
stationID := p_stationID
* @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 := ?,
template (present) ItsPduHeader.protocolVersion p_protocolVersion := c_protocolVersionDenm,
template (present) ItsPduHeader.messageID p_messageID := c_messageId
protocolVersion := p_protocolVersion,
messageID := p_messageID,
stationID := p_stationID
}
/**
* @desc Default receive template for the station id
group timeTemplates {
/**
* @desc Receive template for TimestampIts check with delta
* @param p_time The expected timestamp
*/
template TimestampIts mw_timestampIts_withDelta(
in template (value) TimestampIts p_time
) := (valueof(p_time)-PX_TIME_DELTA .. valueof(p_time)+PX_TIME_DELTA);
} // end timeTemplates
/**
* @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
template (value) ReferencePosition m_tsPosition(
template (value) Longitude p_longitude := f_getTsLongitude(),
template (value) Latitude p_latitude := f_getTsLatitude()
) := {
longitude := p_longitude,
latitude := p_latitude,
positionConfidenceEllipse := m_posConfidenceEllipse,
/**
* @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: HeadingValue_wgs84North)
template (value) PosConfidenceEllipse m_posConfidenceEllipse(
template (value) SemiAxisLength p_semiMajorConfidence := c_semiAxisLengthOneCentimeter,
template (value) SemiAxisLength p_semiMinorConfidence := c_semiAxisLengthOneCentimeter,
template (value) HeadingValue p_semiMajorOrientation := HeadingValue_wgs84North
) := {
semiMajorConfidence := p_semiMajorConfidence,
semiMinorConfidence := p_semiMinorConfidence,
semiMajorOrientation := p_semiMajorOrientation
}
/**
* @desc Send template for altitude
* @param p_altitudeValue The altitude (Default: Sea level)
* @param p_altitudeConfidence The confidence of the elevation (Default: within one meter)
template (value) Altitude m_altitude(
template (value) AltitudeValue p_altitudeValue := c_seaLevel,
template (value) AltitudeConfidence p_altitudeConfidence := alt_000_01
altitudeValue := p_altitudeValue,
altitudeConfidence := p_altitudeConfidence
}
} // end positionTemplates
group decentralizedEnvironmentalNotificationMessageTemplates {
/**
* @desc Send template for DEN Message
* @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_management,
template (omit) SituationContainer p_situation,
template (omit) LocationContainer p_location,
template (omit) AlacarteContainer p_alacarte := omit
) := {
management := p_management,
situation := p_situation,
location := p_location,
/**
* @desc Default receive template for DEN Message
template (present) DecentralizedEnvironmentalNotificationMessage mw_anyDenm := {
situation := *,
location := *,
alacarte := *
}
/**
* @desc Receive template for DEN Message
* @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 := *,
) modifies mw_anyDenm := {
management := p_management,
situation := p_situation,
location := p_location,
* @desc Send template for DEN Message for event termination.
template (value) DecentralizedEnvironmentalNotificationMessage m_denmCancellation(
template (value) ActionID p_actionID,
template (value) StationType p_stationType
management := m_denmMgmtCon(p_actionID, p_stationType, -, -),
situation := omit,
location := omit,
alacarte := omit
} // end group decentralizedEnvironmentalNotificationMessageTemplates
group decentralizedManagementTemplates {
* @param p_actionID The action id
* @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)
* @param p_referenceTime The reference time (Default: current time)
template (value) ManagementContainer m_denmMgmtCon(
template (value) ActionID p_actionID,
template (value) StationType p_stationType := f_getTsStationId(),
template (value) ValidityDuration p_validityDuration := c_defaultValidity,
template (omit) TransmissionInterval p_transmissionInterval := omit,
template (value) TimestampIts p_detectionTime := f_getCurrentTime(),
template (value) TimestampIts p_referenceTime := f_getCurrentTime()
referenceTime := p_referenceTime,
termination := omit,
eventPosition := m_tsPosition,
relevanceDistance := lessThan50m,
relevanceTrafficDirection := allTrafficDirections,
transmissionInterval := p_transmissionInterval,
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
/**
* @desc Send template for Management Container
* @param p_actionID The action id
* @param p_isNegation The negation flag (Default: false)
* @param p_isCancellation The cancellation 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)
* @param p_referenceTime The reference time (Default: current time)
*/
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 (omit) TransmissionInterval p_transmissionInterval := omit,
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
}
* @param p_actionID The expected action id
* @param p_referenceTime The reference time (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 (present) ManagementContainer mw_denmMgmtCon(
template (present) StationType p_stationType := f_getTsStationId(),
template (present) TimestampIts p_referenceTime := ?,
template ValidityDuration p_validityDuration := ?,
template TransmissionInterval p_transmissionInterval := *,
template Termination p_termination := *
referenceTime := p_referenceTime,
transmissionInterval := p_transmissionInterval,
stationType := p_stationType
* @param p_sequenceNumber The sequence number (Default: 0)
originatingStationID := f_getTsStationId(),
* @desc Default receive template for Management Container
template (present) ManagementContainer mw_anyDenmMgmtCon := {
actionID := ?,
detectionTime := ?,
eventPosition := ?,
relevanceDistance := ?,
relevanceTrafficDirection := ?,
validityDuration := ?,
transmissionInterval := *,
stationType := ?
* @desc Receive template for Management Container with the given action id
* @param p_actionId The expected action id (Default: any)
template (present) ManagementContainer mw_denmMgmtConWithActionID(
template (present) ActionID p_actionId := ?
) modifies mw_anyDenmMgmtCon := {
actionID := p_actionId
}
/**
* @desc Receive template for Management Container with the given data version
* @param p_referenceTime The expected reference time (Default: any)
template (present) ManagementContainer mw_denmMgmtConWithReferenceTime(
template (present) TimestampIts p_referenceTime := ?
referenceTime := p_referenceTime
* @param p_sequenceNumber The sequence number
* @param p_originatorStationID The originator station id (Default: IUT's station id)
*/
template (value) ActionID m_actionId(
template (value) ITS_Container.StationID p_originatorStationID := f_getIutStationId()
originatingStationID := p_originatorStationID,
sequenceNumber := p_sequenceNumber
}
/**
* @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) ITS_Container.StationID p_originatorStationID := ?,
template (present) SequenceNumber p_sequenceNumber := ?
originatingStationID := p_originatorStationID,
sequenceNumber := p_sequenceNumber
}
*/
template (present) ActionID mw_anyActionId := ?;
} // end group decentralizedManagementTemplates
* @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,
template (value) SubCauseCodeType p_subCause,
template (value) InformationQuality p_informationQuality := 0
informationQuality := p_informationQuality,
eventType := {
causeCode := p_cause,
subCauseCode := p_subCause
},
linkedCause := omit,
eventHistory := omit
* @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,
template (present) SubCauseCodeType p_subCause,
template (present) InformationQuality p_informationQuality := ?
informationQuality := p_informationQuality,
eventType := {
causeCode := p_cause,
subCauseCode := p_subCause
},
linkedCause := *,
eventHistory := *
* @desc Default receive template for Situation Container
*/
template (present) SituationContainer mw_anySitutation := ?;
group decentralizedLocationTemplates {
* @desc Send template for Location Container where no delta is given
template (value) LocationContainer m_denmLocation_zeroDelta := {
eventSpeed := omit,
eventPositionHeading := omit,
traces := {
{
{
pathPosition := {
deltaLatitude := 0,
deltaLongitude := 0,
* @desc Default receive template for Location Container
*/
template (present) LocationContainer mw_anyDenmLocation := {
eventSpeed := *,
eventPositionHeading := *,
traces := ?,
* @desc Receive template for Location Container with the given traces
*/
template (present) LocationContainer mw_denmLocationWithTrace(
) := {
eventSpeed := *,
eventPositionHeading := *,
traces := p_traces,
}
} // end group decentralizedLocationTemplates
group alacarteTemplates {
* @desc Send template for Alacarte Container including lanePosition
*/
template (value) AlacarteContainer m_alacarteConLaneCount := {
impactReduction := omit,
externalTemperature := omit,
roadWorks := omit,
positioningSolution := omit,
stationaryVehicle := omit
}
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
/**
* @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