33 #ifndef dds_c_rh_plugin_h 
   34 #define dds_c_rh_plugin_h 
   40 #ifndef dds_c_discovery_h 
   62     DDSHST_READEREVENT_KIND_LIVELINESS_LOST = 1,
 
   67     DDSHST_READEREVENT_KIND_LIVELINESS_DETECTED,
 
   72     DDSHST_READEREVENT_KIND_REMOTE_WRITER_DELETED,
 
   77     DDSHST_READEREVENT_KIND_DEADLINE_EXPIRED
 
   78 } DDSHST_ReaderEventKind_T;
 
   83 struct DDSHST_ReaderEvent
 
   88     DDSHST_ReaderEventKind_T kind;
 
  132     struct RT_Component _parent;
 
  135 typedef struct DDSHST_Reader DDSHST_Reader_T;
 
  137 struct DDSHST_ReaderSampleEntry;
 
  143 typedef struct DDSHST_ReaderSampleEntry* DDSHST_ReaderSampleEntryRef_T;
 
  145 struct DDSHST_ReaderKeyEntry;
 
  151 typedef struct DDSHST_ReaderKeyEntry* DDSHST_ReaderKeyEntryRef_T;
 
  156 typedef struct DDSHST_ReaderSample
 
  185     DDSHST_ReaderSampleEntryRef_T _ref;
 
  186 } DDSHST_ReaderSample_T;
 
  188 #define T DDSHST_ReaderSample_T 
  189 #define TSeq DDSHST_ReaderSample_TSeq 
  190 #include <reda/reda_sequence_decl.h> 
  195 struct DDSHST_ReaderProperty
 
  200     struct RT_ComponentProperty _parent;
 
  218 #define DDSHST_ReaderProperty_INITIALIZER \ 
  220     RT_ComponentProperty_INITIALIZER,\ 
  238 (*DDSHST_ReaderListener_OnSampleRemovedFunc)(
 
  239         struct DDSHST_Reader *rh,
 
  242         DDSHST_ReaderSample_T *sample);
 
  256 (*DDSHST_ReaderListener_OnKeyRemovedFunc)(
 
  257         struct DDSHST_Reader *rh,
 
  273 (*DDSHST_ReaderListener_OnDeadlineMissedFunc)(
 
  274         struct DDSHST_Reader *rh,
 
  291 (*DDSHST_ReaderListener_OnDataAvailableFunc)(
 
  292         struct DDSHST_Reader *rh,
 
  295         DDSHST_ReaderSample_T *sample);
 
  310 (*DDSHST_ReaderListener_OnSampleRejectedFunc)(
 
  311         struct DDSHST_Reader *rh,
 
  331 (*DDSHST_ReaderListener_OnSampleLostFunc)(
 
  332         struct DDSHST_Reader *rh,
 
  353 (*DDSHST_ReaderListener_OnInstanceReplacedFunc)(
 
  354         struct DDSHST_Reader *rh,
 
  381 (*DDSHST_ReaderListener_OnSampleCommittedFunc)(
struct DDSHST_Reader *rh,
 
  389 struct DDSHST_ReaderListener
 
  394     struct RT_ComponentListener _parent;
 
  399     DDSHST_ReaderListener_OnSampleRemovedFunc on_sample_removed;
 
  404     DDSHST_ReaderListener_OnKeyRemovedFunc on_key_removed;
 
  409     DDSHST_ReaderListener_OnDataAvailableFunc on_data_available;
 
  414     DDSHST_ReaderListener_OnDeadlineMissedFunc on_deadline_missed;
 
  419     DDSHST_ReaderListener_OnSampleRejectedFunc on_sample_rejected;
 
  424     DDSHST_ReaderListener_OnSampleLostFunc on_sample_lost;
 
  429     DDSHST_ReaderListener_OnInstanceReplacedFunc on_instance_replaced;
 
  434     DDSHST_ReaderListener_OnSampleCommittedFunc on_sample_committed;
 
  445 #define DDSHST_ReaderListener_INITIALIZE {\ 
  446         RT_ComponentListener_INITIALIZER,\ 
  467 (*DDSHST_Reader_deleteFunc)(
struct DDSHST_Reader *
self);
 
  479 FUNCTION_MUST_TYPEDEF(
 
  480 struct DDSHST_Reader*
 
  481 (*DDSHST_Reader_createFunc)(
const struct DDSHST_ReaderProperty *
const property,
 
  482                             const struct DDSHST_ReaderListener *
const listener)
 
  504 FUNCTION_MUST_TYPEDEF(
 
  505 DDSHST_ReaderSampleEntryRef_T
 
  506 (*DDSHST_Reader_reserve_entryFunc)(
 
  507         struct DDSHST_Reader *
self,
 
  512         struct REDA_SequenceNumber *sample_sn,
 
  513         struct REDA_SequenceNumber *sample_virtual_sn,
 
  526 (*DDSHST_Reader_return_entryFunc)(
struct DDSHST_Reader *
self,
 
  527                                   DDSHST_ReaderSampleEntryRef_T entry);
 
  545 FUNCTION_MUST_TYPEDEF(
 
  547 (*DDSHST_Reader_commitFunc)(
struct DDSHST_Reader *
self,
 
  549                             struct REDA_SequenceNumber *sn,
 
  552                             struct REDA_SequenceNumber *last_virtual_sn,
 
  569 FUNCTION_MUST_TYPEDEF(
 
  571 (*DDSHST_Reader_add_and_commitFunc)(
struct DDSHST_Reader *rh,
 
  572                                     DDSHST_ReaderSampleEntryRef_T entry,
 
  573                                     DDSHST_ReaderSample_T *sample,
 
  574                                     struct REDA_SequenceNumber *commit_sn,
 
  576                                     struct REDA_SequenceNumber *last_virtual_sn,
 
  590 (*DDSHST_Reader_post_eventFunc)(
struct DDSHST_Reader *
self,
 
  591                                 struct DDSHST_ReaderEvent *event,
 
  615 FUNCTION_MUST_TYPEDEF(
 
  617 (*DDSHST_Reader_read_or_takeFunc)(
struct DDSHST_Reader *
self,
 
  618                                   void ***sample_ptr_array,
 
  643 FUNCTION_MUST_TYPEDEF(
 
  645 (*DDSHST_Reader_finish_read_or_takeFunc)(
struct DDSHST_Reader *
self,
 
  646                                          void ***sample_ptr_array,
 
  662 FUNCTION_MUST_TYPEDEF(
 
  663 DDSHST_ReaderKeyEntryRef_T
 
  664 (*DDSHST_Reader_lookup_keyFunc)(
struct DDSHST_Reader* 
self,
 
  671 struct DDSHST_ReaderI
 
  676     struct RT_ComponentI _parent;
 
  681     DDSHST_Reader_return_entryFunc return_entry;
 
  686     DDSHST_Reader_read_or_takeFunc read_or_take;
 
  691     DDSHST_Reader_finish_read_or_takeFunc finish_read_or_take;
 
  696     DDSHST_Reader_post_eventFunc post_event;
 
  701     DDSHST_Reader_lookup_keyFunc lookup_key;
 
  706     DDSHST_Reader_reserve_entryFunc reserve_entry;
 
  712     DDSHST_Reader_add_and_commitFunc add_and_commit;
 
  717     DDSHST_Reader_commitFunc commit;
 
  723 #define DDSHST_ReaderFactory_create_component(f_,p_,l_) \ 
  724 (struct DDSHST_Reader*)((f_)->intf)->create_component(f_,p_,l_) 
  729 #define DDSHST_ReaderFactory_delete_component(f_,c_) \ 
  730         ((f_)->intf)->delete_component(f_,(RT_Component_T*)(c_)) 
  755 #define DDSHST_Reader_reserve_entry(self_,rw_,key_,si_,strength_,\ 
  756                                     sample_sn_,sample_virtual_sn_,\ 
  758         ((struct DDSHST_ReaderI*)((self_)->_parent._intf))->reserve_entry(\ 
  759                                   self_,rw_,key_,si_,strength_,\ 
  760                                   sample_sn_,sample_virtual_sn_,reject_reason_) 
  774 #define DDSHST_Reader_return_entry(self_,entry_) \ 
  775         ((struct DDSHST_ReaderI*)((self_)->_parent._intf))->return_entry(\ 
  798 #define DDSHST_Reader_add_and_commit(self_,entry_,sample_,sn_,noc_,\ 
  799                                      last_virtual_sn_,missing_vsn_) \ 
  800         ((struct DDSHST_ReaderI*)((self_)->_parent._intf))->add_and_commit(\ 
  801                 self_,entry_,sample_,sn_,noc_,last_virtual_sn_,missing_vsn_) 
  822 #define DDSHST_Reader_commit(self_,rw_,sn_,s_,noc_,last_virtual_sn_,missing_vsn_) \ 
  823         ((struct DDSHST_ReaderI*)((self_)->_parent._intf))->commit(\ 
  824                 self_,rw_,sn_,s_,noc_,last_virtual_sn_,missing_vsn_) 
  852 #define DDSHST_Reader_read_or_take(self_,\ 
  853 sample_arr_,info_arr_,count_,handle_,max_samples_,sample_states_,view_states_,\ 
  854         instance_states_,take_) \ 
  855     ((struct DDSHST_ReaderI*)(\ 
  856             (self_)->_parent._intf))->read_or_take(self_,\ 
  857             sample_arr_,info_arr_,count_,handle_,max_samples_,\ 
  858             sample_states_,view_states_,instance_states_,take_) 
  875 #define DDSHST_Reader_finish_read_or_take(self_,sample_seq_,info_seq_,count_,take_) \ 
  876         ((struct DDSHST_ReaderI*)(\ 
  877                 (self_)->_parent._intf))->finish_read_or_take(self_,\ 
  878                         sample_seq_,info_seq_,count_,take_) 
  891 #define DDSHST_Reader_post_event(self_,event_,time_) \ 
  892         ((struct DDSHST_ReaderI*)(\ 
  893                 (self_)->_parent._intf))->post_event(self_,event_,time_) 
  903 #define DDSHST_Reader_lookup_key(self_,key_) \ 
  904         ((struct DDSHST_ReaderI*)(\ 
  905                 (self_)->_parent._intf))->lookup_key(self_,key_)