RTI Connext DDS Micro  Version 2.4.6
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dds_c_discovery_plugin.h
Go to the documentation of this file.
1 /*
2  * FILE: dds_c_discovery_plugin.h - DDS discovery plugin interface
3  *
4  * (c) Copyright, Real-Time Innovations, 2012-2015.
5  *
6  * All rights reserved.
7  *
8  * No duplications, whole or partial, manual or electronic, may be made
9  * without express written permission. Any such copies, or
10  * revisions thereof, must display this notice unaltered.
11  * This code contains trade secrets of Real-Time Innovations, Inc.
12  *
13  * Modification History
14  * --------------------
15  * 23jan2012,tk Updated
16  * 30apr2008,tk Written
17  */
18 /*ce
19  * \file
20  * \brief DDS discovery plugin interface
21  */
22 /*ci \defgroup DDSDiscoveryModule DDS Discovery Module
23  * \ingroup DDSCModule
24  */
25 /*ci \addtogroup DDSDiscoveryModule
26  * @{
27  */
28 #ifndef dds_c_discovery_plugin_h
29 #define dds_c_discovery_plugin_h
30 
31 #ifndef dds_c_dll_h
32 #include "dds_c/dds_c_dll.h"
33 #endif
34 #ifndef dds_c_common_h
35 #include "dds_c/dds_c_common.h"
36 #endif
37 #ifndef dds_c_domain_h
38 #include "dds_c/dds_c_domain.h"
39 #endif
40 
41 #ifdef __cplusplus
42 extern "C"
43 {
44 #endif
45 
46 /*ci
47  * \brief The standardized type name for the Participant discovery type
48  */
49 extern DDSCDllVariable const char *DDS_PARTICIPANT_BUILTIN_TOPIC_TYPE_NAME;
50 
51 /*ci
52  * \brief The standardized topic name for Participant discovery
53  */
54 extern DDSCDllVariable const char *DDS_PARTICIPANT_BUILTIN_TOPIC_NAME;
55 
56 /*ci
57  * \brief The standardized type name for the Publication discovery type
58  */
59 extern DDSCDllVariable const char *DDS_PUBLICATION_BUILTIN_TOPIC_TYPE_NAME;
60 
61 /*ci
62  * \brief The standardized topic name for Publication discovery
63  */
64 extern DDSCDllVariable const char *DDS_PUBLICATION_BUILTIN_TOPIC_NAME;
65 
66 /*ci
67  * \brief The standardized type name for the Subscription discovery type
68  */
69 extern DDSCDllVariable const char *DDS_SUBSCRIPTION_BUILTIN_TOPIC_TYPE_NAME;
70 
71 /*ci
72  * \brief The standardized topic name for Subscription discovery
73  */
74 extern DDSCDllVariable const char *DDS_SUBSCRIPTION_BUILTIN_TOPIC_NAME;
75 
76 /*ce
77  * \dref_PARTICIPANT_TOPIC_NAME
78  */
79 #define DDS_PARTICIPANT_TOPIC_NAME DDS_PARTICIPANT_BUILTIN_TOPIC_NAME
80 
81 /*ce
82  * \dref_PUBLICATION_TOPIC_NAME
83  */
84 #define DDS_PUBLICATION_TOPIC_NAME DDS_PUBLICATION_BUILTIN_TOPIC_NAME
85 
86 /*ce
87  * \dref_SUBSCRIPTION_TOPIC_NAME
88  */
89 #define DDS_SUBSCRIPTION_TOPIC_NAME DDS_SUBSCRIPTION_BUILTIN_TOPIC_NAME
90 
91 /*ci
92  * \brief Base-class for discovery plugins
93  */
94 struct NDDS_Discovery_Plugin
95 {
96  /*ci
97  * \brief Inherit from RT base-class
98  */
99  struct RT_Component _parent;
100 };
101 
102 /*ci
103  * \brief Base-class for discovery plugins
104  */
105 struct NDDS_Discovery_Listener
106 {
107  /*ci
108  * \brief Inherit from RT base-class listener
109  */
110  struct RT_ComponentListener _parent;
111 };
112 
113 /*ci
114  * \def NDDS_Discovery_Listener_INITIALIZE
115  * \brief Constant to initialize a NDDS_Discovery_Listener
116  */
117 #define NDDS_Discovery_Listener_INITIALIZE {\
118  RT_ComponentListener_INITIALIZER\
119 }
120 
121 /*ci
122  * \def NDDSDiscovery_narrow
123  * \brief Narrow a RT factory to a DDS discovery factory
124  *
125  * \param[in] factory_ Generic factory to specialize
126  *
127  * \return NDDSDiscovery factory
128  */
129 #define NDDSDiscovery_narrow(factory_) \
130  (((struct NDDS_Discovery_Plugin*)(factory_))->intf)
131 
132 /* ------------------------------ Life-cycle -------------------------------- */
133 /*ci
134  * \brief Definition of \ref RT_ComponentFactory delete_component method
135  *
136  * \param[in] self The discovery instance to delete
137  *
138  * \sa \ref RT_ComponentFactoryI
139  */
140 typedef void
141 (*NDDSDiscovery_deleteFunc)(struct NDDS_Discovery_Plugin *self);
142 
143 /*ci
144  * \brief Definition of \ref RT_ComponentFactory create_component method
145  *
146  * \param[in] property The component property
147  * \param[in] listener The component listener
148  *
149  * \return A reference to a discovery instance on success, NULL otherwise
150  *
151  * \sa \ref RT_ComponentFactoryI
152  */
153 FUNCTION_MUST_TYPEDEF(
154 struct NDDS_Discovery_Plugin*
155 (*NDDS_Discovery_Plugin_createFunc) (
156  const struct NDDS_Discovery_Property *const property,
157  const struct NDDS_Discovery_Listener *const listener)
158 )
159 
160 /*ci
161  * \brief Definition of the \ref NDDS_DiscoveryI on_before_local_participant_created method
162  *
163  * \param[in] discovery_plugin The DPSE plugin.
164  * \param[in] participant The participant creating the plugin.
165  * \param[inout] participant_qos The participant's qos policy.
166  * \param[inout] local_builtin_data_out The participant's announcement data.
167  *
168  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure.
169  *
170  * \sa \ref NDDS_DiscoveryI,
171  * \ref NDDS_Discovery_Plugin_on_before_local_participant_created
172  */
173 FUNCTION_MUST_TYPEDEF(
175 (*NDDS_Discovery_Plugin_BeforeLocalParticipantCreatedCallback)(
176  struct NDDS_Discovery_Plugin *const discovery_plugin,
177  DDS_DomainParticipant *const participant,
178  struct DDS_DomainParticipantQos *participant_qos,
179  struct DDS_ParticipantBuiltinTopicData *local_builtin_data_out);
180 )
181 
182 /*ci
183  * \brief Definition of the \ref NDDS_DiscoveryI on_after_local_participant_created method
184  *
185  * \param[in] discovery_plugin The DPSE plugin
186  * \param[in] participant The participant creating the plugin
187  * \param[in] local_participant_data The participant's announcement data
188  *
189  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
190  *
191  * \sa \ref NDDS_DiscoveryI,
192  * \ref NDDS_Discovery_Plugin_on_after_local_participant_created
193  */
194 FUNCTION_MUST_TYPEDEF(
196 (*NDDS_Discovery_Plugin_AfterLocalParticipantCreatedCallback)(
197  struct NDDS_Discovery_Plugin *const discovery_plugin,
198  DDS_DomainParticipant *const participant,
199  struct DDS_ParticipantBuiltinTopicData *const local_participant_data);
200 )
201 
202 /*ci
203  * \brief Definition of the \ref NDDS_DiscoveryI on_after_local_participant_enabled method
204  *
205  * \param[in] discovery_plugin The DPSE plugin
206  * \param[in] participant The participant creating the plugin
207  * \param[in] local_participant_data The participant's announcement data
208  *
209  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
210  *
211  * \sa \ref NDDS_DiscoveryI,
212  * \ref NDDS_Discovery_Plugin_on_after_local_participant_enabled
213  */
214 FUNCTION_MUST_TYPEDEF(
216 (*NDDS_Discovery_Plugin_AfterLocalParticipantEnabledCallback)(
217  struct NDDS_Discovery_Plugin* const discovery_plugin,
218  DDS_DomainParticipant *const participant,
219  struct DDS_ParticipantBuiltinTopicData *const local_participant_data)
220 )
221 
222 /*ci
223  * \brief Definition of the \ref NDDS_DiscoveryI on_before_local_participant_deleted method
224  *
225  * \param[in] discovery_plugin The DPSE plugin
226  * \param[in] participant The participant being deleted
227  * \param[in] local_participant_key The participant's key
228  *
229  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
230  *
231  * \sa \ref NDDS_DiscoveryI,
232  * \ref NDDS_Discovery_Plugin_on_before_local_participant_deleted
233  */
234 FUNCTION_MUST_TYPEDEF(
236 (*NDDS_Discovery_Plugin_BeforeLocalParticipantDeletedCallback)(
237  struct NDDS_Discovery_Plugin *const discovery_plugin,
238  DDS_DomainParticipant *const participant,
239  struct DDS_BuiltinTopicKey_t *const local_participant_key)
240 )
241 
242 /*ci
243  * \brief Definition of the \ref NDDS_DiscoveryI on_after_local_datawriter_enabled method
244  *
245  * \param[in] discovery_plugin The DPSE plugin
246  * \param[in] participant The participant
247  * \param[in] data_writer The datawriter being enabled
248  * \param[in] qos The datawriter's Qos
249  *
250  * \return DDS_BOOLEAN_TRUE
251  *
252  * \sa \ref NDDS_DiscoveryI,
253  * \ref NDDS_Discovery_Plugin_on_after_local_datawriter_enabled
254  */
255 FUNCTION_MUST_TYPEDEF(
257 (*NDDS_Discovery_Plugin_AfterLocalDataWriterEnabledCallback)(
258  struct NDDS_Discovery_Plugin *const discovery_plugin,
259  DDS_DomainParticipant *const participant,
260  DDS_DataWriter *const data_writer,
261  const struct DDS_DataWriterQos *const qos);
262 )
263 
264 /*ci
265  * \brief Definition of the \ref NDDS_DiscoveryI after_local_datawriter_deleted method
266  *
267  * \param[in] discovery_plugin The DPSE plugin
268  * \param[in] participant The participant
269  * \param[in] local_datawriter_key The key of the deleted datawriter
270  *
271  * \return DDS_BOOLEAN_TRUE
272  *
273  * \sa \ref NDDS_DiscoveryI,
274  * \ref NDDS_Discovery_Plugin_on_after_local_datawriter_deleted
275  */
276 FUNCTION_MUST_TYPEDEF(
278 (*NDDS_Discovery_Plugin_AfterLocalDataWriterDeletedCallback)(
279  struct NDDS_Discovery_Plugin *const discovery_plugin,
280  DDS_DomainParticipant *const participant,
281  const struct DDS_BuiltinTopicKey_t *const local_datawriter_key);
282 )
283 
284 /*ci
285  * \brief Definition of the \ref NDDS_DiscoveryI on_after_local_datareader_enabled method
286  *
287  * \param[in] discovery_plugin The DPSE plugin
288  * \param[in] participant The participant
289  * \param[in] data_reader The datareader being enabled
290  * \param[in] qos The datareader's Qos
291  *
292  * \return DDS_BOOLEAN_TRUE
293  *
294  * \sa \ref NDDS_DiscoveryI,
295  * \ref NDDS_Discovery_Plugin_on_after_local_datareader_enabled
296  */
297 FUNCTION_MUST_TYPEDEF(
299 (*NDDS_Discovery_Plugin_AfterLocalDataReaderEnabledCallback)(
300  struct NDDS_Discovery_Plugin *const discovery_plugin,
301  DDS_DomainParticipant *const participant,
302  DDS_DataReader *const data_reader,
303  const struct DDS_DataReaderQos *const qos);
304 )
305 
306 /*ci
307  * \brief Definition of the \ref NDDS_DiscoveryI after_local_datareader_deleted method
308  *
309  * \param[in] discovery_plugin The DPSE plugin
310  * \param[in] participant The participant
311  * \param[in] local_datareader_key The key of the deleted datareader
312  *
313  * \return DDS_BOOLEAN_TRUE
314  *
315  * \sa \ref NDDS_DiscoveryI,
316  * \ref NDDS_Discovery_Plugin_on_after_local_datareader_deleted
317  */
318 FUNCTION_MUST_TYPEDEF(
320 (*NDDS_Discovery_Plugin_AfterLocalDataReaderDeletedCallback)(
321  struct NDDS_Discovery_Plugin *const discovery_plugin,
322  DDS_DomainParticipant *const participant,
323  struct DDS_BuiltinTopicKey_t *const local_datareader_key);
324 )
325 
326 /*ci
327  * \brief Definition of the \ref NDDS_DiscoveryI on_remote_participant_liveliness_expired method
328  *
329  * \param[in] discovery_plugin The DPSE plugin
330  * \param[in] participant The participant
331  * \param[in] remote_participant_data The remote participant data
332  *
333  * \return DDS_BOOLEAN_TRUE on success or DDS_BOOLEAN_FALSE on failure
334  *
335  * \sa \ref NDDS_DiscoveryI,
336  * \ref NDDS_Discovery_Plugin_on_remote_participant_liveliness_expired
337  */
338 FUNCTION_MUST_TYPEDEF(
340 (*NDDS_Discovery_Plugin_RemoteParticipantLivelinessExpiredCallback)(
341  struct NDDS_Discovery_Plugin * const discovery_plugin,
342  DDS_DomainParticipant * const participant,
343  struct DDS_ParticipantBuiltinTopicData *const remote_participant_data);
344 )
345 
346 /*ci
347  * \brief Definition of the \ref NDDS_DiscoveryI add_peer method
348  *
349  * \param[in] discovery_plugin The DPSE plugin
350  * \param[in] participant The participant
351  * \param[in] peer A peer address string
352  *
353  * \return DDS_BOOLEAN_TRUE on success or DDS_BOOLEAN_FALSE on failure
354  *
355  * \sa \ref NDDS_DiscoveryI,
356  * \ref NDDS_Discovery_Plugin_add_peer
357  */
358 FUNCTION_MUST_TYPEDEF(
360 (*NDDS_Discovery_Plugin_AddPeerFunction)(
361  struct NDDS_Discovery_Plugin *const discovery_plugin,
362  DDS_DomainParticipant *const participant,const char *peer);
363 )
364 
365 /*ci
366  * \brief Definition of the \ref NDDS_DiscoveryI assert_remote_participant method
367  *
368  * \param[in] discovery_plugin The DPSE plugin
369  * \param[in] participant The participant
370  * \param[in] participant_name The name of the remote participant
371  *
372  * \sa \ref NDDS_DiscoveryI,
373  * \ref NDDS_Discovery_Plugin_assert_remote_participant
374  */
375 typedef void
376 (*NDDS_Discovery_Plugin_AssertRemoteParticipant)(
377  struct NDDS_Discovery_Plugin *const discovery_plugin,
378  DDS_DomainParticipant *const participant,
379  const char *const participant_name);
380 
381 /*ci
382  * \brief Definition of the NDDS_Discovery interface
383  */
384 struct NDDS_DiscoveryI
385 {
386  /*ci
387  * \brief Inherit from base-class
388  */
389  struct RT_ComponentI _parent;
390 
391  /*ci
392  * \brief Method to signal a remote participant's lease expired
393  */
394  NDDS_Discovery_Plugin_RemoteParticipantLivelinessExpiredCallback
395  on_remote_participant_liveliness_expired;
396 
397  /*ci
398  * \brief Method called when the participant is created, but not yet
399  * initialized
400  */
401  NDDS_Discovery_Plugin_BeforeLocalParticipantCreatedCallback
402  on_before_local_participant_created;
403 
404  /*ci
405  * \brief Method called when the participant has been created but it not
406  * yet enabled
407  */
408  NDDS_Discovery_Plugin_AfterLocalParticipantCreatedCallback
409  on_after_local_participant_created;
410 
411  /*ci
412  * \brief Method called when the participant is enabled
413  */
414  NDDS_Discovery_Plugin_AfterLocalParticipantEnabledCallback
415  on_after_local_participant_enabled;
416 
417  /*ci
418  * \brief Method called when the participant is being deleted
419  */
420  NDDS_Discovery_Plugin_BeforeLocalParticipantDeletedCallback
421  on_before_local_participant_deleted;
422 
423  /*ci
424  * \brief Method called when a local datawriter is enabled
425  */
426  NDDS_Discovery_Plugin_AfterLocalDataWriterEnabledCallback
427  on_after_local_datawriter_enabled;
428 
429  /*ci
430  * \brief Method called when a local datawriter is deleted
431  */
432  NDDS_Discovery_Plugin_AfterLocalDataWriterDeletedCallback
433  on_after_local_datawriter_deleted;
434 
435  /*ci
436  * \brief Method called when a local datareader is enabled
437  */
438  NDDS_Discovery_Plugin_AfterLocalDataReaderEnabledCallback
439  on_after_local_datareader_enabled;
440 
441  /*ci
442  * \brief Method called when a local datareader is deleted
443  */
444  NDDS_Discovery_Plugin_AfterLocalDataReaderDeletedCallback
445  on_after_local_datareader_deleted;
446 
447  /*ci
448  * \brief Method called when a peer is added to the participant
449  */
450  NDDS_Discovery_Plugin_AddPeerFunction add_peer;
451 
452  /*ci
453  * \brief Method called when a remote participant is asserted in the
454  * participant
455  */
456  NDDS_Discovery_Plugin_AssertRemoteParticipant on_assert_remote_participant;
457 };
458 
459 /*ci
460  * \brief Wrapper to call of the DiscoveryComponentFactory->create_component
461  *
462  * \param[in] f_ The discovery factory
463  * \param[in] p_ The property
464  * \param[in] l_ The listener
465  *
466  * \return A reference to new discovery instance on success, NULL otherwise
467  */
468 #define DiscoveryComponentFactory_create_component(f_,p_,l_) \
469  (struct NDDS_Discovery_Plugin*)((f_)->intf)->create_component(f_,p_,l_)
470 
471 /*ci
472  * \brief Wrapper to call of the DiscoveryComponentFactory->delete_component
473  *
474  * \param[in] f_ The discovery factory
475  * \param[in] c_ The discovery instance to delete
476  */
477 #define DiscoveryComponentFactory_delete_component(f_,c_) \
478  ((f_)->intf)->delete_component(f_,(RT_Component_T*)(c_))
479 
480 /*ci
481  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_before_local_participant_created
482  *
483  * \details
484  * When a participant creates an instance of the discovery plugin it calls
485  * this function before allocating any resources. The plugin is allowed to
486  * modify the participant's qos to take its own resource needs into
487  * account.
488  *
489  * \param[in] self_ The DPSE plugin
490  * \param[in] p_ The participant creating the plugin
491  * \param[inout] q_ The participant's qos policy
492  * \param[inout] b_ The participant's announcement data
493  *
494  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
495  */
496 #define NDDS_Discovery_Plugin_on_before_local_participant_created(\
497  self_,p_,q_,b_) \
498 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
499  on_before_local_participant_created(self_,p_,q_,b_)
500 
501 /*ci
502  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_after_local_participant_created
503  *
504  * \details
505  * When a participant is created it is ready for creating user entities. In
506  * this callback the DPSE plugin creates the discovery endpoints. The qos
507  * for the discovery endpoints are pre-defined by the DDS specification.
508  *
509  * \param[in] self_ The DPSE plugin
510  * \param[in] p_ The participant creating the plugin
511  * \param[in] data_ The participant's announcement data
512  *
513  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
514  */
515 #define NDDS_Discovery_Plugin_on_after_local_participant_created(\
516  self_,p_,data_) \
517 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
518  on_after_local_participant_created(self_,p_,data_)
519 
520 /*ci
521  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_after_local_participant_enabled
522  *
523  * \details
524  * When a participant is enabled it is ready to announce discovery data. In
525  * this callback the DPSE plugin enables its own discovery endpoints and
526  * starts announcing the participant.
527  *
528  * \param[in] self_ The DPSE plugin
529  * \param[in] p_ The participant creating the plugin
530  * \param[in] data_ The participant's announcement data
531  *
532  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
533  */
534 #define NDDS_Discovery_Plugin_on_after_local_participant_enabled(\
535  self_,p_,data_) \
536 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
537  on_after_local_participant_enabled(self_,p_,data_)
538 
539 /*ci
540  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_before_local_participant_deleted
541  *
542  * \details
543  * When a participant is deleted the plugin must delete all its internal
544  * resources. It also disposes of the participant.
545  *
546  * \param[in] self_ The DPSE plugin
547  * \param[in] p_ The participant being deleted
548  * \param[in] key_ The participant's key
549  *
550  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
551  */
552 #define NDDS_Discovery_Plugin_on_before_local_participant_deleted(\
553  self_,p_,key_) \
554 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
555  on_before_local_participant_deleted(self_,p_,key_)
556 
557 /*ci
558  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_after_local_datawriter_enabled
559  *
560  * \details
561  * This function is called when a local datawriter is enabled.
562  *
563  * \param[in] self_ The DPSE plugin
564  * \param[in] p_ The participant
565  * \param[in] dw_ The datawriter being enabled
566  * \param[in] dq_ The datawriters Qos
567  *
568  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
569  */
570 #define NDDS_Discovery_Plugin_on_after_local_datawriter_enabled(\
571  self_,p_,dw_,dq_) \
572 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
573  on_after_local_datawriter_enabled(self_,p_,dw_,dq_)
574 
575 /*ci
576  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_after_local_datawriter_deleted
577  *
578  * \details
579  * This function is called when a local datawriter is deleted.
580  *
581  * \param[in] self_ The DPSE plugin
582  * \param[in] p_ The participant
583  * \param[in] dwkey_ The key of the deleted datawriter
584  *
585  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
586  */
587 #define NDDS_Discovery_Plugin_on_after_local_datawriter_deleted(\
588  self_,p_,dwkey_) \
589 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
590  on_after_local_datawriter_deleted(self_,p_,dwkey_)
591 
592 /*ci
593  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_after_local_datareader_enabled
594  *
595  * \details
596  * This function is called when a local datareader is enabled.
597  *
598  * \param[in] self_ The DPSE plugin
599  * \param[in] p_ The participant
600  * \param[in] dr_ The datareader being enabled
601  * \param[in] dq_ The datareaders Qos
602  *
603  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
604  */
605 #define NDDS_Discovery_Plugin_on_after_local_datareader_enabled(\
606  self_,p_,dr_,dq_) \
607 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
608  on_after_local_datareader_enabled(self_,p_,dr_,dq_)
609 
610 /*ci
611  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_after_local_datareader_deleted
612  *
613  * \details
614  * This function is called when a local datareader is deleted.
615  *
616  * \param[in] self_ The DPSE plugin
617  * \param[in] p_ The participant
618  * \param[in] drkey_ The datareader being enabled
619  *
620  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
621  */
622 #define NDDS_Discovery_Plugin_on_after_local_datareader_deleted(self_,p_,drkey_)\
623 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
624  on_after_local_datareader_deleted(self_,p_,drkey_)
625 
626 /*ci
627  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_remote_participant_liveliness_expired
628  *
629  * \details
630  * The participant calls this interface when it detects that a remote
631  * participant does not maintain its lease_duration commitment
632  *
633  * \param[in] self_ The DPSE plugin
634  * \param[in] p_ The participant
635  * \param[in] data_ The remote participant data
636  *
637  * \return DDS_BOOLEAN_TRUE on success or DDS_BOOLEAN_FALSE on failure
638  */
639 #define NDDS_Discovery_Plugin_on_remote_participant_liveliness_expired(\
640  self_,p_,data_) \
641 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
642  on_remote_participant_liveliness_expired(self_,p_,data_)
643 
644 /*ci
645  * \brief Wrapper to call \ref NDDS_DiscoveryI::add_peer
646  *
647  * \details
648  * This API enables peer addresses to be dynamically added to a participants
649  * peer list after it has been created.
650  *
651  * \param[in] self_ The DPSE plugin
652  * \param[in] p_ The participant
653  * \param[in] peer_ A peer address string
654  *
655  * \return DDS_BOOLEAN_TRUE on success or DDS_BOOLEAN_FALSE on failure
656  */
657 #define NDDS_Discovery_Plugin_add_peer(\
658  self_,p_,peer_) \
659 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->add_peer(self_,p_,peer_)
660 
661 /*ci
662  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_assert_remote_participant
663  *
664  * \details
665  * When a remote participant is added to a participant the discovery plugin
666  * is notified. The DPSE plugin keeps track of which participants have
667  * been statically asserted. If a participant is discovered, but has not
668  * been statically asserted it is ignored.
669  *
670  * \param[in] self_ The DPSE plugin
671  * \param[in] p_ The participant
672  * \param[in] name_ The name of the remote participant
673  */
674 #define NDDS_Discovery_Plugin_assert_remote_participant(self_,p_,name_) \
675 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->on_assert_remote_participant(self_,p_,name_)
676 
677 #ifdef __cplusplus
678 } /* extern "C" */
679 #endif
680 
681 #endif /* dds_c_discovery_plugin_h */
682 
683 /*ci @} */
684 
685 

RTI Connext DDS Micro Version 2.4.6 Copyright © Mon Jan 25 2016 Real-Time Innovations, Inc