5734 lines
183 KiB
C
5734 lines
183 KiB
C
/* (c) Copyright 2003-2021, Real-Time Innovations, Inc. All rights reserved. */
|
|
/*
|
|
* @(#)pres_common.h generated by: makeheader Tue Apr 7 22:56:13 2026
|
|
*
|
|
* built from: common.ifc
|
|
*/
|
|
|
|
#ifndef pres_common_h
|
|
#define pres_common_h
|
|
|
|
|
|
#ifndef osapi_ntptime_h
|
|
#include "osapi/osapi_ntptime.h"
|
|
#endif
|
|
#ifndef osapi_type_h
|
|
#include "osapi/osapi_type.h"
|
|
#endif
|
|
#ifndef osapi_utility_h
|
|
#include "osapi/osapi_utility.h"
|
|
#endif
|
|
#ifndef osapi_hash_h
|
|
#include "osapi/osapi_hash.h"
|
|
#endif
|
|
#ifndef osapi_alignment_h
|
|
#include "osapi/osapi_alignment.h"
|
|
#endif
|
|
#ifndef osapi_thread_h
|
|
#include "osapi/osapi_thread.h"
|
|
#endif
|
|
#ifndef reda_boundedSeq_h
|
|
#include "reda/reda_boundedSeq.h"
|
|
#endif
|
|
#ifndef reda_fastBuffer_h
|
|
#include "reda/reda_fastBuffer.h"
|
|
#endif
|
|
#ifndef reda_weakReference_h
|
|
#include "reda/reda_weakReference.h"
|
|
#endif
|
|
#ifndef property_propertyNames_h
|
|
#include "property/property_propertyNames.h"
|
|
#endif
|
|
#ifndef event_jobDispatcher_h
|
|
#include "event/event_jobDispatcher.h"
|
|
#endif
|
|
#ifndef event_activeGenerator_h
|
|
#include "event/event_activeGenerator.h"
|
|
#endif
|
|
#ifndef netio_common_h
|
|
#include "netio/netio_common.h" /*for RTI_NETIO_ALIAS_LIST_SEPARATOR*/
|
|
#endif
|
|
#ifndef mig_rtps_h
|
|
#include "mig/mig_rtps.h"
|
|
#endif
|
|
#ifndef cdr_type_h
|
|
#include "cdr/cdr_type.h"
|
|
#endif
|
|
#ifndef cdr_encapsulation_h
|
|
#include "cdr/cdr_encapsulation.h"
|
|
#endif
|
|
#ifndef mig_generator_h
|
|
#include "mig/mig_generator.h"
|
|
#endif
|
|
#ifndef pres_dll_h
|
|
#include "pres/pres_dll.h"
|
|
#endif
|
|
#ifndef pres_log_h
|
|
#include "pres/pres_log.h"
|
|
#endif
|
|
#ifndef pres_condition_h
|
|
#include "pres/pres_condition.h"
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct PRESSampleInfo;
|
|
|
|
struct PRESFilterSampleInfo;
|
|
|
|
struct PRESExpressionProperty;
|
|
|
|
struct PRESDDSSequence;
|
|
|
|
|
|
#define PRES_PARTICIPANT_DOMAIN_TAG_PROPERTY_NAME PROPERTY_NAME_DDS_DOMAIN_PARTICIPANT_DOMAIN_TAG
|
|
|
|
|
|
#define PRES_PARTICIPANT_DISCOVERY_INITIAL_PARTICIPANT_ANNOUNCEMENTS_ON_ENABLE_PROPERTY PROPERTY_NAME_DDS_PARTICIPANT_DISCOVERY_CONFIG_INITIAL_PARTICIPANT_ANNOUNCEMENTS_ON_ENABLE
|
|
#define PRES_PARTICIPANT_DISCOVERY_USE_STATELESS_PARTICIPANT_DISCOVERY_READER_PROPERTY_NAME PROPERTY_NAME_DDS_PARTICIPANT_DISCOVERY_CONFIG_USE_STATELESS_PARTICIPANT_DISCOVERY_READER
|
|
#define PRES_PARTICIPANT_DISCOVERY_DISABLE_SIGNATURE_VALIDATION_PROPERTY_NAME PROPERTY_NAME_DDS_PARTICIPANT_DISCOVERY_CONFIG_DISABLE_SIGNATURE_VALIDATION
|
|
#define PRES_PARTICIPANT_DISCOVERY_DISABLE_SECURE_PARTICIPANT_DISCOVERY_PROPERTY_NAME PROPERTY_NAME_DDS_PARTICIPANT_DISCOVERY_CONFIG_DISABLE_SECURE_PARTICIPANT_DISCOVERY
|
|
#define PRES_PARTICIPANT_DISCOVERY_DISABLE_RECEIVED_DISCOVERY_PROTECTION_NAME PROPERTY_NAME_DDS_PARTICIPANT_DISCOVERY_CONFIG_DISABLE_RECEIVED_DISCOVERY_PROTECTION
|
|
#define PRES_PARTICIPANT_DISCOVERY_DISABLE_RTI_ENDPOINT_SECURITY_ATTRIBUTES_PROPAGATION_NAME PROPERTY_NAME_DDS_PARTICIPANT_DISCOVERY_CONFIG_DISABLE_RTI_ENDPOINT_SECURITY_ATTRIBUTES_PROPAGATION
|
|
#define PRES_PARTICIPANT_DISCOVERY_DISABLE_PARTICIPANT_SECURITY_INFO_VALIDATION_NAME PROPERTY_NAME_DDS_PARTICIPANT_DISCOVERY_CONFIG_DISABLE_PARTICIPANT_SECURITY_INFO_VALIDATION
|
|
#define PRES_PARTICIPANT_DISCOVERY_ENABLE_FRAGMENTATION_PROPERTY PROPERTY_NAME_DDS_PARTICIPANT_DISCOVERY_CONFIG_ENABLE_FRAGMENTATION
|
|
|
|
|
|
|
|
#define PRES_PARTICIPANT_DISCOVERY_ENDPOINT_TYPE_OBJECT_LB_SERIALIZATION_THRESHOLD_PROPERTY_NAME \
|
|
PROPERTY_NAME_DDS_PARTICIPANT_DISCOVERY_CONFIG_ENDPOINT_TYPE_OBJECT_LB_SERIALIZATION_THRESHOLD
|
|
#define PRES_PARTICIPANT_DISCOVERY_ENDPOINT_TYPE_OBJECT_LB_SERIALIZATION_ALGORITHM_PROPERTY_NAME \
|
|
PROPERTY_NAME_DDS_PARTICIPANT_DISCOVERY_CONFIG_ENDPOINT_TYPE_OBJECT_LB_SERIALIZATION_ALGORITHM
|
|
|
|
|
|
#define PRES_PARTICIPANT_DISCOVERY_SEND_PARTICIPANT_ANNOUNCEMENT_ON_DISCOVERY_PROPERTY PROPERTY_NAME_DDS_PARTICIPANT_INTER_PARTICIPANT_DATA_WRITER_PROTOCOL_SEND_PARTICIPANT_ANNOUNCEMENT_ON_DISCOVERY
|
|
#define PRES_PARTICIPANT_DISCOVERY_BROADCAST_PARTICIPANT_ANNOUNCEMENT_ON_DISCOVERY_PROPERTY PROPERTY_NAME_DDS_PARTICIPANT_INTER_PARTICIPANT_DATA_WRITER_PROTOCOL_BROADCAST_PARTICIPANT_ANNOUNCEMENT_ON_DISCOVERY
|
|
#define PRES_INTER_PARTICIPANT_DISABLE_PREEMPTIVE_NACK_PROPERTY PROPERTY_NAME_DDS_PARTICIPANT_INTER_PARTICIPANT_DATA_READER_PROTOCOL_DISABLE_PREEMPTIVE_NACK
|
|
#define PRES_INTER_PARTICIPANT_DISABLE_PREEMPTIVE_HEARTBEAT_PROPERTY PROPERTY_NAME_DDS_PARTICIPANT_INTER_PARTICIPANT_DATA_WRITER_PROTOCOL_DISABLE_PREEMPTIVE_HEARTBEAT
|
|
#define PRES_PARTICIPANT_DISABLE_PREEMPTIVE_HEARTBEAT_PROPERTY PROPERTY_NAME_DDS_PARTICIPANT_BUILTIN_DATA_WRITER_PROTOCOL_DISABLE_PREEMPTIVE_HEARTBEAT
|
|
#define PRES_PARTICIPANT_BUILTIN_DATA_WRITER_PROTOCOL_DISABLE_REPAIR_PIGGYBACK_HEARTBEAT \
|
|
PROPERTY_NAME_DDS_PARTICIPANT_BUILTIN_DATA_WRITER_PROTOCOL_DISABLE_REPAIR_PIGGYBACK_HEARTBEAT
|
|
|
|
#define PRES_DISCOVERY_ENABLE_RTPS_DISCOVERY_OPTIMIZATION_DEFAULT (RTI_FALSE)
|
|
|
|
|
|
|
|
#define PRES_DEFAULT_ROUND_TRIP_TIME 200
|
|
|
|
|
|
#define PRES_OWNERSHIP_STRENGTH_QOS_POLICY_VALUE_MIN (-2147483647-1)
|
|
|
|
|
|
#define PRES_TIME_BASED_FILTER_QOS_POLICY_MINIMUM_SEPARATION_MAX {100000000,0}
|
|
|
|
|
|
#define PRES_DEADLINE_QOS_POLICY_DEADLINE_PERIOD_MAX {100000000,0}
|
|
|
|
|
|
#define PRES_LIFESPAN_QOS_POLICY_LIFESPAN_DURATION_MAX {100000000,0}
|
|
|
|
typedef enum {
|
|
/*e
|
|
* Volatile.
|
|
*/
|
|
PRES_VOLATILE_DURABILITY_QOS,
|
|
|
|
/*e
|
|
* Transient Local.
|
|
*/
|
|
PRES_TRANSIENT_LOCAL_DURABILITY_QOS,
|
|
|
|
/*e
|
|
* Transient.
|
|
*/
|
|
PRES_TRANSIENT_DURABILITY_QOS,
|
|
|
|
/*e
|
|
* Persistent.
|
|
*/
|
|
PRES_PERSISTENT_DURABILITY_QOS
|
|
} PRESDurabilityQosPolicyKind;
|
|
|
|
|
|
#define PRESDurabilityQosPolicyKind_toString(kind__) \
|
|
((kind__) == PRES_VOLATILE_DURABILITY_QOS) \
|
|
? "volatile" \
|
|
: ((kind__) == PRES_TRANSIENT_LOCAL_DURABILITY_QOS) \
|
|
? "transient local" \
|
|
: ((kind__) == PRES_TRANSIENT_DURABILITY_QOS) \
|
|
? "transient" \
|
|
: ((kind__) == PRES_PERSISTENT_DURABILITY_QOS) \
|
|
? "persistent" \
|
|
: "invalid"
|
|
|
|
|
|
#define PRES_AUTO_WRITER_DEPTH 0
|
|
|
|
|
|
/**
|
|
* @brief The Service QoS policy kind.
|
|
*/
|
|
#define PRESServiceQosPolicyKind MIGServiceQosPolicyKind
|
|
|
|
#define PRES_NO_SERVICE_QOS MIG_NO_SERVICE_QOS
|
|
#define PRES_PERSISTENCE_SERVICE_QOS MIG_PERSISTENCE_SERVICE_QOS
|
|
#define PRES_QUEUING_SERVICE_QOS MIG_QUEUING_SERVICE_QOS
|
|
#define PRES_ROUTING_SERVICE_QOS MIG_ROUTING_SERVICE_QOS
|
|
#define PRES_RECORDING_SERVICE_QOS MIG_RECORDING_SERVICE_QOS
|
|
#define PRES_REPLAY_SERVICE_QOS MIG_REPLAY_SERVICE_QOS
|
|
#define PRES_DATABASE_INTEGRATION_SERVICE_QOS MIG_DATABASE_INTEGRATION_SERVICE_QOS
|
|
#define PRES_WEB_INTEGRATION_SERVICE_QOS MIG_WEB_INTEGRATION_SERVICE_QOS
|
|
#define PRES_OBSERVABILITY_COLLECTOR_SERVICE_QOS MIG_OBSERVABILITY_COLLECTOR_SERVICE_QOS
|
|
#define PRES_ADMIN_CONSOLE_SERVICE_QOS MIG_ADMIN_CONSOLE_SERVICE_QOS
|
|
|
|
typedef enum {
|
|
PRES_INSTANCE_PRESENTATION_QOS,
|
|
PRES_TOPIC_PRESENTATION_QOS,
|
|
PRES_GROUP_PRESENTATION_QOS,
|
|
PRES_HIGHEST_OFFERED_PRESENTATION_QOS
|
|
} PRESPresentationQosPolicyAccessScopeKind;
|
|
|
|
|
|
#define PRESPresentationQosPolicyAccessScopeKind_toString(kind__) \
|
|
((kind__) == PRES_INSTANCE_PRESENTATION_QOS) \
|
|
? "instance" \
|
|
: ((kind__) == PRES_TOPIC_PRESENTATION_QOS) \
|
|
? "topic" \
|
|
: ((kind__) == PRES_GROUP_PRESENTATION_QOS) \
|
|
? "group" \
|
|
: ((kind__) == PRES_HIGHEST_OFFERED_PRESENTATION_QOS) \
|
|
? "highest offered" \
|
|
: "invalid"
|
|
|
|
/*e \ingroup PRESQosModule
|
|
* @brief Convert coherent access kind to human readable string.
|
|
* @param kind__ Coherent access kind to convert.
|
|
*/
|
|
#define PRESPresentationQosPolicyCoherentAccess_toString(kind__) \
|
|
((kind__) == RTI_TRUE) \
|
|
? "coherent access" \
|
|
: "non-coherent access"
|
|
|
|
/*e \ingroup PRESQosModule
|
|
* @brief Convert ordered access kind to human readable string.
|
|
* @param kind__ Ordered access kind to convert.
|
|
*/
|
|
/*e \ingroup PRESQosModule */
|
|
#define PRESPresentationQosPolicyOrderedAccess_toString(kind__) \
|
|
((kind__) == RTI_TRUE) \
|
|
? "ordered access" \
|
|
: "unordered access"
|
|
|
|
typedef RTI_INT32 PRESDataRepresentationCdrSupportMask;
|
|
|
|
typedef enum {
|
|
PRES_DATA_REPRESENTATION_CDR_SUPPORT_FLAG_CDR_V1 = 0x0001 << 0,
|
|
PRES_DATA_REPRESENTATION_CDR_SUPPORT_FLAG_CDR_V2 = 0x0001 << 1
|
|
} PRESDataRepresentationCdrSupportFlagBits;
|
|
|
|
|
|
#define PRES_DATA_REPRESENTATION_CDR_SUPPORT_MASK_INVALID (0)
|
|
|
|
|
|
/*e
|
|
This value is set to 4 because the XTypes 1.2 specification allows
|
|
3 representations (namely XCDR, XCDR2 and XML) and the specification also
|
|
allows the user to add their own custom representation.
|
|
*/
|
|
#define PRES_MAX_DATA_REPRESENTATION_VALUES 4
|
|
|
|
|
|
typedef RTI_INT16 PRESDataRepresentation;
|
|
typedef RTI_UINT32 PRESCompressionIdMask;
|
|
|
|
REDA_BOUNDED_SEQUENCE(
|
|
PRESDataRepresentationBoundedSeq,
|
|
PRESDataRepresentation,
|
|
PRES_MAX_DATA_REPRESENTATION_VALUES)
|
|
|
|
typedef enum {
|
|
PRES_COMPRESSION_ID_ZLIB = (0x0001 << 0),
|
|
PRES_COMPRESSION_ID_BZIP2 = (0x0001 << 1),
|
|
PRES_COMPRESSION_ID_LZ4 = (0x0001 << 2)
|
|
} PRESCompressionIdMaskBits;
|
|
|
|
#define PRES_COMPRESSION_ID_NONE 0
|
|
#define PRES_COMPRESSION_ID_ALL \
|
|
PRES_COMPRESSION_ID_ZLIB | PRES_COMPRESSION_ID_BZIP2 \
|
|
| PRES_COMPRESSION_ID_LZ4
|
|
|
|
struct PRESCompressionSettings {
|
|
/*e
|
|
* Compression algorithms enabled.
|
|
*/
|
|
PRESCompressionIdMask compressionIds;
|
|
/*e
|
|
* Compression level to apply to the payload.
|
|
*/
|
|
RTI_UINT32 writerCompressionLevel;
|
|
/*e
|
|
* Threshold from which a payload with bigger size will be compressed.
|
|
*/
|
|
RTI_INT32 writerCompressionThreshold;
|
|
};
|
|
|
|
|
|
/*e
|
|
Predefined data representations. Used by disc for initialization.
|
|
*/
|
|
#define PRES_XCDR_DATA_REPRESENTATION 0
|
|
#define PRES_XML_DATA_REPRESENTATION 1
|
|
#define PRES_XCDR2_DATA_REPRESENTATION 2
|
|
|
|
struct PRESDataRepresentationQosPolicy {
|
|
/*e
|
|
* Bounded seq of PRESDataRepresentation for storing data representations
|
|
*/
|
|
PRESDataRepresentationBoundedSeq value;
|
|
/*e
|
|
* Compression settings
|
|
*/
|
|
struct PRESCompressionSettings compressionSettings;
|
|
};
|
|
|
|
|
|
|
|
#define PRES_COMPRESSION_THRESHOLD_INFINITE -1
|
|
|
|
#define PRES_DATA_REPRESENTATION_VALUE_DEFAULT \
|
|
{ \
|
|
PRES_MAX_DATA_REPRESENTATION_VALUES, \
|
|
0, \
|
|
{0} /* _buffer */ \
|
|
}
|
|
|
|
#define PRES_COMPRESSION_IDS_DEFAULT \
|
|
(PRESCompressionIdMask)(PRES_COMPRESSION_ID_NONE)
|
|
|
|
#define PRES_COMPRESSION_SETTINGS_DEFAULT \
|
|
{ \
|
|
PRES_COMPRESSION_IDS_DEFAULT, /* bitmask */ \
|
|
RTI_OSAPI_COMPRESSION_LEVEL_BEST_COMPRESSION /* compression level */, \
|
|
8192 /* compression threshold */ \
|
|
}
|
|
|
|
#define PRES_DATA_REPRESENTATION_QOS_POLICY_DEFAULT \
|
|
{ \
|
|
PRES_DATA_REPRESENTATION_VALUE_DEFAULT, \
|
|
PRES_COMPRESSION_SETTINGS_DEFAULT \
|
|
}
|
|
|
|
|
|
|
|
extern PRESDllExport
|
|
int PRESDataRepresentationQosPolicy_compare(
|
|
const struct PRESDataRepresentationQosPolicy *left,
|
|
const struct PRESDataRepresentationQosPolicy *right);
|
|
|
|
|
|
extern PRESDllExport
|
|
RTIOsapiCompressionPluginClassId PRESCompressionId_toOsapiCompressionPluginId(
|
|
PRESCompressionIdMaskBits compressionId);
|
|
|
|
typedef enum {
|
|
/*e
|
|
* Shared ownership.
|
|
*/
|
|
PRES_SHARED_OWNERSHIP_QOS,
|
|
|
|
/*e
|
|
* Exclusive ownership.
|
|
*/
|
|
PRES_EXCLUSIVE_OWNERSHIP_QOS
|
|
} PRESOwnershipQosPolicyKind;
|
|
|
|
|
|
#define PRESOwnershipQosPolicyKind_toString(ownership__) \
|
|
(ownership__ == PRES_SHARED_OWNERSHIP_QOS) \
|
|
? "shared" \
|
|
: (ownership__ == PRES_EXCLUSIVE_OWNERSHIP_QOS) \
|
|
? "exclusive" \
|
|
: "invalid"
|
|
|
|
typedef enum {
|
|
/*e
|
|
* Automatic.
|
|
*/
|
|
PRES_AUTOMATIC_LIVELINESS_QOS,
|
|
|
|
/*e
|
|
* Manual by participant.
|
|
*/
|
|
PRES_MANUAL_BY_PARTICIPANT_LIVELINESS_QOS,
|
|
|
|
/*e
|
|
* Manual by topic.
|
|
*/
|
|
PRES_MANUAL_BY_TOPIC_LIVELINESS_QOS
|
|
} PRESLivelinessQosPolicyKind;
|
|
|
|
|
|
#define PRESLivelinessQosPolicyKind_toString(kind__) \
|
|
((kind__) == PRES_AUTOMATIC_LIVELINESS_QOS) \
|
|
? "automatic" \
|
|
: ((kind__) == PRES_MANUAL_BY_PARTICIPANT_LIVELINESS_QOS) \
|
|
? "manual by participant" \
|
|
: ((kind__) == PRES_MANUAL_BY_TOPIC_LIVELINESS_QOS) \
|
|
? "manual by topic" \
|
|
: "invalid"
|
|
|
|
typedef enum {
|
|
/*e
|
|
* Best-effort (not reliable).
|
|
*/
|
|
PRES_BEST_EFFORT_RELIABILITY_QOS = 0x01,
|
|
|
|
/*e
|
|
* Strict reliable.
|
|
Guaranteed delivery enforced by publication.
|
|
<UL>
|
|
<LI>advantage
|
|
<OL>
|
|
<LI>messages are fully acknowledged
|
|
<LI>the pub makes sure all messages are received and
|
|
blocks the user from pumping more data in the
|
|
system if this would lead to messaged being lost
|
|
<LI>the pub KNOWS whether all subs have received an issue
|
|
or not; the user is alerted in case a sub becomes unresponsive
|
|
</OL>
|
|
<LI>disadvantage
|
|
<OL>
|
|
<LI>the throughput is essentially limited by the SLOWEST sub
|
|
<LI>the pub must keep state on each sub (space & management overhead)
|
|
</OL>
|
|
</UL>
|
|
*/
|
|
PRES_RELIABLE_RELIABILITY_QOS = 0x02
|
|
} PRESReliabilityQosPolicyKind;
|
|
|
|
|
|
#define PRESReliabilityQosPolicyKind_toString(kind__) \
|
|
((kind__) == PRES_RELIABLE_RELIABILITY_QOS) \
|
|
? "reliable" \
|
|
: ((kind__) == PRES_BEST_EFFORT_RELIABILITY_QOS) \
|
|
? "best effort" \
|
|
: "invalid"
|
|
|
|
typedef enum {
|
|
/*e
|
|
* Use only protocol acknowledgment (disables
|
|
* application acknowledgment)
|
|
*/
|
|
PRES_PROTOCOL_ACKNOWLEDGMENT_MODE, /* default */
|
|
/*e
|
|
* Automatically send application acknowledgments
|
|
*/
|
|
PRES_APPLICATION_AUTO_ACKNOWLEDGMENT_MODE,
|
|
/*e
|
|
* Application acknowledgment will ACK up to
|
|
* and including the specified VSN
|
|
*/
|
|
PRES_APPLICATION_ORDERED_ACKNOWLEDGMENT_MODE,
|
|
/*e
|
|
* Application acknowledgment will only ACK the
|
|
* specified VSN
|
|
*/
|
|
PRES_APPLICATION_EXPLICIT_ACKNOWLEDGMENT_MODE
|
|
} PRESReliabilityQosPolicyAcknowledgmentModeKind;
|
|
|
|
|
|
#define PRESReliabilityQosPolicyAcknowledgmentModeKind_isAppAck(ackKind__) \
|
|
(((ackKind__) != PRES_PROTOCOL_ACKNOWLEDGMENT_MODE) ? RTI_TRUE : RTI_FALSE)
|
|
|
|
|
|
#define PRESReliabilityQosPolicyAcknowledgmentModeKind_toString(ackKind__) \
|
|
((ackKind__) == PRES_PROTOCOL_ACKNOWLEDGMENT_MODE) \
|
|
? "protocol acknowledgment" \
|
|
: ((ackKind__) == PRES_APPLICATION_AUTO_ACKNOWLEDGMENT_MODE) \
|
|
? "application auto acknowledgment" \
|
|
: ((ackKind__) == PRES_APPLICATION_ORDERED_ACKNOWLEDGMENT_MODE) \
|
|
? "application ordered acknowledgment" \
|
|
: ((ackKind__) == PRES_APPLICATION_EXPLICIT_ACKNOWLEDGMENT_MODE) \
|
|
? "application explicit acknowledgment" \
|
|
: "invalid"
|
|
|
|
typedef enum {
|
|
/*e
|
|
* Zero pad the cdr stream
|
|
*/
|
|
PRES_ZERO_CDR_PADDING,
|
|
|
|
/*e
|
|
* No zero padding in the cdr stream
|
|
*/
|
|
PRES_NOT_SET_CDR_PADDING,
|
|
|
|
/*e
|
|
* Auto zero padding
|
|
*/
|
|
PRES_AUTO_CDR_PADDING
|
|
} PRESCdrPaddingKind;
|
|
|
|
typedef enum {
|
|
/*e
|
|
* Order by reception timestamp.
|
|
*/
|
|
PRES_BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS,
|
|
|
|
/*e
|
|
* Order by source timestamp.
|
|
*/
|
|
PRES_BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS
|
|
} PRESDestinationOrderQosPolicyKind;
|
|
|
|
|
|
#define PRESDestinationOrderQosPolicyKind_toString(kind__) \
|
|
((kind__) == PRES_BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS) \
|
|
? "by reception timestamp" \
|
|
: ((kind__) == PRES_BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS) \
|
|
? "by source timestamp" \
|
|
: "invalid"
|
|
|
|
typedef enum {
|
|
PRES_INSTANCE_SCOPE_DESTINATIONORDER_QOS,
|
|
PRES_TOPIC_SCOPE_DESTINATIONORDER_QOS
|
|
} PRESDestinationOrderQosPolicyScopeKind;
|
|
|
|
typedef enum {
|
|
/*e
|
|
* Keep just the last value.
|
|
*/
|
|
PRES_KEEP_LAST_HISTORY_QOS,
|
|
|
|
/*e
|
|
* Keep all values.
|
|
*/
|
|
PRES_KEEP_ALL_HISTORY_QOS
|
|
} PRESHistoryQosPolicyKind;
|
|
|
|
|
|
#define PRESHistoryQosPolicyKind_toString(kind__) \
|
|
((kind__) == PRES_KEEP_LAST_HISTORY_QOS) ? "KEEP_LAST" : "KEEP_ALL"
|
|
|
|
|
|
struct PRESSequenceOctet {
|
|
/*e
|
|
maximum capacity of sequence
|
|
*/
|
|
RTI_UINT32 _maximum;
|
|
/*e
|
|
actual length of data in sequence
|
|
*/
|
|
RTI_UINT32 _length;
|
|
/*e
|
|
pointer to first element in sequence
|
|
*/
|
|
RTICdrOctet *_buffer;
|
|
};
|
|
|
|
|
|
#define PRES_SEQUENCE_OCTET_DEFAULT { \
|
|
0, /* maximum */ \
|
|
0, /* length */ \
|
|
NULL /* buffer */ \
|
|
}
|
|
|
|
extern PRESDllExport
|
|
unsigned int PRESSequenceOctet_getMaxSizeSerialized(
|
|
unsigned int size, int maxLength);
|
|
|
|
extern PRESDllExport
|
|
int PRESSequenceOctet_compare(
|
|
const struct PRESSequenceOctet *left,
|
|
const struct PRESSequenceOctet *right);
|
|
|
|
extern PRESDllExport
|
|
const char * PRESDataRepresentationId_toString(PRESDataRepresentation rep);
|
|
|
|
struct PRESUserDataQosPolicy {
|
|
/*e
|
|
Sequence of octet representating user data
|
|
*/
|
|
struct PRESSequenceOctet data;
|
|
};
|
|
|
|
|
|
#define PRES_USER_DATA_QOS_POLICY_DEFAULT {PRES_SEQUENCE_OCTET_DEFAULT}
|
|
|
|
struct PRESEntityNameQosPolicy {
|
|
/*e
|
|
pointer to the name
|
|
*/
|
|
RTICdrChar *name;
|
|
/*e
|
|
pointer to the role name
|
|
*/
|
|
RTICdrChar *roleName;
|
|
};
|
|
|
|
|
|
#define PRES_ENTITY_NAME_QOS_POLICY_DEFAULT { \
|
|
NULL, /* name */ \
|
|
NULL, /* roleName */ \
|
|
}
|
|
|
|
extern int PRESEntityNameQosPolicy_compare(const void* l, const void* r);
|
|
|
|
extern RTIBool PRESEntityNameQosPolicy_copyI(
|
|
struct PRESEntityNameQosPolicy* self,
|
|
const struct PRESEntityNameQosPolicy* src,
|
|
RTIBool freeStringsIfNull);
|
|
|
|
extern RTIBool PRESEntityNameQosPolicy_copy(
|
|
struct PRESEntityNameQosPolicy* self,
|
|
const struct PRESEntityNameQosPolicy* src);
|
|
|
|
struct PRESGroupDataQosPolicy {
|
|
/*e
|
|
Sequence of octet representing group data
|
|
*/
|
|
struct PRESSequenceOctet data;
|
|
};
|
|
|
|
typedef enum {
|
|
/*e
|
|
* Semaphore blocking
|
|
*/
|
|
PRES_SEMAPHORE_BLOCKING_KIND,
|
|
|
|
/*e
|
|
* Spin lock blocking
|
|
*/
|
|
PRES_SPIN_BLOCKING_KIND
|
|
} PRESThreadBlockingKind;
|
|
|
|
typedef enum {
|
|
/*i
|
|
* Do not use instance state consistency
|
|
*/
|
|
PRES_NO_RECOVER_INSTANCE_STATE_CONSISTENCY,
|
|
|
|
/*i
|
|
* Use instance state consistency
|
|
*/
|
|
PRES_RECOVER_INSTANCE_STATE_CONSISTENCY
|
|
} PRESInstanceStateConsistencyKind;
|
|
|
|
|
|
#define PRESInstanceStateConsistencyKind_toString(kind__) \
|
|
((kind__) == PRES_NO_RECOVER_INSTANCE_STATE_CONSISTENCY) \
|
|
? "PRES_NO_RECOVER_INSTANCE_STATE_CONSISTENCY" \
|
|
: ((kind__) == PRES_RECOVER_INSTANCE_STATE_CONSISTENCY) \
|
|
? "PRES_RECOVER_INSTANCE_STATE_CONSISTENCY" \
|
|
: "invalid"
|
|
|
|
struct PRESAsynchronousPublisherQosPolicy {
|
|
/*e
|
|
* Disables async. pub
|
|
*/
|
|
RTIBool disableAsyncWrite;
|
|
/*e
|
|
* Async. pub thread priority
|
|
*/
|
|
int asyncWritePriority;
|
|
/*e
|
|
* Async. pub thread stack size
|
|
*/
|
|
int asyncWriteStackSize;
|
|
/*e
|
|
* Async. pub thread options
|
|
*/
|
|
int asyncWriteOptions;
|
|
/*e
|
|
* Async. pub thread allowed CPUs
|
|
*/
|
|
struct RTIOsapiCpuBitmap asyncWriteBitmap;
|
|
|
|
/*e
|
|
* Disables async. batching
|
|
*/
|
|
RTIBool disableAsyncBatch;
|
|
/*e
|
|
* Async. batching thread priority
|
|
*/
|
|
int asynchBatchThreadPriority;
|
|
/*e
|
|
* Async. batching thread stack size
|
|
*/
|
|
int asynchBatchThreadStackSize;
|
|
/*e
|
|
* Async. batching thread options
|
|
*/
|
|
int asynchBatchThreadOptions;
|
|
/*e
|
|
* Async. batching thread allowed CPUs
|
|
*/
|
|
struct RTIOsapiCpuBitmap asynchBatchThreadBitmap;
|
|
/*e
|
|
* Async. batching thread blocking kind
|
|
*/
|
|
PRESThreadBlockingKind asynchBatchBlockingKind;
|
|
|
|
RTIBool disableTopicQueryPublication;
|
|
|
|
/*e
|
|
* Topic query thread priority
|
|
*/
|
|
int topicQueryPublicationThreadPriority;
|
|
/*e
|
|
* Topic query thread stack size
|
|
*/
|
|
int topicQueryPublicationThreadStackSize;
|
|
/*e
|
|
* Topic query thread options
|
|
*/
|
|
int topicQueryPublicationThreadOptions;
|
|
/*e
|
|
* Topic query thread allowed CPUs
|
|
*/
|
|
struct RTIOsapiCpuBitmap topicQueryPublicationThreadBitmap;
|
|
|
|
};
|
|
|
|
|
|
#define PRES_ASYNCHRONOUS_PUBLISHER_QOS_POLICY_DEFAULT { \
|
|
RTI_FALSE, /*disabled*/ \
|
|
RTI_OSAPI_THREAD_PRIORITY_DEFAULT, /*priority*/ \
|
|
RTI_OSAPI_THREAD_STACK_SIZE_DEFAULT, /*stackSize*/ \
|
|
RTI_OSAPI_THREAD_OPTION_DEFAULT, /*options*/ \
|
|
RTI_OSAPI_CPU_BITMAP_DEFAULT, /*bitmap*/ \
|
|
RTI_TRUE, /* disbaled async. batching */ \
|
|
RTI_OSAPI_THREAD_PRIORITY_DEFAULT, /*priority*/ \
|
|
RTI_OSAPI_THREAD_STACK_SIZE_DEFAULT, /*stackSize*/ \
|
|
RTI_OSAPI_THREAD_OPTION_DEFAULT, /*options*/ \
|
|
RTI_OSAPI_CPU_BITMAP_DEFAULT, /*bitmap*/ \
|
|
PRES_SEMAPHORE_BLOCKING_KIND, \
|
|
RTI_FALSE, /* disableTopicQueryPublication */ \
|
|
RTI_OSAPI_THREAD_PRIORITY_DEFAULT, /*TQ priority*/ \
|
|
RTI_OSAPI_THREAD_STACK_SIZE_DEFAULT, /*TQ stackSize*/ \
|
|
RTI_OSAPI_THREAD_OPTION_DEFAULT, /*TQ options*/ \
|
|
RTI_OSAPI_CPU_BITMAP_DEFAULT /*TQ bitmap*/ \
|
|
}
|
|
|
|
struct PRESTopicDataQosPolicy {
|
|
/*e
|
|
Sequence of octet representating topic data
|
|
*/
|
|
struct PRESSequenceOctet data;
|
|
};
|
|
|
|
typedef enum {
|
|
/*e
|
|
* DELETE: Deletes the rollback journal at the conclusion of each
|
|
* transaction.
|
|
*/
|
|
PRES_DELETE_PERSISTENT_JOURNAL,
|
|
/*e
|
|
* TRUNCATE: Commits transactions by truncating the rollback journal to
|
|
* zero-length instead of deleting it.
|
|
*/
|
|
PRES_TRUNCATE_PERSISTENT_JOURNAL,
|
|
/*e
|
|
* PERSIST: Prevents the rollback journal from being deleted at the end of
|
|
* each transaction. Instead, the header of the journal is overwritten
|
|
* with zeros.
|
|
*/
|
|
PRES_PERSIST_PERSISTENT_JOURNAL,
|
|
/*e
|
|
* MEMORY: Stores the rollback journal in volatile RAM. This saves disk I/O.
|
|
*/
|
|
PRES_MEMORY_PERSISTENT_JOURNAL,
|
|
/*e
|
|
* WAL: Uses a write-ahead log instead of a rollback journal to implement
|
|
* transactions.
|
|
*/
|
|
PRES_WAL_PERSISTENT_JOURNAL,
|
|
/*e
|
|
* OFF: Completely disables the rollback journal. If the application
|
|
* crashes in the middle of a transaction when the OFF journaling mode
|
|
* is set, the files containing the DDS samples (or reader state) will very
|
|
* likely be corrupted.
|
|
*/
|
|
PRES_OFF_PERSISTENT_JOURNAL
|
|
} PRESPersistentJournalKind;
|
|
|
|
extern PRESDllExport
|
|
const char *PRESPersistentJournalKind_toStr(PRESPersistentJournalKind kind);
|
|
|
|
typedef enum {
|
|
/*e
|
|
* NORMAL: Changes are written into disk at critical moments.
|
|
*/
|
|
PRES_NORMAL_PERSISTENT_SYNCHRONIZATION,
|
|
/*e
|
|
* FULL: Every change is written into physical disk as soon as it is
|
|
* comitted.
|
|
*/
|
|
PRES_FULL_PERSISTENT_SYNCHRONIZATION,
|
|
/*e
|
|
* OFF: No synchronization is enforced. Changes will be written to physical
|
|
* disk when the OS flushes its buffers.
|
|
*/
|
|
PRES_OFF_PERSISTENT_SYNCHRONIZATION
|
|
} PRESPersistentSynchronizationKind;
|
|
|
|
extern PRESDllExport
|
|
const char *PRESPersistentSynchronizationKind_toStr(
|
|
PRESPersistentSynchronizationKind kind);
|
|
|
|
struct PRESPersistentStorageSettings {
|
|
/*e
|
|
* Enables or disables the persistent storage.
|
|
*/
|
|
RTIBool enable;
|
|
/*e
|
|
* The file where to store the DDS samples for a DW or the reader state
|
|
* containing the last sequence number received for VGUID for a DR.
|
|
*/
|
|
char *fileName;
|
|
/*e
|
|
* Specifies the name of the trace file for debugging purposes. The trace
|
|
* file contains information about all SQL statements executed.
|
|
*/
|
|
char *traceFileName;
|
|
/*e
|
|
* Controls how the journal file is stored and processed.
|
|
*/
|
|
PRESPersistentJournalKind journalKind;
|
|
/*e
|
|
* Determines the level of synchronization with the physical disk.
|
|
*/
|
|
PRESPersistentSynchronizationKind synchronizationKind;
|
|
/*e
|
|
* Sets the auto-vacuum status of the storage.
|
|
* TRUE: The storage files are compacted every transaction.
|
|
* FALSE: When data is deleted from the storage files, the files remain the
|
|
* same size.
|
|
*/
|
|
RTIBool vacuum;
|
|
/*e
|
|
* For a DataWriter: if TRUE, the persisted writer history must be restored
|
|
* once the DataWriter is restarted.
|
|
* For a DataReader: if TRUE, the persisted DataReader state must be
|
|
* restored once the DataReader is restarted.
|
|
*/
|
|
RTIBool restore;
|
|
/*e
|
|
* Resource limits associated with the ODBC instance writer history cache.
|
|
*/
|
|
struct REDAFastBufferPoolGrowthProperty writerInstanceCacheAllocation;
|
|
/*e
|
|
* Resource limits associated with the ODBC sample writer history cache.
|
|
*/
|
|
struct REDAFastBufferPoolGrowthProperty writerSampleCacheAllocation;
|
|
/*e
|
|
* If TRUE, the ODBC writer history cache is stored in memory.
|
|
*/
|
|
RTIBool writerMemoryState;
|
|
/*e
|
|
* The frequency at which the reader state is checkpointed.
|
|
*
|
|
* This field only applies to DataReader entities.
|
|
*
|
|
* A value of N means store the state once every N received and processed
|
|
* samples.
|
|
*
|
|
* The circumstances under which a data sample is considered “processed by
|
|
* the application” depends on the DataReader configuration.
|
|
*
|
|
* For additional information on when a sample is considered
|
|
* "processed by the application" see durable reader state in the
|
|
* Core Libraries User's Manual.
|
|
*/
|
|
RTI_UINT32 readerCheckpointFrequency;
|
|
};
|
|
|
|
|
|
#define PRESPersistentStorageSettings_INITIALIZER { \
|
|
RTI_FALSE, /* enable */ \
|
|
NULL, /* fileName */ \
|
|
NULL, /* traceFileName */ \
|
|
PRES_WAL_PERSISTENT_JOURNAL, /* journalKind */ \
|
|
PRES_NORMAL_PERSISTENT_SYNCHRONIZATION, /* synchronizationKind */ \
|
|
RTI_TRUE, /* vacuum */ \
|
|
RTI_TRUE, /* restore */ \
|
|
{PRES_LENGTH_AUTO, PRES_LENGTH_AUTO, REDA_FAST_BUFFER_POOL_UNLIMITED}, /* writerInstanceCacheAllocation */ \
|
|
{32, 32, PRES_LENGTH_AUTO}, /* writerSampleCacheAllocation */ \
|
|
RTI_TRUE, /* writerMemoryState */ \
|
|
1 /* readerCheckpointFrequency */ \
|
|
}
|
|
|
|
struct PRESDurabilityQosPolicy {
|
|
/*e
|
|
* Durability kind.
|
|
*/
|
|
PRESDurabilityQosPolicyKind kind;
|
|
/*e
|
|
* Direct communication
|
|
* If kind is equal to PRES_TRANSIENT_DURABILITY_QOS or
|
|
* PRES_PERSISTENCE_DURABILITY_QOS and directCommunication is RTI_FALSE
|
|
* The data reader will not communicate directly with the data writers
|
|
* offering persistence or transient durability. All the communication
|
|
* will go through the persistence service.
|
|
*/
|
|
RTIBool directCommunication;
|
|
/*e
|
|
* Writer depth
|
|
* Number of samples a durable DataWriter will send to a late joining
|
|
* DataReader. This configuration will be ignored at the DataReader.
|
|
*/
|
|
RTI_INT32 writerDepth;
|
|
/*
|
|
* This field is used to configure durable writer history and durable
|
|
* reader state. The samples of a DW or the state of a DR can be stored into
|
|
* a file when storageSettings.enable is set to RTI_TRUE.
|
|
*/
|
|
struct PRESPersistentStorageSettings storageSettings;
|
|
};
|
|
|
|
|
|
#define PRES_DURABILITY_QOS_POLICY_DEFAULT { \
|
|
PRES_VOLATILE_DURABILITY_QOS, /* kind */ \
|
|
RTI_TRUE, /* directCommunication */ \
|
|
PRES_AUTO_WRITER_DEPTH, /* writerDepth */ \
|
|
PRESPersistentStorageSettings_INITIALIZER /* storageSettings */ \
|
|
}
|
|
|
|
extern PRESDllExport
|
|
int PRESDurabilityQosPolicy_compare(
|
|
const struct PRESDurabilityQosPolicy *l,
|
|
const struct PRESDurabilityQosPolicy *r);
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESDurabilityQosPolicy_copy(
|
|
struct PRESDurabilityQosPolicy *dst,
|
|
const struct PRESDurabilityQosPolicy *src,
|
|
RTIBool shallowCopy,
|
|
RTIBool allocateMemoryIfNeeded,
|
|
RTIBool freeStringsIfNull);
|
|
|
|
extern PRESDllExport
|
|
void PRESDurabilityQosPolicy_finalize(
|
|
struct PRESDurabilityQosPolicy *self);
|
|
|
|
struct PRESPresentationQosPolicy {
|
|
/*e
|
|
determines the largest scope spanning the entities for which the order
|
|
and coherency of changes can be preserved.
|
|
*/
|
|
PRESPresentationQosPolicyAccessScopeKind accessScope;
|
|
/*e
|
|
specify and receive coherent changes
|
|
*/
|
|
RTIBool coherentAccess;
|
|
/*e
|
|
see the relative order of changes
|
|
*/
|
|
RTIBool orderedAccess;
|
|
/*e
|
|
Indicates if samples from incomplete coherent sets are dropped
|
|
*/
|
|
RTIBool dropIncompleteCoherentSet;
|
|
};
|
|
|
|
|
|
#define PRES_PRESENTATION_QOS_POLICY_DEFAULT { \
|
|
PRES_INSTANCE_PRESENTATION_QOS, \
|
|
RTI_FALSE, \
|
|
RTI_FALSE, \
|
|
RTI_TRUE \
|
|
}
|
|
|
|
extern PRESDllExport
|
|
int PRESPresentationQosPolicy_compare(
|
|
const struct PRESPresentationQosPolicy *l,
|
|
const struct PRESPresentationQosPolicy *r);
|
|
|
|
struct PRESDeadlineQosPolicy {
|
|
/*e
|
|
* How long the application should wait until considering the
|
|
* deadline to be expired.
|
|
*/
|
|
struct RTINtpTime deadlinePeriod;
|
|
};
|
|
|
|
struct PRESLatencyBudgetQosPolicy {
|
|
/*e
|
|
* Duration of latency.
|
|
*/
|
|
struct RTINtpTime duration;
|
|
};
|
|
|
|
struct PRESOwnershipQosPolicy {
|
|
/*e
|
|
* Ownership kind.
|
|
*/
|
|
PRESOwnershipQosPolicyKind kind;
|
|
};
|
|
|
|
extern PRESDllExport
|
|
int PRESOwnershipQosPolicy_compare(
|
|
const struct PRESOwnershipQosPolicy *l,
|
|
const struct PRESOwnershipQosPolicy *r);
|
|
|
|
struct PRESOwnershipStrengthQosPolicy {
|
|
RTI_INT32 value;
|
|
};
|
|
|
|
struct PRESLivelinessQosPolicy {
|
|
/*e
|
|
* Duration of liveliness.
|
|
*/
|
|
struct RTINtpTime leaseDuration;
|
|
|
|
/*e
|
|
* Kind of liveliness desired.
|
|
*/
|
|
PRESLivelinessQosPolicyKind kind;
|
|
|
|
/*e
|
|
* The number of liveliness assertions to send per lease duration.
|
|
* Not propagated.
|
|
*/
|
|
RTI_INT32 assertionsPerLeaseDuration;
|
|
};
|
|
|
|
extern PRESDllExport
|
|
int PRESLivelinessQosPolicy_compare(
|
|
const struct PRESLivelinessQosPolicy *l,
|
|
const struct PRESLivelinessQosPolicy *r);
|
|
|
|
struct PRESTimeBasedFilterQosPolicy {
|
|
/*e datareader does not want to receive more than one vlaue each
|
|
minimumSeparation, regardless of hwo fast the changes orccur. */
|
|
struct RTINtpTime minimumSeparation;
|
|
};
|
|
|
|
struct PRESTypeSupportQosPolicy {
|
|
/*e Option passed to the serialize function
|
|
*/
|
|
void *pluginData;
|
|
|
|
/*e Determines whether or not to zero-pad the cdr stream
|
|
*/
|
|
PRESCdrPaddingKind cdrPaddingKind;
|
|
};
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESTypeSupportQosPolicy_equal(
|
|
const struct PRESTypeSupportQosPolicy* originalValue,
|
|
const struct PRESTypeSupportQosPolicy* setValue);
|
|
|
|
|
|
#define PRES_TYPE_SUPPORT_QOS_POLICY_DEFAULT { \
|
|
NULL, /* pluginData */\
|
|
PRES_AUTO_CDR_PADDING /* cdrPaddingKind */\
|
|
}
|
|
|
|
typedef void* (*PRESContentFilterCompile)
|
|
(RTI_UINT32 systemKey, void* filter_object, const char* expression,
|
|
const char** parameters, RTI_INT32 param_length, const void *typeCode, const char* typeCodeName,
|
|
void *old_handle, RTI_INT32* errorcode);
|
|
|
|
typedef void (*PRESContentFilterWriterCompile)
|
|
(void* filter_object,void *writer_filter_data, struct PRESExpressionProperty * prop,
|
|
const char* expression,const char* parameters, RTI_INT32 param_length, const void *typeCode,
|
|
const char* typeCodeName,struct REDAWeakReference * reader,RTI_INT32* errorcode);
|
|
|
|
typedef RTI_INT32 (*PRESContentFilterEvaluate)
|
|
(RTI_UINT32 systemKey, void* filter_object, void* handle, const void* sample, const struct PRESFilterSampleInfo * meta_data );
|
|
|
|
typedef struct PRESDDSSequence * (*PRESContentFilterWriterEvaluate)
|
|
(void* filter_object, void *writer_filter_data,
|
|
const void* sample, const struct PRESFilterSampleInfo * meta_data, RTIBool evaluateOnSerialized);
|
|
|
|
typedef void (*PRESContentFilterWriterReturnLoan)
|
|
(void* filter_object, void *writer_filter_data, struct PRESDDSSequence * cookies);
|
|
|
|
typedef void (*PRESContentFilterFinalize)
|
|
(RTI_UINT32 systemKey, void* filter_object, void* handle);
|
|
|
|
typedef void (*PRESContentFilterWriterFinalize)
|
|
(void* filter_object, void *writer_filter_data,struct REDAWeakReference * reader);
|
|
|
|
typedef RTI_INT32 (*PRESContentFilterQuery)
|
|
(RTI_UINT32 systemKey, void * filter_object, void * handle);
|
|
|
|
typedef void* (*PRESContentFilterWriterAttach)
|
|
(void* filter_object, void* reserved,RTI_INT32* errorcode);
|
|
|
|
typedef void (*PRESContentFilterWriterDetach)
|
|
(void* filter_object, void* writer_filter_data);
|
|
|
|
|
|
#define PRES_CONTENT_FILTER_STATE_UNKNOWN 0
|
|
#define PRES_CONTENT_FILTER_STATE_PASSED 1
|
|
#define PRES_CONTENT_FILTER_STATE_DROPPED 2
|
|
#define PRES_CONTENT_FILTER_SIGNATURE_DEFAULT {{0,0,0,0}}
|
|
#define PRES_CONTENT_FILTER_SIGNATURE_INT_SIZE (4)
|
|
#define PRES_CONTENT_FILTER_SIGNATURE_BYTES_SIZE (16)
|
|
#define PRESContentFilterSignature_isEqual(__left,__right) \
|
|
(((__left)->signature[0]==(__right)->signature[0]) ? \
|
|
(((__left)->signature[1]==(__right)->signature[1]) ? \
|
|
(((__left)->signature[2]==(__right)->signature[2]) ? \
|
|
(((__left)->signature[3]==(__right)->signature[3]) ? 1 :0) : 0) :0) :0)
|
|
|
|
struct PRESContentFilterSignature {
|
|
int signature[PRES_CONTENT_FILTER_SIGNATURE_INT_SIZE];
|
|
|
|
};
|
|
|
|
struct PRESContentFilter {
|
|
|
|
PRESContentFilterCompile compile;
|
|
PRESContentFilterWriterCompile writerCompile;
|
|
PRESContentFilterEvaluate evaluate;
|
|
PRESContentFilterWriterEvaluate writerEvaluate;
|
|
PRESContentFilterEvaluate evaluateOnSerialized;
|
|
PRESContentFilterQuery query;
|
|
PRESContentFilterFinalize finalizeFunc;
|
|
PRESContentFilterWriterFinalize writerFinalize;
|
|
PRESContentFilterWriterAttach writerAttach;
|
|
PRESContentFilterWriterDetach writerDetach;
|
|
PRESContentFilterWriterReturnLoan writerReturnLoan;
|
|
RTIBool isBuiltin;
|
|
void *filter_object;
|
|
};
|
|
|
|
|
|
#define PRESContentFilter_INITIALIZER { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, RTI_TRUE, NULL }
|
|
|
|
struct PRESTypeAllocationParams {
|
|
RTICdrBoolean allocatePointers;
|
|
RTICdrBoolean allocateOptionalMembers;
|
|
RTICdrBoolean allocateMemory;
|
|
};
|
|
|
|
struct PRESTypeDeallocationParams {
|
|
RTICdrBoolean deletePointers;
|
|
RTICdrBoolean deleteOptionalMembers;
|
|
};
|
|
|
|
struct PRESDDSSequence {
|
|
/* NOTE(V.V.IMP): The members below should match exactly to a DDS_SEQUENCE members */
|
|
void *_contiguous_buffer;
|
|
void **_discontiguous_buffer;
|
|
void *_read_token1;
|
|
void *_read_token2;
|
|
RTIXCdrUnsignedLong _maximum;
|
|
RTIXCdrUnsignedLong _length;
|
|
RTIXCdrLong _sequence_init;
|
|
RTIXCdrBoolean _owned;
|
|
struct PRESTypeAllocationParams _elementAllocParams;
|
|
RTIXCdrUnsignedLong _absolute_maximum;
|
|
struct PRESTypeDeallocationParams _elementDeallocParams;
|
|
/* New members can be added after this. */
|
|
};
|
|
|
|
|
|
#define PRESTypeAllocationParams_INITIALIZER { \
|
|
RTI_CDR_BOOLEAN_TRUE, \
|
|
RTI_CDR_BOOLEAN_FALSE, \
|
|
RTI_CDR_BOOLEAN_TRUE \
|
|
}
|
|
#define PRESTypeDeallocationParams_INITIALIZER { \
|
|
RTI_CDR_BOOLEAN_TRUE, \
|
|
RTI_CDR_BOOLEAN_TRUE \
|
|
}
|
|
#define PRES_DDS_SEQUENCE_MAGIC_NUMBER 0x7344L
|
|
#define PRES_DDS_SEQUENCE_INITIALIZER { \
|
|
NULL, \
|
|
NULL, \
|
|
NULL, \
|
|
NULL, \
|
|
0L, \
|
|
0L, \
|
|
PRES_DDS_SEQUENCE_MAGIC_NUMBER, \
|
|
RTI_XCDR_TRUE, \
|
|
PRESTypeAllocationParams_INITIALIZER, \
|
|
RTI_INT32_MAX, \
|
|
PRESTypeDeallocationParams_INITIALIZER \
|
|
}
|
|
#define PRES_DDS_SEQUENCE_INVALID { \
|
|
NULL, \
|
|
NULL, \
|
|
NULL, \
|
|
NULL, \
|
|
0L, \
|
|
0L, \
|
|
0, /* non valid magic number */ \
|
|
RTI_XCDR_TRUE, \
|
|
PRESTypeAllocationParams_INITIALIZER, \
|
|
RTI_INT32_MAX, \
|
|
PRESTypeDeallocationParams_INITIALIZER \
|
|
}
|
|
|
|
extern PRESDllExport
|
|
void * PRESDDSSequence_get(
|
|
const struct PRESDDSSequence* self,
|
|
RTICdrUnsignedLong i,
|
|
RTICdrUnsignedLong size);
|
|
|
|
extern PRESDllExport
|
|
void PRESDDSSequence_loanContiguous(
|
|
struct PRESDDSSequence *self,
|
|
void *buffer,
|
|
RTICdrUnsignedLong newLength /* = newMax */);
|
|
|
|
struct PRESDDSCookie {
|
|
struct PRESDDSSequence value;
|
|
};
|
|
|
|
struct PRESContentFilterQosPolicy {
|
|
/*i Unique key for each user of a filter */
|
|
RTI_UINT32 systemKey;
|
|
/*i Handle to pass to the evaluate function */
|
|
void *handle;
|
|
/*i Function that filters a sample */
|
|
PRESContentFilterEvaluate evaluate;
|
|
/*i Function that filters a sample on serialized*/
|
|
PRESContentFilterEvaluate evaluateOnSerialized;
|
|
/*i Function used to query the properties of the filter */
|
|
PRESContentFilterQuery query;
|
|
/*i Function that finalizes the use of this filterPolicy */
|
|
PRESContentFilterFinalize finalizeFunc;
|
|
/*i
|
|
* @brief Filter Signature not including last NULL-terminated character.
|
|
*
|
|
* This signature is used for Connext versions 6.x and below.
|
|
*
|
|
* See CORE-12531.
|
|
*/
|
|
struct PRESContentFilterSignature legacySignature;
|
|
/*i
|
|
* @brief Filter Signature including last NULL-terminated character.
|
|
*
|
|
* This signature is used for Connext versions 7.x and above and non-DDS
|
|
* vendors. This is the signature format compatible with the specification.
|
|
*
|
|
* See CORE-12531.
|
|
*/
|
|
struct PRESContentFilterSignature signature;
|
|
/*i Weak reference to filter type */
|
|
struct REDAWeakReference filterWR;
|
|
/*i Apply filter */
|
|
RTIBool doFilter;
|
|
/*i API layer filter object */
|
|
/* NOTE: This is NOT the same filter_data supplied in the DDS_x API.
|
|
In actual use, the presentation filter_data is the entire API layer
|
|
filter structure, of which one memmber is the DDS_x API filter_data.
|
|
Wraper functions are required to translate between the two. */
|
|
void *filter_object;
|
|
/*i is Builtin or custom filter*/
|
|
RTIBool isBuiltin;
|
|
|
|
};
|
|
|
|
struct PRESSequenceString {
|
|
/*i The number of characters allocated in the 'string' field.*/
|
|
RTI_UINT32 _maximum;
|
|
|
|
/*i The logical number of characters in the 'string' field.*/
|
|
RTI_UINT32 _length;
|
|
|
|
/*e
|
|
* The strings in this sequence, delimited by a character of the
|
|
* client's choosing. Many of the helper functions assume that the
|
|
* delimiter is a NULL character ('\0') in order to take advantage
|
|
* of the builtin string functions. It is recommended to use a
|
|
* NULL character as the delimiter unless there is a specific reason
|
|
* not to.
|
|
*/
|
|
char *str;
|
|
};
|
|
|
|
|
|
#define PRESSequenceString_INITIALIZER {\
|
|
0, /* _maximum */ \
|
|
0, /* _length */ \
|
|
NULL /* str */ \
|
|
}
|
|
|
|
|
|
#define PRESSequenceString_isEmpty(sequence__) \
|
|
((sequence__)->_length == 0 || (sequence__)->str == NULL)
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESSequenceString_copy(
|
|
struct PRESSequenceString * dst,
|
|
const struct PRESSequenceString * src);
|
|
|
|
|
|
#define PRESSequenceString_initializeFromBuffer(self__, bufferSizeMax__, buffer__) \
|
|
(self__)->_maximum = (bufferSizeMax__); \
|
|
(self__)->_length = 0; \
|
|
(self__)->str = (buffer__);
|
|
|
|
extern PRESDllExport
|
|
void PRESSequenceString_initializeFromString(
|
|
struct PRESSequenceString *self,
|
|
RTI_UINT32 maximumLength,
|
|
char *stringValue);
|
|
|
|
extern PRESDllExport
|
|
void PRESSequenceString_initialize(
|
|
struct PRESSequenceString * self);
|
|
|
|
extern PRESDllExport
|
|
void PRESSequenceString_finalize(
|
|
struct PRESSequenceString * self);
|
|
|
|
extern PRESDllExport
|
|
void PRESSequenceString_reset(
|
|
struct PRESSequenceString * self);
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESSequenceString_equals(
|
|
const struct PRESSequenceString *self,
|
|
const struct PRESSequenceString *other);
|
|
|
|
extern PRESDllExport
|
|
int PRESSequenceString_compare(
|
|
const struct PRESSequenceString *left,
|
|
const struct PRESSequenceString *right);
|
|
|
|
extern PRESDllExport
|
|
void
|
|
PRESSequenceString_print(
|
|
const struct PRESSequenceString *self,
|
|
const char *desc,
|
|
unsigned int indent);
|
|
|
|
extern PRESDllExport
|
|
const char *PRESSequenceString_getNextString(
|
|
const struct PRESSequenceString *self,
|
|
const char *pos);
|
|
|
|
struct PRESPartitionQosPolicy {
|
|
/*e
|
|
A list of strings.
|
|
*/
|
|
struct PRESSequenceString name;
|
|
};
|
|
|
|
|
|
#define PRES_PARTITION_QOS_POLICY_DEFAULT {{0, 0, NULL}}
|
|
|
|
|
|
#define PRES_PARTITION_PERSISTENCE_SYNC_PARTITION_NAME "RTIPSSync"
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESPartitionQosPolicy_hasMatchingElement(
|
|
const struct PRESPartitionQosPolicy *self,
|
|
const struct PRESPartitionQosPolicy *other,
|
|
char delimiter,
|
|
RTIBool allowNoPartition,
|
|
RTIBool defaultPartitionMatchAll);
|
|
|
|
extern PRESDllExport
|
|
int PRESPartitionQosPolicy_compare(
|
|
const struct PRESPartitionQosPolicy *left,
|
|
const struct PRESPartitionQosPolicy *right);
|
|
|
|
struct PRESProperty {
|
|
/*i
|
|
@brief Property name. The name containing a NULL
|
|
terminated string.
|
|
*/
|
|
char *name;
|
|
/*i
|
|
@brief Property value. The value containing a NULL
|
|
terminated string.
|
|
*/
|
|
char *value;
|
|
/*i
|
|
@brief Indicates if the property must be propagated or not.
|
|
*/
|
|
RTIBool propagate;
|
|
};
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESProperty_isPropertyValueTrue(const char * value);
|
|
|
|
struct PRESSequenceProperty {
|
|
/*i The maximum number of elements in the property list*/
|
|
RTI_UINT32 _maximum;
|
|
|
|
/*i The number of elements in the property list */
|
|
RTI_UINT32 _length;
|
|
|
|
/*e The name, value pairs in this sequence */
|
|
struct PRESProperty *_buffer;
|
|
|
|
/*e Maximum length of the string buffer*/
|
|
RTI_UINT32 _string_maximum;
|
|
|
|
/*e Current length of string buffer */
|
|
RTI_UINT32 _string_length;
|
|
|
|
/*e
|
|
* @brief Area allocated for storing string.
|
|
*
|
|
* This buffer contains all the memory used by each of the
|
|
* PRESProperty (name, value) pairs, alongwith the terminating
|
|
* NULL character. Values are kept sequentially for each of the
|
|
* elements in (name, value) order.
|
|
*
|
|
* Storage organization of this form results in a property sequence that,
|
|
* once constructed, cannot be modified. We cannot individually modify the
|
|
* string values. If any kind of modification is required, the entire
|
|
* buffer has to be reconstructed.
|
|
*/
|
|
char *_string_buffer;
|
|
};
|
|
|
|
extern PRESDllExport
|
|
RTI_UINT32 PRESSequenceProperty_getRequiredBufferSize(
|
|
RTI_UINT32 maxPropertyLength,
|
|
RTI_UINT32 maxPropertyStringLength);
|
|
|
|
extern PRESDllExport
|
|
void PRESSequenceProperty_initializeFromBuffer(
|
|
struct PRESSequenceProperty *self,
|
|
RTI_UINT32 maxPropertyLength,
|
|
RTI_UINT32 maxPropertyStringLength,
|
|
void *buffer);
|
|
|
|
struct PRESPropertyQosPolicy {
|
|
struct PRESSequenceProperty data;
|
|
};
|
|
|
|
|
|
#define PRES_SEQUENCE_PROPERTY_DEFAULT {0,0,NULL,0,0,NULL}
|
|
#define PRES_PROPERTY_QOS_POLICY_DEFAULT {PRES_SEQUENCE_PROPERTY_DEFAULT}
|
|
|
|
extern PRESDllExport
|
|
const char *PRESSequenceProperty_getValue(
|
|
const struct PRESSequenceProperty *self,
|
|
const char *name);
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESSequenceProperty_getBoolean(
|
|
const struct PRESSequenceProperty *self,
|
|
RTIBool *value,
|
|
RTIBool *isPropertySet,
|
|
const char *name,
|
|
RTIBool defaultValue);
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESSequenceProperty_parseDurationString(
|
|
const char *propertyValueStr,
|
|
RTINtpTime *value);
|
|
|
|
|
|
extern PRESDllExport
|
|
int PRESPropertyQosPolicy_compare(
|
|
const struct PRESPropertyQosPolicy *left,
|
|
const struct PRESPropertyQosPolicy *right);
|
|
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESPropertyQosPolicy_copy(
|
|
struct PRESPropertyQosPolicy *out,
|
|
const struct PRESPropertyQosPolicy *in);
|
|
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESPropertyQosPolicy_addIntegerProperty(
|
|
struct PRESPropertyQosPolicy *propertyQos,
|
|
const char *name,
|
|
int value);
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESPropertyQosPolicy_addStringProperty(
|
|
struct PRESPropertyQosPolicy *propertyQos,
|
|
const char *name,
|
|
const char *value);
|
|
|
|
extern PRESDllExport
|
|
MIGRtpsDomainTag PRESPropertyQosPolicy_copyDomainTag(
|
|
struct PRESPropertyQosPolicy *propertyQos,
|
|
const MIGRtpsDomainTag domainTag);
|
|
|
|
extern PRESDllExport
|
|
MIGRtpsDomainTag PRESPropertyQosPolicy_getDomainTag(
|
|
const struct PRESPropertyQosPolicy *propertyQos,
|
|
const MIGRtpsDomainTag expectedDomainTag);
|
|
|
|
typedef struct PRESPropertyQosPolicy PRESDataTagQosPolicy;
|
|
|
|
|
|
#define PRES_DATA_TAG_QOS_POLICY_DEFAULT PRES_PROPERTY_QOS_POLICY_DEFAULT
|
|
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESDataTagQosPolicy_copy(
|
|
PRESDataTagQosPolicy *out,
|
|
const PRESDataTagQosPolicy *in);
|
|
|
|
|
|
#define PRES_STATISTICS_QOS_POLICY_DEFAULT {RTI_FALSE}
|
|
|
|
|
|
#define PRES_PARTITION_DEFAULT ""
|
|
|
|
|
|
#define PRES_PARTITION_QOS_POLICY_NAME_SEPARATOR RTI_NETIO_ALIAS_LIST_SEPARATOR
|
|
|
|
struct PRESReliabilityQosPolicy {
|
|
/*e
|
|
* Reliability kind.
|
|
*/
|
|
PRESReliabilityQosPolicyKind kind;
|
|
/*e
|
|
* Max blocking time.
|
|
*/
|
|
struct RTINtpTime maxBlockingTime;
|
|
/*e
|
|
* Application acknowledgment kind
|
|
*/
|
|
PRESReliabilityQosPolicyAcknowledgmentModeKind acknowledgmentKind;
|
|
/*i
|
|
* Instance state consistency kind
|
|
*/
|
|
PRESInstanceStateConsistencyKind instanceStateConsistencyKind;
|
|
/*i
|
|
* Exact reliability kind match
|
|
*/
|
|
RTIBool exactReliabilityKindMatch;
|
|
};
|
|
|
|
|
|
/* clang-format off */
|
|
#define PRES_RELIABLE_RELIABILITY_QOS_POLICY_DEFAULT \
|
|
{ \
|
|
PRES_RELIABLE_RELIABILITY_QOS, /* kind */ \
|
|
RTI_NTP_TIME_ZERO, /* maxBlockingTime */ \
|
|
PRES_PROTOCOL_ACKNOWLEDGMENT_MODE, /* acknowledgmentKind */ \
|
|
PRES_NO_RECOVER_INSTANCE_STATE_CONSISTENCY, /* instanceStateConsistencyKind */ \
|
|
RTI_FALSE /* exactReliabilityKindMatch */ \
|
|
}
|
|
/* clang-format on */
|
|
|
|
/* clang-format off */
|
|
#define PRES_BEST_EFFORT_RELIABILITY_QOS_POLICY_DEFAULT \
|
|
{ \
|
|
PRES_BEST_EFFORT_RELIABILITY_QOS, /* kind */ \
|
|
RTI_NTP_TIME_ZERO, /* maxBlockingTime */ \
|
|
PRES_PROTOCOL_ACKNOWLEDGMENT_MODE, /* acknowledgmentKind */ \
|
|
PRES_NO_RECOVER_INSTANCE_STATE_CONSISTENCY, /* instanceStateConsistencyKind */ \
|
|
RTI_FALSE /* exactReliabilityKindMatch */ \
|
|
}
|
|
/* clang-format on */
|
|
|
|
struct PRESDestinationOrderQosPolicy {
|
|
/*e
|
|
* Which destination order.
|
|
*/
|
|
PRESDestinationOrderQosPolicyKind kind;
|
|
/*e
|
|
* Filter scope for destination order.
|
|
*/
|
|
PRESDestinationOrderQosPolicyScopeKind scope;
|
|
/*e
|
|
* Timestamp tolerance
|
|
*/
|
|
struct RTINtpTime srcTimeTol;
|
|
};
|
|
|
|
extern PRESDllExport
|
|
int PRESReliabilityQosPolicy_compare(
|
|
const struct PRESReliabilityQosPolicy *l,
|
|
const struct PRESReliabilityQosPolicy *r);
|
|
|
|
extern PRESDllExport
|
|
int PRESDestinationOrderQosPolicy_compare(
|
|
const struct PRESDestinationOrderQosPolicy *l,
|
|
const struct PRESDestinationOrderQosPolicy *r);
|
|
|
|
struct PRESHistoryQosPolicy {
|
|
/*e
|
|
* Keep all vs. keep just the last value.
|
|
*/
|
|
PRESHistoryQosPolicyKind kind;
|
|
|
|
/*e
|
|
* How many values to keep.
|
|
*/
|
|
RTI_INT32 depth;
|
|
};
|
|
|
|
|
|
#define PRES_HISTORY_QOS_POLICY_DEFAULT {PRES_KEEP_LAST_HISTORY_QOS, 1}
|
|
|
|
extern PRESDllExport
|
|
int PRESHistoryQosPolicy_compare(
|
|
const struct PRESHistoryQosPolicy *l,
|
|
const struct PRESHistoryQosPolicy *r);
|
|
|
|
struct PRESTransportPriorityQosPolicy {
|
|
/*e
|
|
* The value of the priority.
|
|
*/
|
|
RTI_INT32 value;
|
|
};
|
|
|
|
struct PRESLifespanQosPolicy {
|
|
/*e
|
|
* The value of the lifespan duration.
|
|
*/
|
|
struct RTINtpTime duration;
|
|
};
|
|
|
|
struct PRESWriterDataLifecycleQosPolicy {
|
|
/*e
|
|
* Whether each time a DataWriter will automatically dispose instances when
|
|
* they are unregistered.
|
|
*/
|
|
RTIBool autodisposeUnregisteredInstances;
|
|
/*e
|
|
* Maximum duration for which the DataWriter will maintain samples for an
|
|
* instance once it has been unregistered.
|
|
*/
|
|
struct RTINtpTime autopurgeUnregisteredInstancesDelay;
|
|
/*e
|
|
* Minimum duration for which the DataWriter will maintain an
|
|
* instance once it has been disposed.
|
|
*/
|
|
struct RTINtpTime autopurgeDisposedInstancesDelay;
|
|
};
|
|
|
|
|
|
#define PRES_WRITER_DATA_LIFECYCLE_QOS_POLICY_DEFAULT { \
|
|
RTI_FALSE, /* autodisposeUnregisteredInstances */ \
|
|
RTI_NTP_TIME_MAX, /* autopurgeUnregisteredInstancesDelay */ \
|
|
RTI_NTP_TIME_MAX /* autopurgeDisposedInstancesDelay */ \
|
|
}
|
|
|
|
struct PRESReaderDataLifecycleQosPolicy {
|
|
/*e
|
|
* Maximum duration for which the DataReader will maintain samples for an
|
|
* instance once there are no writers for it.
|
|
*/
|
|
struct RTINtpTime autopurgeNowriterSamplesDelay;
|
|
/*e
|
|
* Maximum duration for which the DataReader will maintain samples for an
|
|
* instance once it has been disposed.
|
|
*/
|
|
struct RTINtpTime autopurgeDisposedSamplesDelay;
|
|
/*e
|
|
* Minimum duration for which the DataReader will maintain an instance
|
|
* once it has been disposed.
|
|
*/
|
|
struct RTINtpTime autopurgeDisposedInstancesDelay;
|
|
/*e
|
|
* Minimum duration for which the DataReader will maintain an instance
|
|
* once there are no writers for it.
|
|
*/
|
|
struct RTINtpTime autopurgeNowriterInstancesDelay;
|
|
};
|
|
|
|
|
|
#define PRES_READER_DATA_LIFECYCLE_QOS_POLICY_DEFAULT { \
|
|
RTI_NTP_TIME_MAX, /*autopurgeNowriterSamplesDelay*/ \
|
|
RTI_NTP_TIME_MAX, /*autopurgeDisposedSamplesDelay*/ \
|
|
RTI_NTP_TIME_MAX, /*autopurgeDisposedInstancesDelay*/ \
|
|
RTI_NTP_TIME_ZERO /*autopurgeNowriterInstancesDelay*/ \
|
|
}
|
|
|
|
struct PRESEntityFactoryQosPolicy {
|
|
/*e Whether the entity acting as a factory automatically enables the
|
|
* instances it creates when enable is called.
|
|
*/
|
|
RTIBool autoenableContainedEntities;
|
|
};
|
|
|
|
struct PRESResourceLimitsQosPolicy {
|
|
/*e Control growth of number of samples. */
|
|
struct REDAFastBufferPoolGrowthProperty sampleCount;
|
|
|
|
/*e Control growth of number of instances. */
|
|
struct REDAFastBufferPoolGrowthProperty instanceCount;
|
|
|
|
/*e
|
|
* The maximum number of samples per instance.
|
|
*/
|
|
RTI_INT32 maxSamplesPerInstance;
|
|
|
|
/*e
|
|
* Number of hash buckets for instances.
|
|
*/
|
|
RTI_INT32 instanceHashBuckets;
|
|
};
|
|
|
|
|
|
/* clang-format off */
|
|
#define PRES_RESOURCE_LIMITS_QOS_POLICY_DEFAULT { \
|
|
REDA_FAST_BUFFER_POOL_GROWTH_PROPERTY_DEFAULT, /* sampleCount */ \
|
|
REDA_FAST_BUFFER_POOL_GROWTH_PROPERTY_DEFAULT, /* instanceCount */ \
|
|
REDA_FAST_BUFFER_POOL_UNLIMITED, /* maxSamplesPerInstance */ \
|
|
1 /* instanceHashBuckets */ \
|
|
}
|
|
/* clang-format on */
|
|
|
|
extern PRESDllExport
|
|
int PRESResourceLimitsQosPolicy_compare(
|
|
const struct PRESResourceLimitsQosPolicy *l,
|
|
const struct PRESResourceLimitsQosPolicy *r);
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESResourceLimitQos_limitExceeded(int limit, int current);
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESResourceLimitQos_limitReached(int limit, int current);
|
|
|
|
struct PRESDurabilityServiceQosPolicy {
|
|
/*e service_cleanup_delay */
|
|
struct RTINtpTime serviceCleanupDelay;
|
|
|
|
struct PRESHistoryQosPolicy history;
|
|
|
|
/*e this has more info than we need, but we will only serialize what
|
|
is in the spec (max...) */
|
|
struct PRESResourceLimitsQosPolicy resourceLimits;
|
|
};
|
|
|
|
extern PRESDllExport
|
|
int PRESDurabilityServiceQosPolicy_compare(
|
|
const struct PRESDurabilityServiceQosPolicy *l,
|
|
const struct PRESDurabilityServiceQosPolicy *r);
|
|
|
|
struct PRESServiceQosPolicy {
|
|
/*e
|
|
* Service kind
|
|
*/
|
|
PRESServiceQosPolicyKind kind;
|
|
};
|
|
|
|
extern PRESDllExport
|
|
int PRESServiceQosPolicy_compare(
|
|
const struct PRESServiceQosPolicy *l,
|
|
const struct PRESServiceQosPolicy *r);
|
|
|
|
|
|
#define PRES_LENGTH_UNLIMITED RTI_INT32_SIZE_UNLIMITED
|
|
|
|
/*e \ingroup PRESQosModule
|
|
* Auto length
|
|
*/
|
|
#define PRES_LENGTH_AUTO COMMEND_LENGTH_AUTO
|
|
|
|
/*e \ingroup PRESQosModule
|
|
* Unlimited length as a String (to be used in Property QoS)
|
|
*/
|
|
#define PRES_LENGTH_UNLIMITED_STR "-1"
|
|
|
|
/*i \ingroup PRESQosModule
|
|
* Identifies a non-set value
|
|
*/
|
|
#define PRES_VALUE_NOT_SET -2
|
|
|
|
struct PRESBatchQosPolicy {
|
|
/*e
|
|
* Enable/Disable batching
|
|
*/
|
|
RTIBool enable;
|
|
/*e
|
|
* Maximum size of a batch in bytes
|
|
*/
|
|
RTI_INT32 maxDataBytes;
|
|
/*e
|
|
* Maximum size of a batch meta data in bytes
|
|
*/
|
|
RTI_INT32 maxMetaDataBytes;
|
|
/*e
|
|
* Maximum number of samples in a batch
|
|
*/
|
|
RTI_INT32 maxSamples;
|
|
/*e
|
|
* Batch flush delay
|
|
*/
|
|
struct RTINtpTime maxFlushDelay;
|
|
/*e
|
|
* Source timestamp resolution
|
|
*/
|
|
struct RTINtpTime sourceTimestampResolution;
|
|
/*e
|
|
* Thread safe write
|
|
*/
|
|
RTIBool threadSafeWrite;
|
|
};
|
|
|
|
extern PRESDllExport
|
|
int PRESBatchQosPolicy_compare(
|
|
const struct PRESBatchQosPolicy *l,
|
|
const struct PRESBatchQosPolicy *r);
|
|
|
|
|
|
#define PRES_FILTER_SIGNATURE_BITMAP_LENGTH (1)
|
|
#define PRES_FILTER_SIGNATURE_LENGTH_MAX (4)
|
|
|
|
struct PRESInlineParameterQos {
|
|
/* for directed write */
|
|
int directed_write_pid; /* int = 2 shorts, which covers pid and length */
|
|
struct MIGRtpsGuid readerGuid;
|
|
|
|
int coherency_pid; /* int = 2 shorts, which covers pid and length */
|
|
struct REDASequenceNumber coherentSetFirstSn;
|
|
|
|
int signature_pid; /* int = 2 shorts, which covers pid and length */
|
|
int signatureBitmapLength;
|
|
int signatureBitmap[PRES_FILTER_SIGNATURE_BITMAP_LENGTH];
|
|
int signatureLength;
|
|
struct PRESContentFilterSignature signature[PRES_FILTER_SIGNATURE_LENGTH_MAX];
|
|
/* common for all inline parameters */
|
|
int sentinel;
|
|
};
|
|
|
|
typedef RTI_UINT32 PRESStatusKind;
|
|
|
|
typedef RTI_UINT32 PRESStatusKindMask;
|
|
|
|
|
|
/*e \ingroup PRESStatusModule
|
|
* Inconsistent topic status.
|
|
*/
|
|
#define PRES_INCONSISTENT_TOPIC_STATUS (PRESStatusKind)(0x0001 << 0)
|
|
/*e \ingroup PRESStatusModule
|
|
* Sample lost status.
|
|
*/
|
|
#define PRES_SAMPLE_LOST_STATUS (PRESStatusKind)(0x0001 << 1)
|
|
/*e \ingroup PRESStatusModule
|
|
* Data on readers status.
|
|
*/
|
|
#define PRES_DATA_ON_READERS_STATUS (PRESStatusKind)(0x0001 << 2)
|
|
/*e \ingroup PRESStatusModule
|
|
* Sample rejected status.
|
|
*/
|
|
#define PRES_SAMPLE_REJECTED_STATUS (PRESStatusKind)(0x0001 << 3)
|
|
/*e \ingroup PRESStatusModule
|
|
* Liveliness changed status.
|
|
*/
|
|
#define PRES_LIVELINESS_CHANGED_STATUS (PRESStatusKind)(0x0001 << 4)
|
|
/*e \ingroup PRESStatusModule
|
|
* Requested deadline missed status.
|
|
*/
|
|
#define PRES_REQUESTED_DEADLINE_MISSED_STATUS (PRESStatusKind)(0x0001 << 5)
|
|
/*e \ingroup PRESStatusModule
|
|
* Requested incompatible QoS status.
|
|
*/
|
|
#define PRES_REQUESTED_INCOMPATIBLE_QOS_STATUS (PRESStatusKind)(0x0001 << 6)
|
|
/*e \ingroup PRESStatusModule
|
|
* Data available status.
|
|
*/
|
|
#define PRES_DATA_AVAILABLE_STATUS (PRESStatusKind)(0x0001 << 7)
|
|
/*e \ingroup PRESStatusModule
|
|
* Liveliness lost status.
|
|
*/
|
|
#define PRES_LIVELINESS_LOST_STATUS (PRESStatusKind)(0x0001 << 8)
|
|
/*e \ingroup PRESStatusModule
|
|
* Offered deadline missed status.
|
|
*/
|
|
#define PRES_OFFERED_DEADLINE_MISSED_STATUS (PRESStatusKind)(0x0001 << 9)
|
|
/*e \ingroup PRESStatusModule
|
|
* Incompatible QoS status.
|
|
*/
|
|
#define PRES_OFFERED_INCOMPATIBLE_QOS_STATUS (PRESStatusKind)(0x0001 << 10)
|
|
/*e \ingroup PRESStatusModule
|
|
* Extend liveliness changed QoS status.
|
|
*/
|
|
#define PRES_LIVELINESS_CHANGED_STATUS_X (PRESStatusKind)(0x0001 << 11)
|
|
/*e \ingroup PRESStatusModule
|
|
* Extend liveliness updated QoS status.
|
|
*/
|
|
#define PRES_LIVELINESS_UPDATED_STATUS_X (PRESStatusKind)(0x0001 << 12)
|
|
/*e \ingroup PRESStatusModule
|
|
* Publication match status.
|
|
*/
|
|
#define PRES_PUBLICATION_MATCH_STATUS (PRESStatusKind)(0x0001 << 13)
|
|
/*e \ingroup PRESStatusModule
|
|
* Subscription match status.
|
|
*/
|
|
#define PRES_SUBSCRIPTION_MATCH_STATUS (PRESStatusKind)(0x0001 << 14)
|
|
/*e \ingroup PRESStatusModule
|
|
* Publication reliable queue status.
|
|
*/
|
|
#define PRES_PUBLICATION_RELIABLE_QUEUE_STATUS_X (PRESStatusKind)(0x0001 <<15)
|
|
/*e \ingroup PRESStatusModule
|
|
* Destination unreachable status.
|
|
*/
|
|
#define PRES_DESTINATION_UNREACHABALE_STATUS_X (PRESStatusKind)(0x00000001 <<16)
|
|
/*e \ingroup PRESStatusModule
|
|
* Sample removed status.
|
|
*/
|
|
#define PRES_SAMPLE_REMOVED_STATUS_X (PRESStatusKind)(0x00000001 <<17)
|
|
/*e \ingroup PRESStatusModule
|
|
* Writer instance replaced status.
|
|
*/
|
|
#define PRES_WRITER_INSTANCE_REPLACED_STATUS_X (PRESStatusKind)(0x00000001 <<18)
|
|
/*e \ingroup PRESStatusModule
|
|
* Writer instance replaced status.
|
|
*/
|
|
#define PRES_WRITER_APP_ACK_STATUS_X (PRESStatusKind)(0x00000001 <<19)
|
|
/*e \ingroup PRESStatusModule
|
|
* Request match status.
|
|
*/
|
|
#define PRES_SERVICE_REQUEST_ACCEPTED_STATUS_X (PRESStatusKind)(0x0001 <<20)
|
|
/*e \ingroup PRESStatusModule
|
|
* Invalid local advance notice status.
|
|
* Triggers the on_invalid_local_status_advance_notice callback when the
|
|
* local status is about to be invalid. In particular, we notify the user on
|
|
* advance (how much depends on the expiration_advance_notice_duration
|
|
* property) the DomainParticipant's Identity Certificate or Permissions
|
|
* Document expires.
|
|
*/
|
|
#define PRES_INVALID_LOCAL_ADVANCE_NOTICE_STATUS_X (PRESStatusKind) (0x0001 << 21)
|
|
/*e \ingroup PRESStatusModule
|
|
* Empty virtual writer status.
|
|
*/
|
|
#define PRES_WRITER_EMPTY_VIRTUAL_WRITER_STATUS_X (PRESStatusKind) (0x0001 << 22)
|
|
|
|
/*e \ingroup PRESStatusModule
|
|
* All statuses, excluding PRES_LIVELINESS_UPDATED_STATUS_X and
|
|
* PRES_DESTINATION_UNREACHABALE_STATUS_X (until it has a status)
|
|
*/
|
|
/* (Edward): unmask onDestUnreachable until it has status */
|
|
#define PRES_STATUS_KIND_MASK_ALL (PRESStatusKindMask)(0x001eefff)
|
|
/*e \ingroup PRESStatusModule
|
|
* No statuses.
|
|
*/
|
|
#define PRES_STATUS_KIND_MASK_NONE (PRESStatusKindMask)(0x0)
|
|
|
|
typedef enum {
|
|
/*e
|
|
* Sample is not rejected.
|
|
*/
|
|
PRES_NOT_REJECTED,
|
|
/*i
|
|
* Sample is rejected because instance limit is exceeded.
|
|
* Not used. We keep it because it is in the spec.
|
|
*/
|
|
PRES_REJECTED_BY_INSTANCES_LIMIT,
|
|
/*e
|
|
* When using "Reliable" reliability:
|
|
* Sample is rejected because sample limit is exceeded.
|
|
*/
|
|
PRES_REJECTED_BY_SAMPLES_LIMIT,
|
|
/*e
|
|
* When using "Reliable" reliability:
|
|
* Sample is rejected because sample per instance limit is exceeded.
|
|
*/
|
|
PRES_REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT,
|
|
/*e
|
|
* Sample is rejected because samples per remote writer limit is exceeded.
|
|
*/
|
|
PRES_REJECTED_BY_SAMPLES_PER_REMOTE_WRITER_LIMIT,
|
|
/*e
|
|
* Sample is rejected because the number of samples for a remote writer in
|
|
* the virtual queue is exceeded.
|
|
*/
|
|
PRES_REJECTED_BY_REMOTE_WRITER_SAMPLES_PER_VIRTUAL_QUEUE_LIMIT,
|
|
/*e
|
|
* When using "Reliable" reliability:
|
|
* Sample is rejected because the sample cannot be decoded.
|
|
*/
|
|
PRES_REJECTED_BY_DECODE_FAILURE
|
|
} PRESSampleRejectedStatusKind;
|
|
|
|
|
|
#define PRESSampleRejectedStatusKind_toString(kind__) \
|
|
(kind__) == PRES_NOT_REJECTED \
|
|
? "not rejected" \
|
|
: (kind__) == PRES_REJECTED_BY_INSTANCES_LIMIT \
|
|
? "instance limit exceeded" \
|
|
: (kind__) == PRES_REJECTED_BY_SAMPLES_LIMIT \
|
|
? "sample limit exceeded" \
|
|
: (kind__) == PRES_REJECTED_BY_SAMPLES_PER_INSTANCE_LIMIT \
|
|
? "samples per instance limit exceeded" \
|
|
: (kind__) == PRES_REJECTED_BY_SAMPLES_PER_REMOTE_WRITER_LIMIT \
|
|
? "samples per remote writer limit exceeded" \
|
|
: (kind__) == PRES_REJECTED_BY_REMOTE_WRITER_SAMPLES_PER_VIRTUAL_QUEUE_LIMIT \
|
|
? "samples per remote writer in virtual queue limit exceeded" \
|
|
: (kind__) == PRES_REJECTED_BY_DECODE_FAILURE \
|
|
? "sample cannot be decoded" \
|
|
: "unknown"
|
|
|
|
typedef enum {
|
|
/*e
|
|
* Sample is not lost.
|
|
*/
|
|
PRES_NOT_LOST,
|
|
/*e
|
|
* Sample is lost because the DataWriter removes it from its cache.
|
|
*/
|
|
PRES_LOST_BY_WRITER,
|
|
/*e
|
|
* Sample is lost because instance limit is exceeded.
|
|
*/
|
|
PRES_LOST_BY_INSTANCE_LIMIT,
|
|
/*e
|
|
* Sample is lost because remote writers per instance limit is exceeded.
|
|
*/
|
|
PRES_LOST_BY_REMOTE_WRITERS_PER_INSTANCE_LIMIT,
|
|
/*e
|
|
* Sample is lost because the associated coherent set is not complete.
|
|
*/
|
|
PRES_LOST_BY_INCOMPLETE_COHERENT_SET,
|
|
/*e
|
|
* Sample is lost because it is part of a large coherent set.
|
|
*/
|
|
PRES_LOST_BY_LARGE_COHERENT_SET,
|
|
/*e
|
|
* Sample is lost because samples per remote writer limit is exceeded.
|
|
*/
|
|
PRES_LOST_BY_SAMPLES_PER_REMOTE_WRITER_LIMIT,
|
|
/*e
|
|
* Sample is lost because virtual writers limit is exceeded.
|
|
*/
|
|
PRES_LOST_BY_VIRTUAL_WRITERS_LIMIT,
|
|
/*e
|
|
* Sample is lost because remote writers per sample limit is exceeded.
|
|
*/
|
|
PRES_LOST_BY_REMOTE_WRITERS_PER_SAMPLE_LIMIT,
|
|
/*e
|
|
* Sample is lost because reliability timeout expires.
|
|
*/
|
|
PRES_LOST_BY_AVAILABILITY_WAITING_TIME,
|
|
/*
|
|
* Sample is lost because the number of samples for a remote writer in
|
|
* the virtual queue is exceeded.
|
|
*/
|
|
PRES_LOST_BY_REMOTE_WRITER_SAMPLES_PER_VIRTUAL_QUEUE_LIMIT,
|
|
/*
|
|
* Sample is lost because there was not enough memory to add the sample.
|
|
*/
|
|
PRES_LOST_BY_OUT_OF_MEMORY,
|
|
/*e
|
|
* Sample is lost because the instance is unknown.
|
|
*/
|
|
PRES_LOST_BY_UNKNOWN_INSTANCE,
|
|
/*e
|
|
* Sample is lost because it cannot be deserialized.
|
|
*/
|
|
PRES_LOST_BY_DESERIALIZATION_FAILURE,
|
|
/*e
|
|
* When using "Best Effort" reliability:
|
|
* Sample is lost because it cannot be decoded.
|
|
*/
|
|
PRES_LOST_BY_DECODE_FAILURE,
|
|
/*e
|
|
* When using "Best Effort" reliability:
|
|
* Sample is lost because sample per instance limit is exceeded.
|
|
*/
|
|
PRES_LOST_BY_SAMPLES_PER_INSTANCE_LIMIT,
|
|
/*e
|
|
* When using "Best Effort" reliability:
|
|
* Sample is lost because sample limit is exceeded.
|
|
*/
|
|
PRES_LOST_BY_SAMPLES_LIMIT
|
|
|
|
} PRESSampleLostStatusKind;
|
|
|
|
typedef enum {
|
|
/*e PRESInvalidQosPolicy */
|
|
PRES_INVALID_QOS_POLICY,
|
|
|
|
/*e PRESUserDataQosPolicy */
|
|
PRES_USER_DATA_QOS_POLICY,
|
|
|
|
/*e PRESDurabilityQosPolicy */
|
|
PRES_DURABILITY_QOS_POLICY,
|
|
|
|
/*e PRESPresentationQosPolicy */
|
|
PRES_PRESENTATION_QOS_POLICY,
|
|
|
|
/*e PRESDeadlineQosPolicy */
|
|
PRES_DEADLINE_QOS_POLICY,
|
|
|
|
/*e PRESLatencyBudgetQosPolicy */
|
|
PRES_LATENCY_BUDGET_QOS_POLICY,
|
|
|
|
/*e PRESOwnershipQosPolicy */
|
|
PRES_OWNERSHIP_QOS_POLICY,
|
|
|
|
/*e PRESOwnershipStrengthQosPolicy */
|
|
PRES_OWNERSHIP_STRENGTH_QOS_POLICY,
|
|
|
|
/*e PRESLivelinessQosPolicy */
|
|
PRES_LIVELINESS_QOS_POLICY,
|
|
|
|
/*e PRESTimeBasedFilterQosPolicy */
|
|
PRES_TIME_BASED_FILTER_QOS_POLICY,
|
|
|
|
/*e PRESPartitionQosPolicy */
|
|
PRES_PARTITION_QOS_POLICY,
|
|
|
|
/*e PRESReliabilityQosPolicy */
|
|
PRES_RELIABILITY_QOS_POLICY,
|
|
|
|
/*e PRESDestinationOrderQosPolicy */
|
|
PRES_DESTINATION_ORDER_QOS_POLICY,
|
|
|
|
/*e PRESHistoryQosPolicy */
|
|
PRES_HISTORY_QOS_POLICY,
|
|
|
|
/*e PRESResourceLimitsQosPolicy */
|
|
PRES_RESOURCE_LIMITS_QOS_POLICY,
|
|
|
|
/*e PRESContentFilterQosPolicy */
|
|
PRES_CONTENTFILTER_QOS_POLICY,
|
|
|
|
/*e PRESEntityFactoryQosPolicy */
|
|
PRES_ENTITY_FACTORY_QOS_POLICY,
|
|
|
|
/*e PRESWriterDataLifecycleQosPolicy */
|
|
PRES_WRITER_DATA_LIFECYCLE_QOS_POLICY,
|
|
|
|
/*e PRESReaderDataLifecycleQosPolicy */
|
|
PRES_READER_DATA_LIFECYCLE_QOS_POLICY,
|
|
|
|
/*e PRESTopicDataQosPolicy */
|
|
PRES_TOPIC_DATA_QOS_POLICY,
|
|
|
|
/*e PRESGroupDataQosPolicy */
|
|
PRES_GROUP_DATA_QOS_POLICY,
|
|
|
|
/*e PRESAsynchronousPublisherQosPolicy */
|
|
PRES_ASYNCHRONOUS_PUBLISHER_QOS_POLICY,
|
|
|
|
/*e PRESTransportPriorityQosPolicy */
|
|
PRES_TRANSPORT_PRIORITY_QOS_POLICY,
|
|
|
|
/*e PRESLifespanQosPolicy */
|
|
PRES_LIFESPAN_QOS_POLICY,
|
|
|
|
/*e PRESDurabilityServiceQosPolicy */
|
|
PRES_DURABILITY_SERVICE_QOS_POLICY,
|
|
|
|
/*e PRESPublishModeQosPolicy */
|
|
PRES_PUBLISH_MODE_QOS_POLICY,
|
|
|
|
/*e PRESServiceQosPolicy */
|
|
PRES_SERVICE_QOS_POLICY,
|
|
|
|
/*e PRESBatchQosPolicy */
|
|
PRES_BATCH_QOS_POLICY,
|
|
|
|
/*e PRESSLocatorFilterQosProperty */
|
|
PRES_LOCATOR_FILTER_QOS_POLICY,
|
|
|
|
/* PRESAvailabilityQosPolicy */
|
|
PRES_AVAILABILITY_QOS_POLICY,
|
|
|
|
/*e PRESTypeConsistencyEnforcementQosPolicy */
|
|
PRES_TYPE_CONSISTENCY_ENFORCEMENT_QOS_POLICY,
|
|
|
|
/*e PRESTopicQueryDispatchQosPolicy */
|
|
PRES_TOPIC_QUERY_DISPATCH_QOS_POLICY,
|
|
|
|
/*e PRESDataRepresentationQosPolicy */
|
|
PRES_DATA_REPRESENTATION_QOS_POLICY
|
|
} PRESQosPolicyId;
|
|
|
|
struct PRESQosPolicyCount {
|
|
/*e
|
|
ID for a participant qos policy.
|
|
*/
|
|
PRESQosPolicyId policyId;
|
|
/*e
|
|
Number of times in which the qos is incompatible.
|
|
*/
|
|
RTI_INT32 count;
|
|
};
|
|
|
|
|
|
/*e \ingroup PRESStatusModule
|
|
Policy index for reliability qos
|
|
*/
|
|
#define PRES_INCOMPATIBLE_RELIABILITY_QOS_POLICY_INDEX (0)
|
|
/*e \ingroup PRESStatusModule
|
|
Policy index for ownership qos
|
|
*/
|
|
#define PRES_INCOMPATIBLE_OWNERSHIP_QOS_POLICY_INDEX (1)
|
|
/*e \ingroup PRESStatusModule
|
|
Policy index for presentation qos
|
|
*/
|
|
#define PRES_INCOMPATIBLE_PRESENTATION_QOS_POLICY_INDEX (2)
|
|
/*e \ingroup PRESStatusModule
|
|
Policy index for liveliness qos
|
|
*/
|
|
#define PRES_INCOMPATIBLE_LIVELINESS_QOS_POLICY_INDEX (3)
|
|
/*e \ingroup PRESStatusModule
|
|
Policy index for durability qos
|
|
*/
|
|
#define PRES_INCOMPATIBLE_DURABILITY_QOS_POLICY_INDEX (4)
|
|
/*e \ingroup PRESStatusModule
|
|
Policy index for deadline qos
|
|
*/
|
|
#define PRES_INCOMPATIBLE_DEADLINE_QOS_POLICY_INDEX (5)
|
|
/*e \ingroup PRESStatusModule
|
|
Policy index for latency budget qos
|
|
*/
|
|
#define PRES_INCOMPATIBLE_LATENCY_BUDGET_QOS_POLICY_INDEX (6)
|
|
/*e \ingroup PRESStatusModule
|
|
Policy index for destination order qos
|
|
*/
|
|
#define PRES_INCOMPATIBLE_DESTINATION_ORDER_QOS_POLICY_INDEX (7)
|
|
/*e \ingroup PRESStatusModule
|
|
Policy index for data representation qos
|
|
*/
|
|
#define PRES_INCOMPATIBLE_DATA_REPRESENTATION_QOS_POLICY_INDEX (8)
|
|
/*e \ingroup PRESStatusModule
|
|
The maximum number of QoS that can be incompatible between reader and
|
|
writer pair.
|
|
*/
|
|
#define PRES_INCOMPATIBLE_QOS_POLICY_MAX (9)
|
|
|
|
|
|
/*e \ingroup PRESStatusModule
|
|
* Queue event index for queue empty
|
|
*/
|
|
#define PRES_QUEUE_EMPTY_QUEUE_EVENT_INDEX (0)
|
|
/*e \ingroup PRESStatusModule
|
|
* Queue event index for queue full
|
|
*/
|
|
#define PRES_QUEUE_FULL_QUEUE_EVENT_INDEX (1)
|
|
/*e \ingroup PRESStatusModule
|
|
* Queue event index for low water mark
|
|
*/
|
|
#define PRES_LOW_WATER_MARK_QUEUE_EVENT_INDEX (2)
|
|
/*e \ingroup PRESStatusModule
|
|
* Queue event index for high water mark
|
|
*/
|
|
#define PRES_HIGH_WATER_MARK_QUEUE_EVENT_INDEX (3)
|
|
/*e \ingroup PRESStatusModule
|
|
* The maximum number of (publication) reliable queue events.
|
|
*/
|
|
#define PRES_QUEUE_EVENT_MAX (4)
|
|
|
|
typedef enum {
|
|
/*e
|
|
Invalid queue event
|
|
*/
|
|
PRES_INVALID_QUEUE_EVENT = -1,
|
|
/*e
|
|
Queue empty (i.e. no unacknowledged samples)
|
|
*/
|
|
PRES_QUEUE_EMPTY_QUEUE_EVENT = PRES_QUEUE_EMPTY_QUEUE_EVENT_INDEX,
|
|
/*e
|
|
Queue full (i.e. all available samples are unacknowledged)
|
|
*/
|
|
PRES_QUEUE_FULL_QUEUE_EVENT = PRES_QUEUE_FULL_QUEUE_EVENT_INDEX,
|
|
/*e
|
|
Low water mark (i.e. number of unacknowledged samples has decreased
|
|
such that it has reached or fallen below user-specified low water mark.
|
|
*/
|
|
PRES_LOW_WATER_MARK_QUEUE_EVENT = PRES_LOW_WATER_MARK_QUEUE_EVENT_INDEX,
|
|
/*e
|
|
High water mark (i.e. number of unacknowledged samples has increased
|
|
such that it has reached or surpassed user-specified high water mark.
|
|
*/
|
|
PRES_HIGH_WATER_MARK_QUEUE_EVENT = PRES_HIGH_WATER_MARK_QUEUE_EVENT_INDEX
|
|
} PRESQueueEventId;
|
|
|
|
struct PRESQueueEventCount {
|
|
/*e
|
|
ID for a (publication) reliable queue event.
|
|
*/
|
|
PRESQueueEventId eventId;
|
|
/*e
|
|
Number of times the queue event has occurred.
|
|
*/
|
|
RTI_INT32 count;
|
|
/*e
|
|
The incremental number of times the queue event has occurred since the
|
|
last time the listener was called or the status was read.
|
|
*/
|
|
RTI_INT32 countChange;
|
|
};
|
|
|
|
struct PRESSampleLostStatus {
|
|
/*e
|
|
Total cumulative count of all samples lost across of instances of topics
|
|
subscribed by the subscriber
|
|
*/
|
|
RTI_INT32 totalCount;
|
|
/*e
|
|
The incremental number of samples lost since the last time the
|
|
listener was called or the status was read.
|
|
*/
|
|
RTI_INT32 totalCountChange;
|
|
/*e
|
|
Reason for losing the last sample
|
|
*/
|
|
PRESSampleLostStatusKind lastReason;
|
|
};
|
|
|
|
struct PRESInconsistentTopicStatus {
|
|
/*e
|
|
* Total count.
|
|
*/
|
|
RTI_INT32 totalCount;
|
|
|
|
/*e
|
|
* Total count change.
|
|
*/
|
|
RTI_INT32 totalCountChange;
|
|
};
|
|
|
|
|
|
#define PRESInconsistentTopicStatus_INITIALIZER { \
|
|
0 /* totalCount */, \
|
|
0 /* totalCountChange */ \
|
|
}
|
|
|
|
struct PRESRequestedIncompatibleQosStatus {
|
|
/*e
|
|
Total cumulative count taht concerned data reader discovered a
|
|
data writer for the same topic with an offered qos that is
|
|
incompatible with that requested by the data reader
|
|
*/
|
|
RTI_INT32 totalCount;
|
|
/*e
|
|
The change in total count since the last time the listener was
|
|
called or the status was read
|
|
*/
|
|
RTI_INT32 totalCountChange;
|
|
/*e
|
|
The policy id of one of the policies that was found to be incompatible
|
|
the last me an incompatibility was detected.
|
|
*/
|
|
PRESQosPolicyId lastPolicyId;
|
|
/*e
|
|
A list containing for each policy the total number of times that
|
|
the concerned data reader discovered a data writer for the
|
|
same topic with an offered qos that is incompatible with that requested
|
|
by the data reader.
|
|
*/
|
|
struct PRESQosPolicyCount policies[PRES_INCOMPATIBLE_QOS_POLICY_MAX];
|
|
};
|
|
|
|
struct PRESLivelinessLostStatus {
|
|
/*e
|
|
Total cumulative count of hte number of times the data writer failed
|
|
to actively signal its liveliness within the offered liveliness period.
|
|
*/
|
|
RTI_INT32 totalCount;
|
|
/*e
|
|
The change in total count since the last itme the listener was called
|
|
or the status was read.
|
|
*/
|
|
RTI_INT32 totalCountChange;
|
|
};
|
|
|
|
struct PRESOfferedIncompatibleQosStatus {
|
|
/*e
|
|
The total cumulative count the concerned data writer discovered a
|
|
data reader for the same topic with a requested QoS that is
|
|
incompatible with that offered by the data writer.
|
|
*/
|
|
RTI_INT32 totalCount;
|
|
/*e
|
|
The change in total count since the last time the listener was
|
|
called or the status was read.
|
|
*/
|
|
RTI_INT32 totalCountChange;
|
|
/*e
|
|
The policy ID of one of the policies that was found to be incompatible
|
|
the last time an incompatiblity was detected.
|
|
*/
|
|
PRESQosPolicyId lastPolicyId;
|
|
/*e
|
|
A list containing for each policy the total numbre of times that
|
|
the concerned data writer discovered a data reader for the same topic
|
|
with a requested QoS that is incompatible with
|
|
that offered by the data writer
|
|
*/
|
|
struct PRESQosPolicyCount policies[PRES_INCOMPATIBLE_QOS_POLICY_MAX];
|
|
};
|
|
|
|
struct PRESLivelinessUpdatedStatus {
|
|
/*e
|
|
Last guid of the remote writer whose liveliness has be updated.
|
|
*/
|
|
struct MIGRtpsGuid lastGuid;
|
|
};
|
|
|
|
struct PRESPublicationReliableQueueStatus {
|
|
/*e
|
|
The id of the last event on the reliable queue.
|
|
*/
|
|
PRESQueueEventId lastQueueEventId;
|
|
/*e
|
|
A list containing for each queue event the total number of times that
|
|
event has occurred and the incremental number of times since the
|
|
listener was called or the status was read.
|
|
*/
|
|
struct PRESQueueEventCount queueEvents[PRES_QUEUE_EVENT_MAX];
|
|
/*e
|
|
The total number of unacknowledged samples in the reliable writer queue.
|
|
*/
|
|
RTI_INT32 unacknowledgedSampleCount;
|
|
/*e
|
|
The maximum number of unacknowledged samples in the reliable writer queue.
|
|
*/
|
|
RTI_INT32 unacknowledgedSampleCountPeak;
|
|
/*e
|
|
The total number of unacknowledged samples replaced in the reliable writer
|
|
queue due to KEEP_LAST history depth limit.
|
|
*/
|
|
RTI_INT64 replacedUnacknowledgedSampleCount;
|
|
};
|
|
|
|
typedef enum {
|
|
/*e
|
|
Indicates invalid sample state
|
|
*/
|
|
PRES_SAMPLE_STATE_INVALID = 0,
|
|
/*e
|
|
Indicates read sample state
|
|
*/
|
|
PRES_SAMPLE_STATE_READ = 0x0001 << 0,
|
|
/*e
|
|
Indicates not read sample state
|
|
*/
|
|
PRES_SAMPLE_STATE_NOT_READ = 0x0001 << 1
|
|
} PRESSampleStateKind;
|
|
|
|
typedef enum {
|
|
/*e
|
|
Indicates invalid view state
|
|
*/
|
|
PRES_VIEW_STATE_INVALID = 0,
|
|
/*e
|
|
Indicates new view state
|
|
*/
|
|
PRES_VIEW_STATE_NEW = 0x0001 << 0,
|
|
/*e
|
|
Indicates not new view state
|
|
*/
|
|
PRES_VIEW_STATE_NOT_NEW = 0x0001 << 1
|
|
} PRESViewStateKind;
|
|
|
|
typedef enum {
|
|
/*e
|
|
Indicates invalid instance state
|
|
*/
|
|
PRES_INSTANCE_STATE_INVALID = 0,
|
|
/*e
|
|
Indicates alive instance state
|
|
*/
|
|
PRES_INSTANCE_STATE_ALIVE = 0x0001 << 0,
|
|
/*e
|
|
Indicates not alive disposed instance state
|
|
*/
|
|
PRES_INSTANCE_STATE_NOT_ALIVE_DISPOSED = 0x0001 << 1,
|
|
/*e
|
|
Indicates not alive no writers instance state
|
|
*/
|
|
PRES_INSTANCE_STATE_NOT_ALIVE_NO_WRITERS = 0x0001 << 2
|
|
} PRESInstanceStateKind;
|
|
|
|
typedef enum {
|
|
/*e
|
|
Indicates invalid stream kind
|
|
*/
|
|
PRES_STREAM_KIND_INVALID = 0,
|
|
/*e
|
|
Indicates live stream kind
|
|
*/
|
|
PRES_STREAM_KIND_LIVE = 0x0001 << 0,
|
|
/*e
|
|
Indicates topic query stream kind
|
|
*/
|
|
PRES_STREAM_KIND_TOPIC_QUERY = 0x0001 << 1
|
|
} PRESStreamKind;
|
|
|
|
struct PRESIeeeTime {
|
|
/*e Seconds */
|
|
RTI_INT64 sec;
|
|
/*e Nano seconds */
|
|
RTI_UINT32 nanosec;
|
|
};
|
|
|
|
|
|
/*e \ingroup PRESCommonModule
|
|
Invalid IEEE time
|
|
*/
|
|
#define PRES_IEEE_TIME_INVALID { -1LL, 0xffffffffU }
|
|
|
|
extern PRESDllExport
|
|
int PRESIeeeTime_compare(const struct PRESIeeeTime left,
|
|
const struct PRESIeeeTime right);
|
|
|
|
struct PRESOctetGuid {
|
|
RTI_UINT8 value[16];
|
|
};
|
|
|
|
|
|
#define PRES_OCTET_GUID_ZERO {{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }}
|
|
|
|
|
|
#define PRES_OCTET_GUID_UNKNOWN PRES_OCTET_GUID_ZERO
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESOctetGuid_isZero(
|
|
const struct PRESOctetGuid * self);
|
|
|
|
extern PRESDllExport
|
|
void PRESOctetGuid_setZero(
|
|
struct PRESOctetGuid * self);
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESOctetGuid_isUnknown(
|
|
const struct PRESOctetGuid * self);
|
|
|
|
extern PRESDllExport
|
|
void PRESOctetGuid_setUnknown(
|
|
struct PRESOctetGuid * self);
|
|
|
|
extern PRESDllExport
|
|
void PRESOctetGuid_from_mig_guid(
|
|
struct PRESOctetGuid * self,
|
|
const struct MIGRtpsGuid * other);
|
|
|
|
extern PRESDllExport
|
|
void PRESOctetGuid_copy(
|
|
struct PRESOctetGuid * dst,
|
|
const struct PRESOctetGuid * src);
|
|
|
|
extern PRESDllExport
|
|
int PRESOctetGuid_compare(
|
|
const struct PRESOctetGuid * self,
|
|
const struct PRESOctetGuid * other);
|
|
|
|
extern PRESDllExport
|
|
void PRESOctetGuid_to_mig_guid(
|
|
const struct PRESOctetGuid * self,
|
|
struct MIGRtpsGuid * other);
|
|
|
|
|
|
|
|
/*e \ingroup PRESSampleStateModule
|
|
Read sample state mask
|
|
*/
|
|
#define PRES_SAMPLE_STATE_MASK_BIT_READ (0x00000001UL)
|
|
/*e \ingroup PRESSampleStateModule
|
|
Not read sample state mask
|
|
*/
|
|
#define PRES_SAMPLE_STATE_MASK_BIT_NOT_READ (0x00000002UL)
|
|
/*e \ingroup PRESSampleStateModule
|
|
All sample states mask
|
|
*/
|
|
#define PRES_SAMPLE_STATE_MASK_ALL (0xffffffffU)
|
|
|
|
/*e \ingroup PRESViewStateModule
|
|
New view state mask
|
|
*/
|
|
#define PRES_VIEW_STATE_MASK_BIT_NEW (0x00000001UL)
|
|
/*e \ingroup PRESViewStateModule
|
|
Not new view state mask
|
|
*/
|
|
#define PRES_VIEW_STATE_MASK_BIT_NOT_NEW (0x00000002UL)
|
|
/*e \ingroup PRESViewStateModule
|
|
All view states mask
|
|
*/
|
|
#define PRES_VIEW_STATE_MASK_ALL (0xffffffffU)
|
|
|
|
/*e \ingroup PRESInstanceStateModule
|
|
Alive instance state mask
|
|
*/
|
|
#define PRES_INSTANCE_STATE_MASK_BIT_ALIVE (0x00000001UL)
|
|
/*e \ingroup PRESInstanceStateModule
|
|
Not alive disposed instance state mask
|
|
*/
|
|
#define PRES_INSTANCE_STATE_MASK_BIT_NOT_ALIVE_DISPOSED (0x00000002UL)
|
|
/*e \ingroup PRESInstanceStateModule
|
|
Not alive no writers instance state mask
|
|
*/
|
|
#define PRES_INSTANCE_STATE_MASK_BIT_NOT_ALIVE_NO_WRITERS (0x00000004UL)
|
|
/*e \ingroup PRESInstanceStateModule
|
|
Not alive instance state mask
|
|
*/
|
|
#define PRES_INSTANCE_STATE_MASK_BIT_NOT_ALIVE (0x00000006UL)
|
|
/*e \ingroup PRESInstanceStateModule
|
|
All instance states mask
|
|
*/
|
|
#define PRES_INSTANCE_STATE_MASK_ALL (0xffffffffU)
|
|
/*e \ingroup PRESStreamKindModule
|
|
Live stream kind mask
|
|
*/
|
|
#define PRES_STREAM_KIND_MASK_BIT_LIVE (0x00000001UL)
|
|
|
|
/*e \ingroup PRESStreamKindModule
|
|
TopicQuery stream kind mask
|
|
*/
|
|
#define PRES_STREAM_KIND_MASK_BIT_TOPIC_QUERY (0x00000002UL)
|
|
|
|
/*e \ingroup PRESStreamKindModule
|
|
Stream kind mask
|
|
*/
|
|
#define PRES_STREAM_KIND_MASK_ALL (0xffffffffU)
|
|
|
|
typedef RTI_UINT32 PRESSampleStateMask;
|
|
|
|
typedef RTI_UINT32 PRESViewStateMask;
|
|
|
|
typedef RTI_UINT32 PRESInstanceStateMask;
|
|
|
|
typedef RTI_UINT32 PRESStreamKindMask;
|
|
|
|
|
|
/*e \ingroup PRESErrorModule
|
|
No error
|
|
*/
|
|
#define PRES_RETURN_OK /* (0) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 0)
|
|
/*e \ingroup PRESErrorModule
|
|
Generic error
|
|
*/
|
|
#define PRES_RETURN_ERROR /* (1) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 1)
|
|
/*e \ingroup PRESErrorModule
|
|
Unsupported feature
|
|
*/
|
|
#define PRES_RETURN_UNSUPPORTED /* (2) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 2)
|
|
/*e \ingroup PRESErrorModule
|
|
Running out of resources
|
|
*/
|
|
#define PRES_RETURN_OUT_OF_RESOURCES /* (3) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 3)
|
|
/*e \ingroup PRESErrorModule
|
|
entity not enabled
|
|
*/
|
|
#define PRES_RETURN_NOT_ENABLED /* (4) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 4)
|
|
/*e \ingroup PRESErrorModule
|
|
Cannot change immutable policy
|
|
*/
|
|
#define PRES_RETURN_IMMUTABLE_POLICY /* (5) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 5)
|
|
/*e \ingroup PRESErrorModule
|
|
Policies are inconsistent
|
|
*/
|
|
#define PRES_RETURN_INCONSISTENT_POLICY /* (6) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 6)
|
|
/*e \ingroup PRESErrorModule
|
|
Try to destroy entities that is not empty
|
|
*/
|
|
#define PRES_RETURN_ENTITY_NOT_EMPTY /* (7) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 7)
|
|
/*e \ingroup PRESErrorModule
|
|
Entity not found in factory
|
|
*/
|
|
#define PRES_RETURN_NOT_FOUND /* (8) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 8)
|
|
/*e \ingroup PRESErrorModule
|
|
Instance not found
|
|
*/
|
|
#define PRES_RETURN_NO_INSTANCE /* (9) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 9)
|
|
/*e \ingroup PRESErrorModule
|
|
Timeout
|
|
*/
|
|
#define PRES_RETURN_TIMEOUT /* (10) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 10)
|
|
/*e \ingroup PRESErrorModule
|
|
record already exists
|
|
*/
|
|
#define PRES_RETURN_ALREADY_EXISTS /* (11) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 11)
|
|
/*e \ingroup PRESErrorModule
|
|
Source timestamp is out of order. */
|
|
#define PRES_RETURN_TIMESTAMP_OUT_OF_ORDER /* (12) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 12)
|
|
/*e \ingroup PRESErrorModule
|
|
Bad parameter.
|
|
*/
|
|
#define PRES_RETURN_BAD_PARAMETER /* (13) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 13)
|
|
/*e \ingroup PRESErrorModule
|
|
Waitset has a thread blocking on it already.
|
|
*/
|
|
#define PRES_RETURN_WAITSET_BLOCKED /* (14) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 14)
|
|
/*e \ingroup PRESErrorModule
|
|
Condition not attached to waitset
|
|
*/
|
|
#define PRES_RETURN_CONDITION_NOT_ATTACHED /* (15) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 15)
|
|
/*e \ingroup PRESErrorModule
|
|
No coherent set.
|
|
*/
|
|
#define PRES_RETURN_NO_COHERENT_SET /* (16) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 16)
|
|
/*e \ingroup PRESErrorModule
|
|
No call to suspendPublications.
|
|
*/
|
|
#define PRES_RETURN_NO_SUSPEND_PUBLICATIONS_CALL /* (17) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 17)
|
|
/*e \ingroup PRESErrorModule
|
|
No coherent set.
|
|
*/
|
|
#define PRES_RETURN_NO_BEGIN_ACCESS_CALL /* (18) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 18)
|
|
/*e \ingroup PRESErrorModule
|
|
entity ignored by user
|
|
*/
|
|
#define PRES_RETURN_IGNORED /* (19) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 19)
|
|
/*e \ingroup PRESErrorModule
|
|
Precondition not met
|
|
*/
|
|
#define PRES_RETURN_PRECONDITION_NOT_MET /* (20) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 20)
|
|
/*e \ingroup PRESErrorModule
|
|
Collator is full
|
|
*/
|
|
#define PRES_RETURN_FULL /* (21) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 21)
|
|
/*e \ingroup PRESErrorModule
|
|
Sequence number is out of order. */
|
|
#define PRES_RETURN_SEQUENCE_OUT_OF_ORDER /* (22) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 22)
|
|
/*e \ingroup PRESErrorModule
|
|
participant ignored by user (remote_peer)
|
|
*/
|
|
#define PRES_RETURN_REMOVED_LOCATOR /* (23) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 23)
|
|
/*e \ingroup PRESErrorModule
|
|
* notifying discovery plugins of remote participant is pending authorization,
|
|
* and therefore endpoint discovery should not be triggered yet.
|
|
*/
|
|
#define PRES_RETURN_PENDING_AUTHORIZATION /* (24) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 24)
|
|
/*e \ingroup PRESErrorModule
|
|
* PsWriter_flush notifying PsWriter_writeBatchInternal that encoding failed.
|
|
*/
|
|
#define PRES_RETURN_ENCODE_FAILURE /* (25) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 25)
|
|
/*e \ingroup PRESErrorModule
|
|
* notifying discovery plugins that the remote participant partition does not
|
|
* match with the local participant partition and therefore discovery should
|
|
* be ignored.
|
|
*/
|
|
#define PRES_RETURN_NOT_MATCHING_PARTITION /* (26) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 26)
|
|
/*e \ingroup PRESErrorModule
|
|
* Notifying discovery plugins that the remote participant does not have
|
|
* compatible vendor_builtin_endpoints and therefore discovery should be
|
|
* ignored.
|
|
*/
|
|
#define PRES_RETURN_NOT_MATCHING_VENDOR_BUILTIN_ENDPOINTS /* (27) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 27)
|
|
/*e \ingroup PRESErrorModule
|
|
* Return value to indicate that two endpoints have a match but are
|
|
* incompatible (either due to QoS or security)
|
|
*/
|
|
#define PRES_RETURN_INCOMPATIBLE /* (28) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 28)
|
|
/*e \ingroup PRESErrorModule
|
|
* notifying discovery plugins that the remote participant exceeds the
|
|
* participant limit and therefore discovery should be ignored.
|
|
*/
|
|
#define PRES_RETURN_EXCEEDS_PARTICIPANT_LIMIT /* (29) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 29)
|
|
|
|
/*e \ingroup PRESErrorModule
|
|
* notifying we have exceeded the remote endpoint limit and therefore the
|
|
* remote endpoint should be ignored.
|
|
*/
|
|
#define PRES_RETURN_EXCEEDS_ENDPOINT_LIMIT /* (30) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 30)
|
|
|
|
/*e \ingroup PRESErrorModule
|
|
* notifying that an operation is not allowed by the Security Extensions.
|
|
*/
|
|
#define PRES_RETURN_NOT_ALLOWED_BY_SECURITY /* (31) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 31)
|
|
|
|
/*e \ingroup PRESErrorModule
|
|
* notifying that a requested operation is unknown.
|
|
*/
|
|
#define PRES_RETURN_UNKNOWN_OPERATION /* (32) */ \
|
|
RTI_LOG_formSubmoduleSpecificNumber(MODULE_PRES, SUBMODULE_PRES_COMMON, 32)
|
|
|
|
|
|
#define PRESReturn_isIgnored(return__) \
|
|
((return__) == PRES_RETURN_IGNORED \
|
|
|| (return__) == PRES_RETURN_EXCEEDS_ENDPOINT_LIMIT \
|
|
|| (return__) == PRES_RETURN_NOT_MATCHING_VENDOR_BUILTIN_ENDPOINTS \
|
|
|| (return__) == PRES_RETURN_NOT_MATCHING_PARTITION \
|
|
|| (return__) == PRES_RETURN_REMOVED_LOCATOR \
|
|
|| (return__) == PRES_RETURN_OUT_OF_RESOURCES \
|
|
|| (return__) == PRES_RETURN_EXCEEDS_PARTICIPANT_LIMIT \
|
|
|| (return__) == PRES_RETURN_NOT_FOUND)
|
|
|
|
|
|
#define PRESReturn_isIgnoredByUserOrLimit(return__) \
|
|
((return__) == PRES_RETURN_IGNORED \
|
|
|| (return__) == PRES_RETURN_EXCEEDS_ENDPOINT_LIMIT \
|
|
|| (return__) == PRES_RETURN_EXCEEDS_PARTICIPANT_LIMIT)
|
|
|
|
extern PRESDllExport
|
|
const char * PRESFailReason_toStr(int failReason);
|
|
|
|
typedef union RTIOsapiAlignmentUnionOfAllDataTypes PRESWord;
|
|
|
|
typedef enum {
|
|
/*e
|
|
* Created
|
|
*/
|
|
PRES_ENTITY_STATE_CREATED,
|
|
|
|
/*e
|
|
* Enabled.
|
|
*/
|
|
PRES_ENTITY_STATE_ENABLED,
|
|
|
|
/*e
|
|
* Ready to be destroyed.
|
|
*/
|
|
PRES_ENTITY_STATE_PREDESTROY,
|
|
|
|
/*e
|
|
* Destroyed.
|
|
*/
|
|
PRES_ENTITY_STATE_DESTROYED
|
|
|
|
} PRESEntityState;
|
|
|
|
struct PRESStatusCondition {
|
|
struct PRESCondition _base;
|
|
/* A bitmask representing the statuses enabled on this Status Condition */
|
|
PRESStatusKindMask _statusMask;
|
|
/*
|
|
* A bitmask representing the bits that must be reset in order for the
|
|
* triggerValue to be reset.
|
|
*/
|
|
PRESStatusKindMask _resetStatusMask;
|
|
};
|
|
|
|
struct PRESEntity {
|
|
/*i enabled state */
|
|
PRESEntityState state;
|
|
/*i Global unique identifier for the entity */
|
|
struct MIGRtpsGuid guid;
|
|
/*i Participant to which entity belongs */
|
|
struct PRESParticipant *participant;
|
|
/*i status condition which belongs to this entity */
|
|
struct PRESStatusCondition statusCondition;
|
|
/*i Pointer to user object stored with entity */
|
|
PRESWord *userObject;
|
|
};
|
|
|
|
typedef RTICdrUnsignedLong PRESEndpointRtiSecurityAttributesBitmask;
|
|
|
|
typedef RTICdrUnsignedLong PRESEndpointSecurityAttributesBitmask;
|
|
|
|
typedef RTICdrUnsignedLong PRESPluginEndpointSecurityAttributesBitmask;
|
|
|
|
|
|
|
|
#define PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_READ_PROTECTED \
|
|
(0x00000001U << 0)
|
|
#define PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_WRITE_PROTECTED \
|
|
(0x00000001U << 1)
|
|
#define PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_DISCOVERY_PROTECTED \
|
|
(0x00000001U << 2)
|
|
#define PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_SUBMESSAGE_PROTECTED \
|
|
(0x00000001U << 3)
|
|
#define PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_PAYLOAD_PROTECTED \
|
|
(0x00000001U << 4)
|
|
#define PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_KEY_PROTECTED \
|
|
(0x00000001U << 5)
|
|
#define PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_LIVELINESS_PROTECTED \
|
|
(0x00000001U << 6)
|
|
#define PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_VALID (0x00000001U << 31)
|
|
|
|
#define PRES_ENDPOINT_SECURITY_ATTRIBUTES_BITMASK_DEFAULT 0
|
|
#define PRES_PLUGIN_ENDPOINT_SECURITY_ATTRIBUTES_BITMASK_DEFAULT 0
|
|
|
|
#define PRES_ENDPOINT_SECURITY_ATTRIBUTES_BITMASK_IS_ENCODING \
|
|
(PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_SUBMESSAGE_PROTECTED \
|
|
| PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_PAYLOAD_PROTECTED)
|
|
|
|
|
|
#define PRESEndpointSecurityAttributesBitmask_isValid(att__) \
|
|
(((att__) & PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_VALID) != 0)
|
|
|
|
#define PRESEndpointSecurityAttributesBitmask_isReadProtected(att__) \
|
|
(PRESEndpointSecurityAttributesBitmask_isValid(att__) \
|
|
&& (((att__) & PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_READ_PROTECTED) != 0))
|
|
|
|
#define PRESEndpointSecurityAttributesBitmask_isWriteProtected(att__) \
|
|
(PRESEndpointSecurityAttributesBitmask_isValid(att__) \
|
|
&& (((att__) & PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_WRITE_PROTECTED) != 0))
|
|
|
|
#define PRESEndpointSecurityAttributesBitmask_isAccessProtected(att__, endpointType) \
|
|
(((endpointType) == MIG_RTPS_RW_TYPE_READER) \
|
|
? (PRESEndpointSecurityAttributesBitmask_isReadProtected(att__)) \
|
|
: (((endpointType) == MIG_RTPS_RW_TYPE_WRITER) \
|
|
? (PRESEndpointSecurityAttributesBitmask_isWriteProtected(att__)) \
|
|
: RTI_FALSE) \
|
|
)
|
|
|
|
#define PRESEndpointSecurityAttributesBitmask_isDiscoveryProtected(att__) \
|
|
(PRESEndpointSecurityAttributesBitmask_isValid(att__) \
|
|
&& (((att__) & PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_DISCOVERY_PROTECTED) != 0))
|
|
|
|
#define PRESEndpointSecurityAttributesBitmask_isSubmessageProtected(att__) \
|
|
(PRESEndpointSecurityAttributesBitmask_isValid(att__) \
|
|
&& (((att__) & PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_SUBMESSAGE_PROTECTED) != 0))
|
|
|
|
#define PRESEndpointSecurityAttributesBitmask_isPayloadProtected(att__) \
|
|
(PRESEndpointSecurityAttributesBitmask_isValid(att__) \
|
|
&& (((att__) & PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_PAYLOAD_PROTECTED) != 0))
|
|
|
|
#define PRESEndpointSecurityAttributesBitmask_isKeyProtected(att__) \
|
|
(PRESEndpointSecurityAttributesBitmask_isValid(att__) \
|
|
&& (((att__) & PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_KEY_PROTECTED) != 0))
|
|
|
|
#define PRESEndpointSecurityAttributesBitmask_isLivelinessProtected(att__) \
|
|
(PRESEndpointSecurityAttributesBitmask_isValid(att__) \
|
|
&& ((att__ & PRES_ENDPOINT_SECURITY_ATTRIBUTES_FLAG_IS_LIVELINESS_PROTECTED) != 0))
|
|
|
|
#define PRESEndpointSecurityAttributesBitmask_isEncoding(att__) \
|
|
(PRESEndpointSecurityAttributesBitmask_isValid(att__) \
|
|
&& (((att__) & PRES_ENDPOINT_SECURITY_ATTRIBUTES_BITMASK_IS_ENCODING) != 0))
|
|
|
|
#define PRESEndpointSecurityAttributesBitmask_compare(left, right) \
|
|
(!PRESEndpointSecurityAttributesBitmask_isValid(left) \
|
|
&& !PRESEndpointSecurityAttributesBitmask_isValid(right) ? 0 : \
|
|
REDAOrderedDataType_compareInt(&(left), &(right)))
|
|
|
|
#define PRESEndpointSecurityAttributesBitmask_isSubmessageOrPayloadProtected(att__) \
|
|
(PRESEndpointSecurityAttributesBitmask_isSubmessageProtected((att__)) \
|
|
|| PRESEndpointSecurityAttributesBitmask_isPayloadProtected(att__))
|
|
|
|
#define PRESEndpointSecurityProtectionInfo_isDefault(info) \
|
|
((info)->bitmask == PRES_ENDPOINT_SECURITY_ATTRIBUTES_BITMASK_DEFAULT \
|
|
&& (info)->pluginBitmask == PRES_PLUGIN_ENDPOINT_SECURITY_ATTRIBUTES_BITMASK_DEFAULT)
|
|
|
|
#define PRESEndpointSecurityProtectionInfo_compare(left, right) \
|
|
(PRESEndpointSecurityAttributesBitmask_compare( \
|
|
(left)->bitmask, \
|
|
(right)->bitmask) != 0 \
|
|
? PRESEndpointSecurityAttributesBitmask_compare( \
|
|
(left)->bitmask, \
|
|
(right)->bitmask) \
|
|
: PRESEndpointSecurityAttributesBitmask_compare( \
|
|
(left)->pluginBitmask, \
|
|
(right)->pluginBitmask))
|
|
|
|
#define PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_FLAG_IS_ACCESS_PROTECTED \
|
|
(0x00000001U << 0)
|
|
#define PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_FLAG_IS_DISCOVERY_PROTECTED \
|
|
(0x00000001U << 1)
|
|
#define PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_FLAG_IS_SUBMESSAGE_PROTECTED \
|
|
(0x00000001U << 2)
|
|
#define PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_IS_PAYLOAD_SIGNED \
|
|
(0x00000001U << 3)
|
|
#define PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_IS_PAYLOAD_ENCRYPTED \
|
|
(0x00000001U << 4)
|
|
#define PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_IS_LIVELINESS_PROTECTED \
|
|
(0x00000001U << 5)
|
|
#define PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_IS_NON_PROPAGABLE \
|
|
(0x00000001U << 30)
|
|
#define PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_IS_INVALID (0x00000001U << 31)
|
|
|
|
#define PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_BITMASK_NONE 0
|
|
#define PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_BITMASK_DEFAULT \
|
|
PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_IS_INVALID
|
|
|
|
#define PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_BITMASK_IS_ENCODING \
|
|
(PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_FLAG_IS_SUBMESSAGE_PROTECTED \
|
|
| PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_IS_PAYLOAD_SIGNED \
|
|
| PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_IS_PAYLOAD_ENCRYPTED)
|
|
|
|
#define PRESEndpointRtiSecurityAttributesBitmask_isPropagable(att) \
|
|
(((att) & PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_IS_NON_PROPAGABLE) == 0)
|
|
|
|
#define PRESEndpointRtiSecurityAttributesBitmask_isValid(att) \
|
|
(((att) & PRES_ENDPOINT_RTI_SECURITY_ATTRIBUTES_IS_INVALID) == 0)
|
|
|
|
extern PRESDllExport
|
|
PRESEndpointRtiSecurityAttributesBitmask
|
|
PRESEndpointSecurityAttributesBitmask_toRtiSecurityAttributesBitmask(
|
|
PRESEndpointSecurityAttributesBitmask att,
|
|
MIGRtpsRWType endpointType);
|
|
|
|
extern PRESDllExport
|
|
PRESEndpointSecurityAttributesBitmask
|
|
PRESEndpointSecurityAttributesBitmask_fromRtiSecurityAttributesBitmask(
|
|
PRESEndpointRtiSecurityAttributesBitmask rtiAtt);
|
|
|
|
struct PRESEndpointSecurityProtectionInfo {
|
|
PRESEndpointSecurityAttributesBitmask bitmask;
|
|
PRESPluginEndpointSecurityAttributesBitmask pluginBitmask;
|
|
};
|
|
|
|
|
|
#define PRESEndpointSecurityProtectionInfo_INITIALIZER { \
|
|
PRES_ENDPOINT_SECURITY_ATTRIBUTES_BITMASK_DEFAULT, \
|
|
PRES_PLUGIN_ENDPOINT_SECURITY_ATTRIBUTES_BITMASK_DEFAULT \
|
|
}
|
|
|
|
/* Mapping to avoid security nomenclature in dds_c.1.0 */
|
|
#define PRESEndpointTrustProtectionInfo_INITIALIZER \
|
|
PRESEndpointSecurityProtectionInfo_INITIALIZER
|
|
|
|
typedef RTICdrUnsignedLong PRESSecurityCryptoAlgorithmBit;
|
|
|
|
|
|
#define PRES_SECURITY_CRYPTO_ALGORITHM_BIT_COMPATIBILITY_MODE (0x1U << 31)
|
|
|
|
typedef RTICdrUnsignedLong PRESSecurityCryptoAlgorithmSet;
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESSecurityCryptoAlgorithmSet_isCompatible(
|
|
PRESSecurityCryptoAlgorithmSet supportedMask,
|
|
PRESSecurityCryptoAlgorithmSet requiredMask,
|
|
RTIBool isNonRtiVendor);
|
|
|
|
|
|
|
|
#define PRES_SECURITY_CRYPTO_ALGORITHM_SET_ALL (0xFFFFFFFF)
|
|
#define PRES_SECURITY_CRYPTO_ALGORITHM_SET_EMPTY (0x00000000)
|
|
|
|
/*
|
|
* The 0x7FF0000U value comes from:
|
|
* - Lowest vendor-specific algorithm: 0x1U << 16U
|
|
* - Highest vendor-specific algorithm: 0x1U << 30U
|
|
* If any of those bits is set, the macro will return true.
|
|
*/
|
|
#define PRESSecurityCryptoAlgorithmSet_containsVendorSpecific(mask__) \
|
|
(((mask__) & 0x7FF0000U) != 0)
|
|
#define PRESSecurityCryptoAlgorithmSet_containsStandard(mask__) \
|
|
(((mask__) & 0x000FFFFU) != 0)
|
|
|
|
#define PRESSecurityCryptoAlgorithmSet_isPairCompatible( \
|
|
supportedMaskA__, \
|
|
requiredMaskA__, \
|
|
supportedMaskB__, \
|
|
requiredMaskB__, \
|
|
isNonRtiVendor__) \
|
|
( \
|
|
PRESSecurityCryptoAlgorithmSet_isCompatible( \
|
|
(supportedMaskB__), \
|
|
(requiredMaskA__), \
|
|
(isNonRtiVendor__)) \
|
|
&& PRESSecurityCryptoAlgorithmSet_isCompatible( \
|
|
(supportedMaskA__), \
|
|
(requiredMaskB__), \
|
|
(isNonRtiVendor__)) \
|
|
)
|
|
|
|
|
|
typedef struct PRESSecurityCryptoAlgorithmRequirements {
|
|
PRESSecurityCryptoAlgorithmSet supportedMask;
|
|
PRESSecurityCryptoAlgorithmSet requiredMask;
|
|
} PRESSecurityCryptoAlgorithmRequirements;
|
|
|
|
|
|
#define PRESSecurityCryptoAlgorithmRequirements_isPairCompatible( \
|
|
algoReqA__, \
|
|
algoReqB__, \
|
|
isNonRtiVendor__) \
|
|
( \
|
|
PRESSecurityCryptoAlgorithmSet_isPairCompatible( \
|
|
(algoReqA__).supportedMask, \
|
|
(algoReqA__).requiredMask, \
|
|
(algoReqB__).supportedMask, \
|
|
(algoReqB__).requiredMask, \
|
|
(isNonRtiVendor__)) \
|
|
)
|
|
|
|
|
|
/*
|
|
* Algorithms reserved for the DDS Security specification have a value of
|
|
* [0x00000001, 0x00010000) and vendor-specific algorithms have a value of
|
|
* [0x00010000, 0x80000000).
|
|
*/
|
|
/* Digital signature cryptographic algorithm bits: */
|
|
#define PRES_SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_BIT_RSASSA_PSS_MGF1SHA256_2048_SHA256 \
|
|
(0x1U << 0U)
|
|
#define PRES_SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_BIT_RSASSA_PKCS1V15_2048_SHA256 \
|
|
(0x1U << 1U)
|
|
#define PRES_SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_BIT_ECDSA_P256_SHA256 \
|
|
(0x1U << 2U)
|
|
#define PRES_SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_BIT_ECDSA_P384_SHA384 \
|
|
(0x1U << 3U)
|
|
/* RTI-specific digital signature algorithm bits: */
|
|
#define PRES_SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_BIT_EDDSA_ED25519_SHA512 \
|
|
(0x1U << 16U)
|
|
#define PRES_SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_BIT_EDDSA_ED448_SHAKE256 \
|
|
(0x1U << 17U)
|
|
#define PRES_SECURITY_DIGITAL_SIGNATURE_ALGORITHM_INFO_BIT_SM2_SM2P256_SM3 \
|
|
(0x1U << 18U)
|
|
|
|
/* Key establishment algorithm bits */
|
|
#define PRES_SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_BIT_DHE_MODP_2048_256 \
|
|
(0x1U << 0U)
|
|
#define PRES_SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_BIT_ECDHE_CEUM_P256 \
|
|
(0x1U << 1U)
|
|
#define PRES_SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_BIT_ECDHE_CEUM_P384 \
|
|
(0x1U << 2U)
|
|
/* RTI-specific key establishment algorithm bits: */
|
|
#define PRES_SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_BIT_ECDHE_CEUM_X25519 \
|
|
(0x1U << 16U)
|
|
#define PRES_SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_BIT_ECDHE_CEUM_X448 \
|
|
(0x1U << 17U)
|
|
#define PRES_SECURITY_KEY_ESTABLISHMENT_ALGORITHM_INFO_BIT_SM2_KXEPH_SM2P256 \
|
|
(0x1U << 18U)
|
|
|
|
/* Symmetric cipher cryptographic algorithm bits: */
|
|
#define PRES_SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_BIT_AES128_GCM \
|
|
(0x1U << 0U)
|
|
#define PRES_SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_BIT_AES256_GCM \
|
|
(0x1U << 1U)
|
|
|
|
/* RTI-specific symmetric cipher cryptographic algorithm bits: */
|
|
#define PRES_SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_BIT_SM4_GCM (0x01U << 16U)
|
|
|
|
/*
|
|
* Endpoint symmetric cipher.
|
|
* Note that the compatibility mode is set by default.
|
|
*/
|
|
#define PRES_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_REQUIRED_MASK_DEFAULT \
|
|
(PRES_SECURITY_CRYPTO_ALGORITHM_SET_ALL)
|
|
|
|
#define PRES_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT \
|
|
(PRES_SECURITY_CRYPTO_ALGORITHM_SET_ALL)
|
|
|
|
#define PRESEndpointSecuritySymmetricCipherAlgorithmInfo_INITIALIZER_NOSEC { \
|
|
0, \
|
|
0 \
|
|
}
|
|
|
|
#define PRESEndpointSecuritySymmetricCipherAlgorithmInfo_INITIALIZER_SEC12 { \
|
|
PRES_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_REQUIRED_MASK_DEFAULT, \
|
|
PRES_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT \
|
|
}
|
|
|
|
#define PRESEndpointSecurityAlgorithmInfo_INITIALIZER_NOSEC { \
|
|
PRESEndpointSecuritySymmetricCipherAlgorithmInfo_INITIALIZER_NOSEC \
|
|
}
|
|
|
|
#define PRESEndpointSecurityAlgorithmInfo_INITIALIZER_SEC12 { \
|
|
PRESEndpointSecuritySymmetricCipherAlgorithmInfo_INITIALIZER_SEC12 \
|
|
}
|
|
|
|
#define PRESEndpointSecuritySymmetricCipherAlgorithmInfo_isDefaultNoSec(symmetricCipher__) \
|
|
((symmetricCipher__).requiredMask == 0 \
|
|
&& (symmetricCipher__).supportedMask == 0)
|
|
|
|
|
|
/*
|
|
* (symmetricCipher__).supportedMask is never serialized, the remote will always
|
|
* infer it from the DomainParticipant. This is because the DDS Security
|
|
* specification defines the supported_mask member as a @non_serialized member
|
|
* that makes the publication/subscription builtin topic data APIs more
|
|
* convenient for the user.
|
|
*
|
|
* Therefore, we should not check if its value is equal to the default one
|
|
* (PRES_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT)
|
|
* in order to decide whether to serialize the endpoint symmetric cipher
|
|
* algorithm info or not. We only need to check the required mask.
|
|
*/
|
|
#define PRESEndpointSecuritySymmetricCipherAlgorithmInfo_isDefaultSec12(symmetricCipher__) \
|
|
((symmetricCipher__).requiredMask \
|
|
== PRES_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_REQUIRED_MASK_DEFAULT)
|
|
|
|
#define PRESEndpointSecurityAttributes_INITIALIZER { \
|
|
PRESEndpointSecurityProtectionInfo_INITIALIZER, \
|
|
NULL, /* acEndpointProperties */ \
|
|
PRESEndpointSecurityAlgorithmInfo_INITIALIZER_NOSEC, \
|
|
PRES_SECURITY_ROS_NO_INTEROPERABILITY /* rosInteroperabilityMode */ \
|
|
}
|
|
|
|
/* Mapping to avoid security nomenclature in dds_c.1.0 */
|
|
#define PRES_TRUST_ALGORITHM_BIT_COMPATIBILITY_MODE \
|
|
PRES_SECURITY_CRYPTO_ALGORITHM_BIT_COMPATIBILITY_MODE
|
|
#define PRES_TRUST_ALGORITHM_SET_ALL PRES_SECURITY_CRYPTO_ALGORITHM_SET_ALL
|
|
#define PRES_TRUST_ALGORITHM_SET_EMPTY PRES_SECURITY_CRYPTO_ALGORITHM_SET_EMPTY
|
|
|
|
#define PRES_ENDPOINT_TRUST_INTERCEPTOR_ALGORITHM_INFO_REQUIRED_MASK_DEFAULT \
|
|
PRES_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_REQUIRED_MASK_DEFAULT
|
|
|
|
#define PRES_ENDPOINT_TRUST_INTERCEPTOR_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT \
|
|
PRES_ENDPOINT_SECURITY_SYMMETRIC_CIPHER_ALGORITHM_INFO_SUPPORTED_MASK_DEFAULT
|
|
|
|
struct PRESEndpointSecuritySymmetricCipherAlgorithmInfo {
|
|
PRESSecurityCryptoAlgorithmSet requiredMask;
|
|
PRESSecurityCryptoAlgorithmSet supportedMask; /* @non_serialized */
|
|
};
|
|
|
|
struct PRESEndpointSecurityAlgorithmInfo {
|
|
struct PRESEndpointSecuritySymmetricCipherAlgorithmInfo symmetricCipher;
|
|
};
|
|
|
|
|
|
#define PRES_NUM_ROS_TOPIC_NAMES 5
|
|
|
|
typedef unsigned int PRESSecurityRosInteroperabilityMode;
|
|
|
|
|
|
/*
|
|
* When set to 1, we have some version of ROS interoperability enabled. No other
|
|
* bits will be checked if this bit is NOT set
|
|
*/
|
|
#define PRES_SECURITY_ROS_ENABLED_BIT (0x00000001U)
|
|
|
|
/*
|
|
* Determines whether we have Connext->ROS interoperability (if 1), or
|
|
* ROS->Connext interoperability (if 0)
|
|
*
|
|
* Connext->ROS interoperability is enabled on a Connext endpoint that has ROS
|
|
* interoperability enabled. It allows us to convert topic names from a
|
|
* Connext topic name to a ROS topic name by "mangling" the topic name with
|
|
* ROS prefixes and suffixes (see PRESParticipant_getValidRosTopicName)
|
|
*
|
|
* ROS->Connext interoperability is enabled on a ROS endpoint that has ROS
|
|
* demangling enabled. It allows us to convert topic names from a ROS topic
|
|
* name to a Connext topic name by "demangling" the topic name by removing the
|
|
* ROS prefixes and suffixes (see PRESParticipant_getValidRosTopicName)
|
|
*/
|
|
#define PRES_SECURITY_CONNEXT_ROS_INTEROPERABILITY_MODE_BIT (0x00000002U)
|
|
|
|
/*
|
|
* Determines whether the primary topic name should be checked first when
|
|
* evaluating permissions and governance (if 0), or second (if 1)
|
|
*/
|
|
#define PRES_SECURITY_ROS_USE_ALIAS_AS_PRIMARY_BIT (0x00000004U)
|
|
|
|
/*
|
|
* No ROS interoperability is supported, topic names are not converted
|
|
* when evaluating permissions. Default behavior.
|
|
*/
|
|
#define PRES_SECURITY_ROS_NO_INTEROPERABILITY (0x00000000U)
|
|
|
|
|
|
#define PRESSecurityRosInteroperabilityMode_isRosInteroperabilityEnabled( \
|
|
rosInterOperabilityMode__) \
|
|
((rosInterOperabilityMode__) & PRES_SECURITY_ROS_ENABLED_BIT)
|
|
|
|
|
|
#define PRESSecurityRosInteroperabilityMode_checkTopicAliasFirst( \
|
|
rosInterOperabilityMode__) \
|
|
(PRESSecurityRosInteroperabilityMode_isRosInteroperabilityEnabled((rosInterOperabilityMode__))\
|
|
&& ((rosInterOperabilityMode__) & PRES_SECURITY_ROS_USE_ALIAS_AS_PRIMARY_BIT))
|
|
|
|
|
|
#define PRESSecurityRosInteroperabilityMode_isRosToConnextInteroperabilityEnabled(rosInterOperabilityMode__) \
|
|
PRESSecurityRosInteroperabilityMode_isRosInteroperabilityEnabled((rosInterOperabilityMode__)) \
|
|
&& (((rosInterOperabilityMode__) & PRES_SECURITY_CONNEXT_ROS_INTEROPERABILITY_MODE_BIT) == 0)
|
|
|
|
|
|
#define PRESSecurityRosInteroperabilityMode_isConnextToRosInteroperabilityEnabled(rosInterOperabilityMode__) \
|
|
PRESSecurityRosInteroperabilityMode_isRosInteroperabilityEnabled((rosInterOperabilityMode__)) \
|
|
&& (((rosInterOperabilityMode__) & PRES_SECURITY_CONNEXT_ROS_INTEROPERABILITY_MODE_BIT))
|
|
|
|
struct PRESEndpointSecurityAttributes {
|
|
struct PRESEndpointSecurityProtectionInfo protectionInfo;
|
|
struct PRESDDSSequence *acEndpointProperties;
|
|
struct PRESEndpointSecurityAlgorithmInfo algorithmInfo;
|
|
/*
|
|
* ROS interoperability mode of the endpoint. Allows for ROS names to be
|
|
* evaluated for permissions when creating this endpoint
|
|
*/
|
|
PRESSecurityRosInteroperabilityMode rosInteroperabilityMode;
|
|
};
|
|
|
|
extern PRESDllExport
|
|
RTIBool
|
|
PRESParticipant_getValidRosTopicName(
|
|
char *rosTopicName,
|
|
int *nextRosFormatIndex,
|
|
size_t bufferSize,
|
|
PRESSecurityRosInteroperabilityMode rosInteroperabilityMode,
|
|
const char *topicName,
|
|
struct REDAWorker *worker);
|
|
|
|
struct PRESEndpointSecurity {
|
|
struct PRESEndpointSecurityAttributes attributes;
|
|
void *interceptorHandle; /* key material */
|
|
};
|
|
|
|
|
|
#define PRESEndpointSecurity_INITIALIZER { \
|
|
PRESEndpointSecurityAttributes_INITIALIZER, \
|
|
NULL /* interceptorHandle */ \
|
|
}
|
|
|
|
struct PRESTopicSecurityAttributes {
|
|
RTICdrBoolean isReadProtected;
|
|
RTICdrBoolean isWriteProtected;
|
|
RTICdrBoolean isDiscoveryProtected;
|
|
RTICdrBoolean isLivelinessProtected;
|
|
};
|
|
|
|
|
|
#define PRESTopicSecurityAttributes_INITIALIZER { \
|
|
RTI_CDR_BOOLEAN_FALSE, /* isReadProtected */ \
|
|
RTI_CDR_BOOLEAN_FALSE, /* isWriteProtected */ \
|
|
RTI_CDR_BOOLEAN_FALSE, /* isDiscoveryProtected */ \
|
|
RTI_CDR_BOOLEAN_FALSE /* isLivelinessProtected */ \
|
|
}
|
|
|
|
struct PRESLocalEndpoint {
|
|
/*e Endpoint extends entity */
|
|
struct PRESEntity parent;
|
|
/*i The group to which teh endpoint belongs */
|
|
struct PRESGroup *_group;
|
|
/*i References the record in the Participant LocalTopic table containing
|
|
the topic and associated type of the endpoint */
|
|
struct REDAWeakReference _localTopicWR;
|
|
/*i References the record in the Participant TopicType table containing
|
|
the topic and associated type of the endpoint
|
|
This value is invalid before the topic is enabled.
|
|
*/
|
|
struct REDAWeakReference _topicTypeWR;
|
|
/*i The service to which the endpoint belongs */
|
|
struct PRESService *_service;
|
|
/*i The service keeps its own table of endpoints this is a WR into that
|
|
other table */
|
|
struct REDAWeakReference _endpointWR;
|
|
|
|
/* putting in a hack, which will be addressed later.
|
|
* for making getStatusChanges consistent
|
|
*/
|
|
RTIBool _onDataAvailableStatusFlag;
|
|
|
|
/* Indicates if batching is enabled in a DataWriter */
|
|
RTIBool _batchEnabled;
|
|
/* WriterHistoryDriver pointer (used for batching)
|
|
when thread safe write is RTI_FALSE
|
|
*/
|
|
struct PRESWriterHistoryDriver *_whDriver;
|
|
|
|
/* Cdr data representation(s) supported by this endpoint. */
|
|
PRESDataRepresentationCdrSupportMask _cdrSupportMask;
|
|
|
|
struct PRESEndpointSecurity _security;
|
|
|
|
#ifdef RTI_LM_ARCHITECTURE
|
|
/*
|
|
* Express-Edition: Whether this endpoint is whitelisted or not.
|
|
* Whitelisted endpoints are not subject to the limits.
|
|
*/
|
|
RTIBool _isExpressWhitelisted;
|
|
#endif
|
|
};
|
|
|
|
struct PRESLocalEndpointProperty {
|
|
/*e transport priority for netio send/receive resource created for
|
|
this endpoint */
|
|
/*e mutable, unsupported */
|
|
struct PRESTransportPriorityQosPolicy transportPriority;
|
|
|
|
/*e desired transport plugin alias for this endpoint */
|
|
struct RTINetioAliasList transportAliasList;
|
|
|
|
/*i desired security state for this endpoint */
|
|
struct PRESEndpointSecurity security;
|
|
|
|
/*i
|
|
* CORE-15138
|
|
* This property configures which topic is announced as the real topic and
|
|
* which type is announced as the real type name.
|
|
* When this is TRUE, the topic alias is announced as the real topic and the
|
|
* type alias is announced as the real type name. When
|
|
* this is FALSE, the primary topic is announced as the real
|
|
* topic and the primary type name is announced as the real type name.
|
|
* This defaults to FALSE for all endpoints that are not using
|
|
* ROS interoperability. If using ROS interoperability
|
|
* (dds.ros.enable_interoperability is TRUE), this defaults to TRUE.
|
|
* If using ROS topic/type demangling
|
|
* (dds.ros.demangle_topic_and_type_names), this defaults to FALSE.
|
|
*/
|
|
RTIBool useAliasAsPrimaryName;
|
|
};
|
|
|
|
|
|
/*e \ingroup PRESEntityModule
|
|
Default value of local endpoint property
|
|
*/
|
|
#define PRES_LOCAL_ENDPOINT_PROPERTY_DEFAULT { \
|
|
{0}, /* transportPriority */ \
|
|
RTI_NETIO_ALIAS_LIST_DEFAULT, /*transportAliasList */ \
|
|
PRESEndpointSecurity_INITIALIZER, /* security */ \
|
|
RTI_FALSE /* useAliasAsPrimaryName */ \
|
|
}
|
|
|
|
struct PRESRemoteEndpointProperty {
|
|
/*i
|
|
* This would ideally be an empty struct, but we need a field here to
|
|
* avoid warnings about empty structs having different sizes in C
|
|
* vs C++. If a field gets added to this struct ever, this dummy field
|
|
* should be removed.
|
|
*/
|
|
char _dummy;
|
|
};
|
|
|
|
|
|
/*e \ingroup PRESEntityModule
|
|
Default value of remote endpoint property
|
|
*/
|
|
#define PRES_REMOTE_ENDPOINT_PROPERTY_DEFAULT { \
|
|
0 /* _dummy */ \
|
|
}
|
|
|
|
struct PRESEventThread {
|
|
int refCount;
|
|
struct RTIEventTimer * timer;
|
|
struct RTIEventActiveGeneratorListener activeListener;
|
|
struct RTIEventGeneratorListener listener;
|
|
struct RTIEventActiveGenerator * generator;
|
|
struct RTIOsapiSemaphore * terminateSem;
|
|
int eventStorageSize;
|
|
};
|
|
|
|
struct PRESOriginalWriterInfo {
|
|
/*e
|
|
* Original writer guid
|
|
*/
|
|
struct MIGRtpsGuid writerGuid;
|
|
/*e
|
|
* Original writer sequence number
|
|
*/
|
|
struct REDASequenceNumber sequenceNumber;
|
|
};
|
|
|
|
|
|
#define PRES_ORIGINAL_WRITER_INFO_UNKNOWN \
|
|
{MIG_RTPS_GUID_UNKNOWN, REDA_SEQUENCE_NUMBER_UNKNOWN}
|
|
|
|
struct PRESGroup {
|
|
/*e
|
|
PRESGroup is one kind of entity
|
|
*/
|
|
struct PRESEntity _parent;
|
|
/*i
|
|
Weak reference to the group record in the group table.
|
|
*/
|
|
struct REDAWeakReference _groupWR;
|
|
/*i
|
|
EA used by the group.
|
|
*/
|
|
struct REDAExclusiveArea *_groupEa;
|
|
/*i
|
|
Pointer to the service from which the group is created
|
|
*/
|
|
struct PRESService *_service;
|
|
|
|
/* putting in a hack, which will be addressed later.
|
|
* for making getStatusChanges consistent
|
|
*/
|
|
RTIBool _onDataOnReadersStatusFlag;
|
|
|
|
/*i Event generator for batching
|
|
*/
|
|
struct PRESEventThread _batchEventGenerator;
|
|
|
|
/*i Event generator for topic-query dispatching
|
|
*/
|
|
struct PRESEventThread _topicQueryDispatchEventGenerator;
|
|
|
|
/*i This field contains the virtual GUID and virtual SN associated with
|
|
the publisher.
|
|
The field is only used when PresentationQosPolicy is set to GROUP. */
|
|
struct PRESOriginalWriterInfo _virtualInfo;
|
|
/* When PresentationQosPolicy is set to GROUP this sequence number
|
|
* contains the sequence number that identifies the group coherent set
|
|
* after beginCoherentSet is called
|
|
*/
|
|
struct REDASequenceNumber _groupCoherentSetSn;
|
|
|
|
/*i This field contains the list of writer infos across all writer-sessions. */
|
|
struct MIGRtpsWriterInfoList _writerInfoList;
|
|
struct REDAInlineList _writerInfoListInlineList;
|
|
|
|
/* These member are only used by Subscribers configured with GROUP order access */
|
|
/* TODO: Move this to Subscriber specific storage */
|
|
struct PRESPresentationQosPolicy _presentationQosPolicy;
|
|
struct REDAObjectPerWorker * _sampleIteratorPerWorker;
|
|
struct PRESReaderQueueVirtualWriterList * _virtualWriterList;
|
|
};
|
|
|
|
struct PRESGroupProperty {
|
|
/*e immutable */
|
|
struct PRESPresentationQosPolicy presentation;
|
|
/*e mutable */
|
|
struct PRESPartitionQosPolicy partition;
|
|
/*e mutable */
|
|
struct PRESGroupDataQosPolicy groupData;
|
|
};
|
|
|
|
|
|
/*e \ingroup PRESEntityModule
|
|
Default value of group property
|
|
*/
|
|
#define PRES_GROUP_PROPERTY_DEFAULT { \
|
|
PRES_PRESENTATION_QOS_POLICY_DEFAULT, \
|
|
PRES_PARTITION_QOS_POLICY_DEFAULT, \
|
|
{{0, 0, NULL}} \
|
|
}
|
|
|
|
typedef enum {
|
|
PRES_DISALLOW_TYPE_COERCION,
|
|
PRES_ALLOW_TYPE_COERCION
|
|
} PRESTypeConsistencyKind;
|
|
|
|
struct PRESTypeConsistencyEnforcementQosPolicy {
|
|
PRESTypeConsistencyKind kind;
|
|
RTICdrBoolean ignoreSequenceBounds;
|
|
RTICdrBoolean ignoreStringBounds;
|
|
RTICdrBoolean ignoreMemberNames;
|
|
RTICdrBoolean preventTypeWidening;
|
|
RTICdrBoolean forceTypeValidation;
|
|
RTICdrBoolean ignoreEnumLiteralNames;
|
|
};
|
|
|
|
|
|
#define PRES_TYPE_CONSISTENCY_ENFORCEMENT_QOS_DEFAULT { \
|
|
PRES_ALLOW_TYPE_COERCION, \
|
|
RTI_CDR_BOOLEAN_TRUE, /* ignoreSequenceBounds */ \
|
|
RTI_CDR_BOOLEAN_TRUE, /* ignoreStringBounds */ \
|
|
RTI_CDR_BOOLEAN_FALSE, /* ignoreMemberNames */ \
|
|
RTI_CDR_BOOLEAN_FALSE, /* preventTypeWidening */ \
|
|
RTI_CDR_BOOLEAN_FALSE, /* forceTypeValidation */ \
|
|
RTI_CDR_BOOLEAN_FALSE /* ignoreEnumLiteralNames */ \
|
|
}
|
|
|
|
extern PRESDllExport
|
|
int PRESTypeConsistencyEnforcementQosPolicy_compare(
|
|
const struct PRESTypeConsistencyEnforcementQosPolicy *l,
|
|
const struct PRESTypeConsistencyEnforcementQosPolicy *r);
|
|
|
|
typedef enum {
|
|
/*e
|
|
unknown group
|
|
*/
|
|
PRES_GROUP_SUFFIX_UNKNOWN_GROUP = 0x00,
|
|
/*e
|
|
normal user writer group
|
|
*/
|
|
PRES_GROUP_SUFFIX_NORMAL_USER_WRITER_GROUP = 0x08,
|
|
/*e
|
|
normal user reader group
|
|
*/
|
|
PRES_GROUP_SUFFIX_NORMAL_USER_READER_GROUP = 0x09,
|
|
|
|
/*e
|
|
reserved user writer group
|
|
*/
|
|
PRES_GROUP_SUFFIX_RESERVED_USER_WRITER_GROUP = 0x48,
|
|
/*e
|
|
reserved user reader group
|
|
*/
|
|
PRES_GROUP_SUFFIX_RESERVED_USER_READER_GROUP = 0x49,
|
|
|
|
/*e
|
|
normal meta writer group
|
|
*/
|
|
PRES_GROUP_SUFFIX_NORMAL_META_WRITER_GROUP = 0x88,
|
|
/*e
|
|
normal meta reader group
|
|
*/
|
|
PRES_GROUP_SUFFIX_NORMAL_META_READER_GROUP = 0x89,
|
|
|
|
/*e
|
|
reserved meta writer group
|
|
*/
|
|
PRES_GROUP_SUFFIX_RESERVED_META_WRITER_GROUP = 0xc8,
|
|
/*e
|
|
reserved meta reader group
|
|
*/
|
|
PRES_GROUP_SUFFIX_RESERVED_META_READER_GROUP = 0xc9,
|
|
|
|
/*e
|
|
normal user virtual reader group
|
|
*/
|
|
PRES_GROUP_SUFFIX_NORMAL_USER_VIRTUAL_READER_GROUP = 0x3e
|
|
} PRESGroupSuffix;
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESGroupSuffix_fromObjectSuffix(MIGRtpsObjectSuffix osx);
|
|
|
|
typedef enum {
|
|
/*e
|
|
unknown group
|
|
*/
|
|
PRES_TOPIC_SUFFIX_UNKNOWN_TOPIC = 0x00,
|
|
/*e
|
|
normal user topic
|
|
*/
|
|
PRES_TOPIC_SUFFIX_NORMAL_USER_TOPIC = 0x0a,
|
|
/*e
|
|
reserved user topic
|
|
*/
|
|
PRES_TOPIC_SUFFIX_RESERVED_USER_TOPIC = 0x4a,
|
|
/*e
|
|
normal meta topic
|
|
*/
|
|
PRES_TOPIC_SUFFIX_NORMAL_META_TOPIC = 0x8a,
|
|
/*e
|
|
reserved meta topic
|
|
*/
|
|
PRES_TOPIC_SUFFIX_RESERVED_META_TOPIC = 0xca,
|
|
|
|
/*e
|
|
normal user virtual topic
|
|
*/
|
|
PRES_TOPIC_SUFFIX_NORMAL_USER_VIRTUAL_TOPIC = 0x3f
|
|
} PRESTopicSuffix;
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESTopicSuffix_isTopic(MIGRtpsObjectSuffix osx);
|
|
|
|
struct PRESTopicImmutableProperty {
|
|
/*e
|
|
* Durability QoS policy.
|
|
*/
|
|
struct PRESDurabilityQosPolicy durability;
|
|
|
|
/*e Durability service QoS policy. */
|
|
struct PRESDurabilityServiceQosPolicy durabilityService;
|
|
|
|
/*e
|
|
* Ownership QoS policy.
|
|
*/
|
|
struct PRESOwnershipQosPolicy ownership;
|
|
|
|
/*e
|
|
* Liveliness QoS policy.
|
|
*/
|
|
struct PRESLivelinessQosPolicy liveliness;
|
|
|
|
/*e
|
|
* Reliability QoS policy.
|
|
*/
|
|
struct PRESReliabilityQosPolicy reliability;
|
|
|
|
/*e
|
|
* Destination order QoS policy.
|
|
*/
|
|
struct PRESDestinationOrderQosPolicy destinationOrder;
|
|
|
|
/*e
|
|
* History QoS policy.
|
|
*/
|
|
struct PRESHistoryQosPolicy history;
|
|
|
|
/*e
|
|
* Resource limits QoS policy.
|
|
*/
|
|
struct PRESResourceLimitsQosPolicy resourceLimits;
|
|
|
|
/*e
|
|
whether this topic need to be destroyed when deleteContainedEntities
|
|
is called on factroy*/
|
|
RTIBool explicitDestroyOnly;
|
|
|
|
/*e
|
|
* Data Representation qos policy
|
|
*/
|
|
struct PRESDataRepresentationQosPolicy dataRepresentationQosPolicy;
|
|
};
|
|
|
|
struct PRESTopicMutableProperty {
|
|
/*e
|
|
* Deadline QoS policy.
|
|
*/
|
|
struct PRESDeadlineQosPolicy deadline;
|
|
|
|
/*e
|
|
* Latency budget QoS policy.
|
|
*/
|
|
struct PRESLatencyBudgetQosPolicy latencyBudget;
|
|
|
|
/*e
|
|
* Transport priority qos policy.
|
|
*/
|
|
struct PRESTransportPriorityQosPolicy transportPriority;
|
|
|
|
/*e
|
|
* Lifespan qos policy.
|
|
*/
|
|
struct PRESLifespanQosPolicy lifespan;
|
|
|
|
/*e
|
|
* Topic data qos policy.
|
|
*/
|
|
struct PRESTopicDataQosPolicy topicData;
|
|
};
|
|
|
|
struct PRESTopicProperty {
|
|
/*e
|
|
* The immutable portion of a topic property.
|
|
*/
|
|
struct PRESTopicImmutableProperty immutable_part;
|
|
|
|
/*e
|
|
* The mutable portion of a topic property.
|
|
*/
|
|
struct PRESTopicMutableProperty mutable_part;
|
|
};
|
|
|
|
|
|
/*e \ingroup PRESEntityModule
|
|
Default value of topic property.
|
|
*/
|
|
#define PRES_TOPIC_PROPERTY_DEFAULT { \
|
|
{ /* immutable_part */ \
|
|
PRES_DURABILITY_QOS_POLICY_DEFAULT, \
|
|
{ /* durabilityServiceQosPolicy */ \
|
|
RTI_NTP_TIME_ZERO, /* serviceCleanupDelay */ \
|
|
PRES_HISTORY_QOS_POLICY_DEFAULT, /* history */ \
|
|
{ /* resourceLimits */ \
|
|
REDA_FAST_BUFFER_POOL_GROWTH_PROPERTY_DEFAULT, /* sampleCount */ \
|
|
REDA_FAST_BUFFER_POOL_GROWTH_PROPERTY_DEFAULT, /* instanceCount */ \
|
|
REDA_FAST_BUFFER_POOL_UNLIMITED, /* maxSamplesPerInstance */ \
|
|
1 /* instanceHashBuckets */ \
|
|
} \
|
|
}, /* durabilityServiceQosPolicy */ \
|
|
{PRES_SHARED_OWNERSHIP_QOS}, /* ownership */ \
|
|
{ /* liveliness */ \
|
|
RTI_NTP_TIME_MAX, /* leaseDuration */ \
|
|
PRES_AUTOMATIC_LIVELINESS_QOS, /* kind */ \
|
|
0 /* assertionsPerLeaseDuration */ \
|
|
}, \
|
|
PRES_BEST_EFFORT_RELIABILITY_QOS_POLICY_DEFAULT, /* reliability */ \
|
|
{PRES_BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS, \
|
|
PRES_INSTANCE_SCOPE_DESTINATIONORDER_QOS, \
|
|
{30, 0} }, /* destinationOrder */ \
|
|
PRES_HISTORY_QOS_POLICY_DEFAULT, /* history */ \
|
|
{ /* resourceLimits */ \
|
|
REDA_FAST_BUFFER_POOL_GROWTH_PROPERTY_DEFAULT, /* sampleCount */ \
|
|
REDA_FAST_BUFFER_POOL_GROWTH_PROPERTY_DEFAULT, /* instanceCount */ \
|
|
REDA_FAST_BUFFER_POOL_UNLIMITED, /* maxSamplesPerInstance */ \
|
|
1 /* instanceHashBuckets */ \
|
|
}, \
|
|
RTI_FALSE, /* explicitDestroyOnly */ \
|
|
PRES_DATA_REPRESENTATION_QOS_POLICY_DEFAULT /* dataRepresentationQosPolicy */ \
|
|
} /* end immutable */, \
|
|
{ /* mutable_part */ \
|
|
{RTI_NTP_TIME_MAX} /* deadline */, \
|
|
{RTI_NTP_TIME_ZERO} /* latencyBudget */, \
|
|
{0} /* transportPriority */, \
|
|
{RTI_NTP_TIME_MAX} /* lifespan */, \
|
|
{{0, 0, NULL}} /* topicData */ \
|
|
} /* end mutable */ \
|
|
}
|
|
|
|
struct PRESContentFilteredTopicMutableProperty {
|
|
/*e Filtering policy
|
|
*/
|
|
struct PRESContentFilterQosPolicy filterPolicy;
|
|
};
|
|
|
|
|
|
/*e \ingroup PRESEntityModule
|
|
Default value of content filter Qos policy property.
|
|
*/
|
|
#define PRES_CONTENT_FILTER_QOS_POLICY_DEFAULT \
|
|
{ \
|
|
0, /* systemKey */ \
|
|
NULL, /* handle */ \
|
|
(PRESContentFilterEvaluate) NULL, /* evaluate */ \
|
|
(PRESContentFilterEvaluate) NULL, /* evaluateOnSerialized */ \
|
|
(PRESContentFilterQuery) NULL, /* query */ \
|
|
(PRESContentFilterFinalize) NULL, /* finalizeFunc */ \
|
|
PRES_CONTENT_FILTER_SIGNATURE_DEFAULT, /* legacySignature */ \
|
|
PRES_CONTENT_FILTER_SIGNATURE_DEFAULT, /* signature */ \
|
|
REDA_WEAK_REFERENCE_INVALID, /* filterWR */ \
|
|
RTI_FALSE, /* doFilter */ \
|
|
NULL, /* filter_object */ \
|
|
RTI_TRUE /* isBuiltin */ \
|
|
}
|
|
|
|
#define PRES_CONTENTFILTEREDTOPIC_PROPERTY_MUTABLE_DEFAULT {\
|
|
PRES_CONTENT_FILTER_QOS_POLICY_DEFAULT\
|
|
}
|
|
|
|
|
|
struct PRESContentFilteredTopicImmutableProperty {
|
|
/*e A compile function for the filter expression
|
|
*/
|
|
PRESContentFilterCompile compile;
|
|
/*e An eval function that operates on a sample
|
|
*/
|
|
PRESContentFilterEvaluate evaluate;
|
|
/*e An eval function that operates on a sample serialized
|
|
*/
|
|
PRESContentFilterEvaluate evaluateOnSerialized;
|
|
/*e Function called to determine the kind of
|
|
content filter topic (keyOnly or not)
|
|
*/
|
|
PRESContentFilterQuery query;
|
|
/*e Function called when a policy is no longer used
|
|
*/
|
|
PRESContentFilterFinalize finalizeFunc;
|
|
/*e An handle to the filter object supplied dring registration. This
|
|
information is to be passed to the wraper functions for compile, etc.
|
|
*/
|
|
/* NOTE: This is NOT the same filter_data supplied in the DDS_x API.
|
|
In actual use, the presentation filter_object is the entire API layer
|
|
filter structure, of which one memmber is the DDS_x API filter_data.
|
|
Wraper functions are required to translate between the two. */
|
|
void *filter_object;
|
|
|
|
RTIBool explicitDestroyOnly;
|
|
};
|
|
|
|
extern PRESDllExport
|
|
void * PRESContentFilterSQLCompile(
|
|
RTI_UINT32 systemKey,
|
|
void *handle,
|
|
const char *expression,
|
|
const char **parameters,
|
|
RTI_INT32 parameter_length,
|
|
const void *typecode,
|
|
const char *typeCodeName,
|
|
void *old_handle,
|
|
RTI_INT32 *errorcode);
|
|
|
|
extern PRESDllExport
|
|
RTI_INT32 PRESContentFilterSQLEvaluate(
|
|
RTI_UINT32 systemKey,
|
|
void *filter_object,
|
|
void *handle,
|
|
const void *sample,
|
|
const struct PRESFilterSampleInfo* meta_data);
|
|
|
|
extern PRESDllExport
|
|
RTI_INT32 PRESContentFilterSQLEvaluateOnSerialized(
|
|
RTI_UINT32 systemKey,
|
|
void *filter_object,
|
|
void *handle,
|
|
const void *sample,
|
|
const struct PRESFilterSampleInfo* meta_data);
|
|
|
|
extern PRESDllExport
|
|
void PRESContentFilterSQLFinalize(
|
|
RTI_UINT32 systemKey,
|
|
void *filter_object,
|
|
void *handle);
|
|
|
|
extern PRESDllExport
|
|
RTI_INT32 PRESContentFilterSQLQuery(
|
|
RTI_UINT32 systemKey,
|
|
void* filter_object,
|
|
void* handle);
|
|
|
|
|
|
/*e \ingroup PRESEntityModule
|
|
Name of the default content filtering function
|
|
*/
|
|
#define PRES_CONTENTFILTEREDTOPIC_DEFAULT_FILTERNAME "RTISQLFILTER"
|
|
|
|
/*e \ingroup PRESEntityModule
|
|
Maximum lenght of the content filtered topic properties sent over
|
|
the wire. This length includes the length of the content filter name (CFN)
|
|
, related topic name (RTN), filter expression (FE), filter parameters (FP)
|
|
and filter name (FN). The following expression must always be valid. Note that
|
|
length(FE) means the number of non-null octets + 1 for the null terminator
|
|
length(CFN) + length(RTP) + length(FN)+length(FE)+length(FP)
|
|
< PRES_CONTENTFILTER_PROPERTY_DATA_LEN_MAX
|
|
*/
|
|
#define PRES_CONTENT_FILTER_PROPERTY_LEN_MAX (256)
|
|
|
|
#define PRES_CONTENTFILTEREDTOPIC_PROPERTY_IMMUTABLE_DEFAULT {\
|
|
PRESContentFilterSQLCompile ,\
|
|
PRESContentFilterSQLEvaluate ,\
|
|
PRESContentFilterSQLEvaluateOnSerialized ,\
|
|
PRESContentFilterSQLQuery ,\
|
|
PRESContentFilterSQLFinalize ,\
|
|
NULL ,\
|
|
RTI_FALSE \
|
|
}
|
|
|
|
struct PRESContentFilteredTopicProperty {
|
|
/*e
|
|
* The immutable portion of a content filtered topic property.
|
|
*/
|
|
struct PRESContentFilteredTopicImmutableProperty immutable_part;
|
|
|
|
/*e
|
|
* The mutable portion of a content filtered topic property.
|
|
*/
|
|
struct PRESContentFilteredTopicMutableProperty mutable_part;
|
|
};
|
|
|
|
|
|
/*e \ingroup PRESEntityModule
|
|
Default value of topic property.
|
|
*/
|
|
#define PRES_CONTENTFILTEREDTOPIC_PROPERTY_DEFAULT { \
|
|
PRES_CONTENTFILTEREDTOPIC_PROPERTY_IMMUTABLE_DEFAULT, \
|
|
PRES_CONTENTFILTEREDTOPIC_PROPERTY_MUTABLE_DEFAULT \
|
|
}
|
|
|
|
struct PRESContentFilterProperty {
|
|
/*e
|
|
Sequence of octet representating user data
|
|
*/
|
|
struct PRESSequenceOctet propertyData;
|
|
char *contentFilterName;
|
|
char *relatedTopicName;
|
|
char *filterName;
|
|
char *filterExpression;
|
|
char *filterParameters;
|
|
int parameterLength;
|
|
};
|
|
|
|
|
|
#define PRES_CONTENT_FILTER_PROPERTY_DEFAULT \
|
|
{{0,0,NULL},NULL,NULL,NULL,NULL,NULL,0}
|
|
|
|
|
|
/*e \ingroup PRESParticipantModule
|
|
* Maximum number of IP address count.
|
|
*/
|
|
#define PRES_PARTICIPANT_IPADDRESS_COUNT_MAX (RTI_NETIO_RTPS_LOCATOR_LIST_MAX_SIZE)
|
|
|
|
/*e \ingroup PRESParticipantModule
|
|
* Reduced maximum number of IP address count. Used for multicast.
|
|
*/
|
|
#define PRES_PARTICIPANT_IPADDRESS_REDUCED_COUNT_MAX (RTI_NETIO_RTPS_LOCATOR_REDUCED_LIST_MAX_SIZE)
|
|
|
|
|
|
struct PRESLocatorQosPolicy {
|
|
/*e list size */
|
|
int count;
|
|
/*e */
|
|
struct RTINetioLocator locatorList[PRES_PARTICIPANT_IPADDRESS_COUNT_MAX];
|
|
};
|
|
|
|
|
|
|
|
/*e \ingroup PRESParticipantModule
|
|
* Force the endpoint locator count to be 0, regardless of the parent
|
|
* participant's locators
|
|
*/
|
|
#define PRES_LOCATOR_QOS_POLICY_COUNT_FORCE_ZERO -1
|
|
|
|
/*e \ingroup PRESParticipantModule
|
|
Default locator Qos policy value
|
|
*/
|
|
#define PRES_LOCATOR_QOS_POLICY_DEFAULT { \
|
|
0, /* count */ \
|
|
RTI_NETIO_RTPS_LOCATOR_LIST_DEFAULT, \
|
|
}
|
|
|
|
struct PRESReducedLocatorQosPolicy {
|
|
/*e list size */
|
|
int count;
|
|
/*e */
|
|
struct RTINetioLocator locatorList[PRES_PARTICIPANT_IPADDRESS_REDUCED_COUNT_MAX];
|
|
};
|
|
|
|
|
|
/*e \ingroup PRESParticipantModule
|
|
Default locator Qos policy value
|
|
*/
|
|
#define PRES_REDUCED_LOCATOR_QOS_POLICY_DEFAULT { \
|
|
0, /* count */ \
|
|
RTI_NETIO_RTPS_LOCATOR_REDUCED_LIST_DEFAULT, \
|
|
}
|
|
|
|
/*e \ingroup PRESParticipantModule
|
|
Possible values for ignoredEntityReplacementPolicy.
|
|
*/
|
|
typedef enum {
|
|
/*e @brief Default value for Participant's ignoredEntityReplacementPolicy,
|
|
* no replacement is done, ignore will fail if the ignored_entity
|
|
* table is full.
|
|
*/
|
|
PRES_NO_REPLACEMENT_IGNORED_ENTITY_REPLACEMENT,
|
|
|
|
/*e @brief If the ignored_entity table is full, the record that has been
|
|
* not updated for a longer time will be replaced.
|
|
*/
|
|
PRES_NOT_ALIVE_FIRST_IGNORED_ENTITY_REPLACEMENT
|
|
} PRESIgnoredEntityReplacementPolicy;
|
|
|
|
|
|
extern PRESDllExport
|
|
void PRESLocatorQosPolicy_copy(
|
|
struct PRESLocatorQosPolicy* to,
|
|
const struct PRESLocatorQosPolicy* from);
|
|
|
|
extern PRESDllExport
|
|
int PRESLocatorQosPolicy_compare(const void* l, const void* r);
|
|
|
|
extern PRESDllExport
|
|
char * PRESLocatorQosPolicy_toString(
|
|
const struct PRESLocatorQosPolicy *self,
|
|
char *buffer,
|
|
RTI_UINT32 bufferSize);
|
|
|
|
extern PRESDllExport
|
|
void PRESReducedLocatorQosPolicy_toLocator(
|
|
const struct PRESReducedLocatorQosPolicy *src,
|
|
struct RTINetioLocator *dst);
|
|
|
|
|
|
/*e \ingroup PRESQosModule
|
|
Default maximum number of locator filters per writer.
|
|
*/
|
|
#define PRES_LOCATOR_FILTER_DEFAULT_SEQ_LEN_MAX (32)
|
|
/*e \ingroup PRESQosModule
|
|
Default maximum length of each locator filter expression (excluding NULL).
|
|
*/
|
|
#define PRES_LOCATOR_FILTER_DEFAULT_EXPRESSION_LEN_MAX (255)
|
|
/*e \ingroup PRESQosModule
|
|
Maximum length of filter name (including terminating NULL)
|
|
*/
|
|
#define PRES_LOCATOR_FILTER_NAME_LEN_MAX (256)
|
|
|
|
|
|
#define PRES_PUBLICATION_PRIORITY_UNDEFINED COMMEND_PUBLICATION_PRIORITY_UNDEFINED
|
|
#define PRES_PUBLICATION_PRIORITY_AUTOMATIC COMMEND_PUBLICATION_PRIORITY_AUTOMATIC
|
|
|
|
struct PRESLocatorFilterProperty {
|
|
struct PRESLocatorQosPolicy locators;
|
|
struct PRESSequenceOctet filterExpression;
|
|
RTI_INT32 publicationPriority;
|
|
};
|
|
|
|
|
|
#define PRES_LOCATOR_FILTER_DEFAULT { \
|
|
PRES_LOCATOR_QOS_POLICY_DEFAULT, \
|
|
PRES_SEQUENCE_OCTET_DEFAULT, \
|
|
PRES_PUBLICATION_PRIORITY_UNDEFINED \
|
|
}
|
|
|
|
struct PRESSequenceLocatorFilterProperty {
|
|
/*i The maximum number of elements in the property list*/
|
|
RTI_UINT32 _seq_maximum;
|
|
|
|
/*i The number of elements in the property list */
|
|
RTI_UINT32 _seq_length;
|
|
|
|
/*e The locator filter entries in this sequence */
|
|
struct PRESLocatorFilterProperty *_seq_buffer;
|
|
|
|
/*e The filter name */
|
|
char *_filter_name;
|
|
|
|
/*e Maximum length of the data buffer*/
|
|
RTI_UINT32 _data_maximum;
|
|
|
|
/*e Current length of data buffer */
|
|
RTI_UINT32 _data_length;
|
|
|
|
/*e Area allocated for storing data */
|
|
char *_data_buffer;
|
|
};
|
|
|
|
extern PRESDllExport
|
|
RTIBool
|
|
PRESSequenceLocatorFilterProperty_initFromPool(
|
|
struct PRESSequenceLocatorFilterProperty *seq,
|
|
struct REDAFastBufferPool *fastBufferPool,
|
|
int maxSeqLength);
|
|
|
|
struct PRESLocatorFilterQosProperty {
|
|
struct PRESSequenceLocatorFilterProperty data;
|
|
};
|
|
|
|
|
|
#define PRES_SEQ_LOCATOR_FILTER_PROPERTY_DEFAULT {0,0,NULL,NULL,0,0,NULL}
|
|
#define PRES_LOCATOR_FILTER_QOS_PROPERTY_DEFAULT {{0,0,NULL,NULL,0,0,NULL}}
|
|
|
|
struct PRESLocatorFilterPolicy {
|
|
/*i Handle to pass to the evaluate function */
|
|
void *handle;
|
|
/*i Attributes of this filterPolicy */
|
|
RTIBool isEmptyFilter;
|
|
RTIBool isKeyOnlyFilter;
|
|
RTIBool isMetaOnlyFilter;
|
|
};
|
|
|
|
struct PRESSequenceLocatorFilterPolicy {
|
|
/*i Unique key for each user of a filter */
|
|
RTI_UINT32 systemKey;
|
|
/*i Function that compilesthe filter expression */
|
|
PRESContentFilterCompile compile;
|
|
/*i Function that filters a sample */
|
|
PRESContentFilterEvaluate evaluate;
|
|
/*i Function that filters a sample on serialized */
|
|
PRESContentFilterEvaluate evaluateOnSerialized;
|
|
/*i Function that returns attributes of a filter */
|
|
PRESContentFilterQuery queryFunc;
|
|
/*i Function that finalizes the use of a filterPolicy */
|
|
PRESContentFilterFinalize finalizeFunc;
|
|
/*i Indicates if the filter associated is builtin or custom */
|
|
RTIBool isBuiltin;
|
|
/*i API layer filter object */
|
|
/* NOTE: This is NOT the same filter_data supplied in the DDS_x API.
|
|
In actual use, the presentation filter_data is the entire API layer
|
|
filter structure, of which one memmber is the DDS_x API filter_data.
|
|
Wraper functions are required to translate between the two. */
|
|
void *filter_object;
|
|
/*i The maximum number of elements in the property list*/
|
|
RTI_UINT32 _seq_maximum;
|
|
/*i The number of elements in the property list */
|
|
RTI_UINT32 _seq_length;
|
|
/*e The locator filter entries in this sequence */
|
|
struct PRESLocatorFilterPolicy *_seq_buffer;
|
|
};
|
|
|
|
|
|
#define PRES_LOCATOR_FILTER_POLICY_DEFAULT {NULL,RTI_TRUE,RTI_FALSE,RTI_FALSE}
|
|
|
|
#define PRES_SEQ_LOCATOR_FILTER_POLICY_DEFAULT { 0, \
|
|
(PRESContentFilterCompile)NULL,\
|
|
(PRESContentFilterEvaluate)NULL,\
|
|
(PRESContentFilterEvaluate)NULL,\
|
|
(PRESContentFilterQuery)NULL,\
|
|
(PRESContentFilterFinalize)NULL,\
|
|
RTI_TRUE,\
|
|
NULL,\
|
|
0,0,NULL}
|
|
|
|
struct PRESLocatorFilterMatchStatus {
|
|
RTIBool isMatched;
|
|
RTIBool isSessionAsserted;
|
|
/* weak references */
|
|
struct REDAWeakReference commendSrrWR;
|
|
struct REDAWeakReference commendBerWR;
|
|
};
|
|
|
|
struct PRESSequenceLocatorFilterMatchStatus {
|
|
RTI_UINT32 _seq_maximum;
|
|
RTI_UINT32 _seq_length;
|
|
struct PRESLocatorFilterMatchStatus *_seq_buffer;
|
|
};
|
|
|
|
|
|
#define PRES_LOCATOR_FILTER_MATCH_STATUS_DEFAULT {0}
|
|
#define PRES_SEQ_LOCATOR_FILTER_MATCH_STATUS_DEFAULT {0,0,NULL}
|
|
|
|
extern RTIBool
|
|
PRESLocatorFilterQosProperty_copy(
|
|
struct PRESLocatorFilterQosProperty *out,
|
|
const struct PRESLocatorFilterQosProperty *in,
|
|
const struct PRESDataRepresentationQosPolicy *dataRepQos);
|
|
|
|
extern int
|
|
PRESLocatorFilterQosProperty_compare(
|
|
const struct PRESLocatorFilterQosProperty *left,
|
|
const struct PRESLocatorFilterQosProperty *right);
|
|
|
|
extern RTIBool
|
|
PRESSequenceLocatorFilterPolicy_copy(
|
|
struct PRESSequenceLocatorFilterPolicy * out,
|
|
const struct PRESSequenceLocatorFilterPolicy * in);
|
|
|
|
extern int
|
|
PRESSequenceLocatorFilterPolicy_compare(
|
|
const struct PRESSequenceLocatorFilterPolicy *left,
|
|
const struct PRESSequenceLocatorFilterPolicy *right);
|
|
|
|
|
|
|
|
typedef enum {
|
|
PRES_FLOWCONTROLLER_SCHED_POLICY_EDF,
|
|
PRES_FLOWCONTROLLER_SCHED_POLICY_HPF,
|
|
PRES_FLOWCONTROLLER_SCHED_POLICY_RR
|
|
} PRESFlowControllerSchedPolicy;
|
|
|
|
struct PRESFlowControllerProperty {
|
|
PRESFlowControllerSchedPolicy schedPolicy;
|
|
struct RTIEventJobDispatcherTokenBucketProperty bucketProperty;
|
|
};
|
|
|
|
|
|
#define PRES_FLOW_CONTROLLER_PROPERTY_DEFAULT \
|
|
{ \
|
|
PRES_FLOWCONTROLLER_SCHED_POLICY_EDF, \
|
|
RTI_EVENT_JOB_DISPATCHER_TOKEN_BUCKET_PROPERTY_DEFAULT \
|
|
}
|
|
|
|
struct PRESLocalEndpointConfigListener;
|
|
|
|
struct PRESEndpointConfigListener;
|
|
|
|
typedef void
|
|
(*PRESLocalEndpointConfigListenerOnAfterLocalEndpointEnabledCallback)(
|
|
const struct PRESEndpointConfigListener *me,
|
|
const struct MIGRtpsGuid *guid,
|
|
const struct PRESLocalEndpointProperty *property,
|
|
struct REDAWorker *worker);
|
|
|
|
typedef void
|
|
(*PRESLocalEndpointConfigListenerOnAfterLocalEndpointDestructionCallback)(
|
|
const struct PRESEndpointConfigListener *me,
|
|
const struct MIGRtpsGuid *guid,
|
|
RTIBool useSecureChannel,
|
|
struct REDAWorker *worker);
|
|
|
|
typedef void
|
|
(*PRESLocalEndpointConfigListenerOnAfterLocalEndpointPropertyChangedCallback)(
|
|
const struct PRESEndpointConfigListener *me,
|
|
const struct MIGRtpsGuid *guid,
|
|
const struct PRESLocalEndpointProperty *newProp,
|
|
struct REDAWorker *worker);
|
|
|
|
struct PRESLocalEndpointConfigListener {
|
|
PRESLocalEndpointConfigListenerOnAfterLocalEndpointEnabledCallback
|
|
onAfterLocalEndpointEnabled;
|
|
PRESLocalEndpointConfigListenerOnAfterLocalEndpointPropertyChangedCallback
|
|
onAfterLocalEndpointPropertyChanged;
|
|
PRESLocalEndpointConfigListenerOnAfterLocalEndpointDestructionCallback
|
|
onAfterLocalEndpointDestruction;
|
|
};
|
|
|
|
struct PRESRemoteEndpointConfigListener;
|
|
|
|
typedef void
|
|
(*PRESRemoteEndpointConfigListenerOnAfterRemoteEndpointCreationCallback)(
|
|
const struct PRESRemoteEndpointConfigListener *me,
|
|
const struct MIGRtpsGuid *guid,
|
|
const struct PRESRemoteEndpointProperty *property,
|
|
struct REDAWorker *worker);
|
|
|
|
typedef void
|
|
(*PRESRemoteEndpointConfigListenerOnAfterRemoteEndpointDestructionCallback)(
|
|
const struct PRESRemoteEndpointConfigListener *me,
|
|
const struct MIGRtpsGuid *guid,
|
|
struct REDAWorker *worker);
|
|
|
|
typedef void
|
|
(*PRESRemoteEndpointConfigListenerOnAfterRemoteEndpointPropertyChangedCallback)(
|
|
const struct PRESRemoteEndpointConfigListener *me,
|
|
const struct MIGRtpsGuid *guid,
|
|
const struct PRESRemoteEndpointProperty *oldProp,
|
|
const struct PRESRemoteEndpointProperty *newProp,
|
|
struct REDAWorker *worker);
|
|
|
|
typedef RTIBool (
|
|
*PRESRemoteEndpointConfigListenerOnAfterRemoteEndpointTypeResolvedCallback)(
|
|
struct PRESEndpointConfigListener *me,
|
|
struct REDACursor *remoteEndpointCursor,
|
|
const struct MIGRtpsGuid *remoteEndpointGuid,
|
|
struct REDAWorker *worker);
|
|
|
|
struct PRESRemoteEndpointConfigListener {
|
|
PRESRemoteEndpointConfigListenerOnAfterRemoteEndpointCreationCallback
|
|
onAfterRemoteEndpointCreation;
|
|
PRESRemoteEndpointConfigListenerOnAfterRemoteEndpointPropertyChangedCallback onAfterRemoteEndpointPropertyChanged;
|
|
PRESRemoteEndpointConfigListenerOnAfterRemoteEndpointDestructionCallback
|
|
onAfterRemoteEndpointDestruction;
|
|
PRESRemoteEndpointConfigListenerOnAfterRemoteEndpointTypeResolvedCallback onAfterRemoteEndpointTypeResolved;
|
|
};
|
|
|
|
struct PRESEndpointConfigListener {
|
|
struct PRESLocalEndpointConfigListener localEndpointConfigListener;
|
|
struct PRESRemoteEndpointConfigListener remoteEndpointConfigListener;
|
|
};
|
|
|
|
|
|
#define PRESProductVersion MIGRtpsProductVersion
|
|
|
|
|
|
#define PRESProductVersion_INITIALIZER MIGRtpsProductVersion_INITIALIZER
|
|
|
|
|
|
|
|
#define PRES_PRODUCT_VERSION_INVALID_INITIALIZER \
|
|
MIG_RTPS_PRODUCT_VERSION_INVALID_INITIALIZER
|
|
|
|
#define PRES_PRODUCT_VERSION_DEFAULT MIG_RTPS_PRODUCT_VERSION_DEFAULT
|
|
|
|
#define PRES_PRODUCT_VERSION_42c0 { 4, 2, 'c', 0 }
|
|
#define PRES_PRODUCT_VERSION_42d0 { 4, 2, 'd', 0 }
|
|
#define PRES_PRODUCT_VERSION_EARLIEST_COMPATIBLE_VERSION PRES_PRODUCT_VERSION_42d0
|
|
|
|
#define PRES_PRODUCT_VERSION_MAJOR_DIRECTED_WRITE_NATIVE (6)
|
|
#define PRES_PRODUCT_VERSION_MINOR_DIRECTED_WRITE_NATIVE (1)
|
|
#define PRES_PRODUCT_VERSION_RELEASE_DIRECTED_WRITE_NATIVE (0)
|
|
#define PRES_PRODUCT_VERSION_REVISION_DIRECTED_WRITE_NATIVE (0)
|
|
|
|
#define PRES_PRODUCT_VERSION_DIRECTED_WRITE_NATIVE { \
|
|
PRES_PRODUCT_VERSION_MAJOR_DIRECTED_WRITE_NATIVE, \
|
|
PRES_PRODUCT_VERSION_MINOR_DIRECTED_WRITE_NATIVE, \
|
|
PRES_PRODUCT_VERSION_RELEASE_DIRECTED_WRITE_NATIVE, \
|
|
PRES_PRODUCT_VERSION_REVISION_DIRECTED_WRITE_NATIVE \
|
|
}
|
|
|
|
extern PRESDllExport
|
|
int PRESProductVersion_compare(const void* l, const void* r);
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESProductVersion_fromString(
|
|
struct PRESProductVersion *out,
|
|
const char *in);
|
|
|
|
typedef RTI_UINT32 PRESBuiltinEndpointMask;
|
|
|
|
|
|
#define PRES_BUILTIN_ENDPOINT_NONE 0x00000000
|
|
|
|
|
|
#define PRES_BUILTIN_ENDPOINT_SERVICE_REQUEST_WRITER \
|
|
MIG_RTPS_VENDOR_BUILTIN_ENDPOINT_SERVICE_REQUEST_WRITER
|
|
#define PRES_BUILTIN_ENDPOINT_SERVICE_REQUEST_READER \
|
|
MIG_RTPS_VENDOR_BUILTIN_ENDPOINT_SERVICE_REQUEST_READER
|
|
#define PRES_BUILTIN_ENDPOINT_SECURE_SERVICE_REQUEST_WRITER \
|
|
MIG_RTPS_VENDOR_BUILTIN_ENDPOINT_SECURE_SERVICE_REQUEST_WRITER
|
|
#define PRES_BUILTIN_ENDPOINT_SECURE_SERVICE_REQUEST_READER \
|
|
MIG_RTPS_VENDOR_BUILTIN_ENDPOINT_SECURE_SERVICE_REQUEST_READER
|
|
#define PRES_BUILTIN_ENDPOINT_LOCATOR_PING_WRITER \
|
|
MIG_RTPS_VENDOR_BUILTIN_ENDPOINT_LOCATOR_PING_WRITER
|
|
#define PRES_BUILTIN_ENDPOINT_LOCATOR_PING_READER \
|
|
MIG_RTPS_VENDOR_BUILTIN_ENDPOINT_LOCATOR_PING_READER
|
|
#define PRES_BUILTIN_ENDPOINT_CDS_ANNOUNCER_WRITER \
|
|
MIG_RTPS_VENDOR_BUILTIN_ENDPOINT_CDS_ANNOUNCER_WRITER
|
|
#define PRES_BUILTIN_ENDPOINT_SPDP2_BUILTIN_PARTICIPANT_RELIABLE_WRITER \
|
|
MIG_RTPS_VENDOR_BUILTIN_ENDPOINT_SPDP2_BUILTIN_PARTICIPANT_RELIABLE_WRITER
|
|
#define PRES_BUILTIN_ENDPOINT_SPDP2_BUILTIN_PARTICIPANT_RELIABLE_READER \
|
|
MIG_RTPS_VENDOR_BUILTIN_ENDPOINT_SPDP2_BUILTIN_PARTICIPANT_RELIABLE_READER
|
|
#define PRES_BUILTIN_ENDPOINT_SPDP2_BUILTIN_PARTICIPANT_SECURE_RELIABLE_WRITER \
|
|
MIG_RTPS_VENDOR_BUILTIN_ENDPOINT_SPDP2_BUILTIN_PARTICIPANT_SECURE_RELIABLE_WRITER
|
|
#define PRES_BUILTIN_ENDPOINT_SPDP2_BUILTIN_PARTICIPANT_SECURE_RELIABLE_READER \
|
|
MIG_RTPS_VENDOR_BUILTIN_ENDPOINT_SPDP2_BUILTIN_PARTICIPANT_SECURE_RELIABLE_READER
|
|
|
|
|
|
|
|
/* Service Request */
|
|
#define PRES_BUILTIN_CHANNEL_SERVICE_REQUEST_WRITER \
|
|
MIG_RTPS_VENDOR_BUILTIN_ENDPOINT_SERVICE_REQUEST_WRITER
|
|
#define PRES_BUILTIN_CHANNEL_SERVICE_REQUEST_READER \
|
|
MIG_RTPS_VENDOR_BUILTIN_ENDPOINT_SERVICE_REQUEST_READER
|
|
#define PRES_BUILTIN_CHANNEL_SERVICE_REQUEST \
|
|
(PRES_BUILTIN_CHANNEL_SERVICE_REQUEST_WRITER \
|
|
| PRES_BUILTIN_CHANNEL_SERVICE_REQUEST_READER)
|
|
|
|
/* Type Lookup */
|
|
#define PRES_BUILTIN_CHANNEL_TYPE_LOOKUP_SERVICE_REQUEST_WRITER \
|
|
MIG_RTPS_BUILTIN_ENDPOINT_TYPE_LOOKUP_SERVICE_REQUEST_WRITER
|
|
#define PRES_BUILTIN_CHANNEL_TYPE_LOOKUP_SERVICE_REQUEST_READER \
|
|
MIG_RTPS_BUILTIN_ENDPOINT_TYPE_LOOKUP_SERVICE_REQUEST_READER
|
|
#define PRES_BUILTIN_CHANNEL_TYPE_LOOKUP_SERVICE_REQUEST \
|
|
(PRES_BUILTIN_CHANNEL_TYPE_LOOKUP_SERVICE_REQUEST_WRITER \
|
|
| PRES_BUILTIN_CHANNEL_TYPE_LOOKUP_SERVICE_REQUEST_READER)
|
|
#define PRES_BUILTIN_CHANNEL_TYPE_LOOKUP_SERVICE_REPLY_WRITER \
|
|
MIG_RTPS_BUILTIN_ENDPOINT_TYPE_LOOKUP_SERVICE_REPLY_WRITER
|
|
#define PRES_BUILTIN_CHANNEL_TYPE_LOOKUP_SERVICE_REPLY_READER \
|
|
MIG_RTPS_BUILTIN_ENDPOINT_TYPE_LOOKUP_SERVICE_REPLY_READER
|
|
#define PRES_BUILTIN_CHANNEL_TYPE_LOOKUP_SERVICE_REPLY \
|
|
(PRES_BUILTIN_CHANNEL_TYPE_LOOKUP_SERVICE_REPLY_WRITER \
|
|
| PRES_BUILTIN_CHANNEL_TYPE_LOOKUP_SERVICE_REPLY_READER)
|
|
|
|
|
|
|
|
#define PRESBuiltinEndpointMask_enabledBuiltinChannelToBuiltinEndpointMask( \
|
|
enableBuiltinChannelMask__) \
|
|
((enableBuiltinChannelMask__) \
|
|
& (PRES_BUILTIN_CHANNEL_TYPE_LOOKUP_SERVICE_REQUEST \
|
|
| PRES_BUILTIN_CHANNEL_TYPE_LOOKUP_SERVICE_REPLY))
|
|
|
|
|
|
#define PRESBuiltinEndpointMask_enableBuiltinChannelToVendorBuiltinEndpointMask( \
|
|
enableBuiltinChannelMask__) \
|
|
((enableBuiltinChannelMask__) \
|
|
& (PRES_BUILTIN_CHANNEL_SERVICE_REQUEST))
|
|
|
|
typedef RTICdrUnsignedLong PRESBuiltinEndpointQos_t;
|
|
|
|
|
|
#define PRES_BUILTIN_ENDPOINT_QOS_NONE (0)
|
|
|
|
typedef enum PRESBuiltinEndpointQosBits {
|
|
PRES_BUILTIN_ENDPOINT_QOS_BIT_BEST_EFFORT_PARTICIPANT_MESSAGE_DATA_READER = (1 << 0),
|
|
/* RTI extension (only used internally, never sent to the wire). */
|
|
PRES_BUILTIN_ENDPOINT_QOS_BIT_IS_VALID = (1U << 31)
|
|
} PRESBuiltinEndpointQosBits;
|
|
|
|
|
|
#define PRESBuiltinEndpointQos_isValid(qos) \
|
|
(((qos) & PRES_BUILTIN_ENDPOINT_QOS_BIT_IS_VALID) != 0)
|
|
|
|
|
|
struct PRESOdbcDatabaseConnection;
|
|
|
|
|
|
struct PRESCookie {
|
|
struct PRESSequenceOctet data;
|
|
};
|
|
|
|
|
|
#define PRES_COOKIE_DEFAULT { \
|
|
PRES_SEQUENCE_OCTET_DEFAULT \
|
|
}
|
|
|
|
extern void PRESCookie_fromBuffer(struct PRESCookie *cookie,
|
|
struct REDABuffer *buffer);
|
|
|
|
extern void PRESCookie_toBuffer(struct PRESCookie *cookie,
|
|
struct REDABuffer *buffer);
|
|
|
|
typedef enum PRESSampleFlagBits {
|
|
PRES_REDELIVERED_SAMPLE = (1 << 0),
|
|
PRES_INTERMEDIATE_REPLY_SEQUENCE_SAMPLE = (1 << 1),
|
|
PRES_REPLICATE_SAMPLE = (1 << 2),
|
|
PRES_LAST_SHARED_READER_QUEUE_SAMPLE = (1 << 3),
|
|
PRES_INTERMEDIATE_TOPIC_QUERY_SAMPLE = (1 << 4),
|
|
PRES_WRITER_REMOVED_BATCH_SAMPLE = (1 << 5),
|
|
PRES_DISCOVERY_SERVICE_SAMPLE = (1 << 6),
|
|
PRES_INCOMPLETE_SNAPSHOT_TOPIC_QUERY = (1 << 7)
|
|
} PRESSampleFlagBits;
|
|
|
|
|
|
typedef RTI_INT32 PRESSampleFlag;
|
|
|
|
|
|
struct PRESWriteParams {
|
|
struct RTINtpTime *sourceTimestamp;
|
|
struct PRESCookie *cookie;
|
|
struct PRESInstanceHandle *handle;
|
|
RTI_INT32 publicationPriority;
|
|
RTIBool flush_on_write;
|
|
struct PRESOriginalWriterInfo actualOriginalWriterInfo;
|
|
struct PRESOriginalWriterInfo relatedOriginalWriterInfo;
|
|
PRESSampleFlag flag;
|
|
struct MIGRtpsGuid relatedReaderGuid;
|
|
struct MIGRtpsGuid sourceGuid;
|
|
struct MIGRtpsGuid relatedSourceGuid;
|
|
struct MIGRtpsGuid topicQueryGuid;
|
|
/**
|
|
* The product version is here so that it can be propagated to the writer
|
|
* and used when serializing the GUID for directed writes.
|
|
*/
|
|
struct PRESProductVersion relatedReaderProductVersion;
|
|
/* The following param only affects anonymous writer behavior.
|
|
* If locatorDirectedWriteList is set, the writer will only publish the
|
|
* sample to the specified locators. */
|
|
struct REDAInlineList * locatorDirectedWriteList;
|
|
struct REDASequenceNumber relatedEpoch;
|
|
/*
|
|
* The interceptor handle to be used to encode the sample. Only set if the
|
|
* crypto data from a different writer should be used to encode the sample.
|
|
* Note that the writer performing the write, and the writer whose crypto
|
|
* data is used to encode the sample must be within the same publisher. This
|
|
* field is not exposed beyond pres.
|
|
*/
|
|
void *interceptorHandle;
|
|
};
|
|
|
|
|
|
#define PRES_WRITE_PARAMS_DEFAULT { \
|
|
NULL, /* sourceTimestamp */ \
|
|
NULL, /* cookie */ \
|
|
NULL, /* handle */ \
|
|
PRES_PUBLICATION_PRIORITY_UNDEFINED, /* publicationPriority */ \
|
|
RTI_FALSE, /* flush_on_write*/ \
|
|
{MIG_RTPS_GUID_UNKNOWN, REDA_SEQUENCE_NUMBER_UNKNOWN}, /* actualOriginalWriterInfo */ \
|
|
{MIG_RTPS_GUID_UNKNOWN, REDA_SEQUENCE_NUMBER_UNKNOWN}, /* relatedOriginalWriterInfo */ \
|
|
0, /* flag */ \
|
|
MIG_RTPS_GUID_UNKNOWN, /* relatedReaderGuid */ \
|
|
MIG_RTPS_GUID_UNKNOWN, /* sourceGuid */ \
|
|
MIG_RTPS_GUID_UNKNOWN, /* relatedSourceGuid */ \
|
|
MIG_RTPS_GUID_UNKNOWN, /* topicQueryGuid */ \
|
|
PRES_PRODUCT_VERSION_INVALID_INITIALIZER, /* relatedReaderProductVersion */ \
|
|
NULL, /* locatorDirectedWriteList */ \
|
|
REDA_SEQUENCE_NUMBER_ZERO, /* relatedEopoch */ \
|
|
NULL /* intercetorHandle */ \
|
|
}
|
|
|
|
|
|
struct PRESTransportEncapsulationProperty {
|
|
|
|
/*i Apply encapsulations to all plugins */
|
|
RTIBool applyEncapsulationsToAllPlugins;
|
|
|
|
/*i The pointer to the transport plugin */
|
|
NDDS_Transport_Plugin *plugin;
|
|
|
|
/*i The plugin's network address */
|
|
NDDS_Transport_Address_t address;
|
|
|
|
/* The number of encapsulations this transport supports */
|
|
RTI_UINT32 encapsulationCount;
|
|
|
|
/* The encapsulations this transport supports */
|
|
RTIEncapsulationId encapsulations[NETIO_LOCATOR_ENCAPSULATION_COUNT_MAX];
|
|
};
|
|
|
|
|
|
#define PRES_TRANSPORT_ENCAPSULATION_PROPERTY_DEFAULT { \
|
|
RTI_FALSE, /* applyEncapsulationsToAllPlugins */ \
|
|
NULL, /* plugin */ \
|
|
NDDS_TRANSPORT_ADDRESS_INVALID_INITIALIZER, /* address */ \
|
|
0, /* encapsulationCount */ \
|
|
NETIO_LOCATOR_ENCAPSULATION_ARRAY_INVALID /* encapsulations */ \
|
|
}
|
|
|
|
|
|
struct PRESTransportEncapsulationQosPolicy {
|
|
RTI_UINT32 _seq_maximum;
|
|
RTI_UINT32 _seq_length;
|
|
struct PRESTransportEncapsulationProperty *_seq_buffer;
|
|
};
|
|
|
|
|
|
#define PRES_TRANSPORT_ENCAPSULATION_QOS_POLICY_DEFAULT { \
|
|
0, 0, NULL \
|
|
}
|
|
|
|
extern PRESDllExport void
|
|
PRESTransportEncapsulationQosPolicy_reset_property(
|
|
struct PRESTransportEncapsulationProperty *property);
|
|
|
|
extern PRESDllExport void
|
|
PRESTransportEncapsulationQosPolicy_assert_property(
|
|
struct PRESTransportEncapsulationQosPolicy *self,
|
|
const struct PRESTransportEncapsulationProperty *property,
|
|
int encapsulationCount,
|
|
RTIEncapsulationId *encapsulations,
|
|
RTIBool mergeTransports,
|
|
RTIBool *foundMoreThanProvidedFor);
|
|
|
|
|
|
/*
|
|
* @brief The total number of different object suffixes for which an object
|
|
* id can be assigned. The 27 specific MIGRtpsObjectSuffixes can be
|
|
* found in PRESPsService_getUniqueObjectId.
|
|
*/
|
|
#define PRES_PS_SERVICE_OBJECT_KIND_TOTAL (27)
|
|
|
|
|
|
struct PRESUniqueObjectKeyGenerator {
|
|
/*i
|
|
* CORE-6996: This value is used for testing purposes to validate that
|
|
* we can reuse an unassigned objectId (consisting in object key + object
|
|
* kind) after its associated counter for auto object Keys
|
|
* (_objectKeyCounters[i]) overflows.
|
|
*
|
|
* The value is populated from the property:
|
|
* PRES_PARTICIPANT_INITIAL_AUTO_OBJECT_KEY_PROPERTY_NAME
|
|
*
|
|
* Note that this initial value does not apply to group entities. Their
|
|
* object IDs always start at PRES_PS_SERVICE_INITIAL_GROUP_OBJECT_KEY.
|
|
*/
|
|
MIGRtpsObjectKey _initialObjectKey;
|
|
|
|
/*i Array to keep unique object keys for each object type. */
|
|
MIGRtpsObjectKey _objectKeyCounters[PRES_PS_SERVICE_OBJECT_KIND_TOTAL];
|
|
|
|
/*i
|
|
* The following boolean array indicates if the corresponding object
|
|
* key counter rolled over at least once.
|
|
*
|
|
* Once a counter has rolled over, we will have to do a lookup
|
|
* every time we assign an object ID as there may be an entity with
|
|
* that ID already.
|
|
*/
|
|
RTIBool _objectKeyRolledOver[PRES_PS_SERVICE_OBJECT_KIND_TOTAL];
|
|
};
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESUniqueObjectKeyGenerator_initialize(
|
|
struct PRESUniqueObjectKeyGenerator *self,
|
|
struct PRESPropertyQosPolicy *propertyList);
|
|
|
|
typedef enum {
|
|
/*i \ingroup PRESPsServiceModule
|
|
*\brief No instances will be removed
|
|
*/
|
|
PRES_NO_INSTANCE_REMOVAL = 0,
|
|
/*i \ingroup PRESPsServiceModule
|
|
*\brief Only empty instances will be removed
|
|
*/
|
|
PRES_EMPTY_INSTANCE_REMOVAL = 1,
|
|
/*i \ingroup PRESPsServiceModule
|
|
*\brief Only fully processed instances will be removed
|
|
*/
|
|
PRES_FULLY_PROCESSED_INSTANCE_REMOVAL = 2,
|
|
/*i \ingroup PRESPsServiceModule
|
|
*\brief Any instance will be removed
|
|
*/
|
|
PRES_ANY_INSTANCE_REMOVAL = 3
|
|
} PRESDataReaderInstanceRemovalKind;
|
|
|
|
typedef struct PRESDataReaderResourceLimitsInstanceReplacementSettings {
|
|
PRESDataReaderInstanceRemovalKind alive_instance_removal;
|
|
PRESDataReaderInstanceRemovalKind disposed_instance_removal;
|
|
PRESDataReaderInstanceRemovalKind no_writers_instance_removal;
|
|
} PRESDataReaderResourceLimitsInstanceReplacementSettings;
|
|
|
|
extern PRESDllExport
|
|
int PRESDataReaderResourceLimitsInstanceReplacementSettings_compare(
|
|
const struct PRESDataReaderResourceLimitsInstanceReplacementSettings *l,
|
|
const struct PRESDataReaderResourceLimitsInstanceReplacementSettings *r);
|
|
|
|
|
|
#define PRESPsReaderDataReaderResourceLimitsInstanceReplacementSettings_INITIALIZER { \
|
|
PRES_NO_INSTANCE_REMOVAL, /* alive_instance_removal */ \
|
|
PRES_EMPTY_INSTANCE_REMOVAL, /* disposed_instance_removal */ \
|
|
PRES_EMPTY_INSTANCE_REMOVAL /* no_writers_instance_removal */ \
|
|
}
|
|
|
|
typedef enum {
|
|
PRES_UNREGISTERED_INSTANCE_REPLACEMENT,
|
|
|
|
PRES_ALIVE_INSTANCE_REPLACEMENT,
|
|
|
|
PRES_DISPOSED_INSTANCE_REPLACEMENT,
|
|
|
|
PRES_ALIVE_THEN_DISPOSED_INSTANCE_REPLACEMENT,
|
|
|
|
PRES_DISPOSED_THEN_ALIVE_INSTANCE_REPLACEMENT,
|
|
|
|
PRES_ALIVE_OR_DISPOSED_INSTANCE_REPLACEMENT
|
|
|
|
} PRESInstanceReplacementPolicy;
|
|
|
|
struct PRESEndpointGroup {
|
|
/*i
|
|
@brief Role name.
|
|
*/
|
|
char * roleName;
|
|
/*i
|
|
@brief Quorum count.
|
|
*/
|
|
int quorumCount;
|
|
};
|
|
|
|
struct PRESSequenceEndpointGroup {
|
|
/*i The maximum number of elements in the endpoint group list*/
|
|
RTI_UINT32 maximum;
|
|
|
|
/*i The number of elements in the endpoint group list */
|
|
RTI_UINT32 length;
|
|
|
|
/*e The elements in this sequence */
|
|
struct PRESEndpointGroup * buffer;
|
|
|
|
/*e Maximum length of the string buffer*/
|
|
RTI_UINT32 _string_maximum;
|
|
|
|
/*e Current length of string buffer */
|
|
RTI_UINT32 _string_length;
|
|
|
|
/*e Area allocated for storing string */
|
|
char * _string_buffer;
|
|
};
|
|
|
|
|
|
#define PRESSequenceEndpointGroup_INITIALIZER { \
|
|
0, /* maximum */ \
|
|
0, /* length */ \
|
|
NULL, /* buffer */ \
|
|
0, /* _string_maximum */ \
|
|
0, /* _string_length */ \
|
|
NULL /* _string_buffer */ \
|
|
}
|
|
|
|
|
|
#define PRES_AVAILABILITY_QOS_POLICY_DEFAULT {RTI_FALSE,{0,0},{0,0},{0,0,NULL,0,0,NULL}}
|
|
|
|
struct PRESAvailabilityQosPolicy {
|
|
/*
|
|
* Enable required subscriptions
|
|
*/
|
|
RTIBool enableRequiredSubscriptions;
|
|
/*e
|
|
* Max data availability waiting time.
|
|
*/
|
|
struct RTINtpTime maxDataAvailabilityWaitingTime;
|
|
/*e
|
|
* Max endpoint availability waiting time.
|
|
*/
|
|
struct RTINtpTime maxEndpointAvailabilityWaitingTime;
|
|
/*e
|
|
* Endpoint group sequence
|
|
*/
|
|
struct PRESSequenceEndpointGroup requiredMatchedEndpointGroups;
|
|
};
|
|
|
|
struct PRESTopicQueryDispatchQosPolicy {
|
|
/*e
|
|
* Whether to enable Topic Queries on this writer or not
|
|
*/
|
|
RTIBool enable;
|
|
/*e
|
|
* The periodicity of the event that publishes samples for topic queries
|
|
*/
|
|
struct RTINtpTime publicationPeriod;
|
|
|
|
/*e
|
|
* The number of samples to publish in each event, belonging to any topic
|
|
* query.
|
|
*/
|
|
RTI_INT32 samplesPerPeriod;
|
|
};
|
|
|
|
extern PRESDllExport
|
|
int PRESTopicQueryDispatchQosPolicy_compare(
|
|
const struct PRESTopicQueryDispatchQosPolicy *l,
|
|
const struct PRESTopicQueryDispatchQosPolicy *r);
|
|
|
|
|
|
#define PRES_TOPIC_QUERY_DISPATCH_QOS_POLICY_DEFAULT {RTI_FALSE,{1,0},-1}
|
|
|
|
struct PRESTopicQueryPublicationProperty {
|
|
/*e
|
|
* Whether the remote DataWriter enables Topic Queries or not
|
|
*/
|
|
RTIBool enable;
|
|
|
|
/*e
|
|
* The number of sessions this DataWriter dedicates to publishing
|
|
* topic-query samples. Zero indicates that the DataWriter uses a regular
|
|
* session also for publishing topic-query samples.
|
|
*
|
|
* Currently only 0 and 1 are supported and, when enable is true, that value
|
|
* depends on the writer-history plugin: ODBC doesn't support multi-session,
|
|
* so the value is 0; Memory does, so the value is 1.
|
|
*/
|
|
RTI_INT32 numberOfSessions;
|
|
};
|
|
|
|
|
|
#define PRES_TOPIC_QUERY_PUBLICATION_PROPERTY_DEFAULT {RTI_FALSE, 0}
|
|
|
|
extern PRESDllExport
|
|
int PRESTopicQueryPublicationProperty_compare(
|
|
const struct PRESTopicQueryPublicationProperty *l,
|
|
const struct PRESTopicQueryPublicationProperty *r);
|
|
|
|
struct PRESSampleIdentity {
|
|
struct MIGRtpsGuid guid;
|
|
struct REDASequenceNumber sn;
|
|
};
|
|
|
|
struct PRESFilterSampleInfo {
|
|
/*e
|
|
Related publication virtual guid
|
|
*/
|
|
struct PRESOctetGuid relatedSampleWriterGuid;
|
|
/*e
|
|
Related publication virtual sequence number
|
|
*/
|
|
struct REDASequenceNumber relatedSampleSn;
|
|
/*e
|
|
Related source GUID
|
|
*/
|
|
struct PRESOctetGuid relatedSourceGuid;
|
|
/*e
|
|
Related reader GUID
|
|
*/
|
|
struct PRESOctetGuid relatedReaderGuid;
|
|
/*e
|
|
Publication virtual guid
|
|
*/
|
|
struct PRESOctetGuid sampleWriterGuid;
|
|
/*e
|
|
Publication virtual sequence number
|
|
*/
|
|
struct REDASequenceNumber sampleSn;
|
|
/*e
|
|
Source GUID
|
|
*/
|
|
struct PRESOctetGuid sourceGuid;
|
|
/*e
|
|
Publication priority of the sample
|
|
*/
|
|
RTI_INT32 publicationPriority;
|
|
};
|
|
|
|
struct PRESExpressionProperty {
|
|
/*e
|
|
Indicates if expression is based only on key fields
|
|
*/
|
|
RTIBool keyOnlyFilter;
|
|
/*e
|
|
Indicates if writer side filtering optimization can be performed
|
|
*/
|
|
RTIBool writerSideFilterOptimization;
|
|
};
|
|
|
|
|
|
#define PRES_EXPRESSION_PROPERTY_DEFAULT {RTI_FALSE,RTI_FALSE}
|
|
|
|
struct PRESSqlFilterReservedData {
|
|
/*e
|
|
Growth property of the remote reader table
|
|
*/
|
|
struct REDAFastBufferPoolGrowthProperty growth;
|
|
/*e
|
|
Maximum number of remote reader filters
|
|
*/
|
|
int maxRemoteReaderFilters;
|
|
};
|
|
|
|
extern void PRESFilterSampleInfo_initialize(
|
|
struct PRESFilterSampleInfo *self,
|
|
const struct MIGRtpsGuid *originalVirtualWriterGuid,
|
|
const struct REDASequenceNumber *originalVirtualSn,
|
|
const struct MIGRtpsGuid *relatedOriginalVirtualWriterGuid,
|
|
const struct REDASequenceNumber *relatedOriginalVirtualSn,
|
|
const struct MIGRtpsGuid *relatedSourceGuid,
|
|
const struct MIGRtpsGuid *relatedReaderGuid,
|
|
const struct MIGRtpsGuid *sourceGuid,
|
|
RTI_INT32 publicationPriority);
|
|
|
|
|
|
#define PRES_FILTER_SAMPLE_INFO_DEFAULT \
|
|
{ \
|
|
PRES_OCTET_GUID_ZERO /* relatedSampleWriterGuid */, \
|
|
REDA_SEQUENCE_NUMBER_UNKNOWN /* relatedSampleSn */, \
|
|
PRES_OCTET_GUID_ZERO /* relatedSourceGuid */, \
|
|
PRES_OCTET_GUID_ZERO /* relatedReaderGuid */, \
|
|
PRES_OCTET_GUID_ZERO /* sampleWriterGuid */, \
|
|
REDA_SEQUENCE_NUMBER_UNKNOWN /* sampleSn */, \
|
|
PRES_OCTET_GUID_ZERO /* sourceGuid */, \
|
|
PRES_PUBLICATION_PRIORITY_UNDEFINED /* publicationPriority */ \
|
|
}
|
|
|
|
|
|
struct PRESAckResponseData {
|
|
struct PRESSequenceOctet data;
|
|
};
|
|
|
|
|
|
#define PRES_ACK_RESPONSE_DATA_DEFAULT { \
|
|
PRES_SEQUENCE_OCTET_DEFAULT \
|
|
}
|
|
|
|
|
|
extern void PRESAckResponse_fromBuffer(struct PRESAckResponseData *ackResp,
|
|
const struct REDABuffer *buffer);
|
|
|
|
|
|
extern void PRESAckResponse_toBuffer(const struct PRESAckResponseData *ackResp,
|
|
struct REDABuffer *buffer);
|
|
|
|
typedef enum
|
|
{
|
|
PRES_PROTOCOL_ACK_MODE,
|
|
PRES_AUTO_APP_ACK_MODE,
|
|
PRES_ORDERED_APP_ACK_MODE,
|
|
PRES_EXPLICIT_APP_ACK_MODE
|
|
|
|
} PRESAppAckMode;
|
|
|
|
|
|
struct PRESSequenceTransportInfo {
|
|
RTI_UINT32 _maximum;
|
|
RTI_UINT32 _length;
|
|
struct RTINetioTransportInfo *_buffer;
|
|
};
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESTransportInfoSeq_copy(
|
|
struct PRESSequenceTransportInfo *out,
|
|
const struct PRESSequenceTransportInfo *in);
|
|
|
|
|
|
#define PRES_SEQUENCE_TRANSPORT_INFO_DEFAULT {0, 0, NULL}
|
|
|
|
|
|
/**
|
|
* ****************************************************************************
|
|
* GMCLASSID: defined in the OMG security spec, used in GenericMessageClassId.
|
|
* *****************************************************************************
|
|
*/
|
|
|
|
/*************************** OMG class ids ************************************/
|
|
#define PRES_GMCLASSID_TRUST_AUTH_HANDSHAKE "dds.sec.auth"
|
|
#define PRES_GMCLASSID_TRUST_AUTH_REQUEST "dds.sec.auth_request"
|
|
#define PRES_GMCLASSID_TRUST_PARTICIPANT_INTERCEPTOR_STATE \
|
|
"dds.sec.participant_crypto_tokens"
|
|
#define PRES_GMCLASSID_TRUST_DATAWRITER_INTERCEPTOR_STATE \
|
|
"dds.sec.datawriter_crypto_tokens"
|
|
#define PRES_GMCLASSID_TRUST_DATAREADER_INTERCEPTOR_STATE \
|
|
"dds.sec.datareader_crypto_tokens"
|
|
#define PRES_GMCLASSID_TRUST_KEY_REVISION_STATE \
|
|
"dds.sec.key_revision_tokens"
|
|
#define PRES_GMCLASSID_TRUST_IDENTITY_CREDENTIAL_STATE \
|
|
"dds.sec.identity_credential_token"
|
|
#define PRES_GMCLASSID_TRUST_IDENTITY_STATUS_STATE \
|
|
"dds.sec.identity_status_token"
|
|
#define PRES_GMCLASSID_TRUST_PERMISSIONS_CREDENTIAL_STATE \
|
|
"dds.sec.permissions_credential_token"
|
|
|
|
/*************************** RTI class ids ************************************/
|
|
/* Used as prefix for RTI specific trust-plugins class-ids */
|
|
#define PRES_GMCLASSID_TRUST_RTI_PLUGINS_PREFIX "com.rti.sec."
|
|
/* Used for requesting the remote peer to restart the authentication process */
|
|
#define PRES_GMCLASSID_TRUST_RTI_AUTH_REQUEST \
|
|
PRES_GMCLASSID_TRUST_RTI_PLUGINS_PREFIX "auth.request"
|
|
|
|
|
|
/************************* Channel Service-IDs *********************************
|
|
* For each GMCLASSID, we do an internal mapping to a Channel Service-ID. For
|
|
* more information about Channel Service-IDs, please refer to
|
|
* PRESPsServiceBuiltinChannelForwarder documentation.
|
|
******************************************************************************/
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Channel Service-ID for UNKNOWN GMCLASSID.
|
|
*/
|
|
#define PRES_GMCLASSID_SERVICE_ID_UNKNOWN 0
|
|
/*e \ingroup PRESInterParticipantModule
|
|
* Special Service-ID for UNKNOWN GMCLASSID. It identifies DataHolder samples.
|
|
*/
|
|
#define PRES_GMCLASSID_SERVICE_ID_UNKNOWN_DATAHOLDER -1
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Channel Service-ID for GMCLASSID_TRUST_AUTH_HANDSHAKE messages.
|
|
*/
|
|
#define PRES_GMCLASSID_SERVICE_ID_TRUST_AUTH_HANDSHAKE 1
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Channel Service-ID for GMCLASSID_TRUST_RTI_AUTH_REQUEST messages.
|
|
*/
|
|
#define PRES_GMCLASSID_SERVICE_ID_TRUST_RTI_AUTH_REQUEST 2
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Channel Service-ID for GMCLASSID_TRUST_PARTICIPANT_CRYPTO_TOKENS messages.
|
|
*/
|
|
#define PRES_GMCLASSID_SERVICE_ID_TRUST_PARTICIPANT_CRYPTO_TOKENS 3
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Channel Service-ID for GMCLASSID_TRUST_DATAWRITER_CRYPTO_TOKENS messages.
|
|
*/
|
|
#define PRES_GMCLASSID_SERVICE_ID_TRUST_DATAWRITER_CRYPTO_TOKENS 4
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Channel Service-ID for GMCLASSID_TRUST_DATAREADER_CRYPTO_TOKENS messages.
|
|
*/
|
|
#define PRES_GMCLASSID_SERVICE_ID_TRUST_DATAREADER_CRYPTO_TOKENS 5
|
|
/*e \ingroup PRESInterParticipantModule
|
|
* Channel Service-ID for GMCLASSID_TRUST_AUTH_REQUEST messages.
|
|
*/
|
|
#define PRES_GMCLASSID_SERVICE_ID_TRUST_AUTH_REQUEST 6
|
|
/*e \ingroup PRESInterParticipantModule
|
|
* Channel Service-ID for GMCLASSID_TRUST_KEY_REVISION_INFO messages.
|
|
*/
|
|
#define PRES_GMCLASSID_SERVICE_ID_TRUST_KEY_REVISION_TOKENS 7
|
|
/*e \ingroup PRESInterParticipantModule
|
|
* Service-ID to indicate that historical key revision tokens (which includes
|
|
* all of the tokens corresponding to the current active window) should be sent
|
|
* to a late-joiner participant. We distinguish this from
|
|
* PRES_GMCLASSID_SERVICE_ID_TRUST_KEY_REVISION_TOKENS because when sending a
|
|
* new key revision to all participants, we need to save the sequence number
|
|
* so that we know when all participants have acknowledged hearing about this
|
|
* new key revision. On the other hand, when sending the historical key
|
|
* revisions to a new participant, we must not save the sequence number
|
|
* because only one participant will get it. See
|
|
* PRESParticipant_onSecurityChannelWriteEvent.
|
|
*
|
|
* However, we don't need a separate
|
|
* PRES_GMCLASSID_TRUST_HISTORICAL_KEY_REVISION_TOKENS because the
|
|
* message_class_id is the same as
|
|
* PRES_GMCLASSID_TRUST_KEY_REVISION_STATE.
|
|
*/
|
|
#define PRES_GMCLASSID_SERVICE_ID_TRUST_HISTORICAL_KEY_REVISION_TOKENS 8
|
|
/*e \ingroup PRESInterParticipantModule
|
|
* Channel Service-ID to propagate an update of the Identity Certificate.
|
|
*/
|
|
#define PRES_GMCLASSID_SERVICE_ID_TRUST_IDENTITY_CREDENTIAL_TOKEN 9
|
|
/*e \ingroup PRESInterParticipantModule
|
|
* Channel Service-ID to propagate an update of the Status Token.
|
|
*/
|
|
#define PRES_GMCLASSID_SERVICE_ID_TRUST_IDENTITY_STATUS_TOKEN 10
|
|
/*e \ingroup PRESInterParticipantModule
|
|
* Channel Service-ID to propagate an update of the Permissions Document.
|
|
*/
|
|
#define PRES_GMCLASSID_SERVICE_ID_TRUST_PERMISSIONS_CREDENTIAL_TOKEN 11
|
|
|
|
|
|
#define PRES_PLUGIN_CLASSNAME_TRUST_DDS_AUTH_LIGHTWEIGHT_PLUGIN \
|
|
"DDS:Auth:PSK"
|
|
|
|
/* Separator between class name and major version */
|
|
#define PRES_PLUGIN_CLASS_NAME_MAJOR_VERSION_SEPARATOR ":"
|
|
|
|
|
|
struct PRESBinaryProperty {
|
|
/*i
|
|
* @brief BinaryProperty name. The name containing a NUL
|
|
* terminated string.
|
|
*/
|
|
char *name;
|
|
/*i
|
|
* @brief BinaryProperty value. The value containing a sequence of octets.
|
|
*/
|
|
struct PRESDDSSequence value;
|
|
/*i
|
|
* @brief Indicates if the binary property must be propagated or not.
|
|
*/
|
|
RTICdrBoolean propagate;
|
|
};
|
|
|
|
struct PRESDataHolder {
|
|
/*i
|
|
* @brief class_id. Identifies the kind of DataHolder.
|
|
*/
|
|
char *classId;
|
|
/*i
|
|
* @brief properties. A sequence of PRESProperty.
|
|
*/
|
|
struct PRESDDSSequence properties;
|
|
/*i
|
|
* @brief binary_properties. A sequence of PRESBinaryProperty.
|
|
*/
|
|
struct PRESDDSSequence binaryProperties;
|
|
};
|
|
|
|
|
|
|
|
#define PRES_DATA_HOLDER_INITIALIZER { \
|
|
NULL, \
|
|
PRES_DDS_SEQUENCE_INITIALIZER, \
|
|
PRES_DDS_SEQUENCE_INITIALIZER \
|
|
}
|
|
|
|
/*
|
|
* Returns true if the identity token corresponds to a non-lightweight
|
|
* authentication plugin.
|
|
*/
|
|
#define PRESIdentityToken_isFullSecurity(dataHolder__) ( \
|
|
(((dataHolder__)->classId) != NULL) \
|
|
&& (RTIOsapiUtility_strncmp( \
|
|
(dataHolder__)->classId, \
|
|
PRES_PLUGIN_CLASSNAME_TRUST_DDS_AUTH_LIGHTWEIGHT_PLUGIN \
|
|
PRES_PLUGIN_CLASS_NAME_MAJOR_VERSION_SEPARATOR, \
|
|
strlen( \
|
|
PRES_PLUGIN_CLASSNAME_TRUST_DDS_AUTH_LIGHTWEIGHT_PLUGIN \
|
|
PRES_PLUGIN_CLASS_NAME_MAJOR_VERSION_SEPARATOR)) \
|
|
!= 0) \
|
|
)
|
|
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESDataHolder_isNil(const struct PRESDataHolder *dataHolder);
|
|
|
|
|
|
|
|
/*
|
|
* These values are specified in the DDS security logging plugin. We define
|
|
* them in pres to log core-level security-related events that the security
|
|
* plugins cannot detect.
|
|
*/
|
|
#define PRES_TRUST_LOGGING_SILENT_LEVEL -1
|
|
#define PRES_TRUST_LOGGING_EMERGENCY_LEVEL 0
|
|
#define PRES_TRUST_LOGGING_ALERT_LEVEL 1
|
|
#define PRES_TRUST_LOGGING_CRITICAL_LEVEL 2
|
|
#define PRES_TRUST_LOGGING_ERROR_LEVEL 3
|
|
#define PRES_TRUST_LOGGING_WARNING_LEVEL 4
|
|
#define PRES_TRUST_LOGGING_NOTICE_LEVEL 5
|
|
#define PRES_TRUST_LOGGING_INFORMATIONAL_LEVEL 6
|
|
#define PRES_TRUST_LOGGING_DEBUG_LEVEL 7
|
|
|
|
/*
|
|
* Plugin class families.
|
|
* The plugin class family is not something standarized in the DDS Security
|
|
* specification. It is a concept that we use to identify a super set of
|
|
* plugin classes and that we use to build plugin class names.
|
|
*/
|
|
#define PRES_TRUST_LOGGING_AUTHENTICATION_CLASS_FAMILY "Auth"
|
|
#define PRES_TRUST_LOGGING_ACCESS_CONTROL_CLASS_FAMILY "Access"
|
|
#define PRES_TRUST_LOGGING_INTERCEPTOR_CLASS_FAMILY "Crypto"
|
|
#define PRES_TRUST_LOGGING_LOGGING_CLASS_FAMILY "Logging"
|
|
|
|
/*
|
|
* Plugin class names used by PRES.
|
|
* Some Security Events can be logged in PRES using the Security Logging
|
|
* Plugin. PRES is not part of the Security Plugins, therefore, the
|
|
* plugin class names used by PRES events don't need to be aligned with
|
|
* the standard. We define custom class names for them starting with "RTI"
|
|
* but keeping part of the original class name (what we internally call class
|
|
* family).
|
|
*/
|
|
#define PRES_TRUST_LOGGING_AUTHENTICATION_CLASS \
|
|
"RTI:" PRES_TRUST_LOGGING_AUTHENTICATION_CLASS_FAMILY
|
|
#define PRES_TRUST_LOGGING_ACCESS_CONTROL_CLASS \
|
|
"RTI:" PRES_TRUST_LOGGING_ACCESS_CONTROL_CLASS_FAMILY
|
|
#define PRES_TRUST_LOGGING_INTERCEPTOR_CLASS \
|
|
"RTI:" PRES_TRUST_LOGGING_INTERCEPTOR_CLASS_FAMILY
|
|
#define PRES_TRUST_LOGGING_LOGGING_CLASS \
|
|
"RTI:" PRES_TRUST_LOGGING_LOGGING_CLASS_FAMILY
|
|
|
|
|
|
typedef enum {
|
|
PRES_TOPIC_QUERY_SELECTION_KIND_HISTORY_SNAPSHOT = 0,
|
|
PRES_TOPIC_QUERY_SELECTION_KIND_CONTINUOUS
|
|
} PRESTopicQuerySelectionKind;
|
|
|
|
|
|
struct PRESTopicQuerySelection {
|
|
char *filterClassName;
|
|
char *filterExpression;
|
|
struct PRESSequenceString filterParameters;
|
|
PRESTopicQuerySelectionKind kind;
|
|
};
|
|
|
|
|
|
#define PRES_TOPIC_QUERY_SELECTION_DEFAULT \
|
|
{ \
|
|
NULL, /* filterClassName */\
|
|
NULL, /* filterExpression */\
|
|
{0, 0, NULL}, /* filterParameters */\
|
|
0 /* kind */\
|
|
}
|
|
|
|
/*e \ingroup PRESParticipantModule
|
|
Lease expiration for a locator to be considered reachable
|
|
*/
|
|
#define PRES_PARTICIPANT_LEASE_DURATION_SEC_DEFAULT (100)
|
|
#define PRES_PARTICIPANT_LEASE_DURATION_NANOSEC_DEFAULT (0)
|
|
#define PRES_PARTICIPANT_LEASE_DURATION_DEFAULT \
|
|
{\
|
|
PRES_PARTICIPANT_LEASE_DURATION_SEC_DEFAULT, \
|
|
PRES_PARTICIPANT_LEASE_DURATION_NANOSEC_DEFAULT \
|
|
}
|
|
#define PRES_PARTICIPANT_REACHABILITY_LEASE_DURATION_DEFAULT RTI_NTP_TIME_MAX
|
|
|
|
|
|
|
|
|
|
#define PRES_PARTICIPANT_TYPE "DDS_ParticipantBuiltinTopicData"
|
|
#define PRES_TOPIC_TYPE "DDS_TopicBuiltinTopicData"
|
|
#define PRES_PUBLICATION_TYPE "DDS_PublicationBuiltinTopicData"
|
|
#define PRES_SUBSCRIPTION_TYPE "DDS_SubscriptionBuiltinTopicData"
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
* Name of topic used for sending participant liveliness updates.
|
|
*/
|
|
#define PRES_PARTICIPANT_MESSAGE_TOPIC "PRESInterParticipantTopic"
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
* Name of topic used for sending secure participant liveliness updates.
|
|
*/
|
|
#define PRES_PARTICIPANT_MESSAGE_SECURE_TOPIC "PRESInterParticipantTopicSecure"
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Name of type used for service request topic.
|
|
*/
|
|
#define PRES_SERVICE_REQUEST_TYPE "DDS_ServiceRequest"
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Name of topic used for service request support.
|
|
*/
|
|
#define PRES_SERVICE_REQUEST_TOPIC "DDSServiceRequest"
|
|
|
|
/*i \ingroup PRESInterParticipantModule
|
|
* Name of internal topic used for non-secure service request support. This is
|
|
* the one we use for matching core service request writers and readers. It
|
|
* should NOT be used by a regular dds c user.
|
|
*/
|
|
#define PRES_SERVICE_REQUEST_INTERNAL_TOPIC "PRESServiceRequest"
|
|
|
|
/*i \ingroup PRESInterParticipantModule
|
|
* Name of internal topic used for secure service request support. This is
|
|
* the one we use for matching core service request writers and readers. It
|
|
* should NOT be used by a regular dds c user.
|
|
*/
|
|
#define PRES_SERVICE_REQUEST_SECURE_INTERNAL_TOPIC "PRESServiceRequestSecure"
|
|
|
|
/* Name of type used for type lookup service request */
|
|
#define PRES_TYPE_LOOKUP_SERVICE_REQUEST_TYPE "DDS_XTypes_TypeLookup_Request"
|
|
|
|
/* Name of topic used for type lookup service request */
|
|
#define PRES_TYPE_LOOKUP_SERVICE_REQUEST_TOPIC "DDSTypeLookupServiceRequest"
|
|
|
|
/* Name of topic used for secured type lookup service request */
|
|
#define PRES_TYPE_LOOKUP_SERVICE_REQUEST_SECURE_TOPIC "DDSTypeLookupServiceRequestSecure"
|
|
|
|
/*
|
|
* Name of internal topic used for non-secure service type lookup request
|
|
* support. This is the one we use for matching core service request writers
|
|
* and readers. It should NOT be used by a regular dds c user.
|
|
*/
|
|
#define PRES_TYPE_LOOKUP_SERVICE_REQUEST_INTERNAL_TOPIC \
|
|
"PRESTypeLookupServiceRequest"
|
|
/*
|
|
* Name of internal topic used for secure service type lookup request
|
|
* support. This is the one we use for matching core service request writers
|
|
* and readers. It should NOT be used by a regular dds c user.
|
|
*/
|
|
#define PRES_TYPE_LOOKUP_SERVICE_REQUEST_SECURE_INTERNAL_TOPIC \
|
|
"PRESTypeLookupServiceRequestSecure"
|
|
|
|
/* Name of type used for type lookup service reply */
|
|
#define PRES_TYPE_LOOKUP_SERVICE_REPLY_TYPE "DDS_XTypes_TypeLookup_Reply"
|
|
|
|
/* Name of topic used for type lookup service reply */
|
|
#define PRES_TYPE_LOOKUP_SERVICE_REPLY_TOPIC "DDSTypeLookupServiceReply"
|
|
|
|
/* Name of topic used for secured type lookup service reply */
|
|
#define PRES_TYPE_LOOKUP_SERVICE_REPLY_SECURE_TOPIC "DDSTypeLookupServiceReplySecure"
|
|
/*
|
|
* Name of internal topic used for non-secure service type lookup reply
|
|
* support. This is the one we use for matching core service request writers
|
|
* and readers. It should NOT be used by a regular dds c user.
|
|
*/
|
|
#define PRES_TYPE_LOOKUP_SERVICE_REPLY_INTERNAL_TOPIC \
|
|
"PRESTypeLookupServiceReply"
|
|
/*
|
|
* Name of internal topic used for secure service type lookup reply
|
|
* support. This is the one we use for matching core service request writers
|
|
* and readers. It should NOT be used by a regular dds c user.
|
|
*/
|
|
#define PRES_TYPE_LOOKUP_SERVICE_REPLY_SECURE_INTERNAL_TOPIC \
|
|
"PRESTypeLookupServiceReplySecure"
|
|
|
|
/* Name of the topic used for virtual subscriptions */
|
|
#define PRES_VIRTUAL_SUBSCRIPTION_TOPIC_NAME "DDSVirtualSubscription"
|
|
|
|
/*
|
|
* Name of the topics used for Security Plugins log messages when they are
|
|
* configured to be distributed with DDS.
|
|
*/
|
|
#define PRES_LOGGING_TOPIC_NAME "DDS:Security:LogTopicV2"
|
|
#define PRES_LOGGING_LEGACY_TOPIC_NAME "DDS:Security:LogTopic"
|
|
#define PRES_LOGGING_PSK_TOPIC_NAME "DDS:Security:PSK:LogTopic"
|
|
|
|
/*
|
|
* Name of the topics used for the Distributed Logger.
|
|
* IMPORTANT: These names are also defined in
|
|
* distributed_log.1.0/srcIdl/distlog.idl. If you change them here, you must
|
|
* also change them there and vice versa.
|
|
*/
|
|
#define PRES_DL_DEFAULT_LOG_TOPIC_NAME "rti/distlog"
|
|
#define PRES_DL_DEFAULT_STATE_TOPIC_NAME "rti/distlog/administration/state"
|
|
#define PRES_DL_DEFAULT_COMMAND_REQUEST_TOPIC_NAME \
|
|
"rti/distlog/administration/command_request"
|
|
#define PRES_DL_DEFAULT_COMMAND_RESPONSE_TOPIC_NAME \
|
|
"rti/distlog/administration/command_response"
|
|
|
|
/*
|
|
* Name of the topics used for the METP Builtin Publications and Subscriptions.
|
|
* IMPORTANT: These names are also defined in
|
|
* metp.1.0/resource/idl/METPBuiltinTopic.idl. If you
|
|
* change them here, you must also change them there and vice versa.
|
|
*/
|
|
#define PRES_METP_BUILTIN_PUBLICATION_TOPIC \
|
|
"com_rti_publication_builtin_peer_data"
|
|
#define PRES_METP_BUILTIN_SUBSCRIPTION_TOPIC \
|
|
"com_rti_subscription_builtin_peer_data"
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Service Request Channel ID for unknown channel
|
|
*/
|
|
#define PRES_SERVICE_REQUEST_ID_UNKNOWN 0
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Service Request Channel ID for Topic Query
|
|
*/
|
|
#define PRES_SERVICE_REQUEST_ID_TOPIC_QUERY 1
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Service Request Channel ID for Locator Reachability
|
|
*/
|
|
#define PRES_SERVICE_REQUEST_ID_LOCATOR_REACHABILITY 2
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Service Request Channel ID for Instance State
|
|
*/
|
|
#define PRES_SERVICE_REQUEST_ID_INSTANCE_STATE 3
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Service Request Channel ID for Monitoring Library commands
|
|
*/
|
|
#define PRES_SERVICE_REQUEST_ID_MONITORING_LIBRARY_COMMAND 4
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Service Request Channel ID for Monitoring Library replies
|
|
*/
|
|
#define PRES_SERVICE_REQUEST_ID_MONITORING_LIBRARY_REPLY 5
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Object ID for service request writer.
|
|
*/
|
|
#define PRES_SERVICE_REQUEST_RTPS_OBJECT_ID_WRITER \
|
|
MIG_RTPS_OBJECT_ID_SERVICE_REQUEST_WRITER
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Object ID for service request reader.
|
|
*/
|
|
#define PRES_SERVICE_REQUEST_RTPS_OBJECT_ID_READER \
|
|
MIG_RTPS_OBJECT_ID_SERVICE_REQUEST_READER
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
* Object ID for secure service request writer.
|
|
*/
|
|
#define PRES_SECURE_SERVICE_REQUEST_RTPS_OBJECT_ID_WRITER \
|
|
MIG_RTPS_OBJECT_ID_SECURE_SERVICE_REQUEST_WRITER
|
|
/*e \ingroup PRESInterParticipantModule
|
|
* Object ID for secure service request reader.
|
|
*/
|
|
#define PRES_SECURE_SERVICE_REQUEST_RTPS_OBJECT_ID_READER \
|
|
MIG_RTPS_OBJECT_ID_SECURE_SERVICE_REQUEST_READER
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Name of type used for participant stateless and secure volatile message
|
|
channels.
|
|
*/
|
|
#define PRES_PARTICIPANT_GENERIC_MESSAGE_TYPE \
|
|
"ParticipantGenericMessage"
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Name of topic used as wildcard for stateless and secure volatile message
|
|
channels.
|
|
*/
|
|
#define PRES_PARTICIPANT_GENERIC_MESSAGE_TOPIC \
|
|
"[ParticipantGenericMessage]"
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Name of topic used for participant stateless message channel.
|
|
*/
|
|
#define PRES_PARTICIPANT_STATELESS_MESSAGE_TOPIC \
|
|
"DCPSParticipantStatelessMessage"
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Name of topic used for participant secure volatile message channel.
|
|
*/
|
|
#define PRES_PARTICIPANT_SECURE_VOLATILE_MESSAGE_TOPIC \
|
|
"DCPSParticipantVolatileMessageSecure"
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Object ID for stateless message writer.
|
|
*/
|
|
#define PRES_PARTICIPANT_STATELESS_MESSAGE_RTPS_OBJECT_ID_WRITER \
|
|
MIG_RTPS_OBJECT_ID_STATELESS_MESSAGE_WRITER
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Object ID for stateless message reader.
|
|
*/
|
|
#define PRES_PARTICIPANT_STATELESS_MESSAGE_RTPS_OBJECT_ID_READER \
|
|
MIG_RTPS_OBJECT_ID_STATELESS_MESSAGE_READER
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Object ID for secure volatile message writer.
|
|
*/
|
|
#define PRES_PARTICIPANT_SECURE_VOLATILE_MESSAGE_RTPS_OBJECT_ID_WRITER \
|
|
MIG_RTPS_OBJECT_ID_SECURE_VOLATILE_MESSAGE_WRITER
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
Object ID for secure volatile message reader.
|
|
*/
|
|
#define PRES_PARTICIPANT_SECURE_VOLATILE_MESSAGE_RTPS_OBJECT_ID_READER \
|
|
MIG_RTPS_OBJECT_ID_SECURE_VOLATILE_MESSAGE_READER
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
* Names of Monitoring Library 2.0 topics.
|
|
*/
|
|
#define PRES_MONITORING_PERIODIC_TOPIC "DCPSPeriodicStatusMonitoring"
|
|
#define PRES_MONITORING_EVENT_TOPIC "DCPSEventStatusMonitoring"
|
|
#define PRES_MONITORING_LOGGING_TOPIC "DCPSLoggingStatusMonitoring"
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
* Names of types used for Monitoring Library 2.0 topics.
|
|
*/
|
|
#define PRES_MONITORING_PERIODIC_TYPE "dds::monitoring::Periodic"
|
|
#define PRES_MONITORING_EVENT_TYPE "dds::monitoring::Event"
|
|
#define PRES_MONITORING_LOGGING_TYPE "dds::monitoring::Logging"
|
|
|
|
/*e \ingroup PRESInterParticipantModule
|
|
* Names of types used for Simple Discovery
|
|
*/
|
|
/* Full Data(p) */
|
|
#define PRES_DISC_SIMPLE_DISCOVERY_PLUGIN_PARTICIPANT_PARAMETER \
|
|
"DISCParticipantParameter"
|
|
/* Announcement */
|
|
#define PRES_DISC_SIMPLE_DISCOVERY_PLUGIN_PARTICIPANT_BOOTSTRAP_PARAMETER \
|
|
"DISCParticipantBootstrapParameter"
|
|
/* Config */
|
|
#define PRES_DISC_SIMPLE_DISCOVERY_PLUGIN2_PARTICIPANT_CONFIG_PARAMETER \
|
|
"DISCParticipantConfigurationParameter"
|
|
#define PRES_DISC_SIMPLE_DISCOVERY_PLUGIN_TYPE_PARTICIPANT_PARAMETER \
|
|
"DISCParticipantParameter"
|
|
#define PRES_DISC_SIMPLE_DISCOVERY_PLUGIN_PARTICIPANT_STATE_PARAMETER \
|
|
"DISCParticipantStateParameter"
|
|
#define PRES_DISC_SIMPLE_DISCOVERY_PLUGIN_PUBLICATION_PARAMETER \
|
|
"DISCPublicationParameter"
|
|
#define PRES_DISC_SIMPLE_DISCOVERY_PLUGIN_SUBSCRIPTION_PARAMETER \
|
|
"DISCSubscriptionParameter"
|
|
|
|
/* Monitoring Library 1.0 topic names */
|
|
#define PRES_MONITORING_PARTICIPANT_DESC_TOPIC_NAME \
|
|
"rti/dds/monitoring/domainParticipantDescription"
|
|
#define PRES_MONITORING_TOPIC_DESC_TOPIC_NAME \
|
|
"rti/dds/monitoring/topicDescription"
|
|
#define PRES_MONITORING_PUBLISHER_DESC_TOPIC_NAME \
|
|
"rti/dds/monitoring/publisherDescription"
|
|
#define PRES_MONITORING_SUBSCRIBER_DESC_TOPIC_NAME \
|
|
"rti/dds/monitoring/subscriberDescription"
|
|
#define PRES_MONITORING_READER_DESC_TOPIC_NAME \
|
|
"rti/dds/monitoring/dataReaderDescription"
|
|
#define PRES_MONITORING_WRITER_DESC_TOPIC_NAME \
|
|
"rti/dds/monitoring/dataWriterDescription"
|
|
#define PRES_MONITORING_PROCESS_STAT_TOPIC_NAME \
|
|
"rti/dds/monitoring/processStatistics"
|
|
#define PRES_MONITORING_PARTICIPANT_STAT_TOPIC_NAME \
|
|
"rti/dds/monitoring/domainParticipantEntityStatistics"
|
|
#define PRES_MONITORING_READER_STAT_TOPIC_NAME \
|
|
"rti/dds/monitoring/dataReaderEntityStatistics"
|
|
#define PRES_MONITORING_WRITER_STAT_TOPIC_NAME \
|
|
"rti/dds/monitoring/dataWriterEntityStatistics"
|
|
#define PRES_MONITORING_TOPIC_STAT_TOPIC_NAME \
|
|
"rti/dds/monitoring/topicEntityStatistics"
|
|
#define PRES_MONITORING_READER_MATCHED_TOPIC_NAME \
|
|
"rti/dds/monitoring/dataReaderEntityMatchedPublicationStatistics"
|
|
#define PRES_MONITORING_WRITER_MATCHED_TOPIC_NAME \
|
|
"rti/dds/monitoring/dataWriterEntityMatchedSubscriptionStatistics"
|
|
#define PRES_MONITORING_WRITER_MATCHED_W_LOCATOR_TOPIC_NAME \
|
|
"rti/dds/monitoring/dataWriterEntityMatchedSubscriptionWithLocatorStatistics"
|
|
|
|
/* Name of topic used for Instance State Responses */
|
|
#define PRES_INSTANCE_STATE_TOPIC "DDSInstanceStateDataResponse"
|
|
/* Name of type used for Instance State Responses */
|
|
#define PRES_INSTANCE_STATE_TYPE "DDS::InstanceStateDataResponse"
|
|
|
|
/*i
|
|
* Name of internal topic used for non-secure instance state transition
|
|
* response support. This is the one we use for matching core service request
|
|
* writers and readers. It should NOT be used by a regular dds c user.
|
|
*/
|
|
#define PRES_INSTANCE_STATE_INTERNAL_TOPIC "PRESInstanceStateDataResponse"
|
|
|
|
/*i
|
|
* Name of internal topic used for secure instance state transition
|
|
* response support. This is the one we use for matching core service request
|
|
* writers and readers. It should NOT be used by a regular dds c user.
|
|
*/
|
|
#define PRES_INSTANCE_STATE_SECURE_INTERNAL_TOPIC "PRESInstanceStateDataResponseSecure"
|
|
|
|
|
|
typedef RTIBool (*PRESReaderTransformSampleFunction)(
|
|
void *out,
|
|
const void *in,
|
|
void *transformOption,
|
|
struct REDAWorker *worker);
|
|
|
|
|
|
struct PRESRtpsContext {
|
|
RTIBool enableRtpsDiscoveryOptimization;
|
|
struct MIGRtpsGuidPrefix guidPrefix;
|
|
MIGRtpsVendorId vendorId;
|
|
MIGRtpsProtocolVersion protocolVersion;
|
|
};
|
|
|
|
|
|
#define PRES_RTPS_CONTEXT_INITIALIZER { \
|
|
PRES_DISCOVERY_ENABLE_RTPS_DISCOVERY_OPTIMIZATION_DEFAULT, /* enableRtpsDiscoveryOptimization */ \
|
|
MIG_RTPS_GUID_PREFIX_UNKNOWN, /* guidPrefix */ \
|
|
MIG_RTPS_VENDOR_ID_RTI, /* vendorId */ \
|
|
MIG_RTPS_PROTOCOL_VERSION /* protocolVersion */ \
|
|
}
|
|
|
|
struct PRESBuiltinChannelForwarder;
|
|
|
|
typedef void *
|
|
(*PRESBuiltinChannelForwarderCreateSampleFunction)(
|
|
const char *channelTopicName,
|
|
int serviceId,
|
|
void *userData,
|
|
struct REDAWorker *worker);
|
|
|
|
typedef void
|
|
(*PRESBuiltinChannelForwarderDeleteSampleFunction)(
|
|
const char *channelTopicName,
|
|
int serviceId,
|
|
void *userData,
|
|
void *sample,
|
|
struct REDAWorker *worker);
|
|
|
|
typedef RTIBool
|
|
(*PRESBuiltinChannelForwarderTransformSampleFromPresFunction)(
|
|
const char *channelTopicName,
|
|
int serviceId,
|
|
void *userData,
|
|
void *sample,
|
|
const void *presSample);
|
|
|
|
typedef RTIBool
|
|
(*PRESBuiltinChannelForwarderReturnSampleLoanFunction)(
|
|
const char *channelTopicName,
|
|
int serviceId,
|
|
void *userData,
|
|
void *sample);
|
|
|
|
typedef RTIBool
|
|
(*PRESBuiltinChannelForwarderTransformSampleToPresFunction)(
|
|
const char *channelTopicName,
|
|
int serviceId,
|
|
void *userData,
|
|
void *presSample,
|
|
const void *sample);
|
|
|
|
typedef RTIBool
|
|
(*PRESBuiltinChannelForwarderReturnPresSampleLoanFunction)(
|
|
const char *channelTopicName,
|
|
int serviceId,
|
|
void *userData,
|
|
void *presSample);
|
|
|
|
typedef RTIBool
|
|
(*PRESBuiltinChannelForwarderTransformCdrFromPresFunction)(
|
|
const char *channelTopicName,
|
|
int serviceId,
|
|
const void *userData,
|
|
unsigned int *length,
|
|
char *buffer,
|
|
const void *presSample,
|
|
RTICdrEndian endianness,
|
|
struct PRESRtpsContext *rtpsContext);
|
|
|
|
struct PRESBuiltinChannelForwarder {
|
|
/* ddsc sample management */
|
|
PRESBuiltinChannelForwarderCreateSampleFunction createSample;
|
|
PRESBuiltinChannelForwarderDeleteSampleFunction deleteSample;
|
|
|
|
/* pres to ddsc sample transformation */
|
|
PRESBuiltinChannelForwarderTransformSampleFromPresFunction transformSampleFromPres;
|
|
PRESBuiltinChannelForwarderReturnSampleLoanFunction returnSampleLoan;
|
|
|
|
/* ddsc to pres sample transformation */
|
|
PRESBuiltinChannelForwarderTransformSampleToPresFunction transformSampleToPres;
|
|
PRESBuiltinChannelForwarderReturnPresSampleLoanFunction returnPresSampleLoan;
|
|
|
|
/* pres to cdr sample transformation */
|
|
PRESBuiltinChannelForwarderTransformCdrFromPresFunction transformCdrFromPres;
|
|
};
|
|
|
|
struct PRESInterceptorHandleState {
|
|
/*
|
|
* The master copy that will be created and deleted. The nodes will just
|
|
* have copies of this.
|
|
*/
|
|
void *interceptorHandle;
|
|
|
|
/*
|
|
* There's one node, which
|
|
* (1) in the case of wrr is shared across all sessions,
|
|
* (2) in the case of rrw is used by one session.
|
|
*
|
|
* Participant nodes are used during the encode rtps message calls.
|
|
* Endpoints nodes are used during the encode submessage calls.*
|
|
* Directed nodes are populated and used when sending to a subset of
|
|
* matched receivers. For example, unicast heartbeats and ACKNACKs and
|
|
* writer-side filtering.
|
|
*/
|
|
struct MIGInterceptorHandles directedNodes;
|
|
|
|
/*
|
|
* This is a flexible array member, so it must be the last one in the
|
|
* struct. There's one node per session. When we create the buffer pool for
|
|
* PRESInterceptorHandleState, the buffer size is enough to accommodate all
|
|
* the sessions.
|
|
*
|
|
* Flexible array members are only available in the C99 standard. They
|
|
* never came to the C++ standard. Since (even if
|
|
* PRESInterceptorHandleState is not used in C++ code) this header ends up
|
|
* being included in C++ files, the "standard" way to define them in C++ is
|
|
* used, which is an array of size 1. The access and behavior is exactly
|
|
* the same in both cases. This is just a way to appease the compiler while
|
|
* keeping our code consistent with the standard.
|
|
* This should be consistent with PRES_SIZEOF_INTERCEPTOR_HANDLE_STATE
|
|
* because flexible array members have size 0, while an array of size 1 has
|
|
* the size of its element (in this case a MIGInterceptorHandles).
|
|
*
|
|
* Matched nodes are populated upon remote endpoint assertion to commend
|
|
* and used when sending to all matched receivers.
|
|
*/
|
|
#ifdef __cplusplus
|
|
struct MIGInterceptorHandles matchedNodes[1];
|
|
#else
|
|
struct MIGInterceptorHandles matchedNodes[];
|
|
#endif
|
|
};
|
|
|
|
|
|
#ifdef __cplusplus
|
|
#define PRES_SIZEOF_INTERCEPTOR_HANDLE_STATE \
|
|
((int) (sizeof(struct PRESInterceptorHandleState) \
|
|
- sizeof(struct MIGInterceptorHandles)))
|
|
#else
|
|
#define PRES_SIZEOF_INTERCEPTOR_HANDLE_STATE \
|
|
((int) sizeof(struct PRESInterceptorHandleState))
|
|
#endif
|
|
|
|
struct PRESCoherentSetInfo {
|
|
struct PRESOctetGuid groupGuid;
|
|
struct REDASequenceNumber coherentSetSequenceNumber;
|
|
struct REDASequenceNumber groupCoherentSetSequenceNumber;
|
|
/* This type is a char and not an RTIBool (4-byte) because the format has
|
|
* to match the one in DDS_C where incompleteCoherentSet is a DDS_Boolean
|
|
* (1-byte).
|
|
*/
|
|
char incompleteCoherentSet;
|
|
};
|
|
|
|
|
|
#define PRES_COHERENT_SET_INFO_DEFAULT { \
|
|
PRES_OCTET_GUID_UNKNOWN, \
|
|
REDA_SEQUENCE_NUMBER_UNKNOWN, \
|
|
REDA_SEQUENCE_NUMBER_UNKNOWN, \
|
|
0 \
|
|
}
|
|
|
|
extern PRESDllExport
|
|
RTIBool PRESCoherentSetInfo_equal(
|
|
const struct PRESCoherentSetInfo *leftValue,
|
|
const struct PRESCoherentSetInfo *rightValue);
|
|
|
|
extern PRESDllExport
|
|
int PRESEndpointSecurityAlgorithmInfo_compare(
|
|
const struct PRESEndpointSecurityAlgorithmInfo *left,
|
|
const struct PRESEndpointSecurityAlgorithmInfo *right);
|
|
|
|
|
|
/*
|
|
* These two preprocessor definitions are used to limit the number of nodes in
|
|
* the skip list of instances and virtual writers.
|
|
*/
|
|
#define PRES_ENDPOINT_EXPECTED_MAX_INSTANCE_COUNT \
|
|
NDDS_WRITER_HISTORY_EXPECTED_MAX_INSTANCE_COUNT
|
|
#define PRES_ENDPOINT_EXPECTED_MAX_VIRTUAL_WRITERS_COUNT \
|
|
NDDS_WRITER_HISTORY_EXPECTED_MAX_VIRTUAL_WRITERS_COUNT
|
|
|
|
typedef void (*PRESMonitoringPushEventMetricToDdsFunction)(
|
|
const void *presMetricGroup,
|
|
void *presResource,
|
|
RTI_UINT32 classId,
|
|
RTI_UINT32 metricGroupIndex);
|
|
|
|
extern PRESDllVariable PRESMonitoringPushEventMetricToDdsFunction
|
|
PRESMonitoring_g_pushEventMetricToDdsFunction;
|
|
|
|
|
|
/*i
|
|
* @brief A wrapper for PRESMonitoring_g_pushEventMetricToDdsFunction
|
|
* that first checks if the pointer is not NULL.
|
|
*/
|
|
#define PRESMonitoring_pushEvent( \
|
|
status__, \
|
|
entity__, \
|
|
classId__, \
|
|
metricGroupIndex__) \
|
|
if (PRESMonitoring_g_pushEventMetricToDdsFunction != NULL) { \
|
|
PRESMonitoring_g_pushEventMetricToDdsFunction( \
|
|
status__, \
|
|
entity__, \
|
|
classId__, \
|
|
metricGroupIndex__); \
|
|
}
|
|
|
|
struct PRESMonitoringResourceHandle {
|
|
struct RTI_MonitoringResource *resource;
|
|
RTIXCdrUnsignedLong concurrencyIndex;
|
|
RTIXCdrUnsignedLongLong libraryEpoch;
|
|
};
|
|
|
|
extern PRESDllVariable
|
|
const struct PRESMonitoringResourceHandle PRESMonitoringResourceHandle_NIL;
|
|
|
|
typedef struct PRESRegisteredType {
|
|
const char *registeredTypeName;
|
|
const struct RTICdrTypeObject *typeObjectV1;
|
|
struct REDAWeakReference completeTypeObjectV2WR;
|
|
struct PRESParticipant *presParticipant;
|
|
struct PRESMonitoringResourceHandle resourceHandle;
|
|
} PRESRegisteredType;
|
|
|
|
typedef RTI_UINT32 PRESRpcComplianceMask;
|
|
|
|
|
|
/**
|
|
* @brief DDS-RPC standard value for the PID_RELATED_SAMPLE_IDENTITY field of
|
|
* the inline QoS.
|
|
* message.
|
|
*/
|
|
#define PRES_RPC_USE_STANDARD_RELATED_SAMPLE_PID_BIT (0x00000001U << 0U)
|
|
|
|
/**
|
|
* @brief The RPC vendor compliance mask.
|
|
*
|
|
* This value is fully aligned with the RPC/RTPS specification.
|
|
*/
|
|
#define PRES_RPC_COMPLIANCE_MASK_VENDOR \
|
|
(PRES_RPC_USE_STANDARD_RELATED_SAMPLE_PID_BIT)
|
|
|
|
/**
|
|
* @brief Environment variable name for the RPC compliance mask.
|
|
*
|
|
* If this environment variable is set, the value will be the one used
|
|
* to initialize the global RPC compliance mask.
|
|
*/
|
|
#define NDDS_RPC_COMPLIANCE_MASK_ENV_VAR \
|
|
"NDDS_RCP_COMPLIANCE_MASK"
|
|
|
|
/**
|
|
* @brief The default RCP compliance mask.
|
|
*
|
|
* This value is not fully aligned with the RPC/RTPS specification.
|
|
*
|
|
* If you require full compatibility with the specification, use
|
|
* PRES_RPC_COMPLIANCE_MASK_VENDOR.
|
|
*/
|
|
#define PRES_RPC_COMPLIANCE_MASK_DEFAULT (0x00000000U)
|
|
|
|
/**
|
|
* @brief Gets the global RPC compliance mask.
|
|
*
|
|
* @return The global RPC compliance mask.
|
|
*/
|
|
extern PRESDllExport
|
|
PRESRpcComplianceMask PRESCommon_getGlobalRpcComplianceMask(void);
|
|
|
|
|
|
/**
|
|
* @brief Set the global RPC compliance mask.
|
|
*
|
|
* @param mask The mask to set globally.
|
|
*/
|
|
extern PRESDllExport
|
|
void PRESCommon_setGlobalRpcComplianceMask(PRESRpcComplianceMask mask);
|
|
|
|
|
|
/**
|
|
* @brief Load the value of the environment variable NDDS_RCP_COMPLIANCE_MASK
|
|
* in the global RPC compliance mask, if it exists.
|
|
*
|
|
* The format must be an integer in HEX or decimal notation.
|
|
*
|
|
* @return RTI_TRUE if there were no errors, RTI_FALSE if
|
|
* there is an error parsing the value. If the variable is not defined, the
|
|
* method returns RTI_TRUE and leaves the global RPC compliance
|
|
* mask unchanged.
|
|
*/
|
|
extern PRESDllExport
|
|
RTIBool PRESCommon_loadGlobalRpcComplianceMask(void);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#include "pres/pres_common_impl.h"
|
|
|
|
|
|
#define PRES_RTPS_CRC_KIND_32_LEGACY_NAME "CRC_32_LEGACY"
|
|
#define PRES_RTPS_CRC_KIND_32_NAME "CRC_32"
|
|
#define PRES_RTPS_CRC_KIND_64_NAME "CRC_64"
|
|
#define PRES_RTPS_CRC_KIND_128_NAME "CRC_128"
|
|
|
|
typedef enum PRES_RemoteExceptionCode_t
|
|
{
|
|
PRES_REMOTE_EX_OK,
|
|
PRES_REMOTE_EX_UNSUPPORTED,
|
|
PRES_REMOTE_EX_INVALID_ARGUMENT,
|
|
PRES_REMOTE_EX_OUT_OF_RESOURCES,
|
|
PRES_REMOTE_EX_UNKNOWN_OPERATION,
|
|
PRES_REMOTE_EX_UNKNOWN_EXCEPTION
|
|
} PRES_RemoteExceptionCode_t;
|
|
|
|
#endif /* pres_common_h */
|