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

RTI Connext Micro Version 2.4.1.0 Copyright © Thu Nov 20 2014 Real-Time Innovations, Inc