00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef OPENDDS_FEDERATOR_IDL 00009 #define OPENDDS_FEDERATOR_IDL 00010 00011 #include "dds/DCPS/InfoRepoDiscovery/Info.idl" 00012 #include "dds/DdsDcpsGuid.idl" 00013 #include "tao/OctetSeq.pidl" 00014 00015 module OpenDDS { module Federator { 00016 00017 // Unique identifier for a repository. 00018 typedef long RepoKey; 00019 00020 // Value of DomainId for federation. 00021 typedef DDS::DomainId_t FederationDomain; 00022 00023 // Unique identifier for all entities within federation. 00024 typedef DCPS::GUID_t FederationId; 00025 00026 // Types of updates that can be performed. 00027 enum UpdateType { 00028 CreateEntity, 00029 DestroyEntity, 00030 UpdateQosValue1, 00031 UpdateQosValue2, 00032 UpdateFilterExpressionParams 00033 }; 00034 00035 // Constant values. 00036 const RepoKey NIL_REPOSITORY = 0; // Reserved repository Id value. 00037 const FederationDomain DEFAULT_FEDERATIONDOMAIN = -2107281297; 00038 const FederationDomain ANY_FEDERATIONDOMAIN = -1; 00039 00040 //////////////////////////////////////////////////////////////////// 00041 // 00042 // Ownership updates 00043 // 00044 00045 // These pragmas are TAO specific 00046 #pragma DCPS_DATA_TYPE "OpenDDS::Federator::OwnerUpdate" 00047 #pragma DCPS_DATA_KEY "OpenDDS::Federator::OwnerUpdate sender" 00048 struct OwnerUpdate { 00049 RepoKey sender; 00050 RepoKey owner; 00051 FederationId participant; 00052 DDS::DomainId_t domain; 00053 UpdateType action; 00054 }; 00055 00056 // Constant values. 00057 const string OWNERUPDATETOPICNAME = "OwnerUpdate"; 00058 const string OWNERUPDATETYPENAME = "OwnerUpdate"; 00059 00060 //////////////////////////////////////////////////////////////////// 00061 // 00062 // Topic data updates 00063 // 00064 00065 // These pragmas are TAO specific 00066 #pragma DCPS_DATA_TYPE "OpenDDS::Federator::TopicUpdate" 00067 #pragma DCPS_DATA_KEY "OpenDDS::Federator::TopicUpdate sender" 00068 struct TopicUpdate { 00069 FederationId id; 00070 RepoKey sender; 00071 FederationId participant; 00072 DDS::DomainId_t domain; 00073 UpdateType action; 00074 string topic; 00075 string datatype; 00076 DDS::TopicQos qos; 00077 }; 00078 00079 // Constant values. 00080 const string TOPICUPDATETOPICNAME = "TopicUpdate"; 00081 const string TOPICUPDATETYPENAME = "TopicUpdate"; 00082 00083 //////////////////////////////////////////////////////////////////// 00084 // 00085 // Participant data updates 00086 // 00087 00088 // These pragmas are TAO specific 00089 #pragma DCPS_DATA_TYPE "OpenDDS::Federator::ParticipantUpdate" 00090 #pragma DCPS_DATA_KEY "OpenDDS::Federator::ParticipantUpdate sender" 00091 struct ParticipantUpdate { 00092 FederationId id; 00093 RepoKey sender; 00094 RepoKey owner; 00095 DDS::DomainId_t domain; 00096 UpdateType action; 00097 DDS::DomainParticipantQos qos; 00098 }; 00099 00100 // Constant values. 00101 const string PARTICIPANTUPDATETOPICNAME = "ParticipantUpdate"; 00102 const string PARTICIPANTUPDATETYPENAME = "ParticipantUpdate"; 00103 00104 //////////////////////////////////////////////////////////////////// 00105 // 00106 // Publication data updates 00107 // 00108 00109 // These pragmas are TAO specific 00110 #pragma DCPS_DATA_TYPE "OpenDDS::Federator::PublicationUpdate" 00111 #pragma DCPS_DATA_KEY "OpenDDS::Federator::PublicationUpdate sender" 00112 struct PublicationUpdate { 00113 FederationId id; 00114 RepoKey sender; 00115 FederationId topic; 00116 FederationId participant; 00117 DDS::DomainId_t domain; 00118 UpdateType action; 00119 string callback; 00120 DDS::PublisherQos publisher_qos; 00121 DDS::DataWriterQos datawriter_qos; 00122 00123 OpenDDS::DCPS::TransportLocatorSeq transport_info; 00124 }; 00125 00126 // Constant values. 00127 const string PUBLICATIONUPDATETOPICNAME = "PublicationUpdate"; 00128 const string PUBLICATIONUPDATETYPENAME = "PublicationUpdate"; 00129 00130 //////////////////////////////////////////////////////////////////// 00131 // 00132 // Subscription data updates 00133 // 00134 00135 // These pragmas are TAO specific 00136 #pragma DCPS_DATA_TYPE "OpenDDS::Federator::SubscriptionUpdate" 00137 #pragma DCPS_DATA_KEY "OpenDDS::Federator::SubscriptionUpdate sender" 00138 struct SubscriptionUpdate { 00139 FederationId id; 00140 RepoKey sender; 00141 FederationId topic; 00142 FederationId participant; 00143 DDS::DomainId_t domain; 00144 UpdateType action; 00145 string callback; 00146 DDS::SubscriberQos subscriber_qos; 00147 DDS::DataReaderQos datareader_qos; 00148 00149 OpenDDS::DCPS::TransportLocatorSeq transport_info; 00150 00151 // The following are for Content-Subscription Profile 00152 string filter_class_name; 00153 string filter_expression; 00154 DDS::StringSeq expression_params; 00155 }; 00156 00157 // Constant values. 00158 const string SUBSCRIPTIONUPDATETOPICNAME = "SubscriptionUpdate"; 00159 const string SUBSCRIPTIONUPDATETYPENAME = "SubscriptionUpdate"; 00160 00161 // 00162 // Exceptions. 00163 // 00164 00165 // 00166 // Processing has started and failed, leaving the called object in an 00167 // unknown - and likely unstable - state. 00168 // 00169 exception Incomplete {}; 00170 00171 //////////////////////////////////////////////////////////////////// 00172 // 00173 // Federation manager interface. 00174 // 00175 interface Manager { 00176 // 00177 // Initiates the discovery process to establish connectivity with a 00178 // federation having the specified DomainId value. 00179 // 00180 boolean discover_federation( in string ior) raises( Incomplete); 00181 00182 // 00183 // Called to join a federation initially or to redirect the active 00184 // connection of an already federated repository Manager. 00185 // 00186 Manager join_federation( 00187 in Manager peer, 00188 in FederationDomain federation 00189 ) raises( Incomplete); 00190 00191 // 00192 // Called to leave a federation to allow the federation to cleanup 00193 // storage associated with the repository leaving the federation. 00194 // 00195 void leave_federation( in RepoKey id) raises( Incomplete); 00196 00197 // 00198 // Return the FederationId value for the managed repository. This 00199 // value can only be set on creation and initialization of the 00200 // repository. 00201 // 00202 RepoKey federation_id(); 00203 00204 // 00205 // Return a reference to the managed DCPSInfo object within this 00206 // repository. 00207 // 00208 OpenDDS::DCPS::DCPSInfo repository(); 00209 00210 // 00211 // The following methods allow the current state of a repository to 00212 // be pushed to a newly joining repository. 00213 // N.B. These are not 'oneway' since we need to be assured that the 00214 // previous operation has completed on the remote side before 00215 // starting the next call. 00216 // 00217 00218 void initializeOwner( in OwnerUpdate data) raises( Incomplete); 00219 void initializeTopic( in TopicUpdate data) raises( Incomplete); 00220 void initializeParticipant( in ParticipantUpdate data) raises( Incomplete); 00221 void initializePublication( in PublicationUpdate data) raises( Incomplete); 00222 void initializeSubscription( in SubscriptionUpdate data) raises( Incomplete); 00223 00224 ////////////////////////////////// 00225 // 00226 // Administrative methods. 00227 // 00228 00229 // 00230 // Leave the federation gracefully and shutdown the repository. 00231 // 00232 void leave_and_shutdown() raises( Incomplete); 00233 00234 // 00235 // Shutdown without leaving the federation. This leaves existing 00236 // application associations in place and their management will 00237 // transfer to a different repository within the federation. 00238 // 00239 void shutdown() raises( Incomplete); 00240 00241 // 00242 ////////////////////////////////// 00243 00244 }; 00245 00246 // Constant values. 00247 const string REPOSITORY_IORTABLE_KEY = "DCPSInfoRepo"; 00248 const string FEDERATOR_IORTABLE_KEY = "Federator"; 00249 00250 }; }; // End of OpenDDS::Federator 00251 00252 #endif /* OPENDDS_FEDERATOR_IDL */