According the Filtering rules in IEC61375-2-3 A.7.6.3 a)
An empty DestinationURI in a MD telegrams shall be received by a listener regardless of any specified DestinationURI.
The submited ptDestURI in tlm_addListener() is filtered in any case if it is unlike empty. The stack must therefore skip the DestinationURI filtering if the received MD telegram has an empty DestinationURI string.
1) the interfaces of tlm_add/readdListener() need to be adapted acc. table A.20
/******************/
/ Subscribe to MD messages.
*
*
/
TRDP_ERR_T tlm_addListener (
TRDP_APP_SESSION_T appHandle,
TRDP_LIS_T pListenHandle,
const void *pUserRef,
TRDP_MD_CALLBACK_T pfCbFunction,
BOOL8 comIdListener,
UINT32 comId,
UINT32 etbTopoCnt,
UINT32 opTrnTopoCnt,
TRDP_IP_ADDR_T srctIpAddr,
TRDP_IP_ADDR_T srcIpAddr2,
TRDP_IP_ADDR_T mcDestIpAddr,
TRDP_FLAGS_T pktFlags,
const TRDP_URI_USER_T srcURI,
const TRDP_URI_USER_T destURI)
/******************/
/ Resubscribe to MD messages.
*
*
/
EXT_DECL TRDP_ERR_T tlm_readdListener (
TRDP_APP_SESSION_T appHandle,
TRDP_LIS_T listenHandle,
UINT32 etbTopoCnt,
UINT32 opTrnTopoCnt,
TRDP_IP_ADDR_T srctIpAddr,
TRDP_IP_ADDR_T srcIpAddr2,
TRDP_IP_ADDR_T mcDestIpAddr / multiple destId handled in layer above */)
2) in tlm_addListener() check that at least one filter parameter is not empty if there is more than 1 replier
3) check incoming messages against filter criteria acc. A7.6.3
4) for incoming unicast and multicast forward the incoming message to the first listener with fitting filter criteria (difference to A7.6.3)
Last edit: Armin-Hagen Weiss 2017-11-24
First step is to enhance API of tlm_addListener and tlm_reAddListener...
Proposed interface does not follow the standard! source IP range is needed for PD subscribe, not for MD listener! -> new Ticket