天天看點

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)
用于删除傳輸插件執行個體的方法。 
           

繼續閱讀