The TRDP layer shall provide services for message data communication to the TRDP user.
The service primitives listed in Table A.19 and Table A.20 shall be provided.
NOTE The service primitives are defined in an abstract way in order to not restrict implementation. The specification of the service interface itself is not in the scope of this part of the standard.
Table A.19 – TRDP service primitives – Caller
Service primitive Parameters Direction/Description
MD.request TRDP user → TRDP layer
TRDP user asks to send a request message (notification only or requesting a reply)
MsgType • send notification message (‘Mn’)
• send request message (‘Mr’)
UserIdentifier identifier returned with the MD.indication. Used by user to associate the MD.request with the MD.indication
SessionId session identifier used and returned by the TRDP layer.
TransProtocol UDP or TCP transport layer protocol
NumRepliers number of repliers if the request message is sent to known replier(s), e.g. ‘1’ if sent to one replier. Shall be set to ‘0’ if number of repliers is unknown or if notification message is sent.
etbTopoCnt as defined in Table A.18 opTrnTopoCnt as defined in Table A.18
ComId as defined in Table A.18
Service primitive Parameters Direction/Description DatasetLength as defined in Table A.18
Dataset as defined in Table A.18
SourceURI as defined in Table A.18 DestinationURI as defined in Table A.18
DestinationIpAddress IP destination address, generated out of respective URI’s using DNS
ReplyTimeOut as defined in Table A.18
MaxNumRetries maximum number of retries in case NumRepliers == 1. Value range 0..2.
MD.indicate TRDP layer → TRDP user
TRDP layer informs about an event (received data, timeout or error).
IndType • reception of a reply message (‘Mp’)
• reception of a query message (‘Mq’)
• TRDP layer error (‘Me’)
UserIdentifier identifier which was submitted with MD.request SessionId session identifier used by the TRDP layer.
NoOfRepl Number of received replies
etbTopoCnt etbTopoCnt value obtained from received message.
Set to 0 if unknown (error return)
opTrnTopoCnt opTrnTopoCnt value obtained from received message.
Set to 0 if unknown (error return)
ComId as defined in Table A.18
DatasetLength as defined in Table A.18 User Dataset as defined in Table A.18 SourceURI as defined in Table A.18 DestinationURI as defined in Table A.18 SourceIpAddress IP source address DestinationIpAddress IP destination address ReplyTimeOut as defined in Table A.18 ReplyStatus as defined in Table A.18
MD.confirm TRDP user → TRDP layer
TRDP user asks to send a confirm message
SessionId session identifier as returned by MD.indication. Used by the TRDP layer to associate the MD.confirm with the session ReplyStatus as defined in Table A.18
MD.abort TRDP user → TRDP layer
TRDP user asks to abort an open session e.g because of a TCN inauguration
SessionId session identifier used by the TRDP layer.
Table A.20 – TRDP service primitives – Replier
Service primitive Parameters Direction/Description
MD.addListener TRDP user → TRDP layer
TRDP user asks the TRDP layer to prepare for reception of notification/request messages (e.g. by joining defined MC groups and providing telegram buffer).
Filters can be set for ComId, SourceIpAddress, SourceIpAddress range, DestinationIpAddress, SourceURI and DestinationURI.
Handle Handle for this listener, returned by the TRDP layer ComId Notification/request with that ComId(s) to be accepted etbTopoCnt actual etbTopoCnt value
opTrnTopoCnt actual opTrnTopoCnt value
SourceURI[] as defined in Table A.18, only notification/request from that source URI(s) to be accepted, only user part taken into account, host part only in case of group addressing See also A.7.6.3
DestinationURI as defined in Table A.18, only notification/request with that destination URI to be accepted, only user part taken into account, host part only in case of group addressing See also A.7.6.3
SourceIpAddress IP source address, generated out of respective URI’s using DNS
Defines the lower IP address in case of an IP address range (see 5.4.4.6.2)
SourceIpAddress2 Defines the upper IP address in case of an IP address range (see 5.4.4.6.2)
IP source address, generated out of respective URI’s using DNS
Set to 0 if not used
DestinationIpAddress IP destination address, generated out of respective URI’s using DNS
UserIdentifier Identifier to be returned with MD.indicate
MD.updateListener TRDP user → TRDP layer
TRDP user asks the TRDP layer to update the listener parameters and eventually MC group memberships after a change of the train topology.
Handle Handle for this listener
etbTopoCnt actual etbTopoCnt value opTrnTopoCnt actual opTrnTopoCnt value
SourceIpAddress IP source address, generated out of respective URI’s using DNS
Defines the lower IP address in case of an IP address range (see 5.4.4.6.2)
SourceIpAddress2 Defines the upper IP address in case of an IP address range (see 5.4.4.6.2)
IP source address, generated out of respective URI’s using DNS
Set to 0 if not used
Service primitive Parameters Direction/Description
DestinationIpAddress IP destination address, generated out of respective URI’s using DNS
MD.remListener TRDP user → TRDP layer
TRDP user asks the TRDP layer to remove a listener Handle Handle returned by the TRDP layer in MD.addListener
MD.indicate TRDP layer → TRDP user
TRDP layer informs about an event
IndType • reception of a request message (‘Mr’)
• reception of a notification message (’Mn’)
• TRDP layer error (‘Me’)
UserIdentifier identifier which was submitted with MD.addListener SessionId Session identifier of the session created by the TRDP
layer
etbTopoCnt etbTopoCnt value obtained from received message.
Set to 0 if unknown (error return)
opTrnTopoCnt opTrnTopoCnt value obtained from received message.
Set to 0 if unknown (error return)
ComId opTrnTopoCnt value obtained from received message.
Set to 0 if unknown (error return) DatasetLength as defined in Table A.18
Dataset as defined in Table A.18
SourceURI as defined in Table A.18 DestinationURI as defined in Table A.18 SourceIpAddress IP source address
DestinationIpAddress IP destination address. Can also be an IP multicast address.
ReplyTimeOut as defined in Table A.18 ReplyStatus as defined in Table A.18
MD.reply TRDP user → TRDP layer
TRDP user asks to send a reply message
MsgType • send reply message (‘Mp’)
• send query message (‘Mq’)
SessionId Session identifier as indicated with MD.indication. Used by the TRDP layer to associate the MD.reply with the reply session
ComId as defined in Table A.18
DatasetLength as defined in Table A.18 UserDataset as defined in Table A.18 SourceURI as defined in Table A.18
SourceIpAddress IP source address, generated out of respective URI’s using DNS
ReplyTimeOut as defined in Table A.18 ReplyStatus as defined in Table A.18
MD.release TRDP layer → TRDP user
TRDP layer informs about a received confirm message,
Service primitive Parameters Direction/Description related timeout or error.
MsgType • reception of a confirm message (‘Mc’)
• TRDP layer error (‘Me’)
SessionId Session identifier used by the TRDP layer.
etbTopoCnt etbTopoCnt value obtained from received message.
Set to 0 if unknown (error return)
opTrnTopoCnt opTrnTopoCnt value obtained from received message.
Set to 0 if unknown (error return)
ComId as defined in Table A.18
SourceURI as defined in Table A.18 SourceIpAddress IP source address ReplyStatus as defined in Table A.18
A.7.6.2 Interaction sequence
The sequence chart in Figure A.20 defines the sequence of the service primitives.
Figure A.20 – Interaction sequence chart A.7.6.3 Filtering rules
The service primitive MD.addListener allows to optionally define SourceURI and DestinationURI for filtering received MD telegrams. For the filtering, the following rules shall apply:
a) An empty DestinationURI in a MD telegrams shall be received by a listener regardless of any specified DestinationURI.
IEC
TRDP user
TRDPLayer caller
TRDPLayer TRDP
user replier (listener)
MD.request
MD.addListener request message
MD.indicate MD.reply reply message
MD.indicate MD.confirm
confirm message
MD.release
b) An empty SourceURI in a MD telegrams has no special meaning.
c) An empty DestinationURI filter entry in MD.addListener service primitive means that the listener shall receive MD telegrams regardless of any defined DestinationURI in the MD telegrams.
d) An empty SourceURI filter entry in MD.addListener service primitive means that the listener shall receive MD telegrams regardless of any defined SourceURI in the MD telegrams.
e) Any two listeners shall have a disjunctive set of filter parameters ComId, SourceURI, DestinationURI, SourceIpAddress and DestinationIpAddress. If empty filter parameters are used, any two listeners have to differ in at least one non-empty filter parameter.
f) MD telegrams with empty DestinationURI may be received by several listeners with different DestinationURI filters on one device. TRDP has to handle the duplication of received data for the different listeners.
NOTE A MD telegram sent to an unicast IP destination address with empty DestinationURI is a potential multicast – multiple replies may be received.