Files
qt6-migration-pipeline/external/rti_connext_dds-7.7.0/include/ndds/disc/disc_builtin.h
T
torstenandCopilot 342ffd3e5c Update submodule to latest BUILD_RTI fixes
- HandlerMinelayerData: BUILD_RTI Guards für RTI-Abhängigkeiten
- svcTabCommon: Export-Header-Fix via Fallback-Target
- TrainingAreaBase: Stub-Header für BUILD_RTI=OFF
- ddsfts: Include-Pfad und Dependency-Fixes
- BUILD_RTI=OFF Compilation vollständig unterstützt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: 01M0JNZA586SACX1PRZ2DJAE5S
2026-08-21 19:30:20 +02:00

839 lines
31 KiB
C

/*
* (c) Copyright 2024, Real-Time Innovations, All rights reserved.
* No duplications, whole or partial, manual or electronic, may be made
* without express written permission. Any such copies, or
* revisions thereof, must display this notice unaltered.
* This code contains trade secrets of Real-Time Innovations, Inc.
*/
#ifndef disc_builtin_h
#define disc_builtin_h
#ifndef pres_participant_h
#include "pres/pres_participant.h"
#endif
#include "pres/pres_psService.h"
#ifndef cdr_encapsulation_h
#include "cdr/cdr_encapsulation.h"
#endif
#ifndef cdr_stream_h
#include "cdr/cdr_stream.h"
#endif
#ifndef cdr_typeObject_h
#include "cdr/cdr_typeObject.h"
#endif
#ifndef rti_makeheader_h
#include "log/log_makeheader.h"
#endif
#ifndef disc_dll_h
#include "disc/disc_dll.h"
#endif
#ifndef osapi_heap_h
#include "osapi/osapi_heap.h"
#endif
#ifndef osapi_compression_h
#include "osapi/osapi_compression.h"
#endif
#ifndef reda_buffer_h
#include "reda/reda_buffer.h"
#endif
#ifndef reda_fastBuffer_h
#include "reda/reda_fastBuffer.h"
#endif
#ifndef pres_typePlugin_h
#include "pres/pres_typePlugin.h"
#endif
#ifndef pres_participant_h
#include "pres/pres_common.h"
#endif
#ifndef pres_participantChannel_h
#include "pres/pres_participantChannel.h"
#endif
#ifndef pres_participant_h
#include "pres/pres_participant.h"
#endif
#ifndef pres_psService_h
#include "pres/pres_psService.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Protocol defined built-in endpoint bits */
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_ANNOUNCER \
MIG_RTPS_BUILTIN_ENDPOINT_PARTICIPANT_WRITER
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_DETECTOR \
MIG_RTPS_BUILTIN_ENDPOINT_PARTICIPANT_READER
#define DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER \
MIG_RTPS_BUILTIN_ENDPOINT_PUBLICATION_WRITER
#define DISC_BUILTIN_ENDPOINT_PUBLICATION_DETECTOR \
MIG_RTPS_BUILTIN_ENDPOINT_PUBLICATION_READER
#define DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER \
MIG_RTPS_BUILTIN_ENDPOINT_SUBSCRIPTION_WRITER
#define DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_DETECTOR \
MIG_RTPS_BUILTIN_ENDPOINT_SUBSCRIPTION_READER
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_PROXY_ANNOUNCER \
MIG_RTPS_BUILTIN_ENDPOINT_PARTICIPANT_PROXY_WRITER
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_PROXY_DETECTOR \
MIG_RTPS_BUILTIN_ENDPOINT_PARTICIPANT_PROXY_READER
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_STATE_ANNOUNCER \
MIG_RTPS_BUILTIN_ENDPOINT_PARTICIPANT_STATE_WRITER
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_STATE_DETECTOR \
MIG_RTPS_BUILTIN_ENDPOINT_PARTICIPANT_STATE_READER
#define DISC_BUILTIN_ENDPOINT_PUBLICATION_SECURE_ANNOUNCER \
MIG_RTPS_BUILTIN_ENDPOINT_SECURE_PUBLICATION_WRITER
#define DISC_BUILTIN_ENDPOINT_PUBLICATION_SECURE_DETECTOR \
MIG_RTPS_BUILTIN_ENDPOINT_SECURE_PUBLICATION_READER
#define DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_SECURE_ANNOUNCER \
MIG_RTPS_BUILTIN_ENDPOINT_SECURE_SUBSCRIPTION_WRITER
#define DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_SECURE_DETECTOR \
MIG_RTPS_BUILTIN_ENDPOINT_SECURE_SUBSCRIPTION_READER
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_SECURE_ANNOUNCER \
MIG_RTPS_BUILTIN_ENDPOINT_SECURE_RELIABLE_PARTICIPANT_WRITER
#define DISC_BUILTIN_ENDPOINT_PARTICIPANT_SECURE_DETECTOR \
MIG_RTPS_BUILTIN_ENDPOINT_SECURE_RELIABLE_PARTICIPANT_READER
/*
* Builtin topic names -- IMPORTANT: if you add a new one, add it to
* the DISCBuiltin_isBuiltinTopicName() API
*/
#define DISC_BUILTIN_TOPIC_PARTICIPANT_SELF PRES_PARTICIPANT_BUILTIN_TOPIC_NAME
#define DISC_BUILTIN_TOPIC_PARTICIPANT_PROXY "DISCParticipantProxy"
#define DISC_BUILTIN_TOPIC_PARTICIPANT_STATE "DISCParticipantState"
#define DISC_BUILTIN_TOPIC_PUBLICATION "DISCPublication"
#define DISC_BUILTIN_TOPIC_SUBSCRIPTION "DISCSubscription"
#define DISC_BUILTIN_TOPIC_PARTICIPANT_SECURE "DISCParticipantSecure"
#define DISC_BUILTIN_TOPIC_PUBLICATION_SECURE "DISCPublicationsSecure"
#define DISC_BUILTIN_TOPIC_SUBSCRIPTION_SECURE "DISCSubscriptionSecure"
#define DISC_BUILTIN_TOPIC_PARTICIPANT_BOOTSTRAP \
PRES_PARTICIPANT_BUILTIN_BOOTSTRAP_TOPIC_NAME
#define DISC_BUILTIN_TOPIC_PARTICIPANT_CONFIG "DISCParticipantConfig"
#define DISC_BUILTIN_TOPIC_PARTICIPANT_CONFIG_SECURE \
"DISCParticipantConfigSecure"
/* Property names for settable properties */
#define DISC_BUILTIN_PROPERTY_VALUE_SIZE (32)
#define DISC_BUILTIN_PROPERTY_LIST_MAX_LENGTH_NAME \
"DiscBuiltinPropertyListMaxLength"
#define DISC_BUILTIN_PROPERTY_STRING_MAX_LENGTH_NAME \
"DiscBuiltinPropertyStringMaxLength"
#define DISC_BUILTIN_DATA_TAG_LIST_MAX_LENGTH_NAME \
"DiscBuiltinDataTagListMaxLength"
#define DISC_BUILTIN_DATA_TAG_STRING_MAX_LENGTH_NAME \
"DiscBuiltinDataTagStringMaxLength"
#define DISC_BUILTIN_USER_DATA_MAX_LENGTH_NAME "DiscBuiltinUserDataMaxLength"
#define DISC_BUILTIN_TRANSPORT_INFO_LIST_MAX_LENGTH_NAME \
"DiscTransportInfoListMaxLength"
#define DISC_BUILTIN_IDENTITY_TOKEN_LENGTH_NAME "DiscIdentityTokenLength"
#define DISC_BUILTIN_PERMISSIONS_TOKEN_LENGTH_NAME "DiscPermissionsTokenLength"
#define DISC_BUILTIN_TOPIC_DATA_MAX_LENGTH_NAME "DiscBuiltinTopicDataMaxLength"
#define DISC_BUILTIN_GROUP_DATA_MAX_LENGTH_NAME \
"DiscBuiltinTopicGroupDataMaxLength"
#define DISC_BUILTIN_PARTITION_MAX_LENGTH_NAME "DiscBuiltinPartitionMaxLength"
#define DISC_BUILTIN_MAX_PARTITIONS_NAME "DiscBuiltinMaxPartitions"
#define DISC_BUILTIN_TYPE_CODE_MAX_LENGTH_NAME "DiscBuiltinTypeCodeMaxLength"
#define DISC_BUILTIN_TYPE_OBJECT_MAX_SERIALIZED_LENGTH_NAME "DiscBTOMSL"
#define DISC_BUILTIN_SERIALIZED_TYPE_OBJECT_DYNAMIC_ALLOCATION_THRESHOLD_NAME \
"DiscBSTODAT"
#define DISC_BUILTIN_TYPE_OBJECT_MAX_DESERIALIZED_LENGTH_NAME "DiscBTOMDL"
#define DISC_BUILTIN_DESERIALIZED_TYPE_OBJECT_DYNAMIC_ALLOCATION_THRESHOLD_NAME \
"DiscBDTODAT"
#define DISC_BUILTIN_TYPE_OBJECT_LB_SERIALIZATION_THRESHOLD_NAME "DiscBTOLST"
#define DISC_BUILTIN_CFT_PROPERTY_MAX_LENGTH_NAME \
"DiscBuiltinCFTPropertyMaxLength"
#define DISC_BUILTIN_LOCATOR_FILTER_SEQ_MAX_LENGTH_NAME \
"DiscBuiltinLocatorFilterSeqMaxLength"
#define DISC_BUILTIN_LOCATOR_FILTER_EXP_MAX_LENGTH_NAME \
"DiscBuiltinLocatorFilterExpMaxLength"
#define DISC_BUILTIN_LB_SERIALIZATION_CLASS_ID_NAME "DiscLBID"
#define DISC_BUILTIN_ENABLE_RTPS_DISCOVERY_OPTIMIZATION "DiscBERDO"
/* Participant properties */
#define DISC_BUILTIN_PARTICIPANT_PROPERTY_LENGTH (9)
#define DISC_BUILTIN_PARTICIPANT_PROPERTY_SIZE \
(strlen(DISC_BUILTIN_PROPERTY_LIST_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_PROPERTY_STRING_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_USER_DATA_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_TRANSPORT_INFO_LIST_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_IDENTITY_TOKEN_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_PERMISSIONS_TOKEN_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_ENABLE_RTPS_DISCOVERY_OPTIMIZATION) \
+ strlen(DISC_BUILTIN_PARTITION_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_MAX_PARTITIONS_NAME) \
+ DISC_BUILTIN_PARTICIPANT_PROPERTY_LENGTH \
* DISC_BUILTIN_PROPERTY_VALUE_SIZE \
+ DISC_BUILTIN_PARTICIPANT_PROPERTY_LENGTH)
/* Publication properties */
#define DISC_BUILTIN_PUBLICATION_PROPERTY_LENGTH (19)
#define DISC_BUILTIN_PUBLICATION_PROPERTY_SIZE \
(strlen(DISC_BUILTIN_USER_DATA_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_TOPIC_DATA_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_GROUP_DATA_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_PARTITION_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_TYPE_CODE_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_TYPE_OBJECT_MAX_SERIALIZED_LENGTH_NAME) \
+ strlen( \
DISC_BUILTIN_SERIALIZED_TYPE_OBJECT_DYNAMIC_ALLOCATION_THRESHOLD_NAME) \
+ strlen(DISC_BUILTIN_TYPE_OBJECT_MAX_DESERIALIZED_LENGTH_NAME) \
+ strlen( \
DISC_BUILTIN_DESERIALIZED_TYPE_OBJECT_DYNAMIC_ALLOCATION_THRESHOLD_NAME) \
+ strlen(DISC_BUILTIN_TYPE_OBJECT_LB_SERIALIZATION_THRESHOLD_NAME) \
+ strlen(DISC_BUILTIN_PROPERTY_LIST_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_PROPERTY_STRING_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_DATA_TAG_LIST_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_DATA_TAG_STRING_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_MAX_PARTITIONS_NAME) \
+ strlen(DISC_BUILTIN_LOCATOR_FILTER_SEQ_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_LOCATOR_FILTER_EXP_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_LB_SERIALIZATION_CLASS_ID_NAME) \
+ strlen(DISC_BUILTIN_ENABLE_RTPS_DISCOVERY_OPTIMIZATION) \
+ DISC_BUILTIN_PUBLICATION_PROPERTY_LENGTH \
* DISC_BUILTIN_PROPERTY_VALUE_SIZE \
+ DISC_BUILTIN_PUBLICATION_PROPERTY_LENGTH)
/* Subscription properties */
#define DISC_BUILTIN_SUBSCRIPTION_PROPERTY_LENGTH (18)
#define DISC_BUILTIN_SUBSCRIPTION_PROPERTY_SIZE \
(strlen(DISC_BUILTIN_USER_DATA_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_TOPIC_DATA_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_GROUP_DATA_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_PARTITION_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_TYPE_CODE_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_TYPE_OBJECT_MAX_SERIALIZED_LENGTH_NAME) \
+ strlen( \
DISC_BUILTIN_SERIALIZED_TYPE_OBJECT_DYNAMIC_ALLOCATION_THRESHOLD_NAME) \
+ strlen(DISC_BUILTIN_TYPE_OBJECT_MAX_DESERIALIZED_LENGTH_NAME) \
+ strlen( \
DISC_BUILTIN_DESERIALIZED_TYPE_OBJECT_DYNAMIC_ALLOCATION_THRESHOLD_NAME) \
+ strlen(DISC_BUILTIN_TYPE_OBJECT_LB_SERIALIZATION_THRESHOLD_NAME) \
+ strlen(DISC_BUILTIN_PROPERTY_LIST_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_PROPERTY_STRING_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_DATA_TAG_LIST_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_DATA_TAG_STRING_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_CFT_PROPERTY_MAX_LENGTH_NAME) \
+ strlen(DISC_BUILTIN_MAX_PARTITIONS_NAME) \
+ strlen(DISC_BUILTIN_LB_SERIALIZATION_CLASS_ID_NAME) \
+ strlen(DISC_BUILTIN_ENABLE_RTPS_DISCOVERY_OPTIMIZATION) \
+ DISC_BUILTIN_SUBSCRIPTION_PROPERTY_LENGTH \
* DISC_BUILTIN_PROPERTY_VALUE_SIZE \
+ DISC_BUILTIN_SUBSCRIPTION_PROPERTY_LENGTH)
/*
* SEC-570: Used in security.1.0 authentication to generate handshake messages
*/
extern DISCDllExport unsigned int
DISCBuiltin_getBinaryPropertySeqSerializedSize(
const struct PRESDDSSequence *sample);
extern DISCDllExport RTIBool DISCBuiltin_serializeBinaryPropertyDdsSequence(
struct RTICdrStream *stream,
const struct PRESDDSSequence *sequence);
extern DISCDllExport RTIBool DISCBuiltin_createParticipantProperties(
struct PRESPropertyQosPolicy *propertyQos,
int userDataMaximumLength,
int propertyListMaximumLength,
int propertyStringMaximumLength,
int transportInfoListMaxLength,
unsigned int identityTokenLength,
unsigned int permissionsTokenLength,
int partitionMaximumNameCount,
int partitionMaximumCumulativeLength,
RTIBool enableRtpsDiscoveryOptimization);
extern DISCDllExport void DISCBuiltin_deleteProperties(
struct PRESPropertyQosPolicy *propertyQos);
extern DISCDllExport RTIBool DISCBuiltin_serializePropertyQosPolicyI(
PRESTypePluginEndpointData endpointData,
const struct PRESPropertyQosPolicy *qos,
struct RTICdrStream *stream,
RTIBool serializeEncapsulation,
RTIEncapsulationId encapsulationId,
RTIBool serializeData,
void *endpointPluginQos);
/*
* Serialize a partition qos policy
*
* @param endpointData unused
* @param partition Partition to serialize
* @param stream CDR stream to serialize into
* @param serializeEncapsulation unused
* @param encapsulationId unused
* @param serializeData unused
* @param endpointPluginQos unused
*
* @return RTI_TRUE if success, RTI_FALSE if failure
*/
extern DISCDllExport RTIBool DISCBuiltin_serializePartitionQosPolicy(
PRESTypePluginEndpointData endpointData,
const struct PRESPartitionQosPolicy *partition,
struct RTICdrStream *stream,
RTIBool serializeEncapsulation,
RTIEncapsulationId encapsulationId,
RTIBool serializeData,
void *endpointPluginQos);
/*
* Serialize the user data qos policy.
*
* @param endpointData unused
* @param userData user data qos policy to serialize
* @param stream CDR stream to serialize into
* @param serializeEncapsulation unused
* @param encapsulationId unused
* @param serializeData unused
* @param endpointPluginQos unused
*
* @return RTI_TRUE if success, RTI_FALSE if failure
*/
extern DISCDllExport RTIBool DISCBuiltin_serializeUserDataQosPolicy(
PRESTypePluginEndpointData endpointData,
const struct PRESUserDataQosPolicy *userData,
struct RTICdrStream *stream,
RTIBool serializeEncapsulation,
RTIEncapsulationId encapsulationId,
RTIBool serializeData,
void *endpointPluginQos);
/*
* Serialize the entity name.
*
* @param endpointData unused
* @param entityName entity name to serialize
* @param stream CDR stream to serialize into
* @param serializeEncapsulation unused
* @param encapsulationId unused
* @param serializeData unused
* @param endpointPluginQos unused
*
* @return RTI_TRUE if success, RTI_FALSE if failure
*/
extern DISCDllExport RTIBool DISCBuiltin_serializeEntityNameQosPolicyName(
PRESTypePluginEndpointData endpointData,
const struct PRESEntityNameQosPolicy *entityName,
struct RTICdrStream *stream,
RTIBool serializeEncapsulation,
RTIEncapsulationId encapsulationId,
RTIBool serializeData,
void *endpointPluginQos);
/*
* Serialize the entity name role.
*
* @param endpointData unused
* @param entityName Entity name role to serialize
* @param stream CDR stream to serialize into
* @param serializeEncapsulation unused
* @param encapsulationId unused
* @param serializeData unused
* @param endpointPluginQos unused
*
* @return RTI_TRUE if success, RTI_FALSE if failure
*/
extern DISCDllExport RTIBool DISCBuiltin_serializeEntityNameQosPolicyRole(
PRESTypePluginEndpointData endpointData,
const struct PRESEntityNameQosPolicy *entityName,
struct RTICdrStream *stream,
RTIBool serializeEncapsulation,
RTIEncapsulationId encapsulationId,
RTIBool serializeData,
void *endpointPluginQos);
/*
* Serialize a dataholder
*
* @param endpointData unused
* @param userType dataholder to serialize
* @param stream CDR stream to serialize into
* @param serializeEncapsulation unused
* @param encapsulationId unused
* @param serializeData unused
* @param endpointPluginQos unused
*
* @return RTI_TRUE if success, RTI_FALSE if failure
*/
extern DISCDllExport RTIBool DISCBuiltin_serializeDataHolder(
PRESTypePluginEndpointData endpointData,
const void *userType,
struct RTICdrStream *stream,
RTIBool serializeEncapsulation,
RTIEncapsulationId encapsulationId,
RTIBool serializeData,
void *endpointPluginQos);
/*
* Serialize the transport info sequence
*
* @param endpointData unused
* @param transportInfoSeq transport info to serialize
* @param stream CDR stream to serialize into
* @param serializeEncapsulation unused
* @param encapsulationId unused
* @param serializeData unused
* @param endpointPluginQos unused
*
* @return RTI_TRUE if success, RTI_FALSE if failure
*/
extern DISCDllExport RTIBool DISCBuiltin_serializeTransportInfoSeq(
PRESTypePluginEndpointData endpointData,
const struct PRESSequenceTransportInfo *transportInfoSeq,
struct RTICdrStream *stream,
RTIBool serializeEncapsulation,
RTIEncapsulationId encapsulationId,
RTIBool serializeData,
void *endpointPluginQos);
/*
* Serialize the product version
*
* @param endpointData unused
* @param productVersion product version to serialize
* @param stream CDR stream to serialize into
* @param serializeEncapsulation unused
* @param encapsulationId unused
* @param serializeData unused
* @param endpointPluginQos unused
*
* @return RTI_TRUE if success, RTI_FALSE if failure
*/
extern DISCDllExport RTIBool DISCBuiltin_serializeProductVersion(
PRESTypePluginEndpointData endpointData,
const struct PRESProductVersion *productVersion,
struct RTICdrStream *stream,
RTIBool serializeEncapsulation,
RTIEncapsulationId encapsulationId,
RTIBool serializeData,
void *endpointPluginQos);
/*
* Serialize the service qos policy.
*
* @param endpointData unused
* @param p service qos policy to serialize
* @param stream CDR stream to serialize into
* @param serializeEncapsulation unused
* @param encapsulationId unused
* @param serializeData unused
* @param endpointPluginQos unused
*
* @return RTI_TRUE if success, RTI_FALSE if failure
*/
extern DISCDllExport RTIBool DISCBuiltin_serializeServiceQosPolicy(
PRESTypePluginEndpointData endpointData,
const struct PRESServiceQosPolicy *p,
struct RTICdrStream *stream,
RTIBool serializeEncapsulation,
RTIEncapsulationId encapsulationId,
RTIBool serializeData,
void *endpointPluginQos);
/*
* Serialize the participant security protection info
*
* @param endpointData unused
* @param securityProtectionInfo security protection info to serialize
* @param stream CDR stream to serialize into
* @param serializeEncapsulation unused
* @param encapsulationId unused
* @param serializeData unused
* @param endpointPluginQos unused
*
* @return RTI_TRUE if success, RTI_FALSE if failure
*/
extern DISCDllExport RTIBool
DISCBuiltin_serializeParticipantSecurityProtectionInfo(
PRESTypePluginEndpointData endpointData,
const struct PRESParticipantSecurityProtectionInfo
*securityProtectionInfo,
struct RTICdrStream *stream,
RTIBool serializeEncapsulation,
RTIEncapsulationId encapsulationId,
RTIBool serializeData,
void *endpointPluginQos);
/*
* Serialize the signature algorithms.
*
* @param endpointData unused
* @param secAlgos security algorithms to serialize
* @param stream CDR stream to serialize into
* @param serializeEncapsulation unused
* @param encapsulationId unused
* @param serializeData unused
* @param endpointPluginQos unused
*
* @return RTI_TRUE if success, RTI_FALSE if failure
*/
extern DISCDllExport RTIBool DISCBuiltin_serializeSignatureAlgorithms(
PRESTypePluginEndpointData endpointData,
const struct PRESParticipantSecurityDigitalSignatureAlgorithmInfo
*secAlgos,
struct RTICdrStream *stream,
RTIBool serializeEncapsulation,
RTIEncapsulationId encapsulationId,
RTIBool serializeData,
void *endpointPluginQos);
/*
* Serialize the key establishment algorithms.
*
* @param endpointData unused
* @param keyAlgos key establishment algorithms to serialize.
* @param stream CDR stream to serialize into
* @param serializeEncapsulation unused
* @param encapsulationId unused
* @param serializeData unused
* @param endpointPluginQos unused
*
* @return RTI_TRUE if success, RTI_FALSE if failure
*/
extern DISCDllExport RTIBool DISCBuiltin_serializeKeyEstablishmentAlgorithms(
PRESTypePluginEndpointData endpointData,
const struct PRESParticipantSecurityKeyEstablishmentAlgorithmInfo
*keyAlgos,
struct RTICdrStream *stream,
RTIBool serializeEncapsulation,
RTIEncapsulationId encapsulationId,
RTIBool serializeData,
void *endpointPluginQos);
/*
* Serialize the participant cipher algorithms
*
* @param endpointData unused
* @param cipherAlgos Cipher algorithms to serialize
* @param stream CDR stream to serialize into
* @param serializeEncapsulation unused
* @param encapsulationId unused
* @param serializeData unused
* @param endpointPluginQos unused
*
* @return RTI_TRUE if success, RTI_FALSE if failure
*/
extern DISCDllExport RTIBool DISCBuiltin_serializeParticipantCipherAlgorithms(
PRESTypePluginEndpointData endpointData,
const struct PRESParticipantSecuritySymmetricCipherAlgorithmInfo
*cipherAlgos,
struct RTICdrStream *stream,
RTIBool serializeEncapsulation,
RTIEncapsulationId encapsulationId,
RTIBool serializeData,
void *endpointPluginQos);
/*
* Serialize the vendor participant protection info
*
* @param endpointData unused
* @param securityVendorProtectionInfo The vendor protection info to serialize
* @param stream CDR stream to serialize into
* @param serializeEncapsulation unused
* @param encapsulationId unused
* @param serializeData unused
* @param endpointPluginQos unused
*
* @return RTI_TRUE if success, RTI_FALSE if failure
*/
extern DISCDllExport RTIBool
DISCBuiltin_serializeParticipantSecurityVendorProtectionInfo(
PRESTypePluginEndpointData endpointData,
const struct PRESParticipantSecurityVendorProtectionInfo
*securityVendorProtectionInfo,
struct RTICdrStream *stream,
RTIBool serializeEncapsulation,
RTIEncapsulationId encapsulationId,
RTIBool serializeData,
void *endpointPluginQos);
/*e \ingroup DISCPluggableModule
\brief Maximum number of installable participant discovery plugins.
*/
#define DISC_MAX_PDP_PLUGINS 8
/*e \ingroup DISCPluggableModule
\brief Maximum number of installable endpoint discovery plugins.
*/
#define DISC_MAX_EDP_PLUGINS 8
typedef enum {
/*e Participant builtin topic.
*/
DISC_BUILTIN_TOPIC_KIND_PARTICIPANT = 0,
/*e Publication builtin topic.
*/
DISC_BUILTIN_TOPIC_KIND_PUBLICATION,
/*e Subscription builtin topic.
*/
DISC_BUILTIN_TOPIC_KIND_SUBSCRIPTION,
/*e Topic builtin topic.
*/
DISC_BUILTIN_TOPIC_KIND_TOPIC,
/* do not remove this; used to size internal array */
_DISC_BUILTIN_TOPIC_KIND
} DISCBuiltinTopicKind;
/* Defines a hard limit for the maximum number of locators RTI builtin discovery
* plugins can handle. This is used both for defining the max size of the
* outgoing samples and for establishing the maximum number of locators RTI
* Connext DDS will deserialize. */
#define DISC_BUILTIN_LOCATOR_LIST_MAX_SIZE \
(RTI_NETIO_RTPS_LOCATOR_LIST_MAX_SIZE)
/* Reduced maximum number of locators. Used for multicast. */
#define DISC_BUILTIN_LOCATOR_REDUCED_LIST_MAX_SIZE \
(RTI_NETIO_RTPS_LOCATOR_REDUCED_LIST_MAX_SIZE)
struct DISCBuiltinTopicParticipantData {
/*e Guid of the participant */
struct MIGRtpsGuid guid;
/*e Hash for the discovery sample */
PRESSampleHash *sampleHash;
/*e Remote participant signature for the discovery sample */
struct PRESSampleSignature *sampleSignature;
/*e Parameters of the participant. */
struct PRESParticipantParameter *parameter;
/*e
* This is TRUE if the PRESParticipantParameter is only partially
* populated.
*/
RTIBool partialConfiguration;
};
/*e \ingroup DISCPluggableModule
\brief Initialize participant builtin topic data.
*/
#define DISC_BUILTIN_TOPIC_PARTICIPANT_DATA_INITIALIZE \
{ \
MIG_RTPS_GUID_UNKNOWN, /* guid */ \
NULL, /* sampleHash */ \
NULL, /* sampleSignature */ \
NULL, /* parameter */ \
RTI_FALSE /* partialConfiguration */ \
}
/*e \ingroup DISCPluggableModule
\brief The internal dynamic discovery data type for a publication.
The structure is defined in psService.ifc
*/
#define DISCBuiltinTopicPublicationData PRESBuiltinTopicPublicationData
#define DISC_BUILTIN_TOPIC_PUBLICATION_DATA_INITIALIZE \
PRES_BUILTIN_TOPIC_PUBLICATION_DATA_INITIALIZE
/*e \ingroup DISCPluggableModule
\brief The internal dynamic discovery data type for a subscription.
The structure is defined in psService.ifc
*/
#define DISCBuiltinTopicSubscriptionData PRESBuiltinTopicSubscriptionData
#define DISC_BUILTIN_TOPIC_SUBSCRIPTION_DATA_INITIALIZE \
PRES_BUILTIN_TOPIC_SUBSCRIPTION_DATA_INITIALIZE
/*e \ingroup DISCPluggableModule
\brief The internal dynamic discovery data type for a topic.
*/
struct DISCBuiltinTopicTopicData {
/*e GUID.
*/
struct MIGRtpsGuid guid;
};
/*e \ingroup DISCPluggableModule
\brief Initialize topic builtin topic data.
*/
#define DISC_BUILTIN_TOPIC_TOPIC_DATA_INITIALIZE \
{ \
MIG_RTPS_GUID_UNKNOWN /* guid */ \
}
extern DISCDllExport RTIBool
DISCBuiltin_isBuiltinTopicName(const char *topicName);
/* Builtin topic subscription type plugin */
extern DISCDllExport void DISCBuiltinTopicSubscriptionDataPluginSupport_print(
const struct DISCBuiltinTopicSubscriptionData *topic_data,
const char *desc,
unsigned int indent);
extern DISCDllExport RTIBool
DISCBuiltinTopicSubscriptionDataPluginSupport_initializeData_ex(
struct DISCBuiltinTopicSubscriptionData *sample,
RTIBool allocatePointers);
extern DISCDllExport void
DISCBuiltinTopicSubscriptionDataPluginSupport_finalizeData_ex(
struct DISCBuiltinTopicSubscriptionData *sample,
RTIBool deletePointers);
extern DISCDllExport int DISCBuiltinTopicSubscriptionDataPluginSupport_compare(
const struct DISCBuiltinTopicSubscriptionData *left,
const struct DISCBuiltinTopicSubscriptionData *right,
RTIBool printErrors);
/* Publication parameter plugin */
extern DISCDllExport void DISCBuiltinTopicPublicationDataPluginSupport_print(
const struct DISCBuiltinTopicPublicationData *topic_data,
const char *desc,
unsigned int indent);
extern DISCDllExport RTIBool
DISCBuiltinTopicPublicationDataPluginSupport_initializeData_ex(
struct DISCBuiltinTopicPublicationData *sample,
RTIBool allocatePointers);
extern DISCDllExport void
DISCBuiltinTopicPublicationDataPluginSupport_finalizeData_ex(
struct DISCBuiltinTopicPublicationData *sample,
RTIBool deletePointers);
extern DISCDllExport int DISCBuiltinTopicPublicationDataPluginSupport_compare(
const struct DISCBuiltinTopicPublicationData *left,
const struct DISCBuiltinTopicPublicationData *right,
RTIBool printErrors);
extern DISCDllExport RTIBool
DISCBuiltinTopicParticipantDataPluginSupport_initializeDataEx(
struct DISCBuiltinTopicParticipantData *sample,
RTIBool allocatePointers);
extern DISCDllExport void
DISCBuiltinTopicParticipantDataPluginSupport_finalizeDataEx(
struct DISCBuiltinTopicParticipantData *sample,
RTIBool deletePointers);
extern DISCDllExport struct DISCBuiltinTopicParticipantData *
DISCBuiltinTopicParticipantDataPluginSupport_createData(void);
extern DISCDllExport void
DISCBuiltinTopicParticipantDataPluginSupport_destroyData(
struct DISCBuiltinTopicParticipantData *sample);
extern DISCDllExport unsigned int
DISCBuiltinTopicParticipantDataPlugin_getSerializedSampleSize(
PRESTypePluginEndpointData endpointData,
RTIBool includeEncapsulation,
RTIEncapsulationId encapsulationId,
unsigned int size,
const struct DISCBuiltinTopicParticipantData *sample);
extern DISCDllExport RTIBool DISCBuiltinTopicParticipantDataPlugin_copy(
PRESTypePluginEndpointData endpointData,
struct DISCBuiltinTopicParticipantData *out,
const struct DISCBuiltinTopicParticipantData *in);
/*
* Get or create the participant data plugin. There is one plugin per process
* (NOT PER PARTICIPANT).
*
* @param needLock. If this is TRUE we will acquire the global lock prior to
* checking if the plugin has been created. This should only ever be FALSE
* if we have already acquired the global lock (aka, we are calling this
* from DomainParticipantFactory_finalize) or we know that the plugin
* is not being created or deleted concurrently.
*
* @return pointer to address of plugin, NULL if error.
*/
extern DISCDllExport struct PRESTypePlugin **
DISCBuiltinTopicParticipantDataPlugin_assert(RTIBool needLock);
/*
* Get or create the participant bootstrap data plugin. There is one plugin per
* process (NOT PER PARTICIPANT).
*
* @param needLock. If this is TRUE we will acquire the global lock prior to
* checking if the plugin has been created. This should only ever be FALSE
* if we have already acquired the global lock (aka, we are calling this
* from DomainParticipantFactory_finalize) or we know that the plugin
* is not being created or deleted concurrently.
*
* @return pointer to address of plugin, NULL if error.
*/
extern DISCDllExport struct PRESTypePlugin **
DISCBuiltinTopicParticipantBootstrapDataPlugin_assert(RTIBool needLock);
/**
* @brief Exposed publicly to enable monitoring testers in CDS. In SPDP2 mode
* this function is useful to gauge the size of the incoming sample to compute
* the metrics that are expected from the service.
*/
extern DISCDllExport unsigned int
DISCBuiltinTopicParticipantBootstrapDataPlugin_getSerializedSampleSize(
PRESTypePluginEndpointData endpointData,
RTIBool includeEncapsulation,
RTIEncapsulationId encapsulationId,
unsigned int size,
const struct DISCBuiltinTopicParticipantData *sample);
/*
* Delete the built in common participant data plugin. There is only one plugin
* per process that is shared among participants, so this should only be called
* when all participants are deleted.
*
* @param plugin Plugin to delete.
*/
extern DISCDllExport void DISCBuiltinTopicParticipantCommonDataPlugin_delete(
struct PRESTypePlugin *plugin);
extern DISCDllExport int DISCBuiltinTopicParticipantDataPluginSupport_compare(
const struct DISCBuiltinTopicParticipantData *left,
const struct DISCBuiltinTopicParticipantData *right);
extern DISCDllExport int
DISCBuiltinTopicParticipantDataPluginSupport_compare_without_locators(
const struct DISCBuiltinTopicParticipantData *left,
const struct DISCBuiltinTopicParticipantData *right);
/* ----------------------------------------------------------------- */
extern DISCDllExport void DISCBuiltin_printOwnershipQosPolicy(
const struct PRESOwnershipQosPolicy *p,
const char *desc,
unsigned int indent);
extern DISCDllExport int DISCBuiltin_comparePartitionQosPolicy(
const struct PRESPartitionQosPolicy *left,
const struct PRESPartitionQosPolicy *right);
/* --- SPDP2 Listener Storage definitions --- */
/*
* Index used to store the configComplete flag in
* DISCSimpleParticipantDiscoveryPlugin2PDFListener_onBeforeRemoteParticipantRemoved
* which says whether a remote participant has already received the
* configuration information before being removed
*/
#define DISC_SPDP2_CONFIG_COMPLETE_LISTENER_STORAGE_INDEX 0
/*
* Testing only. Index used to store the pointer to the DDS_DomainParticipant.
*/
#define DISC_SPDP2_TEST_PARTICIPANT_LISTENER_STORAGE_INDEX 4
/*
* Testing only. Index used to store the result.
*/
#define DISC_SPDP2_TEST_RESULT_LISTENER_STORAGE_INDEX 5
/*
* Testing only. Index used to store the pointer to the
* onAfterRemoteParticipantAuthenticated callback.
*/
#define DISC_SPDP2_TEST_CALLBACK_LISTENER_STORAGE_INDEX 6
/*
* Testing only. Index used to store whether to shut down the liveliness
* channel after authentication.
*/
#define DISC_SPDP2_TEST_SHUTDOWN_LIVELINESS_BOOL_LISTENER_STORAGE_INDEX 7
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* disc_builtin_h */