Skip to main content

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).

note

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.

note

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 nameRequiredData typeValue rangeDefaultDescription
networkInterfaceNoSTRING"eth0"Name of the network interface for packet capture
pollingIntervalMsNoINT100 – 20001000Timer interval in milliseconds
trafficFilterNo1ARRAYList of port/multicast address pairs (recommended)
portNo1INT0 – 65535Deprecated — UDP port; use trafficFilter instead
groupAddressNo1STRINGDeprecated — IPv4 multicast address; use trafficFilter instead

trafficFilter Entry Configuration

Parameter nameRequiredData typeDescription
portYESINTUDP destination port of the TRDP multicast stream (default per IEC 61375-2-3: 17224)
groupAddressYESSTRINGIPv4 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

InformationValue
AuthorsoptiMEAS GmbH
since smartCORE2.11
Module typeProducer (Dispatcher)
Dependenciesfmproducer

Footnotes

  1. If trafficFilter, port, and groupAddress are all omitted, the module captures all network traffic on the interface and forwards every packet to the parser. This significantly increases processing overhead and should only be used for diagnostic purposes. For production use, specifying at least one trafficFilter entry is strongly recommended. 2 3