Skip to content

Java: DENM v1.1.3 refactoring and new DENM v2.2.0#502

Merged
mathieu1fb merged 12 commits intoOrange-OpenSource:masterfrom
mathieu1fb:denm-refactoring
Apr 14, 2026
Merged

Java: DENM v1.1.3 refactoring and new DENM v2.2.0#502
mathieu1fb merged 12 commits intoOrange-OpenSource:masterfrom
mathieu1fb:denm-refactoring

Conversation

@mathieu1fb
Copy link
Copy Markdown
Collaborator

@mathieu1fb mathieu1fb commented Apr 13, 2026

What's new

  • DENM v2.2.0 support has been added
  • DENM v1.1.3 has been refactored completely for compatibility, so that both versions can be handled in parallel

Close #500


What to do

After reviewing code changes:

  1. Clone the its-client project on your IDE.
  2. Ensure that you have Gradle to be able to build the java/iot3 modules (core, mobility and examples).
  3. Find the Iot3MobilityExample class in the examples module, and set appropriate values for the following fields:
private static final String EXAMPLE_UUID = "uuid";
private static final String EXAMPLE_CONTEXT = "context";
// MQTT parameters
private static final String EXAMPLE_MQTT_HOST = "mqtt_host";
private static final int EXAMPLE_MQTT_PORT = 1883;
private static final String EXAMPLE_MQTT_USERNAME = "mqtt_username";
private static final String EXAMPLE_MQTT_PASSWORD = "mqtt_password";
private static final boolean EXAMPLE_MQTT_USE_TLS = true; // set to true
  1. In the same class, remove the telemetry and LwM2M parameters from the IoT3Mobility builder as they won't be used:
.telemetryParams(EXAMPLE_OTL_SCHEME,
                        EXAMPLE_OTL_HOST,
                        EXAMPLE_OTL_PORT,
                        EXAMPLE_OTL_ENDPOINT,
                        EXAMPLE_OTL_USERNAME,
                        EXAMPLE_OTL_PASSWORD)
.lwm2mParams(
                        EXAMPLE_LWM2M_CONFIG,
                        EXAMPLE_LWM2M_DEVICE,
                        lwm2mConnectivityStatistics)
  1. Run Iot3MobilityExample for a few seconds.
  2. Stop it.
  3. Modify the DenmVersion.V1_1_3 parameter in the sendTestDenm(...) method by CpmVersion.V2_2_0.
  4. Run Iot3MobilityExample for a few seconds.
  5. Stop it.

Expected results

  1. During the first run, you should see DENMs v1.1.3 being received and processed (i.e. turned into RoadHazards).
Raw message received: {"type":"denm","origin":"self","version":"1.1.3","source_uuid":"ora_test_123","timestamp":1776086413659,"message":{"protocol_version":2,"station_id":123456,"management_container":{"action_id":{"originating_station_id":123456,"sequence_number":2201},"detection_time":703171213660,"reference_time":703171213660,"event_position":{"latitude":486260590,"longitude":22479040,"altitude":0},"validity_duration":10,"station_type":5},"situation_container":{"information_quality":7,"event_type":{"cause":2,"subcause":0}}}}

Raw DENM v1.1.3: DenmEnvelope113[type=denm, origin=self, version=1.1.3, sourceUuid=ora_test_123, timestamp=1776086413659, path=null, message=DenmMessage113[protocolVersion=2, stationId=123456, managementContainer=ManagementContainer[actionId=ActionId[originatingStationId=123456, sequenceNumber=2201], detectionTime=703171213660, referenceTime=703171213660, termination=null, eventPosition=ReferencePosition[latitude=486260590, longitude=22479040, altitude=0], relevanceDistance=null, relevanceTrafficDirection=null, validityDuration=10, transmissionInterval=null, stationType=5, confidence=null], situationContainer=SituationContainer[informationQuality=7, eventType=EventType[cause=2, subcause=0], linkedCause=null], locationContainer=null, alacarteContainer=null]]

New Road Hazard: 123456_2201
  1. During the second run, you should see the exact same with DENMs v2.2.0.
Raw message received: {"message_type":"denm","source_uuid":"ora_test_123","timestamp":1776086591115,"version":"2.2.0","message":{"protocol_version":2,"station_id":123456,"management_container":{"action_id":{"originating_station_id":123456,"sequence_number":922},"detection_time":703171391115,"reference_time":703171391115,"event_position":{"latitude":486260590,"longitude":22479040,"position_confidence_ellipse":{"semi_major":4095,"semi_minor":4095,"semi_major_orientation":3601},"altitude":{"value":0,"confidence":15}},"validity_duration":10,"station_type":5},"situation_container":{"information_quality":7,"event_type":{"cause":2,"subcause":0}}}}

