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 Trigger event
template (value) UtTrigger m_utTriggerEvent(
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_anyDenmPdu(
in template (present) ItsPduHeader p_itsPduHeader := ?,
in template (present) DecentralizedEnvironmentalNotificationMessage p_denm := ?
) := {
header := p_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 := ?;
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
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 := *,
template LocationContainer p_loc := *
situation := p_sit,
location := p_loc
* @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
group decentralizedManagementTemplates {
/**
* @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 (omit) ValidityDuration p_validityDuration := omit,
template (omit) TransmissionInterval p_transmissionInterval := omit
detectionTime := f_getCurrentTime(),
isNegation := p_isNegation,
eventPosition := m_tsPosition,
relevanceDistance := lessThan50m,
relevanceTrafficDirection := allTrafficDirection,
validityDuration := p_validityDuration,
transmissionInterval := p_transmissionInterval
}
/**
* @desc Reception template for Decentralized Situation Management
* @param p_dataVersion Data version
* @param p_stationId Station ID of the source
*/
template ManagementContainer mw_denmMgmtCon(
template (present) ActionID p_actionID,
template (present) DataVersion p_dataVersion := ?,
template (present) boolean p_isNegation := false,
template ValidityDuration p_validityDuration := *,
template TransmissionInterval p_transmissionInterval := *
) := {
actionID := p_actionID,
dataVersion := p_dataVersion,
detectionTime := ?,
isNegation := p_isNegation,
eventPosition := ?,
relevanceDistance := ?,
relevanceTrafficDirection := allTrafficDirection,
validityDuration := p_validityDuration,
transmissionInterval := p_transmissionInterval
}
/**
* @desc Send template for Test system ActionID
*/
template (value) ActionID m_tsActionId := {
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
/**
* @desc Receive template for Management Container
*/
template ManagementContainer mw_anyDenmMgmtCon := {
actionID := ?,
dataVersion := ?,
detectionTime := ?,
isNegation := ?,
eventPosition := ?,
relevanceDistance := ?,
relevanceTrafficDirection := ?,
validityDuration := ?,
transmissionInterval := *
}
/**
* @desc Receive template for Management Container
*/
template ManagementContainer mw_denmMgmtConWithActionID(
in template (present) ActionID p_actionId := ?
) modifies mw_anyDenmMgmtCon := {
actionID := p_actionId
}
/**
* @desc Receive template for Management Container
*/
template ManagementContainer mw_denmMgmtConWithDataVersion(
in template (present) DataVersion p_dataVersion := ?
) modifies mw_anyDenmMgmtCon := {
dataVersion := p_dataVersion
}
/**
* @desc Receive template for ActionID
*/
template (value) ActionID m_actionId(
in template (value) SequenceNumber p_sequenceNumber,
in template (value) ITS_Container.StationID p_originatorStationID := f_getIutStationId()
) := {
originatorStationID := p_originatorStationID,
sequenceNumber := p_sequenceNumber
}
/**
* @desc Receive template for ActionID
*/
template ActionID mw_actionId(
in template (present) ITS_Container.StationID p_originatorStationID := ?,
in template (present) SequenceNumber p_sequenceNumber := ?
) := {
originatorStationID := p_originatorStationID,
sequenceNumber := p_sequenceNumber
}
} // end group decentralizedManagementTemplates
/**
* @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
/**
* @desc Receive template for situation
* @param p_cause Cause code
* @param p_subCause Sub-cause code
* @param p_informationQuality Information quality
*/
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 := *
}
group decentralizedLocationTemplates {
template (value) LocationContainer m_denmLocation_zeroDelta := {
eventSpeed := omit,
eventPositionHeading := omit,
traces := {
{
{
pathPosition := {
deltaLatitude := 0,
deltaLongitude := 0,
deltaElevation := 0
},
pathDeltaTime := 0
}
/**
* @desc Receive template for location
*/
template (present) LocationContainer mw_anyDenmLocation := {
eventSpeed := *,
eventPositionHeading := *,
traces := ?,
roadClass := *
}
/**
* @desc Receive template for location
*/
template (present) LocationContainer mw_denmLocationWithTrace(
in template (present) Traces p_traces
) := {
eventSpeed := *,
eventPositionHeading := *,
traces := p_traces,
roadClass := *
}
} // end group decentralizedLocationTemplates