RTI_DDS custom plug-in development 6 listener

The API used by the transport plugin to notify dynamically changed NDDS kernels in the transport plugin.

数据结构

struct  NDDS_Transport_Listener

Structure used to hold callback functions called by Transport-Plugin instances to notify Transport Plugin of dynamic state changes.

类型定义


typedef void(*	NDDS_Transport_Listener_Interface_Changed_Callback )(void * listener_data_in, NDDS_Transport_Plugin * plugin_in, NDDS_Transport_Interface_t * interface_changed_in)
The callback function called by the Transport-Plugin instance notifies it that the number of interfaces it can use has changed.

详细说明

    The API used by the transport plugin to notify dynamically changed NDDS kernels in the transport plugin.
    NDDS will use the Transport Plugin to register a structure NDDS_Transport_Listener. Then, when the Transport Plugin state changes dynamically, the plugin should call the corresponding function in the structure to notify NDDS of the change.
    For example, if a transport plugin can dynamically detect when the interfaces it manages are enabled/disabled, appear or disappear, as they might in IP-based transports when a NIC card is enabled/disabled or connected and unconnected, the plugin The NDDS should be allowed to know that this has happened, and the NDDS has the opportunity to use these new interfaces or stop using the lost communication interface.
Note : This feature is not yet implemented by the NDDS core. That is, the NDDS core cannot take action based on dynamic changes in the Transport Plugin. So it will never register a listener with the Transport Plugin (March 2005).

Typedef文档

typedef void(* NDDS_Transport_Listener_Interface_Changed_Callback)(void * listener_data_in, NDDS_Transport_Plugin * plugin_in,NDDS_Transport_Interface_t * interface_changed_in)
The callback function called by the Transport-Plugin instance notifies it that the number of interfaces it can use has changed.

参数
listener_data_in << in >>听众数据。
plugin_in << in >>调用此回调的Transport-Plugin实例。
interface_changed_in << in >>触发回调的已更改界面。
MT安全性:
多线程 安全此回调的实现者必须确保它是多线程安全的,以便调用者(传输插件实例)不必担心多线程安全问题。


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324469613&siteId=291194637