Newer
Older
* @desc Module containing base template definitions for DENM
*
*/
//LibIts
import from DENM_PDU_Descriptions language "ASN.1:1997" all;
import from CAM_PDU_Descriptions language "ASN.1:1997" all;
import from LibIts_Interface all;
import from LibItsDenm_TypesAndValues all;
import from LibItsCommon_TypesAndValues 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
*/
/**
* @desc Initializes the DENM IUT.
*/
template (value) UtInitialize m_denmInitialize := {
utDenmInitialize := {
}
}
/**
* @desc Send template for Upper Tester event
* @param p_situation Situation
*/
template (value) UtEvent m_utEvent(in template (value) Situation p_situation) := {
utDenmEvent := {
situation := p_situation,
eventOption := omit
}
/**
* @desc Send template for Upper Tester event cancellation
* @param p_situation Situation
* @param p_dataVersion Data version
*/
template (value) UtEvent m_utEventCancellation(
in template (value) Situation p_situation,
in template (value) DataVersion p_dataVersion
utDenmEvent := {
eventOption := {
eventCancellation := p_dataVersion
}
/**
* @desc Send template for Upper Tester event negation
* @param p_situation Situation
* @param p_isNegation Is it a negation
* @see m_utEvent
*/
template (value) UtEvent m_utEventNegation(
in template (value) Situation p_situation,
in template (value) DecentralizedEnvironmentalNotificationMessage.management.isNegation p_isNegation
utDenmEvent := {
eventOption := {
eventNegation := p_isNegation
}
/**
* @desc Send template for Upper Tester event with Traffic flow effect
* @param p_situation Situation
* @param p_trafficFlowEffect Traffic flow effect
*/
template (value) UtEvent m_utEeventTrafficFlowEffect(
in template (value) Situation p_situation,
in template (value) TrafficFlowEffect p_trafficFlowEffect
utDenmEvent := {
eventOption := {
eventTrafficFlowEffect := p_trafficFlowEffect
}
/**
* @desc Send template for Upper Tester event with linked cause
* @param p_situation Situation
* @param p_linkedCause Linked situation
*/
template (value) UtEvent m_utEventLinkedCause(
in template (value) Situation p_situation,
in template (value) Situation p_linkedCause
utDenmEvent := {
eventOption := {
eventLinkedCause := p_linkedCause
}
/**
* @desc Send template for Upper Tester event with expiration time
* @param p_situation Situation
* @param p_expirationTime Expiration time
*/
template (value) UtEvent m_utEventExpirationTime(
in template (value) Situation p_situation,
in template (value) TimeStamp p_expirationTime
utDenmEvent := {
eventOption := {
eventExpirationTime := p_expirationTime
}
/**
* @desc Send template for Upper Tester event with expiration time and frequency
* @param p_situation Situation
* @param p_expirationTime Expiration time
* @param p_frequency Frequency
*/
template (value) UtEvent m_utEventExpirationTimeFrequency(
in template (value) Situation p_situation,
in template (value) TimeStamp p_expirationTime,
in template (value) DecentralizedSituationManagement.frequency p_frequency
utDenmEvent := {
eventOption := {
eventExpirationTimeFrequency := {
p_expirationTime,
p_frequency
}
/**
* @desc Send template for Upper Tester event with characteristics
* @param p_situation Situation
* @param p_eventCharact Event characteristics
*/
template (value) UtEvent m_utEventCharact(
in template (value) Situation p_situation,
in template (value) DecentralizedSituation.eventCharact p_eventCharact
utDenmEvent := {
eventOption := {
eventCharact := p_eventCharact
}
}
}
} // end utPrimitives
/**
* @desc Default send template for ITS PDU header
* @remark generationTime 0 indicates that the lower layer should add the time while sending
*/
template (value) ItsPduHeader m_itsPduHeader := {
/**
* @desc Default send template for ITS PDU header
*/
template ItsPduHeader mw_itsPduHeader := {
protocolVersion := c_protocolVersionDenm,
messageID := c_messageId,
/**
* @desc Send template for DENM PDU
* @param p_denm DEN Message
*/
template (value) DenmPdu 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 DenmPdu mw_denmPdu(
in template (present) DecentralizedEnvironmentalNotificationMessage p_denm
) := {
header := mw_itsPduHeader,
denm := p_denm
}
} // end denmPduTemplates
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) DecentralizedSituationManagement p_mgmt,
template (value) DecentralizedSituation p_sit,
template (value) DecentralizedSituationLocation p_loc
) := {
management := p_mgmt,
situation := p_sit,
location := p_loc
}
/**
* @desc Default receive template for DEN Message
*/
template DecentralizedEnvironmentalNotificationMessage mw_anyDenm := {
management := ?,
situation := ?,
location := ?
}
/**
* @desc Receive template for DEN Message
* @param p_mgmt
* @param p_sit
* @see mw_anyDenm
*/
template DecentralizedEnvironmentalNotificationMessage mw_denm(
template (present) DecentralizedSituationManagement p_mgmt,
template (present) DecentralizedSituation p_sit
) modifies mw_anyDenm := {
/**
* @desc Send template for DENM with cause
* @param p_dataVersion Data version
* @param p_sit Situation
* @param p_eventPosition Event Position
* @param p_stationId Source station ID
*/
template (value) DecentralizedEnvironmentalNotificationMessage m_denmWithCause(
template (value) Situation p_sit,
template (value) DecentralizedSituationLocation.eventPosition p_eventPosition,
template (value) StationID p_stationId
management := m_denmMgmtCon(p_dataVersion, p_stationId),
situation := m_denmSitCon(p_sit, informative),
location := m_denmSitLoc(
/**
* @desc Send template for DENM with cause and negation
* @param p_dataVersion Data version
* @param p_sit Situation
* @param p_eventPosition Event Position
* @param p_stationId Source station ID
* @param p_isNeg Is it a negation
* @see m_denmWithCause
*/
template (value) DecentralizedEnvironmentalNotificationMessage m_denmWithCauseIsNeg(
template (value) DataVersion p_dataVersion,
template (value) Situation p_sit,
template (value) DecentralizedSituationLocation.eventPosition p_eventPosition,
template (value) StationID p_stationId,
template (value) DecentralizedSituationManagement.isNegation p_isNeg
) modifies m_denmWithCause := {
management := m_denmMgmtCon_IsNeg(p_dataVersion, p_stationId, p_isNeg)
template DecentralizedSituation 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) DecentralizedSituationManagement m_denmMgmtCon(
template (value) DataVersion p_dataVersion,
template (value) StationID p_stationId
sequenceNo := 0
},
dataVersion := p_dataVersion,
expiryTime := omit,
frequency := omit,
reliability := 0,
isNegation := false
}
/**
* @desc Send template for Decentralized Situation Management with negation
* @param p_dataVersion Data version
* @param p_stationId Station ID of the source
* @param p_isNeg Is it a negation
* @see m_denmMgmtCon
*/
template (value) DecentralizedSituationManagement m_denmMgmtCon_IsNeg(
template (value) DataVersion p_dataVersion,
template (value) StationID p_stationId,
template (value) DecentralizedSituationManagement.isNegation p_isNeg
) modifies m_denmMgmtCon := {
isNegation := p_isNeg
}
/**
* @desc Receive template for Decentralized Situation Management
* @param p_dataVersion Data version
*/
template DecentralizedSituationManagement mw_denmMgmtCon (
template (present) DataVersion p_dataVersion
):= {
actionID := {
stationID := ?,
sequenceNo := ?
},
dataVersion := p_dataVersion,
expiryTime := *,
frequency := *,
reliability := ?,
isNegation := ?
}
/**
* @desc Receive template for Decentralized Situation Management with negation
* @param p_dataVersion Data version
* @param p_isNeg Is it a negation
* @see mw_denmMgmtCon
*/
template (present) DataVersion p_dataVersion,
template (present) DecentralizedSituationManagement.isNegation p_isNeg
) modifies mw_denmMgmtCon := {
isNegation := p_isNeg
}
/**
* @desc Receive template for Decentralized Situation Management with expiry time
* @param p_dataVersion Data version
* @param p_expiryTime Expiry time
* @see mw_denmMgmtCon
*/
template DecentralizedSituationManagement mw_denmMgmtConWithExpiryTime(
template (present) DataVersion p_dataVersion,
template (present) DecentralizedSituationManagement.expiryTime p_expiryTime
) modifies mw_denmMgmtCon := {
expiryTime := p_expiryTime
}
/**
* @desc Default receive template for expiry time
*/
template DecentralizedSituationManagement.expiryTime mw_anyExpiryTime := ?;
/**
* @desc Send template for decentralized situation
* @param p_sit Situation
* @param p_sev Severity
*/
template (value) DecentralizedSituation m_denmSitCon(
template (value) Situation p_sit,
template (value) Severity p_sev
) := {
trafficFlowEffect := omit,
situation := p_sit,
linkedCause := omit,
severity := p_sev,
eventCharact := omit,
/**
* @desc Default receive template for decentralized situation
*/
template DecentralizedSituation mw_denmSitCon := {
trafficFlowEffect := *,
situation := ?,
linkedCause := *,
severity := ?,
eventCharact := *,
/**
* @desc Receive template for decentralized situation with specific situation
* @param p_sit Situation
* @see mw_denmSitCon
*/
template DecentralizedSituation mw_denmSitCon_Sit(
template (present) Situation p_sit
) modifies mw_denmSitCon := {
situation := p_sit
}
/**
* @desc Receive template for decentralized situation with specific situation
* and traffic flow effect
* @param p_sit Situation
* @param p_tfe Traffic flow effect
* @see mw_denmSitCon_Sit
*/
template DecentralizedSituation mw_denmSitCon_SitTfe(
template (present) Situation p_sit,
template (present) TrafficFlowEffect p_tfe
) modifies mw_denmSitCon_Sit := {
trafficFlowEffect := p_tfe
}
/**
* @desc Receive template for decentrelized situation with specific situation
* and linked cause
* @param p_sit Situation
* @param p_lc Linked Situation
* @see mw_denmSitCon_Sit
*/
template DecentralizedSituation mw_denmSitCon_SitLc(
template (present) Situation p_sit,
template (present) Situation p_lc
) modifies mw_denmSitCon_Sit := {
linkedCause := p_lc
}
/**
* @desc Receive template for decentrelized situation with specific situation
* and event characteristics
* @param p_sit Situtation
* @param p_ec Event characteristics
* @see mw_denmSitCon_Sit
*/
template DecentralizedSituation mw_denmSitCon_SitEc(
template (present) Situation p_sit,
template (present) DecentralizedSituation.eventCharact p_ec
) modifies mw_denmSitCon_Sit := {
eventCharact := p_ec
}
/**
* @desc Send template for situation
* @param p_cause Cause code
* @param p_subCause Sub-cause code
*/
template (value) Situation m_situation(
template (value) DENM_PDU_Descriptions.CauseCode p_cause,
template (value) SubCauseCode p_subCause
) := {
cause := p_cause,
subCause := p_subCause
}
/**
* @desc Receive template for situation
* @param p_cause Cause code
* @param p_subCause Sub-cause code
*/
template Situation mw_situation(
template (present) DENM_PDU_Descriptions.CauseCode p_cause,
template (present) SubCauseCode p_subCause
) := {
cause := p_cause,
subCause := p_subCause
}
/**
* @desc Default send template for event characteristics
*/
template (value) DecentralizedSituation.eventCharact m_eventCharact := {
relevance := difficultDrivingConditions,
timeCriticality := false
/**
* @desc Send template for situation location
* @param p_eventPosition Event position
* @param p_locationRef Location reference
*/
template (value) DecentralizedSituationLocation m_denmSitLoc(
template (value) DecentralizedSituationLocation.eventPosition p_eventPosition,
template (value) DecentralizedSituationLocation.locationRef p_locationRef
) := {
eventPosition := p_eventPosition,
locationRef := p_locationRef
}
/**
* @desc Receive template for situation location
* @param p_eventPosition Event position
* @param p_locationRef Location reference
*/
template DecentralizedSituationLocation mw_denmSitLoc (
template (present) DecentralizedSituationLocation.eventPosition p_eventPosition,
template (present) DecentralizedSituationLocation.locationRef p_locationRef
) := {
eventPosition := p_eventPosition,
locationRef := p_locationRef
}
/**
* @desc Send template for event position
* @param p_referencePosition Reference position of the event
*/
template (value) DecentralizedSituationLocation.eventPosition m_eventPosition (
template (value) ReferencePosition p_referencePosition
) := {
eventPositionCurrentDefinition := {
refPosition := p_referencePosition,
eventSpeed := omit
}
}
/**
* @desc Default send template for location reference
*/
template (value) DecentralizedSituationLocation.locationRef m_locationRef := {
trace := {
traceID := 0,
waypoints := {}
}
}