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.

The module acts exclusively as a TRDP subscriber (sink): it passively reads the cyclic process data and does not send any TRDP telegrams itself. This makes it possible to use the traffic between vehicle control units (e.g. door controllers, HVAC, drive control) for condition monitoring and diagnostics without interfering with vehicle communication.

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.

Data flow from the vehicle network through the trdp module to the smartCORE channels

The default UDP port for TRDP Process Data (PD) is 17224 (as defined in IEC 61375-2-3).

Network Connectivity

The standard approach is to connect smartCORE directly to the vehicle or train network, where the module receives the TRDP telegrams as a regular network participant. If a single connection needs to be observed instead in a physically non-intrusive, galvanically isolated way — without smartCORE appearing as a network participant itself — a smartIO Ethernet-TAP can optionally be placed in front of it. In both cases the trdp module processes the captured telegrams identically.

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.

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", "joinGroup": true },
{ "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 typeDefaultDescription
portYESINTUDP destination port of the TRDP multicast stream (default per IEC 61375-2-3: 17224)
groupAddressYESSTRINGIPv4 multicast address of the TRDP stream
joinGroupNoBOOLfalseActively join the multicast group via IGMP (see below)

By default the module only filters traffic that already arrives on the network interface — it does not send an IGMP join itself. This is sufficient if the switch floods multicast traffic, or if the interface is fed via a mirror port/Ethernet-TAP. If the switch is configured with IGMP snooping, however, it only forwards a multicast group to interfaces that have actively joined it — in that case, set joinGroup: true on the relevant trafficFilter entry so smartCORE registers itself as a receiver via IGMP.

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

ComID decoding: from the TRDP telegram via the ComID as messageKey to named channels in the fmproducer

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