31 #include <dds/dds_seq.h> 32 #include <dds/dds_map.h> 33 #include <dds/dds_inttypes.h> 34 #include <dds/coredx_logging.h> 40 #define DDS_DOMAINID_TYPE_NATIVE unsigned int 41 #define DDS_HANDLE_TYPE_NATIVE intptr_t 42 #define DDS_HANDLE_NIL_NATIVE 0 43 #define DDS_HANDLE_DEFAULT_NATIVE 1 44 #define DDS_BUILTIN_TOPIC_KEY_TYPE_NATIVE int 46 #define CDX_UNUSED(x) (void)(x) 48 typedef unsigned char DDS_Octet;
57 typedef int DDS_QosPolicyId_t;
58 typedef unsigned int DDS_SampleStateKind;
59 typedef unsigned int DDS_SampleStateMask;
60 typedef unsigned int DDS_ViewStateKind;
61 typedef unsigned int DDS_ViewStateMask;
62 typedef unsigned int DDS_InstanceStateKind;
63 typedef unsigned int DDS_InstanceStateMask;
81 #define DDS_LENGTH_UNLIMITED (-1) 83 #define DDS_DURATION_INFINITE_SEC (0x7fffffff) 84 #define DDS_DURATION_INFINITE_NSEC (0xffffffff) 86 #define DDS_DURATION_ZERO_SEC ( 0 ) 87 #define DDS_DURATION_ZERO_NSEC ( 0 ) 89 #define DDS_TIMESTAMP_INVALID_SEC ( -1 ) 90 #define DDS_TIMESTAMP_INVALID_NSEC ( 0xffffffff ) 91 #define DDS_TIMESTAMP_INVALID { DDS_TIMESTAMP_INVALID_SEC, DDS_TIMESTAMP_INVALID_NSEC } 94 COREDX_C_API DDS_InstanceHandle_t DDS_HANDLE_NIL;
95 COREDX_C_API DDS_InstanceHandle_t DDS_HANDLE_DEFAULT;
96 COREDX_C_API DDS_InstanceHandle_t DDS_HANDLE_NOT_ENABLED;
99 #define DDS_RETCODE_OK ( 0 ) 100 #define DDS_RETCODE_ERROR ( 1 ) 101 #define DDS_RETCODE_UNSUPPORTED ( 2 ) 102 #define DDS_RETCODE_BAD_PARAMETER ( 3 ) 103 #define DDS_RETCODE_PRECONDITION_NOT_MET ( 4 ) 104 #define DDS_RETCODE_OUT_OF_RESOURCES ( 5 ) 105 #define DDS_RETCODE_NOT_ENABLED ( 6 ) 106 #define DDS_RETCODE_IMMUTABLE_POLICY ( 7 ) 107 #define DDS_RETCODE_INCONSISTENT_POLICY ( 8 ) 108 #define DDS_RETCODE_ALREADY_DELETED ( 9 ) 109 #define DDS_RETCODE_TIMEOUT ( 10 ) 110 #define DDS_RETCODE_NO_DATA ( 11 ) 113 #define DDS_READ_SAMPLE_STATE ( 0x0001 ) 114 #define DDS_NOT_READ_SAMPLE_STATE ( 0x0002 ) 115 #define DDS_ANY_SAMPLE_STATE ( 0x00FF ) 118 #define DDS_NEW_VIEW_STATE ( 0x0001 ) 119 #define DDS_NOT_NEW_VIEW_STATE ( 0x0002 ) 120 #define DDS_ANY_VIEW_STATE ( 0x00FF ) 123 #define DDS_ALIVE_INSTANCE_STATE ( 0x0001 ) 124 #define DDS_NOT_ALIVE_DISPOSED_INSTANCE_STATE ( 0x0002 ) 125 #define DDS_NOT_ALIVE_NO_WRITERS_INSTANCE_STATE ( 0x0004 ) 128 #define DDS_NOT_ALIVE_INSTANCE_STATE ( 0x0006 ) 129 #define DDS_ANY_INSTANCE_STATE ( 0x00FF ) 132 typedef unsigned int DDS_StatusKind;
136 #define DDS_NO_STATUS 0x0000 137 #define DDS_STATUS_MASK_NONE 0x0000 138 #define DDS_INCONSISTENT_TOPIC_STATUS 0x0001 139 #define DDS_OFFERED_DEADLINE_MISSED_STATUS 0x0002 140 #define DDS_REQUESTED_DEADLINE_MISSED_STATUS 0x0004 141 #define DDS_OFFERED_INCOMPATIBLE_QOS_STATUS 0x0008 142 #define DDS_REQUESTED_INCOMPATIBLE_QOS_STATUS 0x0010 143 #define DDS_SAMPLE_LOST_STATUS 0x0020 144 #define DDS_SAMPLE_REJECTED_STATUS 0x0040 145 #define DDS_DATA_ON_READERS_STATUS 0x0080 146 #define DDS_DATA_AVAILABLE_STATUS 0x0100 147 #define DDS_LIVELINESS_LOST_STATUS 0x0200 148 #define DDS_LIVELINESS_CHANGED_STATUS 0x0400 149 #define DDS_PUBLICATION_MATCHED_STATUS 0x0800 150 #define DDS_SUBSCRIPTION_MATCHED_STATUS 0x1000 151 #define DDS_ALL_STATUS 0xFFFF 245 char last_inconsistent_topic_msg[256];
259 typedef enum DDS_SampleRejectedStatusKind
262 DDS_REJECTED_BY_INSTANCE_LIMIT,
263 DDS_REJECTED_BY_SAMPLES_LIMIT,
264 DDS_REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT
265 } DDS_SampleRejectedStatusKind;
376 DDS_InstanceHandle_t last_subscription_handle;
390 DDS_InstanceHandle_t last_publication_handle;
403 COREDX_C_API DDS_SampleInfoSeq * DDS_SampleInfoSeq__alloc(
void);
404 COREDX_C_API DDS_PointerSeq * DDS_PointerSeq__alloc(
void);
445 COREDX_C_API DDS_ReturnCode_t CoreDX_DDS_heap_init(
void * heap_ptr, uint32_t size);
451 COREDX_C_API
void * CoreDX_DDS_malloc(uint32_t size);
452 COREDX_C_API
void * CoreDX_DDS_calloc(uint32_t nmemb, uint32_t size);
453 COREDX_C_API
void CoreDX_DDS_free(
void * ptr);
460 struct CoreDX_FieldDef;
461 typedef void *(*CoreDX_fdef_access)(
struct _TypeSupport *,
const char *field_name,
struct CoreDX_FieldDef *def,
const void *data);
462 typedef void (*CoreDX_fdef_clear)(
struct CoreDX_FieldDef *def);
463 typedef struct CoreDX_FieldDef
467 unsigned char elem_kind;
469 CoreDX_fdef_access access;
470 CoreDX_fdef_clear clear;
475 DECLARE_SEQ(
unsigned int, CoreDX_FieldDef_OffsetTable);
477 COREDX_C_API
void *CoreDX_fielddef_access(
struct _TypeSupport *ts,
478 const char *field_name,
479 struct CoreDX_FieldDef *def,
481 COREDX_C_API
void CoreDX_fielddef_clear(
struct CoreDX_FieldDef *def);
int current_count_change
Change in current_count since the last time the listener was called or status was read...
Definition: dds_types.h:375
int alive_count
The number of 'active' DataWriters matched to this DataReader.
Definition: dds_types.h:298
int total_count_change
Change in total_count since the last time the listener was called or status was read.
Definition: dds_types.h:387
int sample_rank
Number of samples related to this instances that follow in the collection returned by the DataReader ...
Definition: dds_types.h:212
int total_count_change
Change in total_count since the last time the listener was called or status was read.
Definition: dds_types.h:360
int generation_rank
The generation difference of this sample and the most recent sample in the collection.
Definition: dds_types.h:218
int total_count
Cummulative count of the number of detected deadline misses for any instance read by the DataReader...
Definition: dds_types.h:323
Status related to the on_offered_incompatible_qos listener methods of the DDS_DataWriter, DDS_Publisher, and DDS_DomainParticipant structures.
Definition: dds_types.h:344
int total_count_change
Change in total_count since the last time the listener was called or status was read.
Definition: dds_types.h:347
Encapsulates statistics available from a DataReader or DataWriter.
Definition: dds_types.h:419
DDS_QosPolicyId_t last_policy_id
Id of the most recent requested incompatible QoS policy.
Definition: dds_types.h:348
int total_count_change
Change in total_count since the last time the listener was called or status was read.
Definition: dds_types.h:313
Status related to the on_liveliness_changed listener methods of the DDS_DataReader, DDS_Subscriber, and DDS_DomainParticipant structures.
Definition: dds_types.h:296
int total_count
Cummulative count of the number of times this DataWriter has discovered a matching DataReader...
Definition: dds_types.h:372
int32_t instance_alive_count
Definition: dds_types.h:422
DDS_InstanceStateKind instance_state
Indicates whether the associated instance currently exists. instance_state can be one of: DDS_ALIVE...
Definition: dds_types.h:190
int total_count_change
Change in total_count since the last time the listener was called or status was read.
Definition: dds_types.h:244
int total_count
Cummulative count of the number of deadlines missed by this DataWriter.
Definition: dds_types.h:312
Status related to the on_inconsistent_topic listener methods of the DDS_TopicListener structure...
Definition: dds_types.h:241
uint32_t nanosec
Definition: dds_types.h:75
DDS_QosPolicyCountSeq policies
A list of QoS policies and the total number of times each QoS policy was found to be incompatible...
Definition: dds_types.h:349
DDS_DOMAINID_TYPE_NATIVE DDS_DomainId_t
Definition: dds_types.h:51
int DDS_ReturnCode_t
Definition: dds_types.h:56
int current_count
The current number of DataReaders matched to the DataWriter.
Definition: dds_types.h:374
DDS_InstanceHandle_t publication_handle
The local handle of the source DataWriter.
Definition: dds_types.h:198
int current_count
The current number of DataWriters matched to the DataReader.
Definition: dds_types.h:388
int32_t instance_no_writers_count
Definition: dds_types.h:424
Status related to the on_liveliness_lost listener methods of the DDS_DataWriter, DDS_Publisher, and DDS_DomainParticipant structures.
Definition: dds_types.h:285
int absolute_generation_rank
The generation difference between this sample and the most recent sample.
Definition: dds_types.h:224
Definition: dds_types.h:72
DDS_SampleRejectedStatusKind last_reason
The reason for rejecting the most recently rejected sample.
Definition: dds_types.h:276
int total_count
Cummulative count of all samples lost under the Topic.
Definition: dds_types.h:255
int32_t instance_disposed_count
Definition: dds_types.h:423
unsigned char valid_data
Set to true (non-zero) if the associated DataSample contains data.
Definition: dds_types.h:229
DDS_InstanceHandle_t last_instance_handle
Handle identifying the most recent instance whose deadline was missed.
Definition: dds_types.h:325
Status related to the on_offered_deadline_missed listener methods of the DDS_DataWriter, DDS_Publisher, and DDS_DomainParticipant structures.
Definition: dds_types.h:310
int32_t sample_count
Definition: dds_types.h:426
Holds a DDS_QosPolicyId_t value and a counter to indicate the number of events associated with that P...
Definition: dds_types.h:332
int total_count_change
Change in total_count since the last time the listener was called or status was read.
Definition: dds_types.h:288
int total_count_change
Change in total_count since the last time the listener was called or status was read.
Definition: dds_types.h:256
int current_count_change
Change in current_count since the last time the listener was called or status was read...
Definition: dds_types.h:389
The SampleInfo structure contains information associated with each sample.
Definition: dds_types.h:159
int not_alive_count_change
Change in not_alive_count since the last time the listener was called or status was read...
Definition: dds_types.h:301
int32_t instance_count
Definition: dds_types.h:421
int no_writers_generation_count
The number of times the instance has become 'ALIVE' after being automatically disposed due to no acti...
Definition: dds_types.h:208
DDS_QosPolicyCountSeq policies
A list of QoS policies and the total number of times each QoS policy was found to be incompatible...
Definition: dds_types.h:362
DDS_Time_t reception_timestamp
The time the sample was received by the DataReader.
Definition: dds_types.h:194
DDS_QosPolicyId_t last_policy_id
Handle identifying the most recent QoS policy detected to be incompatible.
Definition: dds_types.h:361
DDS_ViewStateKind view_state
Associated instance has/has not been seen before.
Definition: dds_types.h:178
int total_count
Cummulative number of times that an 'alive' DataWriter became not alive.
Definition: dds_types.h:287
int total_count_change
Change in total_count since the last time the listener was called or status was read.
Definition: dds_types.h:275
DDS_SampleStateKind sample_state
The associated data sample has/has not been read previously.
Definition: dds_types.h:169
DDS_Time_t source_timestamp
The time provided by the DataWriter when the sample was written.
Definition: dds_types.h:192
int total_count_change
Change in total_count since the last time the listener was called or status was read.
Definition: dds_types.h:324
int total_count
Cummulative count of the number of DataWriters discovered having matching Topic and incompatible QoS...
Definition: dds_types.h:346
uint32_t state_flags
Definition: dds_types.h:428
int count
Definition: dds_types.h:334
DECLARE_SEQ(DDS_DynamicTypeMember, DDS_DynamicTypeMemberSeq)
A DDS_DynamicTypeMemberSeq instance is a sequence of DDS_DynamicTypeMember's.
DDS_InstanceHandle_t last_publication_handle
Handle identifying the most recent DataWriter whose liveliness changed.
Definition: dds_types.h:302
Status related to the on_requested_deadline_missed listener methods of the DDS_DataReader, DDS_Subscriber, and DDS_DomainParticipant structures.
Definition: dds_types.h:321
int total_count_change
Change in total_count since the last time the listener was called or status was read.
Definition: dds_types.h:373
int total_count
Cummulative count of the number of times this DataReader has discovered a matching DataWriter...
Definition: dds_types.h:386
int32_t sample_read_count
Definition: dds_types.h:427
Status related to the on_publication_matched listener methods of the DDS_DataWriter, DDS_Publisher, and DDS_DomainParticipant structures.
Definition: dds_types.h:370
int total_count
Cummulative count of samples rejected by the DataReader.
Definition: dds_types.h:274
unsigned int DDS_StatusMask
Definition: dds_types.h:134
DDS_HANDLE_TYPE_NATIVE DDS_InstanceHandle_t
Definition: dds_types.h:53
DDS_InstanceHandle_t last_instance_handle
The handle of the instance associated with the most recently rejected sample.
Definition: dds_types.h:277
int sec
Definition: dds_types.h:74
Status related to the on_subscription_matched listener methods of the DDS_DataReader, DDS_Subscriber, and DDS_DomainParticipant structures.
Definition: dds_types.h:384
DDS_InstanceHandle_t last_instance_handle
Handle identifying the most recent instance whose deadline was missed.
Definition: dds_types.h:314
Status related to the on_requested_incompatible_qos listener methods of the DDS_DataReader, DDS_Subscriber, and DDS_DomainParticipant structures.
Definition: dds_types.h:357
int not_alive_count
The number of 'not-alive' DataWriters matched to this DataReader.
Definition: dds_types.h:299
DDS_InstanceHandle_t instance_handle
The handle that locally identifies the associated instance.
Definition: dds_types.h:196
DDS_QosPolicyId_t policy_id
Definition: dds_types.h:333
int alive_count_change
Change in alive_count since the last time the listener was called or status was read.
Definition: dds_types.h:300
int total_count
Cummulative count of the number of discovered DataReaders having matching Topic and incompatible QoS...
Definition: dds_types.h:359
int disposed_generation_count
The number of times the instance has become 'ALIVE' after being explicitly disposed. (Computed at the time the sample arrives at the DataReader.)
Definition: dds_types.h:202
Status related to the on_sample_lost listener methods of the DDS_DataReader, DDS_Subscriber, and DDS_DomainParticipant structures.
Definition: dds_types.h:253
int32_t instance_new_count
Definition: dds_types.h:425
int total_count
Cummulative count of the discovered Topics having a matching name and inconsistent characteristics...
Definition: dds_types.h:243
Status related to the on_sample_rejected listener methods of the DDS_DataReader, DDS_Subscriber, and DDS_DomainParticipant structures.
Definition: dds_types.h:272