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 dispatcher the TRDP module delivers to. Unless set otherwise, this is 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
fmdNoSTRINGName of the module instanceName of the default dispatcher the payload is passed to
dispatchersNoARRAYAdditional dispatchers, selected by the sender's IP address (since smartCORE 2.12, see below)

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.

Dispatchers by Sender Address​

info

Support for dispatchers is officially available only as of smartCORE 2.12.

By default the module passes all received telegrams to a single dispatcher: the default dispatcher, whose name is the module instance name or the value of fmd. If several ECUs use the same ComIDs, their telegrams can no longer be told apart there.

dispatchers configures additional named dispatchers, each assigned to a sender IP address. Every telegram is delivered to exactly one dispatcher, based on the IPv4 sender address of its UDP packet:

  • If the sender address matches a sourceIp entry, the telegram goes to the dispatcher name of that entry.
  • All other telegrams go to the default dispatcher as before.

For each dispatcher, a separate fmproducer module is configured whose fmd parameter contains the dispatcher name. This maps identical ComIDs of different ECUs to separate channels without creating one trdp module instance per ECU.

dispatchers Entry Configuration​

Parameter nameRequiredData typeDefaultDescription
nameYESSTRINGName of the dispatcher; entered in the fmd parameter of the associated fmproducer
sourceIpYESSTRINGIPv4 sender address of the telegrams routed to this dispatcher
note
  • A telegram is always delivered to one dispatcher only. An fmproducer on the default dispatcher no longer receives the telegrams of senders listed in dispatchers.
  • If the same sourceIp is listed more than once, the first matching entry applies.
  • Several entries may use the same name; the telegrams of these senders are then merged in the same dispatcher.
  • Entries without name or with an invalid sourceIp are skipped with a warning in the log.
  • Only IPv4 sender addresses are evaluated.

Example Configuration (two ECUs with identical ComIDs)​

Two ECUs each send the speed under ComID 45056. dispatchers separates their telegrams, and two fmproducer modules map them to channels of their own.

{
"plugins": ["trdp", "fmproducer"],
"modules": [
{
"module": "TRDP",
"factory": "trdp",
"config": {
"networkInterface": "eth0",
"trafficFilter": [
{ "port": 17224, "groupAddress": "239.255.0.1" }
],
"dispatchers": [
{ "name": "TRDP_ECU1", "sourceIp": "192.168.1.23" },
{ "name": "TRDP_ECU2", "sourceIp": "192.168.2.23" }
]
}
},
{
"module": "fmproducer_ecu1",
"factory": "fmproducer",
"config": {
"fmd": "TRDP_ECU1",
"byteOrder": "BigEndian",
"channels": [
{
"name": "trdp.ecu1.speed",
"messageKey": 45056,
"bitOffset": 144,
"bitLength": 16,
"imageType": "unsigned",
"physicalUnit": "km/h"
}
]
}
},
{
"module": "fmproducer_ecu2",
"factory": "fmproducer",
"config": {
"fmd": "TRDP_ECU2",
"byteOrder": "BigEndian",
"channels": [
{
"name": "trdp.ecu2.speed",
"messageKey": 45056,
"bitOffset": 144,
"bitLength": 16,
"imageType": "unsigned",
"physicalUnit": "km/h"
}
]
}
}
]
}

Telegrams from other senders still go to the default dispatcher "TRDP" and can be evaluated by a further fmproducer with "fmd": "TRDP".

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