TRDP Module "trdp"
Description
The trdp module receives telegrams of the Train Real-time Data Protocol (TRDP) according to IEC 61375-2-3 via a network interface. It exclusively processes messages of type Process Data (PD) and provides their payload to the fmproducer module via the Fast Message Dispatcher (FMD) for further signal extraction.
Packet capture is performed directly at Layer 2 using PcapPlusPlus, allowing TRDP multicast groups to be monitored on arbitrary network interfaces. The ComID is extracted from the TRDP header and passed as the messageKey to the dispatcher. The fmproducer can subscribe to messages of specific ComIDs and extract individual signals from the payload.
The default UDP port for TRDP Process Data (PD) is 17224 (as defined in IEC 61375-2-3).
Bit offsets in the fmproducer are relative to the beginning of the payload (after the 40-byte TRDP header), not to the beginning of the entire telegram.
The module requires elevated system privileges for network access (cap_net_admin).
Interfaces & Protocols
- Train Real-time Data Protocol (TRDP), IEC 61375-2-3 — Process Data (PD)
- Fast Message Dispatching
JSON Configuration
The following section describes the JSON configuration of the module.
Minimal Example Configuration
{
"module": "TRDP",
"factory": "trdp",
"config": {
"networkInterface": "eth0",
"trafficFilter": [
{ "port": 17224, "groupAddress": "239.255.0.1" }
]
}
}
Example Configuration (with fmproducer, multiple multicast groups)
The trdp module acts as a data source for the fmproducer. The fmd parameter of the fmproducer specifies the name of the TRDP module instance (here: "TRDP"). The messageKey is the ComID from the TRDP header.
{
"plugins": ["trdp", "fmproducer"],
"modules": [
{
"module": "TRDP",
"factory": "trdp",
"config": {
"networkInterface": "eth0",
"trafficFilter": [
{ "port": 17224, "groupAddress": "192.168.0.6" },
{ "port": 17224, "groupAddress": "192.168.0.5" }
]
}
},
{
"module": "fmproducer_trdp",
"factory": "fmproducer",
"config": {
"fmd": "TRDP",
"byteOrder": "BigEndian",
"channels": [
{
"name": "trdp.speed",
"messageKey": 45056,
"bitOffset": 144,
"bitLength": 16,
"imageType": "unsigned",
"scale": 1.0,
"offset": 0.0,
"physicalUnit": "km/h"
},
{
"name": "trdp.speed_scaled",
"messageKey": 45056,
"bitOffset": 144,
"bitLength": 16,
"imageType": "unsigned",
"scale": 0.1,
"offset": 2.2,
"physicalUnit": "km/h"
}
]
}
}
]
}
Global Module Parameters
| Parameter name | Required | Data type | Value range | Default | Description |
|---|---|---|---|---|---|
| networkInterface | No | STRING | "eth0" | Name of the network interface for packet capture | |
| pollingIntervalMs | No | INT | 100 – 2000 | 1000 | Timer interval in milliseconds |
| trafficFilter | No1 | ARRAY | List of port/multicast address pairs (recommended) | ||
| port | No1 | INT | 0 – 65535 | Deprecated — UDP port; use trafficFilter instead | |
| groupAddress | No1 | STRING | Deprecated — IPv4 multicast address; use trafficFilter instead |
trafficFilter Entry Configuration
| Parameter name | Required | Data type | Description |
|---|---|---|---|
| port | YES | INT | UDP destination port of the TRDP multicast stream (default per IEC 61375-2-3: 17224) |
| groupAddress | YES | STRING | IPv4 multicast address of the TRDP stream |
Notes on fmproducer Configuration
TRDP telegrams are always transmitted in Big-Endian format. The associated fmproducer should therefore have "byteOrder": "BigEndian" set globally.
The ComID from the TRDP header serves as the messageKey in the fmproducer. Bit offsets (bitOffset) are relative to the beginning of the payload area (after the 40-byte TRDP header).
Further information on channel extraction (imageType, bitOffset, bitLength, addressSpec, etc.) is described in the fmproducer documentation.
Module Information
| Information | Value |
|---|---|
| Authors | optiMEAS GmbH |
| since smartCORE | 2.11 |
| Module type | Producer (Dispatcher) |
| Dependencies | fmproducer |