OpenDDS  Snapshot(2023/04/28-20:55)
DdsDcpsCore.idl
Go to the documentation of this file.
1 /*
2  * Distributed under the OpenDDS License.
3  * See: http://www.opendds.org/license.html
4  */
5 
6 #ifndef OPENDDS_DDSDCPSCORE_IDL
7 #define OPENDDS_DDSDCPSCORE_IDL
8 
9 // The includes below are needed to deal with compilers that
10 // have ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT
11 #include "tao/ShortSeq.pidl"
12 #include "tao/StringSeq.pidl"
13 #include "tao/LongSeq.pidl"
14 
15 #define HANDLE_TYPE_NATIVE long
16 
17 #if defined __OPENDDS_IDL && !defined DDS_HAS_MINIMUM_BIT
18 # define BUILT_IN_TOPIC_TYPE @topic
19 # define BUILT_IN_TOPIC_KEY @key
20 #else
21 # define BUILT_IN_TOPIC_TYPE
22 # define BUILT_IN_TOPIC_KEY
23 #endif
24 
25 // Make the IDL compiler produce include of zero-copy read info
26 // sequence template.
27 #pragma DCPS_SUPPORT_ZERO_COPY_READ
28 
29 module DDS {
30  // XTypes 1.3 Table 43
31  typedef octet Byte;
32  typedef boolean _Boolean;
33  typedef int8 _Int8;
34  typedef uint8 _UInt8;
35  typedef int16 _Int16;
36  typedef uint16 _UInt16;
37  typedef int32 _Int32;
38  typedef uint32 _UInt32;
39  typedef int64 _Int64;
40  typedef uint64 _UInt64;
41  typedef float Float32;
42  typedef double Float64;
43  typedef long double Float128;
44  typedef char Char8;
45  typedef wchar Char16;
46  // These are not part of the table, but make sense to also have.
47  typedef string String8;
48  typedef wstring String16;
49 
50  typedef sequence<string> StringSeq;
52 
53  typedef sequence<InstanceHandle_t> InstanceHandleSeq;
54 
55  typedef long QosPolicyId_t;
56 
57  struct QosPolicyCount {
58  QosPolicyId_t policy_id;
59  long count;
60  };
61 
62  typedef sequence<QosPolicyCount> QosPolicyCountSeq;
63 
64  typedef sequence<octet> OctetSeq;
65 
66  @final
67  struct Duration_t {
68  long sec;
69  unsigned long nanosec;
70  };
71 
72  const long DURATION_INFINITE_SEC = 0x7fffffff;
73  const unsigned long DURATION_INFINITE_NSEC = 0x7fffffff;
74 
75  const long DURATION_ZERO_SEC = 0;
76  const unsigned long DURATION_ZERO_NSEC = 0;
77 
78  // Property_t, PropertySeq, BinaryProperty_t, BinaryPropertySeq, and PropertyQosPolicy
79  // are all part of the security specification (ptc/2017-09-26).
80  // These structs/typedefs are in this file to satisfy dependencies for
81  // DomainParticipantQos (which was extended in the security specification).
82  @OpenDDS::internal::special_serialization
83  struct Property_t {
84  string name;
85  string value;
86  boolean propagate;
87  };
88  @OpenDDS::internal::special_serialization("prop_seq")
89  typedef sequence<Property_t> PropertySeq;
90 
91  @OpenDDS::internal::special_serialization
93  string name;
94  OctetSeq value;
95  boolean propagate;
96  };
97  @OpenDDS::internal::special_serialization("prop_seq")
98  typedef sequence<BinaryProperty_t> BinaryPropertySeq;
99 
100  // This is for when we support XCDR1.
101  // @appendable
102  @OpenDDS::internal::special_serialization
105  BinaryPropertySeq binary_value;
106  };
107 
108  // This is for when we support XCDR1.
109  // @appendable
111  OctetSeq value;
112  };
113 
114  // This is for when we support XCDR1.
115  // @appendable
117  OctetSeq value;
118  };
119 
120  // This is for when we support XCDR1.
121  // @appendable
123  OctetSeq value;
124  };
125 
126  // This is for when we support XCDR1.
127  // @appendable
129  StringSeq name;
130  };
131 
135  };
136 
142  };
143 
144  // This is for when we support XCDR1.
145  // @appendable
148  };
149 
157  };
158 
159  // This is for when we support XCDR1.
160  // @appendable
163  };
164 
165  // This is for when we support XCDR1.
166  // @appendable
169  };
170 
175  };
176 
177  // This is for when we support XCDR1.
178  // @appendable
182  };
183 
187  };
188 
189  // This is for when we support XCDR1.
190  // @appendable
194  };
195 
196  // This is for when we support XCDR1.
197  // @appendable
201  };
202 
205  };
206 
207  // This is for when we support XCDR1.
208  // @appendable
211  long depth;
212  };
213 
214  // This is for when we support XCDR1.
215  // @appendable
220  };
221 
222  // This is for when we support XCDR1.
223  // @appendable
225  long value;
226  };
227 
228  // This is for when we support XCDR1.
229  // @appendable
232  };
233 
237  };
238 
239  // This is for when we support XCDR1.
240  // @appendable
243  };
244 
245  // This is for when we support XCDR1.
246  // @appendable
248  long value;
249  };
250 
255  };
256 
257  // This is for when we support XCDR1.
258  // @appendable
262  boolean ordered_access;
263  };
264 
265  // This is for when we support XCDR1.
266  // @appendable
269  };
270 
271  typedef short DataRepresentationId_t;
272  /*
273  * Custom representations, which should be negative, are defined in OpenDDS
274  * module below.
275  */
276  const DataRepresentationId_t XCDR_DATA_REPRESENTATION = 0;
277  const DataRepresentationId_t XML_DATA_REPRESENTATION = 1;
278  const DataRepresentationId_t XCDR2_DATA_REPRESENTATION = 2;
279 
280  typedef sequence<DataRepresentationId_t> DataRepresentationIdSeq;
281 
282  // This is for when we support XCDR1.
283  // @appendable
285  DataRepresentationIdSeq value;
286  };
287  const QosPolicyId_t DATA_REPRESENTATION_QOS_POLICY_ID = 23;
288  const string DATA_REPRESENTATION_QOS_POLICY_NAME = "DataRepresentation";
289 
290  /* TODO
291  @bit_bound(16)
292  enum TypeConsistencyKind {
293  DISALLOW_TYPE_COERCION,
294  ALLOW_TYPE_COERCION
295  };
296  */
298  const TypeConsistencyEnforcementQosPolicyKind_t DISALLOW_TYPE_COERCION = 1;
299  const TypeConsistencyEnforcementQosPolicyKind_t ALLOW_TYPE_COERCION = 2;
300  /*
301  const QosPolicyId_t TYPE_CONSISTENCY_ENFORCEMENT_QOS_POLICY_ID = 24;
302  const string TYPE_CONSISTENCY_ENFORCEMENT_QOS_POLICY_NAME = "TypeConsistencyEnforcement";
303 
304  // This is for when we support XCDR1.
305  // @appendable
306  */
308  TypeConsistencyEnforcementQosPolicyKind_t kind;
314  };
315 
316  // This is for when we support XCDR1.
317  // @mutable
318  struct TopicQos {
333  };
334 
337  };
338 
339  // This is for when we support XCDR1.
340  // @mutable
341  struct DataWriterQos {
358  };
359 
362  };
363 
364  struct PublisherQos {
369  };
370 
374  };
375 
376  // This is for when we support XCDR1.
377  // @mutable
378  struct DataReaderQos {
393  };
394 
395  struct SubscriberQos {
400  };
401 
404  };
405 
409  PropertyQosPolicy property; // DDS-Security 1.1 ptc/2017-09-26
410  };
411 
412  typedef octet OctetArray16[16];
413  // @appendable
415  OctetArray16 value;
416  };
417 
418  // ----------------------------------------------------------------------
419 
421  // This is for when we support XCDR1.
422  // @mutable
425  @id(0x0050) BuiltinTopicKey_t key;
426  @id(0x002c) UserDataQosPolicy user_data;
427  };
428 
430  // This is for when we support XCDR1.
431  // @mutable
434  @id(0x005A) BuiltinTopicKey_t key;
435  @id(0x0050) BuiltinTopicKey_t participant_key;
436  @id(0x0005) string topic_name;
437  @id(0x0007) string type_name;
438 
439  /* TODO
440  // XTYPES 1.1
441  @id(0x0069) @optional TypeIdV1 type_id;
442  @id(0x0072) @optional TypeObjectV1 type;
443  // XTYPES 1.2
444  @id(0x0075) @optional XTypes::TypeInformation type_information;
445  */
446 
447  @id(0x001D) DurabilityQosPolicy durability;
448  @id(0x001E) DurabilityServiceQosPolicy durability_service;
449  @id(0x0023) DeadlineQosPolicy deadline;
450  @id(0x0027) LatencyBudgetQosPolicy latency_budget;
451  @id(0x001B) LivelinessQosPolicy liveliness;
452  @id(0x001A) ReliabilityQosPolicy reliability;
453  @id(0x002B) LifespanQosPolicy lifespan;
454  @id(0x002C) UserDataQosPolicy user_data;
455  @id(0x001F) OwnershipQosPolicy ownership;
456  @id(0x0006) OwnershipStrengthQosPolicy ownership_strength;
457  @id(0x0025) DestinationOrderQosPolicy destination_order;
458  @id(0x0021) PresentationQosPolicy presentation;
459  @id(0x0029) PartitionQosPolicy partition;
460  @id(0x002E) TopicDataQosPolicy topic_data;
461  @id(0x002D) GroupDataQosPolicy group_data;
462  @id(0x0073) DataRepresentationQosPolicy representation;
463  };
464 
466  // This is for when we support XCDR1.
467  // @mutable
470  @id(0x005A) BuiltinTopicKey_t key;
471  @id(0x0050) BuiltinTopicKey_t participant_key;
472  @id(0x0005) string topic_name;
473  @id(0x0007) string type_name;
474 
475  /* TODO
476  // XTYPES 1.1
477  @id(0x0069) @optional TypeIdV1 type_id;
478  @id(0x0072) @optional TypeObjectV1 type;
479  // XTYPES 1.2
480  @id(0x0075) @optional XTypes::TypeInformation type_information;
481  */
482 
483  @id(0x001D) DurabilityQosPolicy durability;
484  @id(0x0023) DeadlineQosPolicy deadline;
485  @id(0x0027) LatencyBudgetQosPolicy latency_budget;
486  @id(0x001B) LivelinessQosPolicy liveliness;
487  @id(0x001A) ReliabilityQosPolicy reliability;
488  @id(0x001F) OwnershipQosPolicy ownership;
489  @id(0x0025) DestinationOrderQosPolicy destination_order;
490  @id(0x002C) UserDataQosPolicy user_data;
491  @id(0x0004) TimeBasedFilterQosPolicy time_based_filter;
492  @id(0x0021) PresentationQosPolicy presentation;
493  @id(0x0029) PartitionQosPolicy partition;
494  @id(0x002E) TopicDataQosPolicy topic_data;
495  @id(0x002D) GroupDataQosPolicy group_data;
496  @id(0x0073) DataRepresentationQosPolicy representation;
497  @id(0x0074) TypeConsistencyEnforcementQosPolicy type_consistency;
498  };
499 
501  // This is for when we support XCDR1.
502  // @mutable
505  @id(0x005A) BuiltinTopicKey_t key;
506  @id(0x0005) string name;
507  @id(0x0007) string type_name;
508 
509  /* TODO
510  // XTYPES 1.1
511  @id(0x0069) @optional TypeIdV1 type_id;
512  @id(0x0072) @optional TypeObjectV1 type;
513  // XTYPES 1.2
514  @id(0x0075) @optional XTypes::TypeInformation type_information;
515  */
516 
517  @id(0x001D) DurabilityQosPolicy durability;
518  @id(0x001E) DurabilityServiceQosPolicy durability_service;
519  @id(0x0023) DeadlineQosPolicy deadline;
520  @id(0x0027) LatencyBudgetQosPolicy latency_budget;
521  @id(0x001B) LivelinessQosPolicy liveliness;
522  @id(0x001A) ReliabilityQosPolicy reliability;
523  @id(0x0049) TransportPriorityQosPolicy transport_priority;
524  @id(0x002B) LifespanQosPolicy lifespan;
525  @id(0x0025) DestinationOrderQosPolicy destination_order;
526  @id(0x0040) HistoryQosPolicy history;
527  @id(0x0041) ResourceLimitsQosPolicy resource_limits;
528  @id(0x001F) OwnershipQosPolicy ownership;
529  @id(0x002E) TopicDataQosPolicy topic_data;
530  @id(0x0073) DataRepresentationQosPolicy representation;
531  };
532 
533  // Sample states to support reads
534  typedef unsigned long SampleStateKind;
535 
536  const SampleStateKind READ_SAMPLE_STATE = 0x0001 << 0;
537  const SampleStateKind NOT_READ_SAMPLE_STATE = 0x0001 << 1;
538 
539  // This is a bit-mask SampleStateKind
540  typedef unsigned long SampleStateMask;
541  const SampleStateMask ANY_SAMPLE_STATE = 0xffff;
542 
543  // View states to support reads
544  typedef unsigned long ViewStateKind;
545  const ViewStateKind NEW_VIEW_STATE = 0x0001 << 0;
546  const ViewStateKind NOT_NEW_VIEW_STATE = 0x0001 << 1;
547 
548  // This is a bit-mask ViewStateKind
549  typedef unsigned long ViewStateMask;
550  const ViewStateMask ANY_VIEW_STATE = 0xffff;
551 
552  // Instance states to support reads
553  typedef unsigned long InstanceStateKind;
554  const InstanceStateKind ALIVE_INSTANCE_STATE = 0x0001 << 0;
555  const InstanceStateKind NOT_ALIVE_DISPOSED_INSTANCE_STATE = 0x0001 << 1;
556  const InstanceStateKind NOT_ALIVE_NO_WRITERS_INSTANCE_STATE = 0x0001 << 2;
557 
558  // This is a bit-mask InstanceStateKind
559  typedef unsigned long InstanceStateMask;
560  const InstanceStateMask ANY_INSTANCE_STATE = 0xffff;
561  const InstanceStateMask NOT_ALIVE_INSTANCE_STATE = 0x006;
562 
563  struct Time_t {
564  long sec;
565  unsigned long nanosec;
566  };
567 
568  const long TIME_INVALID_SEC = -1;
569  const unsigned long TIME_INVALID_NSEC = 0xffffffff;
570 
571  struct SampleInfo {
572  SampleStateKind sample_state;
573  ViewStateKind view_state;
574  InstanceStateKind instance_state;
576  InstanceHandle_t instance_handle;
577  InstanceHandle_t publication_handle;
583  boolean valid_data;
585  };
586 
587  typedef sequence<SampleInfo> SampleInfoSeq;
588 };
589 
590 module OpenDDS {
591  module DCPS {
594  };
595 };
596 
597 #undef BUILT_IN_TOPIC_TYPE
598 #undef BUILT_IN_TOPIC_KEY
599 
600 #endif /* OPENDDS_DCPS_CORE_IDL */
UserDataQosPolicy user_data
PartitionQosPolicy partition
wstring String16
Definition: DdsDcpsCore.idl:48
HistoryQosPolicy history
sequence< InstanceHandle_t > InstanceHandleSeq
Definition: DdsDcpsCore.idl:53
DestinationOrderQosPolicyKind
uint16 _UInt16
Definition: DdsDcpsCore.idl:36
InstanceStateKind instance_state
EntityFactoryQosPolicy entity_factory
sequence< QosPolicyCount > QosPolicyCountSeq
Definition: DdsDcpsCore.idl:62
LatencyBudgetQosPolicy latency_budget
ReliabilityQosPolicy reliability
GroupDataQosPolicy group_data
LifespanQosPolicy lifespan
ViewStateKind view_state
boolean _Boolean
Definition: DdsDcpsCore.idl:32
OwnershipQosPolicy ownership
string String8
Definition: DdsDcpsCore.idl:47
const long DURATION_INFINITE_SEC
Definition: DdsDcpsCore.idl:72
DurabilityQosPolicy durability
HistoryQosPolicyKind kind
TimeBasedFilterQosPolicy time_based_filter
TransportPriorityQosPolicy transport_priority
sequence< octet > key
sequence< SampleInfo > SampleInfoSeq
PresentationQosPolicyAccessScopeKind access_scope
DataRepresentationQosPolicy representation
OwnershipQosPolicy ownership
uint64 _UInt64
Definition: DdsDcpsCore.idl:40
HistoryQosPolicyKind
const QosPolicyId_t DATA_REPRESENTATION_QOS_POLICY_ID
LivelinessQosPolicy liveliness
const SampleStateMask ANY_SAMPLE_STATE
DeadlineQosPolicy deadline
long absolute_generation_rank
octet Byte
Definition: DdsDcpsCore.idl:31
OwnershipQosPolicyKind kind
DestinationOrderQosPolicy destination_order
unsigned long InstanceStateMask
EntityFactoryQosPolicy entity_factory
const long TIME_INVALID_SEC
const DDS::DataRepresentationId_t JSON_DATA_REPRESENTATION
unsigned long SampleStateKind
const DataRepresentationId_t XCDR_DATA_REPRESENTATION
DataRepresentationQosPolicy representation
sequence< DataRepresentationId_t > DataRepresentationIdSeq
EntityFactoryQosPolicy entity_factory
ResourceLimitsQosPolicy resource_limits
OwnershipQosPolicyKind
EntityFactoryQosPolicy entity_factory
DestinationOrderQosPolicyKind kind
LatencyBudgetQosPolicy latency_budget
long long opendds_reserved_publication_seq
DestinationOrderQosPolicy destination_order
#define BUILT_IN_TOPIC_TYPE
Definition: DdsDcpsCore.idl:21
DurabilityServiceQosPolicy durability_service
TypeConsistencyEnforcementQosPolicy type_consistency
long QosPolicyId_t
Definition: DdsDcpsCore.idl:55
const TypeConsistencyEnforcementQosPolicyKind_t ALLOW_TYPE_COERCION
PresentationQosPolicy presentation
const ViewStateKind NOT_NEW_VIEW_STATE
const DataRepresentationId_t XCDR2_DATA_REPRESENTATION
ReliabilityQosPolicyKind kind
DurabilityQosPolicyKind kind
InstanceHandle_t publication_handle
DurabilityQosPolicy durability
uint32 _UInt32
Definition: DdsDcpsCore.idl:38
unsigned long nanosec
Definition: DdsDcpsCore.idl:69
OwnershipStrengthQosPolicy ownership_strength
InstanceHandle_t instance_handle
double Float64
Definition: DdsDcpsCore.idl:42
DestinationOrderQosPolicy destination_order
DataRepresentationQosPolicy representation
unsigned long InstanceStateKind
long no_writers_generation_count
const InstanceStateMask ANY_INSTANCE_STATE
const string DATA_REPRESENTATION_QOS_POLICY_NAME
DurabilityQosPolicy durability
const unsigned long DURATION_ZERO_NSEC
Definition: DdsDcpsCore.idl:76
const ViewStateKind NEW_VIEW_STATE
const ViewStateMask ANY_VIEW_STATE
ResourceLimitsQosPolicy resource_limits
int16 _Int16
Definition: DdsDcpsCore.idl:35
SampleStateKind sample_state
char Char8
Definition: DdsDcpsCore.idl:44
DurabilityQosPolicyKind
DDS::BinaryPropertySeq BinaryPropertySeq
TopicDataQosPolicy topic_data
const DataRepresentationId_t XML_DATA_REPRESENTATION
sequence< octet > OctetSeq
Definition: DdsDcpsCore.idl:64
DeadlineQosPolicy deadline
ReliabilityQosPolicyKind
ReliabilityQosPolicy reliability
The End User API.
const DDS::DataRepresentationId_t UNALIGNED_CDR_DATA_REPRESENTATION
const char *const name
Definition: debug.cpp:60
unsigned long SampleStateMask
ReaderDataLifecycleQosPolicy reader_data_lifecycle
BinaryPropertySeq binary_value
HANDLE_TYPE_NATIVE InstanceHandle_t
Definition: DdsDcpsCore.idl:51
const SampleStateKind READ_SAMPLE_STATE
HistoryQosPolicy history
long disposed_generation_count
const unsigned long DURATION_INFINITE_NSEC
Definition: DdsDcpsCore.idl:73
OwnershipQosPolicy ownership
TransportPriorityQosPolicy transport_priority
const unsigned long TIME_INVALID_NSEC
unsigned long nanosec
QosPolicyId_t policy_id
Definition: DdsDcpsCore.idl:58
ReliabilityQosPolicy reliability
const long DURATION_ZERO_SEC
Definition: DdsDcpsCore.idl:75
const InstanceStateKind NOT_ALIVE_DISPOSED_INSTANCE_STATE
#define HANDLE_TYPE_NATIVE
Definition: DdsDcpsCore.idl:15
HistoryQosPolicy history
LifespanQosPolicy lifespan
sequence< Property > PropertySeq
WriterDataLifecycleQosPolicy writer_data_lifecycle
uint8 _UInt8
Definition: DdsDcpsCore.idl:34
const SampleStateKind NOT_READ_SAMPLE_STATE
int64 _Int64
Definition: DdsDcpsCore.idl:39
PresentationQosPolicyAccessScopeKind
wchar Char16
Definition: DdsDcpsCore.idl:45
LivelinessQosPolicyKind kind
const InstanceStateMask NOT_ALIVE_INSTANCE_STATE
LivelinessQosPolicy liveliness
unsigned long ViewStateKind
short DataRepresentationId_t
TypeConsistencyEnforcementQosPolicyKind_t kind
DataRepresentationIdSeq value
UserDataQosPolicy user_data
UserDataQosPolicy user_data
DeadlineQosPolicy deadline
GroupDataQosPolicy group_data
float Float32
Definition: DdsDcpsCore.idl:41
short TypeConsistencyEnforcementQosPolicyKind_t
PartitionQosPolicy partition
int32 _Int32
Definition: DdsDcpsCore.idl:37
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
const InstanceStateKind NOT_ALIVE_NO_WRITERS_INSTANCE_STATE
#define BUILT_IN_TOPIC_KEY
Definition: DdsDcpsCore.idl:22
unsigned long ViewStateMask
const TypeConsistencyEnforcementQosPolicyKind_t DISALLOW_TYPE_COERCION
HistoryQosPolicyKind history_kind
Time_t source_timestamp
PresentationQosPolicy presentation
ResourceLimitsQosPolicy resource_limits
const InstanceStateKind ALIVE_INSTANCE_STATE
LivelinessQosPolicyKind
LivelinessQosPolicy liveliness
PropertyQosPolicy property
octet OctetArray16[16]
int8 _Int8
Definition: DdsDcpsCore.idl:33
sequence< string > StringSeq
Definition: DdsDcpsCore.idl:50
DurabilityServiceQosPolicy durability_service
long double Float128
Definition: DdsDcpsCore.idl:43
LatencyBudgetQosPolicy latency_budget