Raw DENM v2.2.0: DenmEnvelope220[messageType=denm, sourceUuid=ora_test_123, timestamp=1776086591115, version=2.2.0, path=null, message=DenmMessage220[protocolVersion=2, stationId=123456, managementContainer=ManagementContainer[actionId=ActionId[originatingStationId=123456, sequenceNumber=922], detectionTime=703171391115, referenceTime=703171391115, termination=null, eventPosition=ReferencePosition[latitude=486260590, longitude=22479040, positionConfidenceEllipse=PositionConfidenceEllipse[semiMajor=4095, semiMinor=4095, semiMajorOrientation=3601], altitude=Altitude[value=0, confidence=15]], awarenessDistance=null, trafficDirection=null, validityDuration=10, transmissionInterval=null, stationType=5], situationContainer=SituationContainer[informationQuality=7, eventType=CauseCode[cause=2, subcause=0], linkedCause=null, eventZone=null, linkedDenms=null, eventEnd=null], locationContainer=null, alacarteContainer=null]]

New Road Hazard: 123456_922

Note: it is normal if source_uuid, station_id and timestamps differ in your test.

Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
…asses

Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
…eration

Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
…ent classes for v1.1.3 and v2.2.0

Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Use full names including "container" instead of short versions.

Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Handle new DENM implementations to process them into RoadHazard objects.

Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
@mathieu1fb mathieu1fb requested a review from fredOG-2A1 April 13, 2026 09:29
@mathieu1fb mathieu1fb self-assigned this Apr 13, 2026
Copy link
Copy Markdown
Member

@fredOG-2A1 fredOG-2A1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi.
Done with code review.
Just a question, for DENM version 1.1.3 it is the latest and is compatible with versions from 1.0.0 to 1.1.3 if any?
About to perform the requested tests.

@mathieu1fb
Copy link
Copy Markdown
Collaborator Author

Hi. Done with code review. Just a question, for DENM version 1.1.3 it is the latest and is compatible with versions from 1.0.0 to 1.1.3 if any? About to perform the requested tests.

Hi Frédéric ! Great :) DENM v1.1.3 is the latest v1 version, and v2.2.0 is the latest v2 version for the time being. Our oldest tracked DENM version is v1.1.0 which is most likely compatible with v1.1.3.

@fredOG-2A1
Copy link
Copy Markdown
Member

Using 1.1.3 version of the DENM:
INFOS: Success connecting to the server
Raw message received: {"type":"denm","origin":"self","version":"1.1.3","source_uuid":"uuid","timestamp":1776081326301,"message":{"protocol_version":2,"station_id":123456,"management_container":{"action_id":{"originating_station_id":123456,"sequence_number":11441},"detection_time":703166126304,"reference_time":703166126304,"event_position":{"latitude":486260590,"longitude":22479040,"altitude":0},"validity_duration":10,"station_type":5},"situation_container":{"information_quality":7,"event_type":{"cause":2,"subcause":0}}}}

Raw DENM v1.1.3: DenmEnvelope113[type=denm, origin=self, version=1.1.3, sourceUuid=uuid, timestamp=1776081326301, path=null, message=DenmMessage113[protocolVersion=2, stationId=123456, managementContainer=ManagementContainer[actionId=ActionId[originatingStationId=123456, sequenceNumber=11441], detectionTime=703166126304, referenceTime=703166126304, termination=null, eventPosition=ReferencePosition[latitude=486260590, longitude=22479040, altitude=0], relevanceDistance=null, relevanceTrafficDirection=null, validityDuration=10, transmissionInterval=null, stationType=5, confidence=null], situationContainer=SituationContainer[informationQuality=7, eventType=EventType[cause=2, subcause=0], linkedCause=null], locationContainer=null, alacarteContainer=null]]
New Road Hazard: 123456_11441

Using the 2.2.0 version:
INFOS: Success connecting to the server
Raw message received: {"message_type":"denm","source_uuid":"uuid","timestamp":1776081527964,"version":"2.2.0","message":{"protocol_version":2,"station_id":123456,"management_container":{"action_id":{"originating_station_id":123456,"sequence_number":23123},"detection_time":703166327965,"reference_time":703166327966,"event_position":{"latitude":486260590,"longitude":22479040,"position_confidence_ellipse":{"semi_major":4095,"semi_minor":4095,"semi_major_orientation":3601},"altitude":{"value":0,"confidence":15}},"validity_duration":10,"station_type":5},"situation_container":{"information_quality":7,"event_type":{"cause":2,"subcause":0}}}}

