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 }
1118 DDS_AUTOMATIC_LIVELINESS_QOS,
1122 DDS_MANUAL_BY_PARTICIPANT_LIVELINESS_QOS,
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 { \
1395 #define DDS_DESTINATION_ORDER_QOS_POLICY_DEFAULT \
1397 DDS_BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS, \
1425 extern DDSCDllVariable
const char *
const
1462 #define DDS_DATAREADERRESOURCE_LIMITS_QOS_POLICY_DEFAULT { \
1467 DDS_NO_INSTANCE_REPLACEMENT_QOS, \
1481 extern DDSCDllVariable const
char *const
1497 DDSC_CPP_QOS_POLICY_METHODS(DDS_DataWriterResourceLimitsQosPolicy)
1502 #define DDS_DATAWRITERRESOURCE_LIMITS_QOS_POLICY_DEFAULT { \
1528 DDSC_CPP_QOS_POLICY_METHODS(DDS_EntityFactoryQosPolicy)
1533 #define DDS_ENTITY_FACTORY_QOS_POLICY_DEFAULT { DDS_BOOLEAN_TRUE }
1545 #define DDS_LENGTH_UNLIMITED (-1)
1547 #define DDS_LENGTH_AUTO (-2)
1559 extern DDSCDllVariable
const char *
const DDS_TYPESUPPORT_QOS_POLICY_NAME;
1564 struct DDSCPPDllExport DDS_TypeSupportQosPolicy
1570 DDSC_CPP_QOS_POLICY_METHODS(DDS_TypeSupportQosPolicy)
1575 #define DDS_TYPESUPPORT_QOS_POLICY_DEFAULT \
1578 DDSC_QOS_POLICY_METHODS_DECL(DDS_TypeSupportQosPolicy)
1604 DDSC_CPP_QOS_POLICY_METHODS(DDS_SystemResourceLimitsQosPolicy)
1609 #define DDS_SYSTEM_RESOURCE_LIMITS_QOS_POLICY_DEFAULT { 1L,16L }
1619 #define DDS_RtpsWellKnownPorts NETIO_RtpsPortParam
1635 #ifdef DOXYGEN_DOCUMENTATION_ONLY
1671 #define DDS_RtpsWellKnownPorts_t DDS_RtpsWellKnownPorts
1675 #define DDS_RTPS_WELL_KNOWN_PORTS_DEFAULT \
1729 #define DDS_WIRE_PROTOCOL_QOS_POLICY_DEFAULT { \
1731 DDS_RTPS_AUTO_ID , \
1732 DDS_RTPS_AUTO_ID , \
1733 DDS_RTPS_AUTO_ID , \
1734 DDS_RTPS_WELL_KNOWN_PORTS_DEFAULT \
1744 #define DDS_Locator RTPS_Locator
1749 #define DDS_Locator_t RTPS_Locator_t
1754 #define DDS_LocatorUdpv4_t RTPS_LocatorUdpv4_t
1756 #ifdef DOXYGEN_DOCUMENTATION_ONLY
1777 #define T struct RTPS_Locator
1778 #define TSeq DDS_LocatorSeq
1779 #define REDA_SEQUENCE_USER_API
1780 #define TSeq_is_equal
1781 #include <reda/reda_sequence_decl.h>
1783 #ifdef DOXYGEN_DOCUMENTATION_ONLY
1792 #define DDS_LOCATOR_INVALID RTPS_LOCATOR_INVALID
1798 #define DDS_LOCATOR_DEFAULT RTPS_LOCATOR_DEFAULT
1803 #define DDS_LOCATOR_KIND_INVALID RTPS_LOCATOR_KIND_INVALID
1808 #define DDS_LOCATOR_PORT_INVALID RTPS_LOCATOR_PORT_INVALID
1813 #define DDS_LOCATOR_ADDRESS_INVALID RTPS_LOCATOR_ADDRESS_INVALID
1821 #define DDS_LOCATOR_KIND_UDPv4 RTPS_LOCATOR_KIND_UDPv4
1826 #define DDS_LOCATOR_KIND_UDPv6 RTPS_LOCATOR_KIND_UDPv6
1831 #define DDS_LOCATOR_KIND_RESERVED RTPS_LOCATOR_KIND_RESERVED
1836 #define DDS_LOCATOR_KIND_SHMEM RTPS_LOCATOR_KIND_SHMEM
1857 #define DDS_PROTOCOL_VERSION_DEFAULT { 0, 0 }
1861 #define DDS_PROTOCOLVERSION_1_0 { 1, 0 }
1864 #define DDS_PROTOCOLVERSION_1_1 { 1, 1 }
1867 #define DDS_PROTOCOLVERSION_1_2 { 1, 2 }
1870 #define DDS_PROTOCOLVERSION_2_0 { 2, 0 }
1873 #define DDS_PROTOCOLVERSION_2_1 { 2, 1 }
1876 #define DDS_PROTOCOLVERSION { 2, 1 }
1880 #define DDS_VENDOR_ID_LENGTH_MAX 2
1891 #ifdef DOXYGEN_DOCUMENTATION_ONLY
1903 DDSC_VARIABLE_LENGTH_VALUE_TYPE_SUPPORT_BASIC(
DDS_VendorId);
1904 #define DDS_VendorId_t DDS_VendorId
1908 #define DDS_VENDOR_ID_DEFAULT { {0, 0} }
1912 #define DDS_VENDORID_UNKNOWN { {0, 0} }
1938 #ifdef DOXYGEN_DOCUMENTATION_ONLY
1958 #define DDS_ProductVersion_t DDS_ProductVersion
1963 #define DDS_PRODUCTVERSION_UNKNOWN { 0, 0, '0', 0 }
1967 #define DDS_PRODUCTVERSION_DEFAULT { 2, 0, 'c', 1 }
1973 DDSCDllExport
const char*
2001 #define DDS_DATA_READER_PROTOCOL_QOS_POLICY_DEFAULT \
2035 #define DDS_RTPSRELIABLEWRITER_DEFAULT_SEND_WINDOW (DDS_LENGTH_UNLIMITED)
2039 #define DDS_RTPS_RELIABLE_WRITER_PROTOCOL_DEFAULT { \
2042 DDS_RTPSRELIABLEWRITER_DEFAULT_SEND_WINDOW, \
2043 DDS_LENGTH_UNLIMITED, \
2079 #define DDS_DATA_WRITER_PROTOCOL_QOS_POLICY_DEFAULT \
2080 { DDS_RTPS_AUTO_ID, \
2081 DDS_RTPS_RELIABLE_WRITER_PROTOCOL_DEFAULT,\
2098 #ifdef DOXYGEN_DOCUMENTATION_ONLY
2101 struct DDS_StringSeq {};
2111 struct DDS_StringSeq enabled_transports;
2118 #define DDS_TRANSPORT_QOS_POLICY_DEFAULT \
2120 DDS_SEQUENCE_INITIALIZER \
2133 extern DDSCDllVariable const
char *const
2194 DDSC_CPP_QOS_POLICY_METHODS(DDS_DomainParticipantResourceLimitsQosPolicy)
2203 #define DDS_DomainParticipantResourceLimitsQosPolicy_MATCH_INIT (32L)
2223 #define DDS_DOMAIN_PARTICIPANT_RESOURCE_LIMITS_QOS_POLICY_DEFAULT \
2233 DDS_DomainParticipantResourceLimitsQosPolicy_MATCH_INIT, \
2234 DDS_DomainParticipantResourceLimitsQosPolicy_MATCH_INIT, \
2245 #define DDS_BUILTIN_TOPIC_KEY_TYPE_NATIVE_LENGTH (4)
2253 DDS_BUILTIN_TOPIC_KEY_TYPE_NATIVE
value[DDS_BUILTIN_TOPIC_KEY_TYPE_NATIVE_LENGTH];
2258 #define DDS_BuiltinTopicKey_t_INITIALIZER { {0, 0, 0, 0} }
2310 const DDS_InstanceHandle_t *out);
2344 typedef struct DDS_ConditionImpl *DDS_Condition_ptr;
2348 #define T struct DDS_ConditionImpl*
2350 #define TSeq_ensure_length
2351 #define TSeq_has_ownership
2353 #define TSeq DDS_ConditionSeq
2354 #include <reda/reda_sequence_decl.h>
2356 #ifdef DOXYGEN_DOCUMENTATION_ONLY
2370 DDS_ConditionImpl_set_wrapper(
DDS_Condition *
self,
void *wrapper);
2374 DDSCDllExport
void**
2383 #define DDS_GuardCondition_as_condition(guard_condition_ptr_) \
2384 ((DDS_Condition*) guard_condition_ptr_)
2386 #ifdef DOXYGEN_DOCUMENTATION_ONLY
2416 #define DDS_StatusCondition_as_condition(status_cond_ptr_) \
2417 ((DDS_Condition*) status_cond_ptr_)
2419 #ifdef DOXYGEN_DOCUMENTATION_ONLY
2429 DDSCDllExport DDS_StatusMask
2436 DDS_StatusMask mask);
2502 #define DDS_Listener_INITIALIZER { NULL }
2508 #ifdef DOXYGEN_DOCUMENTATION_ONLY
2530 DDSCDllExport DDS_InstanceHandle_t
2545 DDSCDllExport DDS_StatusMask
2566 DDS_Entity_set_wrapper(
DDS_Entity *
self,
void *wrapper);
2604 #define DDS_ENTITYNAME_QOS_NAME_MAX 255
2607 #pragma warning(push)
2608 #pragma warning(disable: 4522)
2623 bool set_name(
const char *
const name);
2633 bool operator==(
const char *
const name)
const;
2635 bool operator!=(
const char *
const name)
const;
2640 #pragma warning(pop)
2645 #define DDS_ENTITY_NAME_QOS_POLICY_DEFAULT { {'\0'} }
2653 const
char *const name);
2661 struct DDSCPPDllExport RTI_ManagementQosPolicy
2665 DDS_Boolean disable_unregister_dispose_for_unpublished_instance;
2667 DDSC_CPP_QOS_POLICY_METHODS(RTI_ManagementQosPolicy)
2672 #define RTI_MANAGEMENT_QOS_POLICY_DEFAULT { \
2674 DDS_BOOLEAN_FALSE, \
2678 DDSC_QOS_POLICY_METHODS_DECL(RTI_ManagementQosPolicy)
2697 DDSHST_RETCODE_ERROR = -1000,
2698 DDSHST_RETCODE_NOSPACE,
2699 DDSHST_RETCODE_EXISTS,
2700 DDSHST_RETCODE_NOT_EXISTS,
2701 DDSHST_RETCODE_INVALID_PROPERTY,
2702 DDSHST_RETCODE_INVALID_ENTRY_REQUEST,
2703 DDSHST_RETCODE_NOT_SUPPORTED,
2704 DDSHST_RETCODE_SUCCESS = 0
2705 } DDSHST_ReturnCode_T;
2711 DDSHST_REPLACE_POLICY_KIND_OLDEST,
2712 DDSHST_REPLACE_POLICY_KIND_NONE
2713 } DDSHST_ReplacePolicyKind_T;
2735 #define DDS_SAMPLE_IDENTITY_UNKNOWN \
2737 DDS_GUID_INITIALIZER, \
2738 DDS_SEQUENCE_NUMBER_UNKNOWN \
2766 #define DDS_WRITEPARAMS_DEFAULT \
2768 DDS_SAMPLE_IDENTITY_UNKNOWN, \
2769 DDS_SAMPLE_IDENTITY_UNKNOWN, \
2771 DDS_HANDLE_NIL_NATIVE \
2784 #define DDS_PropertySeq CDR_PropertySeq
2785 #define DDS_Property CDR_Property
2786 #define DDS_PropertySeq_initialize CDR_PropertySeq_initialize
2787 #define DDS_PropertySeq_set_length CDR_PropertySeq_set_length
2788 #define DDS_PropertySeq_get_length CDR_PropertySeq_get_length
2789 #define DDS_PropertySeq_get_reference CDR_PropertySeq_get_reference
2804 DDSCDllExport
struct DDS_PropertySeq*
2818 struct DDS_Locator *locator);