37 #ifndef dds_c_infrastructure_h
38 #define dds_c_infrastructure_h
43 #ifndef osapi_thread_h
52 #ifndef dds_c_common_h
55 #ifndef dds_c_string_h
58 #ifndef dds_c_sequence_h
75 #define RTI_MICRODDS_MAJOR 2
76 #define RTI_MICRODDS_MINOR 0
85 #define DDSC_CPP_SUPPORT_METHODS_EXTENDED(T) \
89 DDS_ReturnCode_t copy(const T& from);\
91 T& operator=(const T& from);\
92 bool operator==(const T& other);\
93 bool operator!=(const T& other);
95 #define DDSC_CPP_SUPPORT_METHODS_EXTENDED(T) \
99 DDS_ReturnCode_t copy(const T& from);\
102 T& operator=(const T& from);\
103 bool operator==(const T& other);\
104 bool operator!=(const T& other);
107 #define DDSC_CPP_SUPPORT_METHODS_BASIC(T) \
113 T& operator=(const T& from);\
114 bool operator==(const T& other);\
115 bool operator!=(const T& other);
118 #define DDSC_CPP_SUPPORT_METHODS_EXTENDED(T)
119 #define DDSC_CPP_SUPPORT_METHODS_BASIC(T)
146 #define DDS_Time_t_equals(l, r) \
147 ((l).sec == (r).sec && (l).nanosec == (r).nanosec)
149 #ifdef DOXYGEN_DOCUMENTATION_ONLY
158 #define DDS_Time_t_greater_than(l, r) \
159 (((l).sec > (r).sec) || \
160 (((l).sec == (r).sec) && \
161 ((l).nanosec > (r).nanosec)))
163 #ifdef DOXYGEN_DOCUMENTATION_ONLY
172 #define DDS_Time_t_less_than(l, r) \
173 (((l).sec < (r).sec) || \
174 (((l).sec == (r).sec) && \
175 ((l).nanosec < (r).nanosec)))
177 #ifdef DOXYGEN_DOCUMENTATION_ONLY
189 #define DDS_TIME_ZERO { 0L, 0UL }
191 #define DDS_Time_is_zero(timePtr) \
192 ((timePtr)->sec == 0L || (timePtr)->nanosec == 0UL)
194 #ifdef DOXYGEN_DOCUMENTATION_ONLY
209 #define DDS_TIMESTAMP_INVALID_SEC DDS_TIME_INVALID_SEC
217 #define DDS_TIMESTAMP_INVALID_NSEC DDS_TIME_INVALID_NSEC
224 #define DDS_Time_is_invalid(timePtr) \
227 #ifdef DOXYGEN_DOCUMENTATION_ONLY
255 #define DDS_DURATION_INFINITY_SEC DDS_DURATION_INFINITE_SEC
262 #define DDS_DURATION_INFINITY_NSEC DDS_DURATION_INFINITE_NSEC
268 #define DDS_Duration_is_infinite(durationPtr) \
269 ((durationPtr)->sec == DDS_DURATION_INFINITE_SEC && \
270 (durationPtr)->nanosec == DDS_DURATION_INFINITE_NSEC)
272 #ifdef DOXYGEN_DOCUMENTATION_ONLY
296 #define DDS_Duration_copy(out, in) \
297 ((out.sec = in.sec) && \
298 (out.nanosec = in.nanosec))
299 #ifdef DOXYGEN_DOCUMENTATION_ONLY
309 #define DDS_Duration_equal(me, other) \
310 ((me)->sec == (other)->sec && \
311 (me)->nanosec == (other)->nanosec)
312 #ifdef DOXYGEN_DOCUMENTATION_ONLY
321 #define DDS_Duration_set(me, __sec,__nanosec) \
323 (me)->nanosec = __nanosec
324 #define DDS_Duration_get(me, __sec,__nanosec) \
326 __nanosec = (me)->nanosec
340 #define DDS_Duration_is_zero(durationPtr) \
341 ((durationPtr)->sec == DDS_DURATION_ZERO_SEC && \
342 (durationPtr)->nanosec == DDS_DURATION_ZERO_NSEC)
343 #ifdef DOXYGEN_DOCUMENTATION_ONLY
357 DDS_SEQUENCE(DDS_InstanceHandleSeq, DDS_InstanceHandle_t)
359 #ifdef DOXYGEN_DOCUMENTATION_ONLY
362 struct DDS_InstanceHandleSeq {};
373 const DDS_InstanceHandle_t *other);
375 #define DDS_InstanceHandle_is_nil(handlePtr) \
376 DDS_InstanceHandle_equals(handlePtr, &DDS_HANDLE_NIL)
378 #ifdef DOXYGEN_DOCUMENTATION_ONLY
387 DDS_InstanceHandle_from_rtps(DDS_InstanceHandle_t *
self,
388 const struct RTPS_Guid *other);
393 DDS_InstanceHandle_to_rtps(
struct RTPS_Guid *other,
394 const DDS_InstanceHandle_t *
self);
399 DDS_InstanceHandle_from_netio_address(DDS_InstanceHandle_t *
self,
400 const struct NETIO_Address *other);
406 const DDS_InstanceHandle_t * other);
411 DDS_InstanceHandle_compare(
const DDS_InstanceHandle_t *
self,
412 const DDS_InstanceHandle_t * other);
433 #define DDS_GUID_INITIALIZER {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}
437 extern DDSCDllVariable
const struct DDS_GUID_t DDS_GUID_AUTO;
445 extern DDSCDllVariable
const struct DDS_GUID_t DDS_GUID_PREFIX_UNKNOWN;
449 extern DDSCDllVariable
const struct DDS_GUID_t DDS_GUID_PREFIX_AUTO;
467 DDS_GUID_to_rtps(
struct RTPS_Guid *other,
475 const struct RTPS_Guid *other);
481 DDS_GUID_compare(
const struct DDS_GUID_t *
self,
507 #define DDS_SEQUENCE_NUMBER_UNKNOWN REDA_SEQUENCE_NUMBER_UNKNOWN
511 #define DDS_SEQUENCE_NUMBER_ZERO REDA_SEQUENCE_NUMBER_ZERO
515 #define DDS_SEQUENCE_NUMBER_MAX REDA_SEQUENCE_NUMBER_MAX
517 #define DDS_SequenceNumber_compare(sn1,sn2) \
518 ((((sn1)->high) > ((sn2)->high)) ? 1 : \
519 ((((sn1)->high) < ((sn2)->high)) ? -1 : \
520 ((((sn1)->low) > ((sn2)->low)) ? 1 : \
521 ((((sn1)->low) < ((sn2)->low)) ? -1 : 0))))
523 #ifdef DOXYGEN_DOCUMENTATION_ONLY
601 #define DDSC_VARIABLE_LENGTH_VALUE_TYPE_SUPPORT_FULL(T) \
603 DDSCDllExport DDS_Boolean T ## _initialize(struct T* self); \
604 DDSCDllExport DDS_Boolean T ## _finalize(struct T* self); \
605 DDSCDllExport DDS_Boolean T ## _copy(struct T* self, const struct T* from);\
606 MUST_CHECK_RETURN DDSCDllExport DDS_Boolean T ## _is_equal(const struct T* self, const struct T* from)
611 #define DDSC_VARIABLE_LENGTH_VALUE_TYPE_SUPPORT_BASIC(T) \
613 DDSCDllExport DDS_Boolean T ## _is_equal(const struct T* self, const struct T* from)
630 #define DDS_STATUS_MASK_NONE ((DDS_StatusMask) 0)
634 #define DDS_STATUS_MASK_ALL (~DDS_STATUS_MASK_NONE)
729 DDS_USERDATA_QOS_POLICY_ID = 1,
733 DDS_DURABILITY_QOS_POLICY_ID = 2,
737 DDS_PRESENTATION_QOS_POLICY_ID = 3,
745 DDS_LATENCYBUDGET_QOS_POLICY_ID = 5,
761 DDS_TIMEBASEDFILTER_QOS_POLICY_ID = 9,
765 DDS_PARTITION_QOS_POLICY_ID = 10,
773 DDS_DESTINATIONORDER_QOS_POLICY_ID = 12,
781 DDS_RESOURCELIMITS_QOS_POLICY_ID = 14,
789 DDS_WRITERDATALIFECYCLE_QOS_POLICY_ID = 16,
793 DDS_READERDATALIFECYCLE_QOS_POLICY_ID = 17,
797 DDS_TOPICDATA_QOS_POLICY_ID = 18,
801 DDS_GROUPDATA_QOS_POLICY_ID = 19,
805 DDS_TRANSPORTPRIORITY_QOS_POLICY_ID = 20,
809 DDS_LIFESPAN_QOS_POLICY_ID = 21,
813 DDS_DURABILITYSERVICE_QOS_POLICY_ID = 22,
820 struct DDS_QosPolicyCount
831 #define MICRO_DDS_SEQUENCE_MODULE
832 #ifdef MICRO_DDS_SEQUENCE_MODULE
833 DDS_SEQUENCE(DDS_QosPolicyCountSeq,
struct DDS_QosPolicyCount)
835 #ifdef DOXYGEN_DOCUMENTATION_ONLY
838 struct DDS_QosPolicyCountSeq
895 #define DDS_Duration_to_ms(dur_) (((dur_).sec*1000) + ((dur_).nanosec/1000000))
900 #define DDS_DEADLINE_QOS_POLICY_DEFAULT \
901 {{ 0x7fffffffL, 0xffffffffUL }}
939 #define DDS_OWNERSHIP_QOS_POLICY_DEFAULT { DDS_SHARED_OWNERSHIP_QOS }
963 #define DDS_OWNERSHIP_STRENGTH_QOS_POLICY_DEFAULT { 0L }
982 DDS_AUTOMATIC_LIVELINESS_QOS,
986 DDS_MANUAL_BY_PARTICIPANT_LIVELINESS_QOS,
1010 #define DDS_LIVELINESS_QOS_POLICY_DEFAULT \
1011 { DDS_MANUAL_BY_TOPIC_LIVELINESS_QOS, {0x7fffffff, 0xffffffffUL}}
1057 #define DDS_RELIABILITY_QOS_POLICY_DEFAULT \
1058 { DDS_BEST_EFFORT_RELIABILITY_QOS, \
1083 DDS_KEEP_ALL_HISTORY_QOS
1102 #define DDS_HISTORY_QOS_POLICY_DEFAULT { DDS_KEEP_LAST_HISTORY_QOS, \
1130 DDS_TRANSIENT_DURABILITY_QOS,
1134 DDS_PERSISTENT_DURABILITY_QOS
1149 #define DDS_DURABILITY_QOS_POLICY_DEFAULT \
1150 { DDS_VOLATILE_DURABILITY_QOS }
1186 #define DDS_RESOURCE_LIMITS_QOS_POLICY_DEFAULT { \
1214 extern DDSCDllVariable
const char *
const
1245 #define DDS_DATAREADERRESOURCE_LIMITS_QOS_POLICY_DEFAULT { \
1250 DDS_NO_INSTANCE_REPLACEMENT_QOS, \
1261 extern DDSCDllVariable
const char *
const
1276 #define DDS_DATAWRITERRESOURCE_LIMITS_QOS_POLICY_DEFAULT { \
1302 #define DDS_ENTITY_FACTORY_QOS_POLICY_DEFAULT { DDS_BOOLEAN_TRUE }
1312 #define DDS_LENGTH_UNLIMITED (-1)
1324 extern DDSCDllVariable
const char *
const DDS_TYPESUPPORT_QOS_POLICY_NAME;
1329 struct DDS_TypeSupportQosPolicy
1338 #define DDS_TYPESUPPORT_QOS_POLICY_DEFAULT \
1364 #define DDS_SYSTEM_RESOURCE_LIMITS_QOS_POLICY_DEFAULT { 1L }
1372 #define DDS_RtpsWellKnownPorts NETIO_RtpsPortParam
1388 #ifdef DOXYGEN_DOCUMENTATION_ONLY
1424 #define DDS_RtpsWellKnownPorts_t DDS_RtpsWellKnownPorts
1428 #define DDS_RTPS_WELL_KNOWN_PORTS_DEFAULT \
1476 #define DDS_WIRE_PROTOCOL_QOS_POLICY_DEFAULT { \
1478 DDS_RTPS_AUTO_ID , \
1479 DDS_RTPS_AUTO_ID , \
1480 DDS_RTPS_AUTO_ID , \
1481 DDS_RTPS_WELL_KNOWN_PORTS_DEFAULT \
1486 #define DDS_Locator RTPS_Locator
1487 #define DDS_Locator_t RTPS_Locator_t
1488 #define DDS_LocatorUdpv4_t RTPS_LocatorUdpv4_t
1489 #define DDS_LOCATOR_DEFAULT RTPS_LOCATOR_DEFAULT
1490 #define DDS_LOCATOR_UDPV4_DEFAULT RTPS_LOCATOR_UDPV4_DEFAULT
1492 #ifdef DOXYGEN_DOCUMENTATION_ONLY
1515 #ifdef DOXYGEN_DOCUMENTATION_ONLY
1524 #define DDS_LOCATOR_INVALID RTPS_LOCATOR_INVALID
1529 #define DDS_LOCATOR_DEFAULT RTPS_LOCATOR_DEFAULT
1534 #define DDS_LOCATOR_KIND_INVALID RTPS_LOCATOR_KIND_INVALID
1539 #define DDS_LOCATOR_PORT_INVALID RTPS_LOCATOR_PORT_INVALID
1544 #define DDS_LOCATOR_ADDRESS_INVALID RTPS_LOCATOR_ADDRESS_INVALID
1549 #define DDS_LOCATOR_KIND_UDPv4 RTPS_LOCATOR_KIND_UDPv4
1554 #define DDS_LOCATOR_KIND_UDPv6 RTPS_LOCATOR_KIND_UDPv6
1559 #define DDS_LOCATOR_KIND_RESERVED RTPS_LOCATOR_KIND_RESERVED
1564 #define DDS_LOCATOR_KIND_SHMEM RTPS_LOCATOR_KIND_SHMEM
1585 #define DDS_PROTOCOL_VERSION_DEFAULT { 0, 0 }
1589 #define DDS_PROTOCOLVERSION_1_0 { 1, 0 }
1592 #define DDS_PROTOCOLVERSION_1_1 { 1, 1 }
1595 #define DDS_PROTOCOLVERSION_1_2 { 1, 2 }
1598 #define DDS_PROTOCOLVERSION_2_0 { 2, 0 }
1601 #define DDS_PROTOCOLVERSION_2_1 { 2, 1 }
1604 #define DDS_PROTOCOLVERSION { 2, 1 }
1608 #define DDS_VENDOR_ID_LENGTH_MAX 2
1619 #ifdef DOXYGEN_DOCUMENTATION_ONLY
1631 DDSC_VARIABLE_LENGTH_VALUE_TYPE_SUPPORT_BASIC(
DDS_VendorId);
1632 #define DDS_VendorId_t DDS_VendorId
1636 #define DDS_VENDOR_ID_DEFAULT { {0, 0} }
1640 #define DDS_VENDORID_UNKNOWN { {0, 0} }
1663 #ifdef DOXYGEN_DOCUMENTATION_ONLY
1683 #define DDS_ProductVersion_t DDS_ProductVersion
1688 #define DDS_PRODUCTVERSION_UNKNOWN { 0, 0, '0', 0 }
1692 #define DDS_PRODUCTVERSION_DEFAULT { 2, 0, 'c', 1 }
1717 #define DDS_DATA_READER_PROTOCOL_QOS_POLICY_DEFAULT \
1749 #define DDS_RTPSRELIABLEWRITER_DEFAULT_SEND_WINDOW (DDS_LENGTH_UNLIMITED)
1753 #define DDS_RTPS_RELIABLE_WRITER_PROTOCOL_DEFAULT { \
1756 DDS_RTPSRELIABLEWRITER_DEFAULT_SEND_WINDOW, \
1757 DDS_LENGTH_UNLIMITED, \
1787 #define DDS_DATA_WRITER_PROTOCOL_QOS_POLICY_DEFAULT \
1788 { DDS_RTPS_AUTO_ID, \
1789 DDS_RTPS_RELIABLE_WRITER_PROTOCOL_DEFAULT\
1803 #ifdef DOXYGEN_DOCUMENTATION_ONLY
1806 struct DDS_StringSeq {};
1821 #define DDS_TRANSPORT_QOS_POLICY_DEFAULT \
1823 DDS_SEQUENCE_INITIALIZER(DDS_String)\
1834 extern DDSCDllVariable
const char *
const
1898 #define DDS_DomainParticipantResourceLimitsQosPolicy_MATCH_INIT (32L)
1918 #define DDS_DOMAIN_PARTICIPANT_RESOURCE_LIMITS_QOS_POLICY_DEFAULT \
1928 DDS_DomainParticipantResourceLimitsQosPolicy_MATCH_INIT, \
1929 DDS_DomainParticipantResourceLimitsQosPolicy_MATCH_INIT, \
1938 #define DDS_BUILTIN_TOPIC_KEY_TYPE_NATIVE_LENGTH (4)
1946 DDS_BUILTIN_TOPIC_KEY_TYPE_NATIVE
value[DDS_BUILTIN_TOPIC_KEY_TYPE_NATIVE_LENGTH];
1951 #define DDS_BuiltinTopicKey_t_INITIALIZER { {0, 0, 0, 0} }
2003 const DDS_InstanceHandle_t *out);
2024 typedef struct DDS_ConditionImpl *DDS_Condition_ptr;
2030 #ifdef DOXYGEN_DOCUMENTATION_ONLY
2044 DDS_ConditionImpl_set_wrapper(
DDS_Condition *
self,
void *wrapper);
2048 DDSCDllExport
void**
2057 #define DDS_GuardCondition_as_condition(guard_condition_ptr_) \
2058 ((DDS_Condition*) guard_condition_ptr_)
2060 #ifdef DOXYGEN_DOCUMENTATION_ONLY
2090 #define DDS_StatusCondition_as_condition(status_cond_ptr_) \
2091 ((DDS_Condition*) status_cond_ptr_)
2093 #ifdef DOXYGEN_DOCUMENTATION_ONLY
2103 DDSCDllExport DDS_StatusMask
2110 DDS_StatusMask mask);
2172 #define DDS_Listener_INITIALIZER { NULL }
2178 #ifdef DOXYGEN_DOCUMENTATION_ONLY
2200 DDSCDllExport DDS_InstanceHandle_t
2215 DDSCDllExport DDS_StatusMask
2235 DDS_Entity_set_wrapper(
DDS_Entity *
self,
void *wrapper);
2273 #define DDS_ENTITYNAME_QOS_NAME_MAX 255
2286 #define DDS_ENTITY_NAME_QOS_POLICY_DEFAULT { {'\0'} }
2294 struct RTI_ManagementQosPolicy
2302 #define RTI_MANAGEMENT_QOS_POLICY_DEFAULT { \
2318 #define DDS_IntegerWithRange(__value, __low,__high) \
2319 ((__value) < (__low) ? -1 : ((__value) > (__high) ? 1 : 0))
2329 DDSHST_RETCODE_ERROR = -1000,
2330 DDSHST_RETCODE_NOSPACE,
2331 DDSHST_RETCODE_EXISTS,
2332 DDSHST_RETCODE_NOT_EXISTS,
2333 DDSHST_RETCODE_INVALID_PROPERTY,
2334 DDSHST_RETCODE_INVALID_ENTRY_REQUEST,
2335 DDSHST_RETCODE_SUCCESS = 0
2336 } DDSHST_ReturnCode_T;
2342 DDSHST_REPLACE_POLICY_KIND_OLDEST,
2343 DDSHST_REPLACE_POLICY_KIND_NONE
2344 } DDSHST_ReplacePolicyKind_T;
2364 #define DDS_SAMPLE_IDENTITY_UNKNOWN \
2366 DDS_GUID_INITIALIZER, \
2367 DDS_SEQUENCE_NUMBER_UNKNOWN \
2393 #define DDS_WRITEPARAMS_DEFAULT \
2395 DDS_SAMPLE_IDENTITY_UNKNOWN, \
2396 DDS_SAMPLE_IDENTITY_UNKNOWN, \
2398 DDS_HANDLE_NIL_NATIVE \
2411 #define DDS_PropertySeq CDR_PropertySeq
2412 #define DDS_Property CDR_Property
2413 #define DDS_PropertySeq_initialize CDR_PropertySeq_initialize
2414 #define DDS_PropertySeq_set_length CDR_PropertySeq_set_length
2415 #define DDS_PropertySeq_get_length CDR_PropertySeq_get_length
2416 #define DDS_PropertySeq_get_reference CDR_PropertySeq_get_reference
2417 #define DDS_PropertySeq_loan_contiguous CDR_PropertySeq_loan_contiguous
2421 DDSCDllExport
struct DDS_PropertySeq*