Raw DENM v2.2.0: DenmEnvelope220[messageType=denm, sourceUuid=uuid, timestamp=1776081527964, version=2.2.0, path=null, message=DenmMessage220[protocolVersion=2, stationId=123456, managementContainer=ManagementContainer[actionId=ActionId[originatingStationId=123456, sequenceNumber=23123], detectionTime=703166327965, referenceTime=703166327966, termination=null, eventPosition=ReferencePosition[latitude=486260590, longitude=22479040, positionConfidenceEllipse=PositionConfidenceEllipse[semiMajor=4095, semiMinor=4095, semiMajorOrientation=3601], altitude=Altitude[value=0, confidence=15]], awarenessDistance=null, trafficDirection=null, validityDuration=10, transmissionInterval=null, stationType=5], situationContainer=SituationContainer[informationQuality=7, eventType=CauseCode[cause=2, subcause=0], linkedCause=null, eventZone=null, linkedDenms=null, eventEnd=null], locationContainer=null, alacarteContainer=null]]
New Road Hazard: 123456_23123

Seems good to me.

…ls into EtsiConverter + DenmHelper

Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
Signed-off-by: Mathieu LEFEBVRE <mathieu1.lefebvre@orange.com>
@mathieu1fb mathieu1fb marked this pull request as ready for review April 13, 2026 13:40
@mathieu1fb
Copy link
Copy Markdown
Collaborator Author

mathieu1fb commented Apr 13, 2026

Using 1.1.3 version of the DENM: INFOS: Success connecting to the server Raw message received: {"type":"denm","origin":"self","version":"1.1.3","source_uuid":"uuid","timestamp":1776081326301,"message":{"protocol_version":2,"station_id":123456,"management_container":{"action_id":{"originating_station_id":123456,"sequence_number":11441},"detection_time":703166126304,"reference_time":703166126304,"event_position":{"latitude":486260590,"longitude":22479040,"altitude":0},"validity_duration":10,"station_type":5},"situation_container":{"information_quality":7,"event_type":{"cause":2,"subcause":0}}}}

Raw DENM v1.1.3: DenmEnvelope113[type=denm, origin=self, version=1.1.3, sourceUuid=uuid, timestamp=1776081326301, path=null, message=DenmMessage113[protocolVersion=2, stationId=123456, managementContainer=ManagementContainer[actionId=ActionId[originatingStationId=123456, sequenceNumber=11441], detectionTime=703166126304, referenceTime=703166126304, termination=null, eventPosition=ReferencePosition[latitude=486260590, longitude=22479040, altitude=0], relevanceDistance=null, relevanceTrafficDirection=null, validityDuration=10, transmissionInterval=null, stationType=5, confidence=null], situationContainer=SituationContainer[informationQuality=7, eventType=EventType[cause=2, subcause=0], linkedCause=null], locationContainer=null, alacarteContainer=null]] New Road Hazard: 123456_11441

Using the 2.2.0 version: INFOS: Success connecting to the server Raw message received: {"message_type":"denm","source_uuid":"uuid","timestamp":1776081527964,"version":"2.2.0","message":{"protocol_version":2,"station_id":123456,"management_container":{"action_id":{"originating_station_id":123456,"sequence_number":23123},"detection_time":703166327965,"reference_time":703166327966,"event_position":{"latitude":486260590,"longitude":22479040,"position_confidence_ellipse":{"semi_major":4095,"semi_minor":4095,"semi_major_orientation":3601},"altitude":{"value":0,"confidence":15}},"validity_duration":10,"station_type":5},"situation_container":{"information_quality":7,"event_type":{"cause":2,"subcause":0}}}}

Raw DENM v2.2.0: DenmEnvelope220[messageType=denm, sourceUuid=uuid, timestamp=1776081527964, version=2.2.0, path=null, message=DenmMessage220[protocolVersion=2, stationId=123456, managementContainer=ManagementContainer[actionId=ActionId[originatingStationId=123456, sequenceNumber=23123], detectionTime=703166327965, referenceTime=703166327966, termination=null, eventPosition=ReferencePosition[latitude=486260590, longitude=22479040, positionConfidenceEllipse=PositionConfidenceEllipse[semiMajor=4095, semiMinor=4095, semiMajorOrientation=3601], altitude=Altitude[value=0, confidence=15]], awarenessDistance=null, trafficDirection=null, validityDuration=10, transmissionInterval=null, stationType=5], situationContainer=SituationContainer[informationQuality=7, eventType=CauseCode[cause=2, subcause=0], linkedCause=null, eventZone=null, linkedDenms=null, eventEnd=null], locationContainer=null, alacarteContainer=null]] New Road Hazard: 123456_23123

Seems good to me.

Looks fine, thanks for the review! You should now be able to approve the PR ;)

@mathieu1fb mathieu1fb merged commit 6be1c6d into Orange-OpenSource:master Apr 14, 2026
115 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manage several versions of DENM

2 participants