Skip to main content

Module den_protocol

Expand description

DEN service protocol engine (ETSI TS 103 831 V2.3.1 (2025-11), clause 8).

Pure protocol logic, independent of threads, sockets and codecs:

  • originating ITS-S operation (clause 8.2): AppDENM_trigger, AppDENM_update, AppDENM_termination, the originating ITS-S message table, timers T_O_Validity, T_RepetitionDuration and T_Repetition;
  • forwarding ITS-S operation (clause 8.3): the optional Keep-Alive Forwarding (KAF), the forwarding ITS-S message table, timers T_F_Validity and T_Forwarding, DENM regeneration;
  • receiving ITS-S operation (clause 8.4): the receiving ITS-S message table and timer T_R_Validity.

Time is always passed in as now (TimestampIts, ms since 2004-01-01T00:00:00Z, TAI). The engine never transmits: operations return the DENMs to hand to the networking & transport layer as OutgoingDenm. DenProtocol::tick fires expired timers and DenProtocol::next_deadline tells a scheduler when to call it next.

Mirrors flexstack/facilities/decentralized_environmental_notification_service/den_protocol.py.

Structs§

DenActionId
actionId: originating stationId and sequenceNumber (clause 6.1.1.1).
DenProtocol
DEN service protocol engine for one ITS-S.
DenmRequest
Data passed with AppDENM_trigger / AppDENM_update / AppDENM_termination (clause 5.3.1, Tables 2 to 4). See the Python DENMRequest for the meaning of each field.
ForwardingEntry
OriginatingEntry
OutgoingDenm
A DENM to pass to the networking & transport layer (GeoBroadcast).
ReceivingEntry
ReceptionOutcome
Result of the receiving ITS-S operation for one received DENM.

Enums§

DenFailure
Reason of a failure notification to the ITS-S application (clause 8.2.3).
DenmState
State of a DENM entry in an ITS-S message table (clauses 8.2.1.6, 8.4.1.6).
DiscardReason
Why the receiving ITS-S discarded a DENM (clause 8.4.2).

Constants§

DEFAULT_DESTINATION_RADIUS_M
Radius of the default circular destination area around the event position.
DEFAULT_VALIDITY_DURATION_S
Default validityDuration (defaultValidity, Annex A) in seconds.
KAF_MAX_RANDOM_DELAY_MS
Upper bound of the random part of the T_Forwarding timeout (clause 8.3.2.5).

Functions§

default_area
Circle of DEFAULT_DESTINATION_RADIUS_M centred on the event position.
inside_area
True when the point (1/10 micro-degree) lies inside or on the border of the GeoBroadcast area: geometric function F >= 0 of ETSI EN 302 931, with the area rotated by its azimuth angle (degrees from north).
state_of
State conveyed by a DENM: termination absent, isCancellation or isNegation.

Type Aliases§

DenResult
Answer to an application request: the actionId or a failure notification.
DenmValidator
Validation hook: a DENM generation exception when it returns Err.