DdsDcpsInfrastructure.idl

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #ifndef OPENDDS_DCPS_INFRASTRUCTURE_IDL
00009 #define OPENDDS_DCPS_INFRASTRUCTURE_IDL
00010 
00011 #include "dds/DdsDcpsCore.idl"
00012 #include "dds/DdsDcpsConditionSeq.idl"
00013 
00014 #define DOMAINID_TYPE_NATIVE long
00015 #define HANDLE_NIL_NATIVE 0
00016 // Implementation Note:
00017 //   Client code must include "Service_Participant.h"
00018 //   to have these definitions.
00019 //#define TheParticipantFactory
00020 
00021 // Implementation Note:
00022 //   Client code must include "Marked_Default_Qos.h"
00023 //   to have these definitions.
00024 //#define PARTICIPANT_QOS_DEFAULT
00025 //#define TOPIC_QOS_DEFAULT
00026 //#define PUBLISHER_QOS_DEFAULT
00027 //#define SUBSCRIBER_QOS_DEFAULT
00028 //#define DATAWRITER_QOS_DEFAULT
00029 //#define DATAREADER_QOS_DEFAULT
00030 //#define DATAWRITER_QOS_USE_TOPIC_QOS
00031 //#define DATAREADER_QOS_USE_TOPIC_QOS
00032 
00033 #pragma ciao lem "dds/DdsDcpsInfrastructureE.idl"
00034 
00035 module DDS {
00036     typedef DOMAINID_TYPE_NATIVE  DomainId_t;
00037     // Moved to DdsDcpsCore.idl
00038     // typedef HANDLE_TYPE_NATIVE    InstanceHandle_t;
00039     // typedef BUILTIN_TOPIC_KEY_TYPE_NATIVE BuiltinTopicKeyValue[3];
00040     // typedef sequence<InstanceHandle_t> InstanceHandleSeq;
00041 
00042     typedef long ReturnCode_t;
00043 
00044     // ----------------------------------------------------------------------
00045     // Pre-defined values
00046     // ----------------------------------------------------------------------
00047     const InstanceHandle_t HANDLE_NIL = HANDLE_NIL_NATIVE;
00048 
00049     const long LENGTH_UNLIMITED = -1;
00050 
00051     const long            DURATION_INFINITE_SEC   = 0x7fffffff;
00052     const unsigned long   DURATION_INFINITE_NSEC  = 0x7fffffff;
00053 
00054     const long DURATION_ZERO_SEC = 0;
00055     const unsigned long DURATION_ZERO_NSEC = 0;
00056 
00057     const long            TIME_INVALID_SEC        = -1;
00058     const unsigned long   TIME_INVALID_NSEC       = 0xffffffff;
00059 
00060     // ----------------------------------------------------------------------
00061     // Return codes
00062     // ----------------------------------------------------------------------
00063     const ReturnCode_t RETCODE_OK = 0;
00064     const ReturnCode_t RETCODE_ERROR = 1;
00065     const ReturnCode_t RETCODE_UNSUPPORTED = 2;
00066     const ReturnCode_t RETCODE_BAD_PARAMETER = 3;
00067     const ReturnCode_t RETCODE_PRECONDITION_NOT_MET = 4;
00068     const ReturnCode_t RETCODE_OUT_OF_RESOURCES = 5;
00069     const ReturnCode_t RETCODE_NOT_ENABLED = 6;
00070     const ReturnCode_t RETCODE_IMMUTABLE_POLICY = 7;
00071     const ReturnCode_t RETCODE_INCONSISTENT_POLICY = 8;
00072     const ReturnCode_t RETCODE_ALREADY_DELETED = 9;
00073     const ReturnCode_t RETCODE_TIMEOUT = 10;
00074     const ReturnCode_t RETCODE_NO_DATA = 11;
00075     const ReturnCode_t RETCODE_ILLEGAL_OPERATION     = 12;
00076 
00077     // ----------------------------------------------------------------------
00078     // Status to support listeners and conditions
00079     // ----------------------------------------------------------------------
00080 
00081     typedef unsigned long StatusKind;
00082     typedef unsigned long StatusMask; // bit-mask StatusKind
00083 
00084     const StatusKind INCONSISTENT_TOPIC_STATUS            = 0x0001 << 0;
00085     const StatusKind OFFERED_DEADLINE_MISSED_STATUS       = 0x0001 << 1;
00086     const StatusKind REQUESTED_DEADLINE_MISSED_STATUS     = 0x0001 << 2;
00087     const StatusKind OFFERED_INCOMPATIBLE_QOS_STATUS      = 0x0001 << 5;
00088     const StatusKind REQUESTED_INCOMPATIBLE_QOS_STATUS    = 0x0001 << 6;
00089     const StatusKind SAMPLE_LOST_STATUS                   = 0x0001 << 7;
00090     const StatusKind SAMPLE_REJECTED_STATUS               = 0x0001 << 8;
00091     const StatusKind DATA_ON_READERS_STATUS               = 0x0001 << 9;
00092     const StatusKind DATA_AVAILABLE_STATUS                = 0x0001 << 10;
00093     const StatusKind LIVELINESS_LOST_STATUS               = 0x0001 << 11;
00094     const StatusKind LIVELINESS_CHANGED_STATUS            = 0x0001 << 12;
00095     const StatusKind PUBLICATION_MATCHED_STATUS           = 0x0001 << 13;
00096     const StatusKind SUBSCRIPTION_MATCHED_STATUS          = 0x0001 << 14;
00097 
00098     struct InconsistentTopicStatus {
00099                 long total_count;
00100                 long total_count_change;
00101                 };
00102 
00103     struct SampleLostStatus {
00104                 long total_count;
00105                 long total_count_change;
00106                 };
00107 
00108     enum SampleRejectedStatusKind {
00109                 NOT_REJECTED,
00110                 REJECTED_BY_INSTANCES_LIMIT,
00111                 REJECTED_BY_SAMPLES_LIMIT,
00112                 REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT
00113                 };
00114 
00115     struct SampleRejectedStatus {
00116                 long total_count;
00117                 long total_count_change;
00118                 SampleRejectedStatusKind last_reason;
00119                 InstanceHandle_t last_instance_handle;
00120                 };
00121 
00122     struct LivelinessLostStatus {
00123                 long total_count;
00124                 long total_count_change;
00125                 };
00126 
00127     struct LivelinessChangedStatus {
00128                 long alive_count;
00129                 long not_alive_count;
00130                 long alive_count_change;
00131                 long not_alive_count_change;
00132                 InstanceHandle_t last_publication_handle;
00133                 };
00134 
00135     struct OfferedDeadlineMissedStatus {
00136                 long total_count;
00137                 long total_count_change;
00138                 InstanceHandle_t last_instance_handle;
00139                 };
00140 
00141     struct RequestedDeadlineMissedStatus {
00142                 long total_count;
00143                 long total_count_change;
00144                 InstanceHandle_t last_instance_handle;
00145                 };
00146 
00147     struct OfferedIncompatibleQosStatus {
00148                 long total_count;
00149                 long total_count_change;
00150                 QosPolicyId_t last_policy_id;
00151                 QosPolicyCountSeq policies;
00152                 };
00153 
00154     struct RequestedIncompatibleQosStatus {
00155                 long total_count;
00156                 long total_count_change;
00157                 QosPolicyId_t last_policy_id;
00158                 QosPolicyCountSeq policies;
00159                 };
00160 
00161 
00162     struct PublicationMatchedStatus {
00163                 long total_count;
00164                 long total_count_change;
00165                 long current_count;
00166                 long current_count_change;
00167                 InstanceHandle_t last_subscription_handle;
00168                 };
00169 
00170 
00171     struct SubscriptionMatchedStatus {
00172                 long total_count;
00173                 long total_count_change;
00174                 long current_count;
00175                 long current_count_change;
00176                 InstanceHandle_t last_publication_handle;
00177                 };
00178 
00179     // ----------------------------------------------------------------------
00180     // Listeners
00181     // ----------------------------------------------------------------------
00182 
00183     local interface Listener;
00184     local interface Entity;
00185     //interface TopicDescription;
00186     //interface Topic;
00187     //interface ContentFilteredTopic;
00188     //interface MultiTopic;
00189     //interface DataWriter;
00190     //interface DataReader;
00191     //interface Subscriber;
00192     //interface Publisher;
00193 
00194     //typedef sequence<Topic> TopicSeq;
00195     //typedef sequence<DataReader> DataReaderSeq;
00196 
00197     local interface Listener {};
00198 
00199     // ----------------------------------------------------------------------
00200     // Conditions
00201     // ----------------------------------------------------------------------
00202 
00203     local interface Condition {
00204         boolean get_trigger_value();
00205     };
00206 
00207     // WaitSet and GuardCondition can't be expressed in IDL because they are
00208     // required by the spec to be default-constructable by the user
00209     // (07-01-01 section 7.2.2 pgh 11).  Therefore in IDL we have WaitSetInterf
00210     // and GuardConditionInterf.  Application code should #include
00211     // "dds/DCPS/WaitSet.h", "dds/DCPS/GuardCondition.h" and construct heap
00212     // objects with "new WaitSet()" and "new GuardCondition()".  Those objects
00213     // (in the DDS namespace/package) implement the interfaces described below.
00214     // In C++, these are reference-counted local CORBA objects.
00215 
00216     local interface WaitSetInterf {
00217         ReturnCode_t wait(
00218             inout ConditionSeq active_conditions,
00219             in Duration_t timeout);
00220         ReturnCode_t attach_condition(
00221             in Condition cond);
00222         ReturnCode_t detach_condition(
00223             in Condition cond);
00224         ReturnCode_t get_conditions(
00225             inout ConditionSeq attached_conditions);
00226     };
00227 
00228     local interface GuardConditionInterf : Condition {
00229         ReturnCode_t set_trigger_value(
00230             in boolean value);
00231     };
00232 
00233 
00234     local interface StatusCondition : Condition {
00235         StatusMask get_enabled_statuses();
00236         ReturnCode_t set_enabled_statuses(
00237             in StatusMask mask);
00238         Entity get_entity();
00239     };
00240 
00241     // ----------------------------------------------------------------------
00242     // Qos
00243     // ----------------------------------------------------------------------
00244     const string USERDATA_QOS_POLICY_NAME            = "UserData";
00245     const string DURABILITY_QOS_POLICY_NAME          = "Durability";
00246     const string PRESENTATION_QOS_POLICY_NAME        = "Presentation";
00247     const string DEADLINE_QOS_POLICY_NAME            = "Deadline";
00248     const string LATENCYBUDGET_QOS_POLICY_NAME       = "LatencyBudget";
00249     const string OWNERSHIP_QOS_POLICY_NAME           = "Ownership";
00250     const string OWNERSHIPSTRENGTH_QOS_POLICY_NAME   = "OwnershipStrength";
00251     const string LIVELINESS_QOS_POLICY_NAME          = "Liveliness";
00252     const string TIMEBASEDFILTER_QOS_POLICY_NAME     = "TimeBasedFilter";
00253     const string PARTITION_QOS_POLICY_NAME           = "Partition";
00254     const string RELIABILITY_QOS_POLICY_NAME         = "Reliability";
00255     const string DESTINATIONORDER_QOS_POLICY_NAME    = "DestinationOrder";
00256     const string HISTORY_QOS_POLICY_NAME             = "History";
00257     const string RESOURCELIMITS_QOS_POLICY_NAME      = "ResourceLimits";
00258     const string ENTITYFACTORY_QOS_POLICY_NAME       = "EntityFactory";
00259     const string WRITERDATALIFECYCLE_QOS_POLICY_NAME = "WriterDataLifecycle";
00260     const string READERDATALIFECYCLE_QOS_POLICY_NAME = "ReaderDataLifecycle";
00261     const string TOPICDATA_QOS_POLICY_NAME           = "TopicData";
00262     const string GROUPDATA_QOS_POLICY_NAME           = "GroupData";
00263     const string TRANSPORTPRIORITY_QOS_POLICY_NAME   = "TransportPriority";
00264     const string LIFESPAN_QOS_POLICY_NAME            = "Lifespan";
00265     const string DURABILITYSERVICE_POLICY_NAME       = "DurabilityService";
00266 
00267     const QosPolicyId_t INVALID_QOS_POLICY_ID              = 0;
00268     const QosPolicyId_t USERDATA_QOS_POLICY_ID            = 1;
00269     const QosPolicyId_t DURABILITY_QOS_POLICY_ID          = 2;
00270     const QosPolicyId_t PRESENTATION_QOS_POLICY_ID        = 3;
00271     const QosPolicyId_t DEADLINE_QOS_POLICY_ID            = 4;
00272     const QosPolicyId_t LATENCYBUDGET_QOS_POLICY_ID       = 5;
00273     const QosPolicyId_t OWNERSHIP_QOS_POLICY_ID           = 6;
00274     const QosPolicyId_t OWNERSHIPSTRENGTH_QOS_POLICY_ID   = 7;
00275     const QosPolicyId_t LIVELINESS_QOS_POLICY_ID          = 8;
00276     const QosPolicyId_t TIMEBASEDFILTER_QOS_POLICY_ID     = 9;
00277     const QosPolicyId_t PARTITION_QOS_POLICY_ID           = 10;
00278     const QosPolicyId_t RELIABILITY_QOS_POLICY_ID         = 11;
00279     const QosPolicyId_t DESTINATIONORDER_QOS_POLICY_ID    = 12;
00280     const QosPolicyId_t HISTORY_QOS_POLICY_ID             = 13;
00281     const QosPolicyId_t RESOURCELIMITS_QOS_POLICY_ID      = 14;
00282     const QosPolicyId_t ENTITYFACTORY_QOS_POLICY_ID       = 15;
00283     const QosPolicyId_t WRITERDATALIFECYCLE_QOS_POLICY_ID = 16;
00284     const QosPolicyId_t READERDATALIFECYCLE_QOS_POLICY_ID = 17;
00285     const QosPolicyId_t TOPICDATA_QOS_POLICY_ID           = 18;
00286     const QosPolicyId_t GROUPDATA_QOS_POLICY_ID           = 19;
00287     const QosPolicyId_t TRANSPORTPRIORITY_QOS_POLICY_ID   = 20;
00288     const QosPolicyId_t LIFESPAN_QOS_POLICY_ID            = 21;
00289     const QosPolicyId_t DURABILITYSERVICE_QOS_POLICY_ID   = 22;
00290 
00291     // ----------------------------------------------------------------------
00292     local interface Entity {
00293     //  ReturnCode_t set_qos(
00294     //      in EntityQos qos);
00295     //  ReturnCode_t get_qos(
00296     //      inout EntityQos qos);
00297     //  ReturnCode_t set_listener(
00298     //      in Listener l,
00299     //      in StatusMask mask);
00300     //  Listener get_listener();
00301 
00302       ReturnCode_t enable();
00303 
00304       StatusCondition get_statuscondition();
00305 
00306       StatusMask get_status_changes();
00307 
00308       InstanceHandle_t get_instance_handle();
00309     };
00310 
00311 };
00312 
00313 module OpenDDS
00314 {
00315   const string TRANSPORTTYPE_QOS_POLICY_NAME = "TransportType";
00316 
00317   // OpenDDS-specific QosPolicyId_t values start from the maximum
00318   // QosPolicyId_t (a 32-bit signed integer) and decrement as new
00319   // OpenDDS-specific values are added.  The goal is to avoid
00320   // potential conflicts with new OMG defined QosPolicyId_t values.
00321   const ::DDS::QosPolicyId_t TRANSPORTTYPE_QOS_POLICY_ID = 0x7fffffff;
00322 
00323   // DomainIds used by the implementation will be larger than this constant:
00324   const ::DDS::DomainId_t MAX_USER_DOMAINID = 0x7fffffff;
00325 
00326   module DCPS
00327   {
00328     const DDS::StatusMask ALL_STATUS_MASK = 0xffffffff;
00329     const DDS::StatusMask NO_STATUS_MASK  = 0x00000000;
00330     const DDS::StatusMask DEFAULT_STATUS_MASK = ALL_STATUS_MASK;
00331   };
00332 };
00333 
00334 #endif  /* OPENDDS_DCPS_INFRASTRUCTURE_IDL */

Generated on Fri Feb 12 20:05:22 2016 for OpenDDS by  doxygen 1.4.7