OpenDDS  Snapshot(2023/04/28-20:55)
Federator.idl
Go to the documentation of this file.
1 /*
2  *
3  *
4  * Distributed under the OpenDDS License.
5  * See: http://www.opendds.org/license.html
6  */
7 
8 #ifndef OPENDDS_FEDERATOR_IDL
9 #define OPENDDS_FEDERATOR_IDL
10 
12 #include "dds/DdsDcpsGuid.idl"
13 #include "tao/OctetSeq.pidl"
14 
15 module OpenDDS { module Federator {
16 
17  // Unique identifier for a repository.
18  typedef long RepoKey;
19 
20  // Value of DomainId for federation.
22 
23  // Unique identifier for all entities within federation.
25 
26  // Types of updates that can be performed.
27  enum UpdateType {
33  };
34 
35  // Constant values.
36  const RepoKey NIL_REPOSITORY = 0; // Reserved repository Id value.
37  const FederationDomain DEFAULT_FEDERATIONDOMAIN = -2107281297;
38  const FederationDomain ANY_FEDERATIONDOMAIN = -1;
39 
40  ////////////////////////////////////////////////////////////////////
41  //
42  // Ownership updates
43  //
44 
45  @topic
46  struct OwnerUpdate {
47  @key RepoKey sender;
48  RepoKey owner;
49  FederationId participant;
52  };
53 
54  // Constant values.
55  const string OWNERUPDATETOPICNAME = "OwnerUpdate";
56  const string OWNERUPDATETYPENAME = "OwnerUpdate";
57 
58  ////////////////////////////////////////////////////////////////////
59  //
60  // Topic data updates
61  //
62 
63  @topic
64  struct TopicUpdate {
65  FederationId id;
66  @key RepoKey sender;
67  FederationId participant;
70  string topic;
71  string datatype;
73  };
74 
75  // Constant values.
76  const string TOPICUPDATETOPICNAME = "TopicUpdate";
77  const string TOPICUPDATETYPENAME = "TopicUpdate";
78 
79  ////////////////////////////////////////////////////////////////////
80  //
81  // Participant data updates
82  //
83 
84  @topic
86  FederationId id;
87  @key RepoKey sender;
88  RepoKey owner;
92  };
93 
94  // Constant values.
95  const string PARTICIPANTUPDATETOPICNAME = "ParticipantUpdate";
96  const string PARTICIPANTUPDATETYPENAME = "ParticipantUpdate";
97 
98  ////////////////////////////////////////////////////////////////////
99  //
100  // Publication data updates
101  //
102 
103  @topic
105  FederationId id;
106  @key RepoKey sender;
107  FederationId topic;
108  FederationId participant;
111  string callback;
114 
116  unsigned long transport_context;
118  };
119 
120  // Constant values.
121  const string PUBLICATIONUPDATETOPICNAME = "PublicationUpdate";
122  const string PUBLICATIONUPDATETYPENAME = "PublicationUpdate";
123 
124  ////////////////////////////////////////////////////////////////////
125  //
126  // Subscription data updates
127  //
128 
129  @topic
131  FederationId id;
132  @key RepoKey sender;
133  FederationId topic;
134  FederationId participant;
137  string callback;
140 
142  unsigned long transport_context;
143 
144  // The following are for Content-Subscription Profile
149  };
150 
151  // Constant values.
152  const string SUBSCRIPTIONUPDATETOPICNAME = "SubscriptionUpdate";
153  const string SUBSCRIPTIONUPDATETYPENAME = "SubscriptionUpdate";
154 
155  //
156  // Exceptions.
157  //
158 
159  //
160  // Processing has started and failed, leaving the called object in an
161  // unknown - and likely unstable - state.
162  //
163  exception Incomplete {};
164 
165  ////////////////////////////////////////////////////////////////////
166  //
167  // Federation manager interface.
168  //
169  interface Manager {
170  //
171  // Initiates the discovery process to establish connectivity with a
172  // federation having the specified DomainId value.
173  //
174  boolean discover_federation(in string ior) raises(Incomplete);
175 
176  //
177  // Called to join a federation initially or to redirect the active
178  // connection of an already federated repository Manager.
179  //
180  Manager join_federation(
181  in Manager peer,
182  in FederationDomain federation
183  ) raises(Incomplete);
184 
185  //
186  // Called to leave a federation to allow the federation to cleanup
187  // storage associated with the repository leaving the federation.
188  //
189  void leave_federation(in RepoKey id) raises(Incomplete);
190 
191  //
192  // Return the FederationId value for the managed repository. This
193  // value can only be set on creation and initialization of the
194  // repository.
195  //
196  RepoKey federation_id();
197 
198  //
199  // Return a reference to the managed DCPSInfo object within this
200  // repository.
201  //
202  OpenDDS::DCPS::DCPSInfo repository();
203 
204  //
205  // The following methods allow the current state of a repository to
206  // be pushed to a newly joining repository.
207  // N.B. These are not 'oneway' since we need to be assured that the
208  // previous operation has completed on the remote side before
209  // starting the next call.
210  //
211 
212  void initializeOwner(in OwnerUpdate data) raises(Incomplete);
213  void initializeTopic(in TopicUpdate data) raises(Incomplete);
214  void initializeParticipant(in ParticipantUpdate data) raises(Incomplete);
215  void initializePublication(in PublicationUpdate data) raises(Incomplete);
216  void initializeSubscription(in SubscriptionUpdate data) raises(Incomplete);
217 
218  //////////////////////////////////
219  //
220  // Administrative methods.
221  //
222 
223  //
224  // Leave the federation gracefully and shutdown the repository.
225  //
226  void leave_and_shutdown() raises(Incomplete);
227 
228  //
229  // Shutdown without leaving the federation. This leaves existing
230  // application associations in place and their management will
231  // transfer to a different repository within the federation.
232  //
233  void shutdown() raises(Incomplete);
234 
235  //
236  //////////////////////////////////
237 
238  };
239 
240  // Constant values.
241  const string REPOSITORY_IORTABLE_KEY = "DCPSInfoRepo";
242  const string FEDERATOR_IORTABLE_KEY = "Federator";
243 
244 }; }; // End of OpenDDS::Federator
245 
246 #endif /* OPENDDS_FEDERATOR_IDL */
const string PUBLICATIONUPDATETOPICNAME
Definition: Federator.idl:121
const string TOPICUPDATETOPICNAME
Definition: Federator.idl:76
const string OWNERUPDATETYPENAME
Definition: Federator.idl:56
DCPS::GUID_t FederationId
Definition: Federator.idl:24
const FederationDomain ANY_FEDERATIONDOMAIN
Definition: Federator.idl:38
sequence< octet > key
sequence< TransportLocator > TransportLocatorSeq
const string SUBSCRIPTIONUPDATETOPICNAME
Definition: Federator.idl:152
DDS::DomainParticipantQos qos
Definition: Federator.idl:91
const FederationDomain DEFAULT_FEDERATIONDOMAIN
Definition: Federator.idl:37
const RepoKey NIL_REPOSITORY
Definition: Federator.idl:36
DOMAINID_TYPE_NATIVE DomainId_t
const string SUBSCRIPTIONUPDATETYPENAME
Definition: Federator.idl:153
const string PUBLICATIONUPDATETYPENAME
Definition: Federator.idl:122
DDS::DomainId_t FederationDomain
Definition: Federator.idl:21
const string REPOSITORY_IORTABLE_KEY
Definition: Federator.idl:241
sequence< octet > OctetSeq
Definition: DdsDcpsCore.idl:64
OpenDDS::DCPS::TransportLocatorSeq transport_info
Definition: Federator.idl:141
const string PARTICIPANTUPDATETOPICNAME
Definition: Federator.idl:95
::CORBA::Long RepoKey
const string FEDERATOR_IORTABLE_KEY
Definition: Federator.idl:242
const string OWNERUPDATETOPICNAME
Definition: Federator.idl:55
int shutdown(ACE_HANDLE handle, int how)
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
const string PARTICIPANTUPDATETYPENAME
Definition: Federator.idl:96
sequence< string > StringSeq
Definition: DdsDcpsCore.idl:50
const string TOPICUPDATETYPENAME
Definition: Federator.idl:77
OpenDDS::DCPS::TransportLocatorSeq transport_info
Definition: Federator.idl:115