EN 61375 2-3 Annex A
A.7.8.2 TRDP Layer – Replier (Listener), paragraph 4:
In case of a unicast request message to a not registered listener
or to a listener expecting another value of the topography counters an error message (MsgType = ‘Me’)
shall be sent indicating the error with replyStatus == -3 (no replier instance).
'Me' not send in both cases
checked with NTOnTrack TRDP Conformance Test: 2.5-24 TC1, TC2
As confirmed from Armin, another modification also required is - to send the MD error 'Me' only for "unicast request message" i.e. only for unicast 'Mr' requests and NOT for MD Notification 'Mn'.
Propose to have this modification implemented in the same ticket, as it is also related to 'Me'.
This is still an issue – fix does not work: Topocount mismatches are detected before a listener is searched for, thus telegram is ignored and no ME is sent...
For the first case (TC1): If there is no MD listener at all, there is no MD socket open, thus MD data cannot be received at all! Test case has to have at least one listener...
Added mdSendME call in mdCheck.
The standard (in A.7.8.2) states that:
"In case of a unicast request message to a not registered listener or to a listener expecting
another value of the topography counters an error message (MsgType = ‘Me’) shall be sent
indicating the error with replyStatus == -3 (no replier instance)."
As per the current design, session-level topocounts are being checked in mdCheck() much before the appropriate listener is searched for. Sending 'Me' form mdCheck() assumes that a matching listener for this received 'Mr' exists and eventually will be found later. And as per the standard, 'Me' should only be sent in case if the listener is expecting another value of topocounts (which means that listener should be present in the first place). Also, listener level topocounts are being checked in the trdp_mdHandleRequest(), and if there is a discrepancy 'Me' will be sent in this case.
The line above the mentioned standard is actually a catch all:
"All incoming messages shall be checked against the actual topography counters. Messages not fitting to the actual topography counters (see Table A.21) shall be discarded."
Actually, the latest change will be withdrawn.