RTI Connext DDS Micro  Version 2.4.11
 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 * const DDS_PARTICIPANT_BUILTIN_TOPIC_TYPE_NAME;
50 
51 /*ci
52  * \brief The standardized topic name for Participant discovery
53  */
54 extern DDSCDllVariable const char * const 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 * const DDS_PUBLICATION_BUILTIN_TOPIC_TYPE_NAME;
60 
61 /*ci
62  * \brief The standardized topic name for Publication discovery
63  */
64 extern DDSCDllVariable const char * const 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 * const DDS_SUBSCRIPTION_BUILTIN_TOPIC_TYPE_NAME;
70 
71 /*ci
72  * \brief The standardized topic name for Subscription discovery
73  */
74 extern DDSCDllVariable const char * const 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_before_local_datawriter_created method
244  *
245  * \param[in] discovery_plugin The discovery plugin
246  * \param[in] participant The participant
247  * \param[in] dw_key The key of the datawriter to be created
248  * \param[in] reservation DDS_BOOLEAN_TRUE if this is a reservation,
249  * DDS_BOOLEAN_FALSE if this is releasing a
250  * reservation.
251  *
252  * \return DDS_RETCODE_OK success, one of the standard return codes on failure
253  */
254 FUNCTION_MUST_TYPEDEF(
256 (*NDDS_Discovery_Plugin_BeforeLocalDataWriterCreatedCallback)(
257  struct NDDS_Discovery_Plugin *const discovery_plugin,
258  DDS_DomainParticipant *const participant,
259  struct DDS_BuiltinTopicKey_t *const dw_key,
260  DDS_Boolean reservation);
261 )
262 
263 /*ci
264  * \brief Definition of the \ref NDDS_DiscoveryI on_after_local_datawriter_enabled method
265  *
266  * \param[in] discovery_plugin The DPSE plugin
267  * \param[in] participant The participant
268  * \param[in] data_writer The datawriter being enabled
269  * \param[in] qos The datawriter's Qos
270  *
271  * \return DDS_BOOLEAN_TRUE
272  *
273  * \sa \ref NDDS_DiscoveryI,
274  * \ref NDDS_Discovery_Plugin_on_after_local_datawriter_enabled
275  */
276 FUNCTION_MUST_TYPEDEF(
278 (*NDDS_Discovery_Plugin_AfterLocalDataWriterEnabledCallback)(
279  struct NDDS_Discovery_Plugin *const discovery_plugin,
280  DDS_DomainParticipant *const participant,
281  DDS_DataWriter *const data_writer,
282  const struct DDS_DataWriterQos *const qos);
283 )
284 
285 /*ci
286  * \brief Definition of the \ref NDDS_DiscoveryI after_local_datawriter_deleted method
287  *
288  * \param[in] discovery_plugin The DPSE plugin
289  * \param[in] participant The participant
290  * \param[in] local_datawriter_key The key of the deleted datawriter
291  *
292  * \return DDS_BOOLEAN_TRUE
293  *
294  * \sa \ref NDDS_DiscoveryI,
295  * \ref NDDS_Discovery_Plugin_on_after_local_datawriter_deleted
296  */
297 FUNCTION_MUST_TYPEDEF(
299 (*NDDS_Discovery_Plugin_AfterLocalDataWriterDeletedCallback)(
300  struct NDDS_Discovery_Plugin *const discovery_plugin,
301  DDS_DomainParticipant *const participant,
302  const struct DDS_BuiltinTopicKey_t *const local_datawriter_key);
303 )
304 
305 /*ci
306  * \brief Definition of the \ref NDDS_DiscoveryI on_before_local_datareader_created method
307  *
308  * \param[in] discovery_plugin The discovery plugin
309  * \param[in] participant The participant
310  * \param[in] dr_key The key of the datareader to be created
311  * \param[in] reservation DDS_BOOLEAN_TRUE if this is a reservation,
312  * DDS_BOOLEAN_FALSE if this is releasing a
313  * reservation.
314  *
315  * \return DDS_RETCODE_OK success, one of the standard return codes on failure
316  */
317 FUNCTION_MUST_TYPEDEF(
319 (*NDDS_Discovery_Plugin_BeforeLocalDataReaderCreatedCallback)(
320  struct NDDS_Discovery_Plugin *const discovery_plugin,
321  DDS_DomainParticipant *const participant,
322  struct DDS_BuiltinTopicKey_t *const dr_key,
323  DDS_Boolean reservation);
324 )
325 
326 /*ci
327  * \brief Definition of the \ref NDDS_DiscoveryI on_after_local_datareader_enabled method
328  *
329  * \param[in] discovery_plugin The DPSE plugin
330  * \param[in] participant The participant
331  * \param[in] data_reader The datareader being enabled
332  * \param[in] qos The datareader's Qos
333  *
334  * \return DDS_BOOLEAN_TRUE
335  *
336  * \sa \ref NDDS_DiscoveryI,
337  * \ref NDDS_Discovery_Plugin_on_after_local_datareader_enabled
338  */
339 FUNCTION_MUST_TYPEDEF(
341 (*NDDS_Discovery_Plugin_AfterLocalDataReaderEnabledCallback)(
342  struct NDDS_Discovery_Plugin *const discovery_plugin,
343  DDS_DomainParticipant *const participant,
344  DDS_DataReader *const data_reader,
345  const struct DDS_DataReaderQos *const qos);
346 )
347 
348 /*ci
349  * \brief Definition of the \ref NDDS_DiscoveryI after_local_datareader_deleted method
350  *
351  * \param[in] discovery_plugin The DPSE plugin
352  * \param[in] participant The participant
353  * \param[in] local_datareader_key The key of the deleted datareader
354  *
355  * \return DDS_BOOLEAN_TRUE
356  *
357  * \sa \ref NDDS_DiscoveryI,
358  * \ref NDDS_Discovery_Plugin_on_after_local_datareader_deleted
359  */
360 FUNCTION_MUST_TYPEDEF(
362 (*NDDS_Discovery_Plugin_AfterLocalDataReaderDeletedCallback)(
363  struct NDDS_Discovery_Plugin *const discovery_plugin,
364  DDS_DomainParticipant *const participant,
365  struct DDS_BuiltinTopicKey_t *const local_datareader_key);
366 )
367 
368 /*ci
369  * \brief Definition of the \ref NDDS_DiscoveryI on_remote_participant_liveliness_expired method
370  *
371  * \param[in] discovery_plugin The DPSE plugin
372  * \param[in] participant The participant
373  * \param[in] remote_participant_data The remote participant data
374  *
375  * \return DDS_BOOLEAN_TRUE on success or DDS_BOOLEAN_FALSE on failure
376  *
377  * \sa \ref NDDS_DiscoveryI,
378  * \ref NDDS_Discovery_Plugin_on_remote_participant_liveliness_expired
379  */
380 FUNCTION_MUST_TYPEDEF(
382 (*NDDS_Discovery_Plugin_RemoteParticipantLivelinessExpiredCallback)(
383  struct NDDS_Discovery_Plugin * const discovery_plugin,
384  DDS_DomainParticipant * const participant,
385  struct DDS_ParticipantBuiltinTopicData *const remote_participant_data);
386 )
387 
388 /*ci
389  * \brief Definition of the \ref NDDS_DiscoveryI add_peer method
390  *
391  * \param[in] discovery_plugin The DPSE plugin
392  * \param[in] participant The participant
393  * \param[in] peer A peer address string
394  *
395  * \return DDS_BOOLEAN_TRUE on success or DDS_BOOLEAN_FALSE on failure
396  *
397  * \sa \ref NDDS_DiscoveryI,
398  * \ref NDDS_Discovery_Plugin_add_peer
399  */
400 FUNCTION_MUST_TYPEDEF(
402 (*NDDS_Discovery_Plugin_AddPeerFunction)(
403  struct NDDS_Discovery_Plugin *const discovery_plugin,
404  DDS_DomainParticipant *const participant,const char *peer);
405 )
406 
407 /*ci
408  * \brief Definition of the \ref NDDS_DiscoveryI assert_remote_participant method
409  *
410  * \param[in] discovery_plugin The DPSE plugin
411  * \param[in] participant The participant
412  * \param[in] participant_name The name of the remote participant
413  *
414  * \sa \ref NDDS_DiscoveryI,
415  * \ref NDDS_Discovery_Plugin_assert_remote_participant
416  */
417 typedef void
418 (*NDDS_Discovery_Plugin_AssertRemoteParticipant)(
419  struct NDDS_Discovery_Plugin *const discovery_plugin,
420  DDS_DomainParticipant *const participant,
421  const char *const participant_name);
422 
423 /*ci
424  * \brief Definition of the NDDS_Discovery interface
425  */
426 struct NDDS_DiscoveryI
427 {
428  /*ci
429  * \brief Inherit from base-class
430  */
431  struct RT_ComponentI _parent;
432 
433  /*ci
434  * \brief Method to signal a remote participant's lease expired
435  */
436  NDDS_Discovery_Plugin_RemoteParticipantLivelinessExpiredCallback
437  on_remote_participant_liveliness_expired;
438 
439  /*ci
440  * \brief Method called when the participant is created, but not yet
441  * initialized
442  */
443  NDDS_Discovery_Plugin_BeforeLocalParticipantCreatedCallback
444  on_before_local_participant_created;
445 
446  /*ci
447  * \brief Method called when the participant has been created but it not
448  * yet enabled
449  */
450  NDDS_Discovery_Plugin_AfterLocalParticipantCreatedCallback
451  on_after_local_participant_created;
452 
453  /*ci
454  * \brief Method called when the participant is enabled
455  */
456  NDDS_Discovery_Plugin_AfterLocalParticipantEnabledCallback
457  on_after_local_participant_enabled;
458 
459  /*ci
460  * \brief Method called when the participant is being deleted
461  */
462  NDDS_Discovery_Plugin_BeforeLocalParticipantDeletedCallback
463  on_before_local_participant_deleted;
464 
465  /*ci
466  * \brief Method called when a local datawriter is enabled
467  */
468  NDDS_Discovery_Plugin_AfterLocalDataWriterEnabledCallback
469  on_after_local_datawriter_enabled;
470 
471  /*ci
472  * \brief Method called when a local datawriter is deleted
473  */
474  NDDS_Discovery_Plugin_AfterLocalDataWriterDeletedCallback
475  on_after_local_datawriter_deleted;
476 
477  /*ci
478  * \brief Method called when a local datareader is enabled
479  */
480  NDDS_Discovery_Plugin_AfterLocalDataReaderEnabledCallback
481  on_after_local_datareader_enabled;
482 
483  /*ci
484  * \brief Method called when a local datareader is deleted
485  */
486  NDDS_Discovery_Plugin_AfterLocalDataReaderDeletedCallback
487  on_after_local_datareader_deleted;
488 
489  /*ci
490  * \brief Method called when a peer is added to the participant
491  */
492  NDDS_Discovery_Plugin_AddPeerFunction add_peer;
493 
494  /*ci
495  * \brief Method called when a remote participant is asserted in the
496  * participant
497  */
498  NDDS_Discovery_Plugin_AssertRemoteParticipant on_assert_remote_participant;
499 
500  /*ci
501  * \brief Method called before a datareader is created
502  */
503  NDDS_Discovery_Plugin_BeforeLocalDataReaderCreatedCallback
504  on_before_local_datareader_created;
505 
506  /*ci
507  * \brief Method called before a datawriter is created
508  */
509  NDDS_Discovery_Plugin_BeforeLocalDataWriterCreatedCallback
510  on_before_local_datawriter_created;
511 };
512 
513 /*ci
514  * \brief Wrapper to call of the DiscoveryComponentFactory->create_component
515  *
516  * \param[in] f_ The discovery factory
517  * \param[in] p_ The property
518  * \param[in] l_ The listener
519  *
520  * \return A reference to new discovery instance on success, NULL otherwise
521  */
522 #define DiscoveryComponentFactory_create_component(f_,p_,l_) \
523  (struct NDDS_Discovery_Plugin*)((f_)->intf)->create_component(f_,p_,l_)
524 
525 /*ci
526  * \brief Wrapper to call of the DiscoveryComponentFactory->delete_component
527  *
528  * \param[in] f_ The discovery factory
529  * \param[in] c_ The discovery instance to delete
530  */
531 #define DiscoveryComponentFactory_delete_component(f_,c_) \
532  ((f_)->intf)->delete_component(f_,(RT_Component_T*)(c_))
533 
534 /*ci
535  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_before_local_participant_created
536  *
537  * \details
538  * When a participant creates an instance of the discovery plugin it calls
539  * this function before allocating any resources. The plugin is allowed to
540  * modify the participant's qos to take its own resource needs into
541  * account.
542  *
543  * \param[in] self_ The DPSE plugin
544  * \param[in] p_ The participant creating the plugin
545  * \param[inout] q_ The participant's qos policy
546  * \param[inout] b_ The participant's announcement data
547  *
548  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
549  */
550 #define NDDS_Discovery_Plugin_on_before_local_participant_created(\
551  self_,p_,q_,b_) \
552 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
553  on_before_local_participant_created(self_,p_,q_,b_)
554 
555 /*ci
556  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_after_local_participant_created
557  *
558  * \details
559  * When a participant is created it is ready for creating user entities. In
560  * this callback the DPSE plugin creates the discovery endpoints. The qos
561  * for the discovery endpoints are pre-defined by the DDS specification.
562  *
563  * \param[in] self_ The DPSE plugin
564  * \param[in] p_ The participant creating the plugin
565  * \param[in] data_ The participant's announcement data
566  *
567  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
568  */
569 #define NDDS_Discovery_Plugin_on_after_local_participant_created(\
570  self_,p_,data_) \
571 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
572  on_after_local_participant_created(self_,p_,data_)
573 
574 /*ci
575  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_after_local_participant_enabled
576  *
577  * \details
578  * When a participant is enabled it is ready to announce discovery data. In
579  * this callback the DPSE plugin enables its own discovery endpoints and
580  * starts announcing the participant.
581  *
582  * \param[in] self_ The DPSE plugin
583  * \param[in] p_ The participant creating the plugin
584  * \param[in] data_ The participant's announcement data
585  *
586  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
587  */
588 #define NDDS_Discovery_Plugin_on_after_local_participant_enabled(\
589  self_,p_,data_) \
590 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
591  on_after_local_participant_enabled(self_,p_,data_)
592 
593 /*ci
594  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_before_local_participant_deleted
595  *
596  * \details
597  * When a participant is deleted the plugin must delete all its internal
598  * resources. It also disposes of the participant.
599  *
600  * \param[in] self_ The DPSE plugin
601  * \param[in] p_ The participant being deleted
602  * \param[in] key_ The participant's key
603  *
604  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
605  */
606 #define NDDS_Discovery_Plugin_on_before_local_participant_deleted(\
607  self_,p_,key_) \
608 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
609  on_before_local_participant_deleted(self_,p_,key_)
610 
611 /*ci
612  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_after_local_datawriter_enabled
613  *
614  * \details
615  * This function is called when a local datawriter is enabled.
616  *
617  * \param[in] self_ The DPSE plugin
618  * \param[in] p_ The participant
619  * \param[in] dw_ The datawriter being enabled
620  * \param[in] dq_ The datawriters Qos
621  *
622  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
623  */
624 #define NDDS_Discovery_Plugin_on_after_local_datawriter_enabled(\
625  self_,p_,dw_,dq_) \
626 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
627  on_after_local_datawriter_enabled(self_,p_,dw_,dq_)
628 
629 /*ci
630  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_after_local_datawriter_deleted
631  *
632  * \details
633  * This function is called when a local datawriter is deleted.
634  *
635  * \param[in] self_ The DPSE plugin
636  * \param[in] p_ The participant
637  * \param[in] dwkey_ The key of the deleted datawriter
638  *
639  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
640  */
641 #define NDDS_Discovery_Plugin_on_after_local_datawriter_deleted(\
642  self_,p_,dwkey_) \
643 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
644  on_after_local_datawriter_deleted(self_,p_,dwkey_)
645 
646 /*ci
647  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_after_local_datareader_enabled
648  *
649  * \details
650  * This function is called when a local datareader is enabled.
651  *
652  * \param[in] self_ The DPSE plugin
653  * \param[in] p_ The participant
654  * \param[in] dr_ The datareader being enabled
655  * \param[in] dq_ The datareaders Qos
656  *
657  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
658  */
659 #define NDDS_Discovery_Plugin_on_after_local_datareader_enabled(\
660  self_,p_,dr_,dq_) \
661 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
662  on_after_local_datareader_enabled(self_,p_,dr_,dq_)
663 
664 /*ci
665  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_after_local_datareader_deleted
666  *
667  * \details
668  * This function is called when a local datareader is deleted.
669  *
670  * \param[in] self_ The DPSE plugin
671  * \param[in] p_ The participant
672  * \param[in] drkey_ The datareader being enabled
673  *
674  * \return DDS_BOOLEAN_TRUE on success, DDS_BOOLEAN_FALSE on failure
675  */
676 #define NDDS_Discovery_Plugin_on_after_local_datareader_deleted(self_,p_,drkey_)\
677 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
678  on_after_local_datareader_deleted(self_,p_,drkey_)
679 
680 /*ci
681  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_remote_participant_liveliness_expired
682  *
683  * \details
684  * The participant calls this interface when it detects that a remote
685  * participant does not maintain its lease_duration commitment
686  *
687  * \param[in] self_ The DPSE plugin
688  * \param[in] p_ The participant
689  * \param[in] data_ The remote participant data
690  *
691  * \return DDS_BOOLEAN_TRUE on success or DDS_BOOLEAN_FALSE on failure
692  */
693 #define NDDS_Discovery_Plugin_on_remote_participant_liveliness_expired(\
694  self_,p_,data_) \
695 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->\
696  on_remote_participant_liveliness_expired(self_,p_,data_)
697 
698 /*ci
699  * \brief Wrapper to call \ref NDDS_DiscoveryI::add_peer
700  *
701  * \details
702  * This API enables peer addresses to be dynamically added to a participants
703  * peer list after it has been created.
704  *
705  * \param[in] self_ The DPSE plugin
706  * \param[in] p_ The participant
707  * \param[in] peer_ A peer address string
708  *
709  * \return DDS_BOOLEAN_TRUE on success or DDS_BOOLEAN_FALSE on failure
710  */
711 #define NDDS_Discovery_Plugin_add_peer(\
712  self_,p_,peer_) \
713 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->add_peer(self_,p_,peer_)
714 
715 /*ci
716  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_assert_remote_participant
717  *
718  * \details
719  * When a remote participant is added to a participant the discovery plugin
720  * is notified. The DPSE plugin keeps track of which participants have
721  * been statically asserted. If a participant is discovered, but has not
722  * been statically asserted it is ignored.
723  *
724  * \param[in] self_ The DPSE plugin
725  * \param[in] p_ The participant
726  * \param[in] name_ The name of the remote participant
727  */
728 #define NDDS_Discovery_Plugin_assert_remote_participant(self_,p_,name_) \
729 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->on_assert_remote_participant(self_,p_,name_)
730 
731 /*ci
732  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_before_local_datareader_created method
733  *
734  * \param[in] self_ The discovery plugin
735  * \param[in] p_ The participant
736  * \param[in] dr_key_ The key of the datareader to be created
737  * \param[in] res_ DDS_BOOLEAN_TRUE if this is a reservation,
738  * DDS_BOOLEAN_FALSE if this is releasing a
739  * reservation.
740  *
741  * \return DDS_RETCODE_OK success, one of the standard return codes on failure
742  */
743 #define NDDS_Discovery_Plugin_on_before_local_datareader_created(self_,p_,dr_key_,res_) \
744 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->on_before_local_datareader_created(self_,p_,dr_key_,res_)
745 
746 /*ci
747  * \brief Wrapper to call \ref NDDS_DiscoveryI::on_before_local_datawriter_created method
748  *
749  * \param[in] self_ The discovery plugin
750  * \param[in] p_ The participant
751  * \param[in] dw_key_ The key of the datawriter to be created
752  * \param[in] res_ DDS_BOOLEAN_TRUE if this is a reservation,
753  * DDS_BOOLEAN_FALSE if this is releasing a
754  * reservation.
755  * \return DDS_RETCODE_OK success, one of the standard return codes on failure
756  */
757 #define NDDS_Discovery_Plugin_on_before_local_datawriter_created(self_,p_,dw_key_,res_) \
758 ((struct NDDS_DiscoveryI*)((self_)->_parent._intf))->on_before_local_datawriter_created(self_,p_,dw_key_,res_)
759 
760 #ifdef __cplusplus
761 } /* extern "C" */
762 #endif
763 
764 #endif /* dds_c_discovery_plugin_h */
765 
766 /*ci @} */

RTI Connext DDS Micro Version 2.4.11 Copyright © Mon Jul 23 2018 Real-Time Innovations, Inc