47 #ifndef dds_c_infrastructure_h
48 #define dds_c_infrastructure_h
53 #ifndef osapi_thread_h
62 #ifndef dds_c_common_h
65 #ifndef dds_c_string_h
68 #ifndef dds_c_sequence_h
85 #define RTI_MICRODDS_MAJOR 2
86 #define RTI_MICRODDS_MINOR 0
93 #define DDSC_CPP_CERT_PRIVATE_OPERATORS(T) \
96 T& operator=(const T& from);\
97 bool operator==(const T& other);\
98 bool operator!=(const T& other);
100 #define DDSC_CPP_QOS_OPERATORS(T) \
101 DDSC_CPP_CERT_PRIVATE_OPERATORS(T)
103 #define DDSC_CPP_QOS_POLICY_OPERATORS(T) \
104 DDSC_CPP_CERT_PRIVATE_OPERATORS(T)
106 #define DDSC_CPP_STATUS_OPERATORS(T) \
107 DDSC_CPP_CERT_PRIVATE_OPERATORS(T)
109 #define DDSC_CPP_QOS_OPERATORS(T) \
111 bool operator==(const T& other);\
112 bool operator!=(const T& other);
114 #define DDSC_CPP_QOS_POLICY_OPERATORS(T)
116 #define DDSC_CPP_STATUS_OPERATORS(T)
120 #define DDSC_CPP_QOS_METHODS(T) \
123 DDS_ReturnCode_t copy(const T& from); \
124 DDSC_CPP_QOS_OPERATORS(T)
126 #define DDSC_CPP_QOS_POLICY_METHODS(T) \
128 #define DDSC_CPP_STATUS_METHODS(T)
131 #define DDSC_CPP_QOS_METHODS(T)
132 #define DDSC_CPP_QOS_POLICY_METHODS(T)
133 #define DDSC_CPP_STATUS_METHODS(T)
136 #define DDSC_QOS_POLICY_METHODS_DECL(T)
139 DDSCDllExport
void T##_initialize(
struct T *policy);
175 #define DDS_Time_t_greater_than(l, r) \
176 (((l).sec > (r).sec) || \
177 (((l).sec == (r).sec) && \
178 ((l).nanosec > (r).nanosec)))
180 #ifdef DOXYGEN_DOCUMENTATION_ONLY
192 #define DDS_TIME_ZERO { 0L, 0UL }
195 #define DDS_Time_is_zero(timePtr) \
196 ((timePtr)->sec == 0L || (timePtr)->nanosec == 0UL)
198 #ifdef DOXYGEN_DOCUMENTATION_ONLY
228 #define DDS_DURATION_INFINITE_SEC_INITIALIZER 0x7fffffff
232 #define DDS_DURATION_INFINITE_NSEC_INITIALIZER 0xffffffffUL
261 #define DDS_DURATION_INFINITE_INITIALIZER \
263 DDS_DURATION_INFINITE_SEC_INITIALIZER, \
264 DDS_DURATION_INFINITE_NSEC_INITIALIZER \
288 extern DDSCDllVariable
const struct DDS_Duration_t DDS_DURATION_YEAR;
292 extern DDSCDllVariable
const struct DDS_Duration_t DDS_DURATION_NANOSEC;
387 DDSCDllExport RTI_BOOL
388 DDS_Duration_is_normalized(
const struct DDS_Duration_t *
const self);
398 #define T DDS_InstanceHandle_t
399 #define TSeq DDS_InstanceHandleSeq
400 #include <reda/reda_sequence_decl.h>
402 #ifdef DOXYGEN_DOCUMENTATION_ONLY
405 struct DDS_InstanceHandleSeq {};
423 const DDS_InstanceHandle_t *other);
425 #define DDS_InstanceHandle_is_nil(handlePtr) \
426 DDS_InstanceHandle_equals(handlePtr, &DDS_HANDLE_NIL)
428 #ifdef DOXYGEN_DOCUMENTATION_ONLY
446 DDS_InstanceHandle_from_rtps(DDS_InstanceHandle_t *
self,
447 const struct RTPS_Guid *other);
461 DDS_InstanceHandle_to_rtps(
struct RTPS_Guid *other,
462 const DDS_InstanceHandle_t *
self);
477 DDS_InstanceHandle_from_netio_address(DDS_InstanceHandle_t *
self,
478 const struct NETIO_Address *other);
491 DDS_InstanceHandle_compare(
const DDS_InstanceHandle_t *
self,
492 const DDS_InstanceHandle_t *other);
513 #define DDS_GUID_INITIALIZER {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}
517 extern DDSCDllVariable
const struct DDS_GUID_t DDS_GUID_AUTO;
525 extern DDSCDllVariable
const struct DDS_GUID_t DDS_GUID_PREFIX_UNKNOWN;
529 extern DDSCDllVariable
const struct DDS_GUID_t DDS_GUID_PREFIX_AUTO;
542 DDS_GUID_to_rtps(
struct RTPS_Guid *other,
557 const struct RTPS_Guid *other);
600 #define DDS_SEQUENCE_NUMBER_UNKNOWN REDA_SEQUENCE_NUMBER_UNKNOWN
604 #define DDS_SEQUENCE_NUMBER_ZERO REDA_SEQUENCE_NUMBER_ZERO
608 #define DDS_SEQUENCE_NUMBER_MAX REDA_SEQUENCE_NUMBER_MAX
688 #define DDSC_VARIABLE_LENGTH_VALUE_TYPE_SUPPORT_FULL(T) \
690 DDSCDllExport DDS_Boolean T ## _initialize(struct T* self); \
691 DDSCDllExport DDS_Boolean T ## _finalize(struct T* self); \
692 DDSCDllExport DDS_Boolean T ## _copy(struct T* self, const struct T* from);\
693 MUST_CHECK_RETURN DDSCDllExport DDS_Boolean T ## _is_equal(const struct T* self, const struct T* from)
698 #define DDSC_VARIABLE_LENGTH_VALUE_TYPE_SUPPORT_BASIC(T) \
700 DDSCDllExport DDS_Boolean T ## _is_equal(const struct T* self, const struct T* from)
717 #define DDS_STATUS_MASK_NONE ((DDS_StatusMask) 0)
721 #define DDS_STATUS_MASK_ALL (~DDS_STATUS_MASK_NONE)
816 DDS_USERDATA_QOS_POLICY_ID = 1,
820 DDS_DURABILITY_QOS_POLICY_ID = 2,
824 DDS_PRESENTATION_QOS_POLICY_ID = 3,
832 DDS_LATENCYBUDGET_QOS_POLICY_ID = 5,
848 DDS_TIMEBASEDFILTER_QOS_POLICY_ID = 9,
852 DDS_PARTITION_QOS_POLICY_ID = 10,
860 DDS_DESTINATIONORDER_QOS_POLICY_ID = 12,
868 DDS_RESOURCELIMITS_QOS_POLICY_ID = 14,
876 DDS_WRITERDATALIFECYCLE_QOS_POLICY_ID = 16,
880 DDS_READERDATALIFECYCLE_QOS_POLICY_ID = 17,
884 DDS_TOPICDATA_QOS_POLICY_ID = 18,
888 DDS_GROUPDATA_QOS_POLICY_ID = 19,
892 DDS_TRANSPORTPRIORITY_QOS_POLICY_ID = 20,
896 DDS_LIFESPAN_QOS_POLICY_ID = 21,
900 DDS_DURABILITYSERVICE_QOS_POLICY_ID = 22,
907 struct DDS_QosPolicyCount
918 #define T struct DDS_QosPolicyCount
919 #define TSeq DDS_QosPolicyCountSeq
920 #include <reda/reda_sequence_decl.h>
922 #ifdef DOXYGEN_DOCUMENTATION_ONLY
925 struct DDS_QosPolicyCountSeq
1009 DDS_DeadlineQosPolicy_get_sample_freq(
1028 #define DDS_DEADLINE_QOS_POLICY_DEFAULT \
1029 {DDS_DURATION_INFINITE_INITIALIZER}
1069 #define DDS_OWNERSHIP_QOS_POLICY_DEFAULT { DDS_SHARED_OWNERSHIP_QOS }
1092 DDSC_CPP_QOS_POLICY_METHODS(DDS_OwnershipStrengthQosPolicy)
1097 #define DDS_OWNERSHIP_STRENGTH_QOS_POLICY_DEFAULT { 0L }
1148 #define DDS_LIVELINESS_QOS_POLICY_DEFAULT \
1150 DDS_AUTOMATIC_LIVELINESS_QOS,\
1151 DDS_DURATION_INFINITE_INITIALIZER \
1200 #define DDS_RELIABILITY_QOS_POLICY_DEFAULT \
1201 { DDS_BEST_EFFORT_RELIABILITY_QOS, \
1227 DDS_KEEP_ALL_HISTORY_QOS
1236 #define DDS_MAX_DEPTH_HISTORY_QOS (2147483647)
1256 #define DDS_HISTORY_QOS_POLICY_DEFAULT { DDS_KEEP_LAST_HISTORY_QOS, \
1286 DDS_TRANSIENT_DURABILITY_QOS,
1290 DDS_PERSISTENT_DURABILITY_QOS
1307 #define DDS_DURABILITY_QOS_POLICY_DEFAULT \
1308 { DDS_VOLATILE_DURABILITY_QOS }
1347 DDSC_CPP_QOS_POLICY_METHODS(DDS_ResourceLimitsQosPolicy)
1352 #define DDS_RESOURCE_LIMITS_QOS_POLICY_DEFAULT { \
1372 DDS_INSTANCE_PRESENTATION_QOS,
1376 DDS_TOPIC_PRESENTATION_QOS,
1380 DDS_GROUP_PRESENTATION_QOS,
1384 DDS_HIGHEST_OFFERED_PRESENTATION_QOS
1385 } DDS_PresentationQosPolicyAccessScopeKind;
1390 struct DDS_PresentationQosPolicy
1394 DDS_PresentationQosPolicyAccessScopeKind access_scope;
1404 DDSC_CPP_QOS_POLICY_METHODS(DDS_PresentationQosPolicy)
1409 #define DDS_PRESENTATION_QOS_POLICY_DEFAULT \
1410 { DDS_INSTANCE_PRESENTATION_QOS, DDS_BOOLEAN_FALSE, DDS_BOOLEAN_FALSE }
1412 DDSC_QOS_POLICY_METHODS_DECL(DDS_PresentationQosPolicy)
1450 #define DDS_DESTINATION_ORDER_QOS_POLICY_DEFAULT \
1452 DDS_BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS, \
1480 extern DDSCDllVariable
const char *
const
1517 #define DDS_DATAREADERRESOURCE_LIMITS_QOS_POLICY_DEFAULT { \
1522 DDS_NO_INSTANCE_REPLACEMENT_QOS, \
1536 extern DDSCDllVariable const
char *const
1552 DDSC_CPP_QOS_POLICY_METHODS(DDS_DataWriterResourceLimitsQosPolicy)
1557 #define DDS_DATAWRITERRESOURCE_LIMITS_QOS_POLICY_DEFAULT { \
1583 DDSC_CPP_QOS_POLICY_METHODS(DDS_EntityFactoryQosPolicy)
1588 #define DDS_ENTITY_FACTORY_QOS_POLICY_DEFAULT { DDS_BOOLEAN_TRUE }
1600 #define DDS_LENGTH_UNLIMITED (-1)
1602 #define DDS_LENGTH_AUTO (-2)
1614 extern DDSCDllVariable
const char *
const DDS_TYPESUPPORT_QOS_POLICY_NAME;
1619 struct DDSCPPDllExport DDS_TypeSupportQosPolicy
1625 DDSC_CPP_QOS_POLICY_METHODS(DDS_TypeSupportQosPolicy)
1630 #define DDS_TYPESUPPORT_QOS_POLICY_DEFAULT \
1633 DDSC_QOS_POLICY_METHODS_DECL(DDS_TypeSupportQosPolicy)
1659 DDSC_CPP_QOS_POLICY_METHODS(DDS_SystemResourceLimitsQosPolicy)
1664 #if UDP_TRANSFORMS_ENABLED
1665 #define DDS_SYSTEM_RESOURCE_LIMITS_QOS_POLICY_DEFAULT { 1L,64L }
1667 #define DDS_SYSTEM_RESOURCE_LIMITS_QOS_POLICY_DEFAULT { 1L,16L }
1678 #define DDS_RtpsWellKnownPorts NETIO_RtpsPortParam
1694 #ifdef DOXYGEN_DOCUMENTATION_ONLY
1730 #define DDS_RtpsWellKnownPorts_t DDS_RtpsWellKnownPorts
1734 #define DDS_RTPS_WELL_KNOWN_PORTS_DEFAULT \
1788 #define DDS_WIRE_PROTOCOL_QOS_POLICY_DEFAULT { \
1790 DDS_RTPS_AUTO_ID , \
1791 DDS_RTPS_AUTO_ID , \
1792 DDS_RTPS_AUTO_ID , \
1793 DDS_RTPS_WELL_KNOWN_PORTS_DEFAULT \
1803 #define DDS_Locator RTPS_Locator
1808 #define DDS_Locator_t RTPS_Locator_t
1813 #define DDS_LocatorUdpv4_t RTPS_LocatorUdpv4_t
1815 #ifdef DOXYGEN_DOCUMENTATION_ONLY
1836 #define T struct RTPS_Locator
1837 #define TSeq DDS_LocatorSeq
1838 #define REDA_SEQUENCE_USER_API
1839 #define TSeq_is_equal
1840 #include <reda/reda_sequence_decl.h>
1842 #ifdef DOXYGEN_DOCUMENTATION_ONLY
1851 #define DDS_LOCATOR_INVALID RTPS_LOCATOR_INVALID
1857 #define DDS_LOCATOR_DEFAULT RTPS_LOCATOR_DEFAULT
1862 #define DDS_LOCATOR_KIND_INVALID RTPS_LOCATOR_KIND_INVALID
1867 #define DDS_LOCATOR_PORT_INVALID RTPS_LOCATOR_PORT_INVALID
1872 #define DDS_LOCATOR_ADDRESS_INVALID RTPS_LOCATOR_ADDRESS_INVALID
1880 #define DDS_LOCATOR_KIND_UDPv4 RTPS_LOCATOR_KIND_UDPv4
1885 #define DDS_LOCATOR_KIND_UDPv6 RTPS_LOCATOR_KIND_UDPv6
1890 #define DDS_LOCATOR_KIND_RESERVED RTPS_LOCATOR_KIND_RESERVED
1895 #define DDS_LOCATOR_KIND_SHMEM RTPS_LOCATOR_KIND_SHMEM
1916 #define DDS_PROTOCOL_VERSION_DEFAULT { 0, 0 }
1920 #define DDS_PROTOCOLVERSION_1_0 { 1, 0 }
1923 #define DDS_PROTOCOLVERSION_1_1 { 1, 1 }
1926 #define DDS_PROTOCOLVERSION_1_2 { 1, 2 }
1929 #define DDS_PROTOCOLVERSION_2_0 { 2, 0 }
1932 #define DDS_PROTOCOLVERSION_2_1 { 2, 1 }
1935 #define DDS_PROTOCOLVERSION { 2, 1 }
1939 #define DDS_VENDOR_ID_LENGTH_MAX 2
1950 #ifdef DOXYGEN_DOCUMENTATION_ONLY
1962 DDSC_VARIABLE_LENGTH_VALUE_TYPE_SUPPORT_BASIC(
DDS_VendorId);
1963 #define DDS_VendorId_t DDS_VendorId
1967 #define DDS_VENDOR_ID_DEFAULT { {0, 0} }
1971 #define DDS_VENDORID_UNKNOWN { {0, 0} }
1997 #ifdef DOXYGEN_DOCUMENTATION_ONLY
2017 #define DDS_ProductVersion_t DDS_ProductVersion
2022 #define DDS_PRODUCTVERSION_UNKNOWN { 0, 0, '0', 0 }
2026 #define DDS_PRODUCTVERSION_DEFAULT { 2, 0, 'c', 1 }
2032 DDSCDllExport
const char*
2060 #define DDS_DATA_READER_PROTOCOL_QOS_POLICY_DEFAULT \
2094 #define DDS_RTPSRELIABLEWRITER_DEFAULT_SEND_WINDOW (DDS_LENGTH_UNLIMITED)
2098 #define DDS_RTPS_RELIABLE_WRITER_PROTOCOL_DEFAULT { \
2101 DDS_RTPSRELIABLEWRITER_DEFAULT_SEND_WINDOW, \
2102 DDS_LENGTH_UNLIMITED, \
2138 #define DDS_DATA_WRITER_PROTOCOL_QOS_POLICY_DEFAULT \
2139 { DDS_RTPS_AUTO_ID, \
2140 DDS_RTPS_RELIABLE_WRITER_PROTOCOL_DEFAULT,\
2157 #ifdef DOXYGEN_DOCUMENTATION_ONLY
2160 struct DDS_StringSeq {};
2170 struct DDS_StringSeq enabled_transports;
2177 #define DDS_TRANSPORT_QOS_POLICY_DEFAULT \
2179 DDS_SEQUENCE_INITIALIZER \
2192 extern DDSCDllVariable const
char *const
2253 DDSC_CPP_QOS_POLICY_METHODS(DDS_DomainParticipantResourceLimitsQosPolicy)
2262 #define DDS_DomainParticipantResourceLimitsQosPolicy_MATCH_INIT (32L)
2282 #define DDS_DOMAIN_PARTICIPANT_RESOURCE_LIMITS_QOS_POLICY_DEFAULT \
2292 DDS_DomainParticipantResourceLimitsQosPolicy_MATCH_INIT, \
2293 DDS_DomainParticipantResourceLimitsQosPolicy_MATCH_INIT, \
2304 #define DDS_BUILTIN_TOPIC_KEY_TYPE_NATIVE_LENGTH (4)
2312 DDS_BUILTIN_TOPIC_KEY_TYPE_NATIVE
value[DDS_BUILTIN_TOPIC_KEY_TYPE_NATIVE_LENGTH];
2317 #define DDS_BuiltinTopicKey_t_INITIALIZER { {0, 0, 0, 0} }
2369 const DDS_InstanceHandle_t *out);
2403 typedef struct DDS_ConditionImpl *DDS_Condition_ptr;
2407 #define T struct DDS_ConditionImpl*
2409 #define TSeq_ensure_length
2410 #define TSeq_has_ownership
2412 #define TSeq DDS_ConditionSeq
2413 #include <reda/reda_sequence_decl.h>
2415 #ifdef DOXYGEN_DOCUMENTATION_ONLY
2429 DDS_ConditionImpl_set_wrapper(
DDS_Condition *
self,
void *wrapper);
2433 DDSCDllExport
void**
2442 #define DDS_GuardCondition_as_condition(guard_condition_ptr_) \
2443 ((DDS_Condition*) guard_condition_ptr_)
2445 #ifdef DOXYGEN_DOCUMENTATION_ONLY
2475 #define DDS_StatusCondition_as_condition(status_cond_ptr_) \
2476 ((DDS_Condition*) status_cond_ptr_)
2478 #ifdef DOXYGEN_DOCUMENTATION_ONLY
2488 DDSCDllExport DDS_StatusMask
2495 DDS_StatusMask mask);
2561 #define DDS_Listener_INITIALIZER { NULL }
2567 #ifdef DOXYGEN_DOCUMENTATION_ONLY
2589 DDSCDllExport DDS_InstanceHandle_t
2604 DDSCDllExport DDS_StatusMask
2625 DDS_Entity_set_wrapper(
DDS_Entity *
self,
void *wrapper);
2663 #define DDS_ENTITYNAME_QOS_NAME_MAX 255
2666 #pragma warning(push)
2667 #pragma warning(disable: 4522)
2682 bool set_name(
const char *
const name);
2692 bool operator==(
const char *
const name)
const;
2694 bool operator!=(
const char *
const name)
const;
2699 #pragma warning(pop)
2704 #define DDS_ENTITY_NAME_QOS_POLICY_DEFAULT { {'\0'} }
2712 const
char *const name);
2720 struct DDSCPPDllExport RTI_ManagementQosPolicy
2724 DDS_Boolean disable_unregister_dispose_for_unpublished_instance;
2726 DDSC_CPP_QOS_POLICY_METHODS(RTI_ManagementQosPolicy)
2731 #define RTI_MANAGEMENT_QOS_POLICY_DEFAULT { \
2733 DDS_BOOLEAN_FALSE, \
2737 DDSC_QOS_POLICY_METHODS_DECL(RTI_ManagementQosPolicy)
2756 DDSHST_RETCODE_ERROR = -1000,
2757 DDSHST_RETCODE_NOSPACE,
2758 DDSHST_RETCODE_EXISTS,
2759 DDSHST_RETCODE_NOT_EXISTS,
2760 DDSHST_RETCODE_INVALID_PROPERTY,
2761 DDSHST_RETCODE_INVALID_ENTRY_REQUEST,
2762 DDSHST_RETCODE_NOT_SUPPORTED,
2763 DDSHST_RETCODE_SUCCESS = 0
2764 } DDSHST_ReturnCode_T;
2770 DDSHST_REPLACE_POLICY_KIND_OLDEST,
2771 DDSHST_REPLACE_POLICY_KIND_NONE
2772 } DDSHST_ReplacePolicyKind_T;
2794 #define DDS_SAMPLE_IDENTITY_UNKNOWN \
2796 DDS_GUID_INITIALIZER, \
2797 DDS_SEQUENCE_NUMBER_UNKNOWN \
2825 #define DDS_WRITEPARAMS_DEFAULT \
2827 DDS_SAMPLE_IDENTITY_UNKNOWN, \
2828 DDS_SAMPLE_IDENTITY_UNKNOWN, \
2830 DDS_HANDLE_NIL_NATIVE \
2843 #define DDS_PropertySeq CDR_PropertySeq
2844 #define DDS_Property CDR_Property
2845 #define DDS_PropertySeq_initialize CDR_PropertySeq_initialize
2846 #define DDS_PropertySeq_set_length CDR_PropertySeq_set_length
2847 #define DDS_PropertySeq_get_length CDR_PropertySeq_get_length
2848 #define DDS_PropertySeq_get_reference CDR_PropertySeq_get_reference
2863 DDSCDllExport
struct DDS_PropertySeq*
2877 struct DDS_Locator *locator);