Newer
Older
* @desc Module containing base template definitions for DENM
*
*/
import from LibItsCommon_Functions all;
import from LibItsDenm_TestSystem all;
import from LibItsDenm_TypesAndValues all;
import from ITS_Container language "ASN.1:1997" all;
/**
* @desc Send template for DEN Message (DenmPort Primitive)
* @param p_denMsg DEN Message to be sent
*/
template (value) DenmReq m_denmReq(
/**
* @desc Receive template for DEN Message (DenmPort Primitive)
* @param p_denMsg Expected DEN Message
/**
* @desc Initializes the DENM IUT.
*/
template (value) UtInitialize m_denmInitialize := {
}
/**
* @desc Send template for Upper Tester event
* @param p_situation Situation
template (value) UtTrigger m_utEvent(
template (value) SituationContainer p_situation,
template (value) LocationContainer p_location,
template (omit) TransmissionInterval p_transmissionInterval := omit,
template (omit) boolean p_keepAliveForwardingRequest := omit,
template (omit) AlacarteContainer p_alacarte := omit
) := {
detectionTime := f_getCurrentTime(),
validityDuration := 10,
repetitionDuration := 10,
situtation := p_situation,
location := p_location,
alacarte := p_alacarte,
relevanceDistance := lessThan50m,
relevanceTrafficDirection := allTrafficDirection,
trafficClass := 0,
transmissionInterval := p_transmissionInterval,
keepAliveForwardingRequest := p_keepAliveForwardingRequest
/**
* @desc Send template for Upper Tester event cancellation
* @param p_actionId Action ID of the event to be cancelled
template (value) UtTermination m_utEventCancellation(
in template (value) ActionID p_actionId
* @desc Send template for DENM PDU
* @param p_denm DEN Message
template (value) DENM m_denmPdu(
in template (value) DecentralizedEnvironmentalNotificationMessage p_denm
) := {
header := m_itsPduHeader,
denm := p_denm
* @desc Receive template for DENM PDU
* @param p_denm DEN Message
template DENM mw_denmPdu(
in 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 {
* @desc Default send template for ITS PDU header
* @param p_stationID Source station ID
* @param p_protocolVersion Protocol version (Default: current DENM protocol version)
* @param p_messageID Message Id of DENM (Default: DENM 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
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
}
template(present) StationID mw_anyStationId := ?;
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
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,
elevation := m_elevation
}
template (value) PosConfidenceEllipse m_posConfidenceEllipse(
template (value) SemiAxisLength p_semiMajorConfidence := c_semiAxisLengthOneCentimeter,
template (value) SemiAxisLength p_semiMinorConfidence := c_semiAxisLengthOneCentimeter,
template (value) Direction p_semiMajorOrientation := m_direction
) := {
semiMajorConfidence := p_semiMajorConfidence,
semiMinorConfidence := p_semiMinorConfidence,
semiMajorOrientation := p_semiMajorOrientation
}
template (value) Direction m_direction := {
directionValue := c_directionValueNorth,
directionConfidence := c_directConfidenceWithinZeroPointOneDegree
}
template (value) Elevation m_elevation(
template (value) ElevationValue p_elevationValue := c_seaLevel,
template (value) ElevationConfidence p_elevationConfidence := c_withinOneMeter
) := {
elevationValue := p_elevationValue,
elevationConfidence := p_elevationConfidence
}
} // end positionTemplates
group decentralizedEnvironmentalNotificationMessageTemplates {
/**
* @desc Send template for DEN Message
* @param p_mgmt Decentralized Situation Management
* @param p_sit Decentralized Situation
* @param p_loc Decentralized Situation Location
*/
template (value) DecentralizedEnvironmentalNotificationMessage m_denm(
template (value) ManagementContainer p_mgmt,
template (omit) SituationContainer p_sit,
template (omit) LocationContainer p_loc,
template (omit) AlacarteContainer p_alacarte := omit
/**
* @desc Default receive template for DEN Message
template DecentralizedEnvironmentalNotificationMessage mw_anyDenm := {
management := ?,
situation := *,
location := *,
alacarte := *
}
/**
* @desc Receive template for DEN Message
* @param p_mgmt Decentralized Situation Management
template (present) ManagementContainer p_mgmt := ?,
template SituationContainer p_sit := *
* @desc Send template for DEN Message for event termination.
template (value) DecentralizedEnvironmentalNotificationMessage m_denmCancellation(
template (value) ActionID p_actionID
management := m_denmMgmtCon(p_actionID, c_dataVersionCancellation),
situation := omit,
location := omit,
alacarte := omit
* @desc Send template for DEN Message for event termination.
template (value) DecentralizedEnvironmentalNotificationMessage m_denmNegation(
template (value) ActionID p_actionID,
template (value) DataVersion p_dataVersion
) := {
management := m_denmMgmtCon(p_actionID, p_dataVersion, true),
situation := omit,
location := omit,
alacarte := omit
* @desc Default receive template for any decentralized situation
template SituationContainer mw_anySitutation := ?;
} // end group decentralizedEnvironmentalNotificationMessageTemplates
/**
* @desc Send template for Decentralized Situation Management
* @param p_dataVersion Data version
* @param p_stationId Station ID of the source
template (value) ManagementContainer m_denmMgmtCon(
template (value) ActionID p_actionID,
template (value) boolean p_isNegation := false,
template (value) ValidityDuration p_validityDuration := omit,
template (value) TransmissionInterval p_transmissionInterval := omit
detectionTime := f_getCurrentTime(),
isNegation := p_isNegation,
eventPosition := m_tsPosition,
relevanceDistance := lessThan50m,
relevanceTrafficDirection := allTrafficDirection,
validityDuration := p_validityDuration,
transmissionInterval := p_transmissionInterval
}
/**
* @desc Send template for Test system ActionID
*/
template (value) ActionID m_tsActionId := {
originatorStationID := f_getTsStationId(),
sequenceNumber := 0
/**
* @desc Send template for situation
* @param p_cause Cause code
* @param p_subCause Sub-cause code
template (value) SituationContainer m_situation(
template (value) CauseCodeType p_cause,
template (value) SubCauseCodeType p_subCause,
template (value) InformationQuality p_informationQuality := 0 //TODO what value here???
informationQuality := p_informationQuality,
eventType := {
causeCode := p_cause,
subCauseCode := p_subCause
},
linkedCause := omit
template (value) LocationContainer m_denmLocation_zeroDelta := {
eventSpeed := omit,
eventPositionHeading := omit,
traces := {
{
{
pathPosition := {
deltaLatitude := 0,
deltaLongitude := 0,
deltaElevation := 0
},
pathDeltaTime := 0
}