RTI_DDS自定义插件开发 6 方法

每个Transport-Plugin实现必须提供的方法

数据结构

结构 NDDS_Transport_PluginImpl

传输插件实现的基类“类”

类型定义

 
 
typedef struct NDDS_Transport_PluginImpl NDDS_Transport_Plugin
所有传输的“纯虚拟类”=>所有传输实现都必须实现所有方法,即使它们是虚拟方法。 
typedef RTI_INT32(*NDDS_Transport_Send_Fcn )( NDDS_Transport_Plugin * self,const NDDS_Transport_SendResource_t * sendresource_in,const NDDS_Transport_Address_t * dest_address_in,const NDDS_Transport_Port_t dest_port_in,RTI_INT32 transport_priority_in,const NDDS_Transport_Buffer_t buffer_in [],RTI_INT32 buffer_count_in,void * reserved)同步收集发送。 通过先前创建的SendResource将多个缓冲区发送到预先注册的目标。 
typedef RTI_INT32(*	NDDS_Transport_Recv_Fcn_rEA )( NDDS_Transport_Plugin * self, NDDS_Transport_Message_t * message_out,const NDDS_Transport_Buffer_t * buffer_in,const NDDS_Transport_RecvResource_t * recvresource_in,void *reserved)
阻塞接收调用通过传输插件收到的消息。 
typedef void(*	NDDS_Transport_Return_Loaned_Buffer_Fcn_rEA )( NDDS_Transport_Plugin * self,const NDDS_Transport_RecvResource_t * recvresource_in, NDDS_Transport_Message_t * message_in,void *保留)
NDDS用于在receive_rEA()调用中返回由Transport Plugin提供的缓冲区以将接收到的消息传递给NDDS的方法。 
typedef RTI_INT32(*	NDDS_Transport_Unblock_Recv_Fcn_rrEA )( NDDS_Transport_Plugin * self,const NDDS_Transport_RecvResource_t * recvresource_in,void *保留)
由NDDS调用来取消阻塞在receive_rEA()上被阻塞的线程,否则在receive_rEA()被调用时立即返回。 
typedef RTI_INT32(*	NDDS_Transport_Create_RecvResource_Fcn_rrEA )( NDDS_Transport_Plugin * self, NDDS_Transport_RecvResource_t * recvresource_out, NDDS_Transport_Port_t * recv_port_inout,const NDDS_Transport_Address_t * multicast_address_in,RTI_INT32保留)
由NDDS调用以初始化传输插件以接收给定端口和/或多播地址的消息。 返回NDDS使用的特定于传输的数据结构(RecvResource)的句柄以从此插件收集收到的消息。
 
typedef void(*	NDDS_Transport_Destroy_RecvResource_Fcn_rrEA )( NDDS_Transport_Plugin * self,const NDDS_Transport_RecvResource_t * recvresource_in)
调用以销毁先前使用NDDS_Transport_Create_RecvResource_Fcn_rrEA创建的RecvResource。 
typedef RTI_INT32(*	NDDS_Transport_Share_RecvResource_Fcn_rrEA )( NDDS_Transport_Plugin * self,const NDDS_Transport_RecvResource_t * recvresource_in,const NDDS_Transport_Port_t recv_port_in,const NDDS_Transport_Address_t * multicast_address_in,RTI_INT32保留)
调用以查看是否可以共享现有RecvResource以接收不同端口/多播地址上的消息。 
typedef RTI_INT32(*	NDDS_Transport_Unshare_RecvResource_Fcn_rrEA )( NDDS_Transport_Plugin * self,const NDDS_Transport_RecvResource_t * recvresource_in,const NDDS_Transport_Port_t recv_port_in,const NDDS_Transport_Address_t * multicast_address_in,RTI_INT32保留)
调用以取消共享之前已成功为端口/地址共享的RecvResource。 
typedef RTI_INT32(*	( NDDS_Transport_Plugin * self, NDDS_Transport_SendResource_t * sendresource_out,const NDDS_Transport_Address_t * dest_address_in,const NDDS_Transport_Port_t dest_port_in,RTI_INT32 transport_priority_in)
由NDDS调用以初始化传输插件,将消息发送到由传入的地址/端口定义的目标。 返回NDDS使用的传输特定数据结构(SendResource)用于使用此插件发送消息的句柄。
 
typedef void(*	NDDS_Transport_Destroy_SendResource_Fcn_srEA )( NDDS_Transport_Plugin * self,const NDDS_Transport_SendResource_t * sendresource_in)
调用以销毁先前使用NDDS_Transport_Create_SendResource_Fcn_srEA创建的SendResource。
 
typedef RTI_INT32(*	( NDDS_Transport_Plugin * self,const NDDS_Transport_SendResource_t * sendresource_in,const NDDS_Transport_Address_t * dest_address_in,const NDDS_Transport_Port_t dest_port_in,RTI_INT32 transport_priority_in)
调用以查看是否可以共享现有的SendResource以将消息发送到不同的目标(地址/端口)。 
typedef const char *(*	NDDS_Transport_Get_Class_Name_Fcn_cEA )( NDDS_Transport_Plugin * self)
返回传输的字符串类名称。 
typedef RTI_INT32(*	NDDS_Transport_Unshare_SendResource_Fcn_srEA )( NDDS_Transport_Plugin * self,const NDDS_Transport_SendResource_t * sendresource_in,const NDDS_Transport_Address_t * dest_address_in,const NDDS_Transport_Port_t dest_port_in,RTI_INT32 transport_priority_in)
被调用以取消共享之前已成功为地址/端口共享的SendResource。 
typedef RTI_INT32(*	NDDS_Transport_String_To_Address_Fcn_cEA )( NDDS_Transport_Plugin * self, NDDS_Transport_Address_t * address_out,const char * address_in)
调用将地址的Transport-Plugin特定字符串表示形式转换为IPv6地址表示形式。 
typedef RTI_INT32(*	NDDS_Transport_Get_Receive_Interfaces_Fcn_cEA )( NDDS_Transport_Plugin * self,RTI_INT32 * found_more_than_provided_for_out,RTI_INT32 * interface_reported_count_out, NDDS_Transport_Interface_t interface_array_inout [],RTI_INT32 interface_array_size_in)
被调用来检索可用于通过此传输插件接收消息的接口列表。 
typedef RTI_INT32(*	NDDS_Transport_Register_Listener_Fcn_cEA )( NDDS_Transport_Plugin * self, NDDS_Transport_Listener * listener_in)
由NDDS调用来注册一组回调函数,它应在传输插件实例检测到其状态中的特定动态更改时调用。 
typedef void(*	NDDS_Transport_Delete_Fcn_cEA )( NDDS_Transport_Plugin * self,void * reserved)
用于删除传输插件实例的方法。 

猜你喜欢

转载自blog.csdn.net/xinqingwuji/article/details/79938592
今日推荐