/
DdsDcpsCore.idl
600 lines (515 loc) · 16.8 KB
/
DdsDcpsCore.idl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
/*
* Distributed under the OpenDDS License.
* See: http://www.opendds.org/license.html
*/
#ifndef OPENDDS_DDSDCPSCORE_IDL
#define OPENDDS_DDSDCPSCORE_IDL
// The includes below are needed to deal with compilers that
// have ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT
#include "tao/ShortSeq.pidl"
#include "tao/StringSeq.pidl"
#include "tao/LongSeq.pidl"
#define HANDLE_TYPE_NATIVE long
#if defined __OPENDDS_IDL && !defined DDS_HAS_MINIMUM_BIT
# define BUILT_IN_TOPIC_TYPE @topic
# define BUILT_IN_TOPIC_KEY @key
#else
# define BUILT_IN_TOPIC_TYPE
# define BUILT_IN_TOPIC_KEY
#endif
// Make the IDL compiler produce include of zero-copy read info
// sequence template.
#pragma DCPS_SUPPORT_ZERO_COPY_READ
module DDS {
// XTypes 1.3 Table 43
typedef octet Byte;
typedef boolean _Boolean;
typedef int8 _Int8;
typedef uint8 _UInt8;
typedef int16 _Int16;
typedef uint16 _UInt16;
typedef int32 _Int32;
typedef uint32 _UInt32;
typedef int64 _Int64;
typedef uint64 _UInt64;
typedef float Float32;
typedef double Float64;
typedef long double Float128;
typedef char Char8;
typedef wchar Char16;
// These are not part of the table, but make sense to also have.
typedef string String8;
typedef wstring String16;
typedef sequence<string> StringSeq;
typedef HANDLE_TYPE_NATIVE InstanceHandle_t;
typedef sequence<InstanceHandle_t> InstanceHandleSeq;
typedef long QosPolicyId_t;
struct QosPolicyCount {
QosPolicyId_t policy_id;
long count;
};
typedef sequence<QosPolicyCount> QosPolicyCountSeq;
typedef sequence<octet> OctetSeq;
@final
struct Duration_t {
long sec;
unsigned long nanosec;
};
const long DURATION_INFINITE_SEC = 0x7fffffff;
const unsigned long DURATION_INFINITE_NSEC = 0x7fffffff;
const long DURATION_ZERO_SEC = 0;
const unsigned long DURATION_ZERO_NSEC = 0;
// Property_t, PropertySeq, BinaryProperty_t, BinaryPropertySeq, and PropertyQosPolicy
// are all part of the security specification (ptc/2017-09-26).
// These structs/typedefs are in this file to satisfy dependencies for
// DomainParticipantQos (which was extended in the security specification).
@OpenDDS::internal::special_serialization
struct Property_t {
string name;
string value;
boolean propagate;
};
@OpenDDS::internal::special_serialization("prop_seq")
typedef sequence<Property_t> PropertySeq;
@OpenDDS::internal::special_serialization
struct BinaryProperty_t {
string name;
OctetSeq value;
boolean propagate;
};
@OpenDDS::internal::special_serialization("prop_seq")
typedef sequence<BinaryProperty_t> BinaryPropertySeq;
// This is for when we support XCDR1.
// @appendable
@OpenDDS::internal::special_serialization
struct PropertyQosPolicy {
PropertySeq value;
BinaryPropertySeq binary_value;
};
// This is for when we support XCDR1.
// @appendable
struct UserDataQosPolicy {
OctetSeq value;
};
// This is for when we support XCDR1.
// @appendable
struct GroupDataQosPolicy {
OctetSeq value;
};
// This is for when we support XCDR1.
// @appendable
struct TopicDataQosPolicy {
OctetSeq value;
};
// This is for when we support XCDR1.
// @appendable
struct PartitionQosPolicy {
StringSeq name;
};
enum HistoryQosPolicyKind {
KEEP_LAST_HISTORY_QOS,
KEEP_ALL_HISTORY_QOS
};
enum DurabilityQosPolicyKind {
VOLATILE_DURABILITY_QOS,
TRANSIENT_LOCAL_DURABILITY_QOS,
TRANSIENT_DURABILITY_QOS,
PERSISTENT_DURABILITY_QOS
};
// This is for when we support XCDR1.
// @appendable
struct DurabilityQosPolicy {
DurabilityQosPolicyKind kind;
};
struct DurabilityServiceQosPolicy {
Duration_t service_cleanup_delay;
HistoryQosPolicyKind history_kind;
long history_depth;
long max_samples;
long max_instances;
long max_samples_per_instance;
};
// This is for when we support XCDR1.
// @appendable
struct DeadlineQosPolicy {
Duration_t period;
};
// This is for when we support XCDR1.
// @appendable
struct LatencyBudgetQosPolicy {
Duration_t duration;
};
enum LivelinessQosPolicyKind {
AUTOMATIC_LIVELINESS_QOS,
MANUAL_BY_PARTICIPANT_LIVELINESS_QOS,
MANUAL_BY_TOPIC_LIVELINESS_QOS
};
// This is for when we support XCDR1.
// @appendable
struct LivelinessQosPolicy {
LivelinessQosPolicyKind kind;
Duration_t lease_duration;
};
enum ReliabilityQosPolicyKind {
BEST_EFFORT_RELIABILITY_QOS,
RELIABLE_RELIABILITY_QOS
};
// This is for when we support XCDR1.
// @appendable
struct ReliabilityQosPolicy {
ReliabilityQosPolicyKind kind;
Duration_t max_blocking_time;
};
// This is for when we support XCDR1.
// @appendable
enum DestinationOrderQosPolicyKind {
BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS,
BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS
};
struct DestinationOrderQosPolicy {
DestinationOrderQosPolicyKind kind;
};
// This is for when we support XCDR1.
// @appendable
struct HistoryQosPolicy {
HistoryQosPolicyKind kind;
long depth;
};
// This is for when we support XCDR1.
// @appendable
struct ResourceLimitsQosPolicy {
long max_samples;
long max_instances;
long max_samples_per_instance;
};
// This is for when we support XCDR1.
// @appendable
struct TransportPriorityQosPolicy {
long value;
};
// This is for when we support XCDR1.
// @appendable
struct LifespanQosPolicy {
Duration_t duration;
};
enum OwnershipQosPolicyKind {
SHARED_OWNERSHIP_QOS,
EXCLUSIVE_OWNERSHIP_QOS
};
// This is for when we support XCDR1.
// @appendable
struct OwnershipQosPolicy {
OwnershipQosPolicyKind kind;
};
// This is for when we support XCDR1.
// @appendable
struct OwnershipStrengthQosPolicy {
long value;
};
enum PresentationQosPolicyAccessScopeKind {
INSTANCE_PRESENTATION_QOS,
TOPIC_PRESENTATION_QOS,
GROUP_PRESENTATION_QOS
};
// This is for when we support XCDR1.
// @appendable
struct PresentationQosPolicy {
PresentationQosPolicyAccessScopeKind access_scope;
boolean coherent_access;
boolean ordered_access;
};
// This is for when we support XCDR1.
// @appendable
struct TimeBasedFilterQosPolicy {
Duration_t minimum_separation;
};
typedef short DataRepresentationId_t;
/*
* Custom representations, which should be negative, are defined in OpenDDS
* module below.
*/
const DataRepresentationId_t XCDR_DATA_REPRESENTATION = 0;
const DataRepresentationId_t XML_DATA_REPRESENTATION = 1;
const DataRepresentationId_t XCDR2_DATA_REPRESENTATION = 2;
typedef sequence<DataRepresentationId_t> DataRepresentationIdSeq;
// This is for when we support XCDR1.
// @appendable
struct DataRepresentationQosPolicy {
DataRepresentationIdSeq value;
};
const QosPolicyId_t DATA_REPRESENTATION_QOS_POLICY_ID = 23;
const string DATA_REPRESENTATION_QOS_POLICY_NAME = "DataRepresentation";
/* TODO
@bit_bound(16)
enum TypeConsistencyKind {
DISALLOW_TYPE_COERCION,
ALLOW_TYPE_COERCION
};
*/
typedef short TypeConsistencyEnforcementQosPolicyKind_t;
const TypeConsistencyEnforcementQosPolicyKind_t DISALLOW_TYPE_COERCION = 1;
const TypeConsistencyEnforcementQosPolicyKind_t ALLOW_TYPE_COERCION = 2;
/*
const QosPolicyId_t TYPE_CONSISTENCY_ENFORCEMENT_QOS_POLICY_ID = 24;
const string TYPE_CONSISTENCY_ENFORCEMENT_QOS_POLICY_NAME = "TypeConsistencyEnforcement";
// This is for when we support XCDR1.
// @appendable
*/
struct TypeConsistencyEnforcementQosPolicy {
TypeConsistencyEnforcementQosPolicyKind_t kind;
boolean ignore_sequence_bounds;
boolean ignore_string_bounds;
boolean ignore_member_names;
boolean prevent_type_widening;
boolean force_type_validation;
};
// This is for when we support XCDR1.
// @mutable
struct TopicQos {
TopicDataQosPolicy topic_data;
DurabilityQosPolicy durability;
DurabilityServiceQosPolicy durability_service;
DeadlineQosPolicy deadline;
LatencyBudgetQosPolicy latency_budget;
LivelinessQosPolicy liveliness;
ReliabilityQosPolicy reliability;
DestinationOrderQosPolicy destination_order;
HistoryQosPolicy history;
ResourceLimitsQosPolicy resource_limits;
TransportPriorityQosPolicy transport_priority;
LifespanQosPolicy lifespan;
OwnershipQosPolicy ownership;
DataRepresentationQosPolicy representation;
};
struct WriterDataLifecycleQosPolicy {
boolean autodispose_unregistered_instances;
};
// This is for when we support XCDR1.
// @mutable
struct DataWriterQos {
DurabilityQosPolicy durability;
DurabilityServiceQosPolicy durability_service;
DeadlineQosPolicy deadline;
LatencyBudgetQosPolicy latency_budget;
LivelinessQosPolicy liveliness;
ReliabilityQosPolicy reliability;
DestinationOrderQosPolicy destination_order;
HistoryQosPolicy history;
ResourceLimitsQosPolicy resource_limits;
TransportPriorityQosPolicy transport_priority;
LifespanQosPolicy lifespan;
UserDataQosPolicy user_data;
OwnershipQosPolicy ownership;
OwnershipStrengthQosPolicy ownership_strength;
WriterDataLifecycleQosPolicy writer_data_lifecycle;
DataRepresentationQosPolicy representation;
};
struct EntityFactoryQosPolicy {
boolean autoenable_created_entities;
};
struct PublisherQos {
PresentationQosPolicy presentation;
PartitionQosPolicy partition;
GroupDataQosPolicy group_data;
EntityFactoryQosPolicy entity_factory;
};
struct ReaderDataLifecycleQosPolicy {
Duration_t autopurge_nowriter_samples_delay;
Duration_t autopurge_disposed_samples_delay;
};
// This is for when we support XCDR1.
// @mutable
struct DataReaderQos {
DurabilityQosPolicy durability;
DeadlineQosPolicy deadline;
LatencyBudgetQosPolicy latency_budget;
LivelinessQosPolicy liveliness;
ReliabilityQosPolicy reliability;
DestinationOrderQosPolicy destination_order;
HistoryQosPolicy history;
ResourceLimitsQosPolicy resource_limits;
UserDataQosPolicy user_data;
OwnershipQosPolicy ownership;
TimeBasedFilterQosPolicy time_based_filter;
ReaderDataLifecycleQosPolicy reader_data_lifecycle;
DataRepresentationQosPolicy representation;
TypeConsistencyEnforcementQosPolicy type_consistency;
};
struct SubscriberQos {
PresentationQosPolicy presentation;
PartitionQosPolicy partition;
GroupDataQosPolicy group_data;
EntityFactoryQosPolicy entity_factory;
};
struct DomainParticipantFactoryQos {
EntityFactoryQosPolicy entity_factory;
};
struct DomainParticipantQos {
UserDataQosPolicy user_data;
EntityFactoryQosPolicy entity_factory;
PropertyQosPolicy property; // DDS-Security 1.1 ptc/2017-09-26
};
typedef octet OctetArray16[16];
// @appendable
struct BuiltinTopicKey_t {
OctetArray16 value;
};
// ----------------------------------------------------------------------
BUILT_IN_TOPIC_TYPE
// This is for when we support XCDR1.
// @mutable
struct ParticipantBuiltinTopicData {
BUILT_IN_TOPIC_KEY
@id(0x0050) BuiltinTopicKey_t key;
@id(0x002c) UserDataQosPolicy user_data;
};
BUILT_IN_TOPIC_TYPE
// This is for when we support XCDR1.
// @mutable
struct PublicationBuiltinTopicData {
BUILT_IN_TOPIC_KEY
@id(0x005A) BuiltinTopicKey_t key;
@id(0x0050) BuiltinTopicKey_t participant_key;
@id(0x0005) string topic_name;
@id(0x0007) string type_name;
/* TODO
// XTYPES 1.1
@id(0x0069) @optional TypeIdV1 type_id;
@id(0x0072) @optional TypeObjectV1 type;
// XTYPES 1.2
@id(0x0075) @optional XTypes::TypeInformation type_information;
*/
@id(0x001D) DurabilityQosPolicy durability;
@id(0x001E) DurabilityServiceQosPolicy durability_service;
@id(0x0023) DeadlineQosPolicy deadline;
@id(0x0027) LatencyBudgetQosPolicy latency_budget;
@id(0x001B) LivelinessQosPolicy liveliness;
@id(0x001A) ReliabilityQosPolicy reliability;
@id(0x002B) LifespanQosPolicy lifespan;
@id(0x002C) UserDataQosPolicy user_data;
@id(0x001F) OwnershipQosPolicy ownership;
@id(0x0006) OwnershipStrengthQosPolicy ownership_strength;
@id(0x0025) DestinationOrderQosPolicy destination_order;
@id(0x0021) PresentationQosPolicy presentation;
@id(0x0029) PartitionQosPolicy partition;
@id(0x002E) TopicDataQosPolicy topic_data;
@id(0x002D) GroupDataQosPolicy group_data;
@id(0x0073) DataRepresentationQosPolicy representation;
};
BUILT_IN_TOPIC_TYPE
// This is for when we support XCDR1.
// @mutable
struct SubscriptionBuiltinTopicData {
BUILT_IN_TOPIC_KEY
@id(0x005A) BuiltinTopicKey_t key;
@id(0x0050) BuiltinTopicKey_t participant_key;
@id(0x0005) string topic_name;
@id(0x0007) string type_name;
/* TODO
// XTYPES 1.1
@id(0x0069) @optional TypeIdV1 type_id;
@id(0x0072) @optional TypeObjectV1 type;
// XTYPES 1.2
@id(0x0075) @optional XTypes::TypeInformation type_information;
*/
@id(0x001D) DurabilityQosPolicy durability;
@id(0x0023) DeadlineQosPolicy deadline;
@id(0x0027) LatencyBudgetQosPolicy latency_budget;
@id(0x001B) LivelinessQosPolicy liveliness;
@id(0x001A) ReliabilityQosPolicy reliability;
@id(0x001F) OwnershipQosPolicy ownership;
@id(0x0025) DestinationOrderQosPolicy destination_order;
@id(0x002C) UserDataQosPolicy user_data;
@id(0x0004) TimeBasedFilterQosPolicy time_based_filter;
@id(0x0021) PresentationQosPolicy presentation;
@id(0x0029) PartitionQosPolicy partition;
@id(0x002E) TopicDataQosPolicy topic_data;
@id(0x002D) GroupDataQosPolicy group_data;
@id(0x0073) DataRepresentationQosPolicy representation;
@id(0x0074) TypeConsistencyEnforcementQosPolicy type_consistency;
};
BUILT_IN_TOPIC_TYPE
// This is for when we support XCDR1.
// @mutable
struct TopicBuiltinTopicData {
BUILT_IN_TOPIC_KEY
@id(0x005A) BuiltinTopicKey_t key;
@id(0x0005) string name;
@id(0x0007) string type_name;
/* TODO
// XTYPES 1.1
@id(0x0069) @optional TypeIdV1 type_id;
@id(0x0072) @optional TypeObjectV1 type;
// XTYPES 1.2
@id(0x0075) @optional XTypes::TypeInformation type_information;
*/
@id(0x001D) DurabilityQosPolicy durability;
@id(0x001E) DurabilityServiceQosPolicy durability_service;
@id(0x0023) DeadlineQosPolicy deadline;
@id(0x0027) LatencyBudgetQosPolicy latency_budget;
@id(0x001B) LivelinessQosPolicy liveliness;
@id(0x001A) ReliabilityQosPolicy reliability;
@id(0x0049) TransportPriorityQosPolicy transport_priority;
@id(0x002B) LifespanQosPolicy lifespan;
@id(0x0025) DestinationOrderQosPolicy destination_order;
@id(0x0040) HistoryQosPolicy history;
@id(0x0041) ResourceLimitsQosPolicy resource_limits;
@id(0x001F) OwnershipQosPolicy ownership;
@id(0x002E) TopicDataQosPolicy topic_data;
@id(0x0073) DataRepresentationQosPolicy representation;
};
// Sample states to support reads
typedef unsigned long SampleStateKind;
const SampleStateKind READ_SAMPLE_STATE = 0x0001 << 0;
const SampleStateKind NOT_READ_SAMPLE_STATE = 0x0001 << 1;
// This is a bit-mask SampleStateKind
typedef unsigned long SampleStateMask;
const SampleStateMask ANY_SAMPLE_STATE = 0xffff;
// View states to support reads
typedef unsigned long ViewStateKind;
const ViewStateKind NEW_VIEW_STATE = 0x0001 << 0;
const ViewStateKind NOT_NEW_VIEW_STATE = 0x0001 << 1;
// This is a bit-mask ViewStateKind
typedef unsigned long ViewStateMask;
const ViewStateMask ANY_VIEW_STATE = 0xffff;
// Instance states to support reads
typedef unsigned long InstanceStateKind;
const InstanceStateKind ALIVE_INSTANCE_STATE = 0x0001 << 0;
const InstanceStateKind NOT_ALIVE_DISPOSED_INSTANCE_STATE = 0x0001 << 1;
const InstanceStateKind NOT_ALIVE_NO_WRITERS_INSTANCE_STATE = 0x0001 << 2;
// This is a bit-mask InstanceStateKind
typedef unsigned long InstanceStateMask;
const InstanceStateMask ANY_INSTANCE_STATE = 0xffff;
const InstanceStateMask NOT_ALIVE_INSTANCE_STATE = 0x006;
struct Time_t {
long sec;
unsigned long nanosec;
};
const long TIME_INVALID_SEC = -1;
const unsigned long TIME_INVALID_NSEC = 0xffffffff;
struct SampleInfo {
SampleStateKind sample_state;
ViewStateKind view_state;
InstanceStateKind instance_state;
Time_t source_timestamp;
InstanceHandle_t instance_handle;
InstanceHandle_t publication_handle;
long disposed_generation_count;
long no_writers_generation_count;
long sample_rank;
long generation_rank;
long absolute_generation_rank;
boolean valid_data;
long long opendds_reserved_publication_seq;
};
typedef sequence<SampleInfo> SampleInfoSeq;
};
module OpenDDS {
module DCPS {
const DDS::DataRepresentationId_t UNALIGNED_CDR_DATA_REPRESENTATION = -12140;
const DDS::DataRepresentationId_t JSON_DATA_REPRESENTATION = -12141;
};
};
#undef BUILT_IN_TOPIC_TYPE
#undef BUILT_IN_TOPIC_KEY
#endif /* OPENDDS_DCPS_CORE_IDL */