Making Communication as Simple as Building Blocks.

TRDP Message Data

The TRDP protocol defines the exchange of MD (Message Data) between a Caller and one or more Repliers on a confirmed TRDP service. Since it is only used for real-time message data, the length of the message is limited to 64 kb.


Roles

In the process of Message Data interaction, there are two roles:

  • Caller: The source device of MD messages in the Push communication mode; the destination device of MD messages in the Pull communication mode.

  • Replier: The destination device of MD messages in the Push communication mode; the source device of MD messages in the Pull communication mode.


TRDP provides three MD transmission methods:

  • The request message has no response ('notification')

  • The request message has a response but no confirmation ('request without confirmation')

  • The request message has a response and confirmation ('request with confirmation')


TRDP Message Data

Push communication mode

It supports various modes such as point-to-point, point-to-multipoint, the source device knows the destination device, and the source device doesn't know the destination device.


Pull communication mode

It supports various modes such as point-to-point, point-to-multipoint, the destination device knows the source device, and the destination device doesn't know the source device.


MD message format

The IEC standard defines the MD message format as follows:

TRDP Message Data

Field

Length

Value

Description

SequenceCounter4 bytes

Counting starts from 0


ProtocolVersion2 bytesFixed value

High byte:MainVersion

Low byte:SubVersion

For example: '0102' = Version 1.2

MsgType2 bytes

'4D6E'H ('Mn')

'4D72'H ('Mr') 

'4D70'H ('Mp') 

'4D71'H ('Mq') 

'4D63'H ('Mc') 

'4D65'H ('Me')

'Mn' = Notification (Request without reply) 

'Mr' = MD Request with reply 

'Mp' = MD Reply without confirmation 

'Mq' = MD Reply with confirmation 

'Mc' = MD Confirm 

'Me' = MD error

comId4 bytesSet by the userIdentifier of user data, supporting Unspecified message (ComId = 0)
etbTopoCnt4 bytes0..232-1

The ETB topography counter:

  • Used as the train's address in IEC 61375-2-5 (parameter 'etbTopoCnt')

  • Set by the user

  • Must be set for all ETB-based communications

  • If a valid opTrnTopoCnt is set, this field must also be set

  • Set to 0 in other cases

opTrnTopoCnt4 bytes

The operational train topography counter:

  • Refer to the description in Section 5.3.3 for usage

  • Set by the user

  • Set this field when information in the operational train directory is required (e.g., routing operations)

  • Set this field when the source device uses the operational train dictionary to resolve the destination IP (e.g., resolving the URI 'vcu.leadVeh.anyCst.anyClTrn.lTrn')

  • Set to 0 in other cases

DatasetLength4 bytes0 ..65388Length of user data, in bytes, excluding padding bytes
ReplyStatus4 bytes

< 0: NOK

0: OK 

> 0: user reply status

Set when the Replier reports the execution result of the request message, or when the caller sends a confirmation message. The Replier carries this field in the reply message.

If it is an MD error message, the values may be as follows:

  • –1 – reserved 

  • –2 – session abort 

  • –3 – no replier instance (at replier side) 

  • –4 – no memory (at replier side) 

  • –5 – no memory (local) 

  • –6 – no reply 

  • –7 – not all replies 

  • –8 – no confirm 

  • –9 – reserved 

  • –10 – sending failed

SessionId16 bytesCalculated

  • Can identify a set of "request-reply" session or "request-reply-confirm" session

  • Can identify a set of "request-error" session

ReplyTimeOut4 bytes

1..232-1

0==Infinite time  

Used in request/reply

Set to 0 in 'Mn', 'Mp', 'Mc' and 'Me'

SourceURI32 bytes

  • For addressing function

  • It is a null-terminated string

  • Padded with 0 at the end

  • The URI only contains the user part, excluding the host part and @

  • It may be an all-0 empty string

DestinationURI32 bytes

  • For addressing function

  • It should be a null-terminated string

  • Padded with 0 at the end

  • The URI only contains the user part, excluding the host part and @

  • It may be an all-0 empty string

HeaderFCS4 bytes

  • Calculated based on the PD-PDU header

  • Exclude the headerFcs itself during calculation

Dataset0..65388

Must be an integer multiple of 4 bytes. Pad with zeros if insufficient.




Related Products

wechat