- 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
741 lines
25 KiB
C
741 lines
25 KiB
C
/*
|
|
* (c) Copyright, Real-Time Innovations, 2002-2024.
|
|
* 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 routingservice_adapter_new_h
|
|
#define routingservice_adapter_new_h
|
|
|
|
#include "dds_c/dds_c_infrastructure.h"
|
|
#include "dds_c/dds_c_subscription.h"
|
|
#include "routingservice/routingservice_infrastructure.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
#define RTI_ROUTING_SERVICE_LEGNTH_UNLIMITED DDS_LENGTH_UNLIMITED
|
|
#define RTI_RoutingServiceSampleState DDS_SampleStateKind
|
|
#define RTI_RoutingServiceSampleStateMask DDS_SampleStateMask
|
|
#define RTI_RoutingServiceViewStateMask DDS_ViewStateMask
|
|
#define RTI_RoutingServiceInstanceStateMask DDS_InstanceStateMask
|
|
#define RTI_RoutingServiceInstanceHandle DDS_InstanceHandle_t
|
|
#define RTI_ROUTING_SERVICE_INSTANCE_KEY_HASH_MAX_LENGTH MIG_RTPS_KEY_HASH_MAX_LENGTH
|
|
#define RTI_ROUTING_SERVICE_INSTANCE_HANDLE_NIL_NATIVE DDS_HANDLE_NIL_NATIVE
|
|
#define RTI_RoutingServiceGuid DDS_GUID_t
|
|
#define RTI_ROUTING_SERVICE_GUID_VALUE_MAX_LENGTH DDS_GUID_LENGTH
|
|
#define RTI_ROUTING_SERVICE_GUID_DEFAULT DDS_GUID_DEFAULT
|
|
#define RTI_ROUTING_SERVICE_GUID_AUTO DDS_GUID_AUTO
|
|
#define RTI_ROUTING_SERVICE_GUID_UNKNOWN DDS_GUID_UNKNOWN
|
|
#define RTI_RoutingServiceTime DDS_Time_t
|
|
#define RTI_ROUTING_SERVICE_TIME_ZERO DDS_TIME_ZERO
|
|
#define RTI_ROUTING_SERVICE_TIME_INVALID DDS_TIME_INVALID
|
|
|
|
/*i \ingroup RTI_RoutingServiceInfrastructureModule
|
|
*
|
|
* \dref_WriteActionKind
|
|
*/
|
|
typedef enum {
|
|
RTI_ROUTING_SERVICE_WRITE_ACTION_WRITE,
|
|
RTI_ROUTING_SERVICE_WRITE_ACTION_DISPOSE,
|
|
RTI_ROUTING_SERVICE_WRITE_ACTION_UNREGISTER
|
|
} RTI_RoutingServiceWriteActionKind;
|
|
|
|
/*i \ingroup RTI_RoutingServiceInfrastructureModule
|
|
*
|
|
* \dref_WriteParams
|
|
*/
|
|
struct RTI_RoutingServiceWriteParams {
|
|
struct DDS_WriteParams_t base;
|
|
RTI_RoutingServiceWriteActionKind write_action;
|
|
struct RTI_RoutingServiceGuid destination_output_stream_reader;
|
|
};
|
|
|
|
#define RTI_ROUTING_SERVICE_WRITE_PARAMS_DEFAULT { \
|
|
DDS_WRITEPARAMS_DEFAULT, /* base */\
|
|
RTI_ROUTING_SERVICE_WRITE_ACTION_WRITE, /* write action */ \
|
|
RTI_ROUTING_SERVICE_GUID_DEFAULT /* destination reader GUID */ \
|
|
}
|
|
|
|
/*i \ingroup RTI_RoutingServiceInfrastructureModule
|
|
*
|
|
* \dref_StreamRequest
|
|
*/
|
|
struct RTI_RoutingServiceStreamRequest {
|
|
/*e \dref_RTI_RoutingServiceServiceRequest_service_id
|
|
*/
|
|
int service_id;
|
|
/*e \dref_RTI_RoutingServiceServiceRequest_request_id
|
|
*/
|
|
struct RTI_RoutingServiceGuid request_id;
|
|
/*e \dref_RTI_RoutingServiceServiceRequest_request_body
|
|
*/
|
|
char * request_body;
|
|
/*e \dref_RTI_RoutingServiceServiceRequest_request_body_length
|
|
*/
|
|
int request_body_length;
|
|
};
|
|
|
|
#define RTI_RoutingServiceStreamRequest_INITIALIZER \
|
|
{0, RTI_ROUTING_SERVICE_GUID_DEFAULT, NULL, 0}
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
AdapterEntity
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*i
|
|
* \dref_Entity_update
|
|
*/
|
|
typedef void (*RTI_RoutingServiceAdapterEntityExt_UpdateFcn)(
|
|
void *entity_data,
|
|
const struct RTI_RoutingServiceProperties *properties,
|
|
RTI_RoutingServiceEnvironment *env);
|
|
|
|
/*i
|
|
* \dref_Entity_update
|
|
*/
|
|
typedef void (*RTI_RoutingServiceAdapterEntityExt_GetGuidFcn)(
|
|
void *entity_data,
|
|
struct RTI_RoutingServiceGuid *guid,
|
|
RTI_RoutingServiceEnvironment *env);
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
SampleSelector
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
typedef void* RTI_RoutingServiceSelectorStateQueryData;
|
|
|
|
typedef enum {
|
|
RTI_ROUTING_SERVICE_NONE_INSTANCE_SELECTION,
|
|
RTI_ROUTING_SERVICE_THIS_INSTANCE_SELECTION,
|
|
RTI_ROUTING_SERVICE_NEXT_INSTANCE_SELECTION
|
|
} RTI_RoutingServiceInstanceSelectionKind;
|
|
|
|
struct RTI_RoutingServiceSelectorContent {
|
|
char *expression;
|
|
struct DDS_StringSeq expression_parameters;
|
|
};
|
|
|
|
/*i
|
|
* \dref_SampleSelectorParameters
|
|
*/
|
|
struct RTI_RoutingServiceSelectorState {
|
|
/*i @brief State that the samples to read must meet */
|
|
RTI_RoutingServiceSampleStateMask sample_state;
|
|
RTI_RoutingServiceViewStateMask view_state;
|
|
RTI_RoutingServiceInstanceStateMask instance_state;
|
|
|
|
RTI_RoutingServiceInstanceSelectionKind instance_selection;
|
|
/*i @brief reference instance */
|
|
RTI_RoutingServiceInstanceHandle instance_handle;
|
|
|
|
/*i @brief Maximum number of samples to read */
|
|
int sample_count_max;
|
|
|
|
/*@ @brief Expression that allow specify a subset of samples to read that
|
|
* may have other characteristics than the ones provided by these parameters */
|
|
struct RTI_RoutingServiceSelectorContent content;
|
|
/* @brief a place holder for a content query created from the SR */
|
|
RTI_RoutingServiceSelectorStateQueryData query_data;
|
|
};
|
|
|
|
#define RTI_RoutingServiceSelectorContent_INITIALIZER {\
|
|
NULL, \
|
|
DDS_SEQUENCE_INITIALIZER \
|
|
}
|
|
|
|
#define RTI_RoutingServiceSelectorState_INITIALIZER { \
|
|
DDS_STATUS_MASK_ALL, \
|
|
DDS_STATUS_MASK_ALL, \
|
|
DDS_STATUS_MASK_ALL, \
|
|
RTI_ROUTING_SERVICE_NONE_INSTANCE_SELECTION, \
|
|
DDS_HANDLE_NIL_NATIVE, \
|
|
-1, \
|
|
RTI_RoutingServiceSelectorContent_INITIALIZER, \
|
|
NULL \
|
|
}
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
StreamReader
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
struct RTI_RoutingServiceStreamReaderExt;
|
|
|
|
/*i
|
|
* \dref_StreamReader_read
|
|
*/
|
|
typedef void (*RTI_RoutingServiceStreamReaderExt_ReadFcn)(
|
|
void *stream_reader_data,
|
|
RTI_RoutingServiceSample **sample_array,
|
|
RTI_RoutingServiceSampleInfo **sample_info_array,
|
|
int *array_length,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_StreamReader_take
|
|
*/
|
|
typedef void (*RTI_RoutingServiceStreamReaderExt_TakeFcn)(
|
|
void *stream_reader_data,
|
|
RTI_RoutingServiceSample **sample_array,
|
|
RTI_RoutingServiceSampleInfo **sample_info_array,
|
|
int *array_length,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_StreamReader_read_w_selector
|
|
*/
|
|
typedef void (*RTI_RoutingServiceStreamReaderExt_ReadWithSelectorFcn)(
|
|
void *stream_reader_data,
|
|
RTI_RoutingServiceSample **sample_array,
|
|
RTI_RoutingServiceSampleInfo **sample_info_array,
|
|
int *array_length,
|
|
const struct RTI_RoutingServiceSelectorState *selector,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_StreamReader_take_w_selector
|
|
*/
|
|
typedef void (*RTI_RoutingServiceStreamReaderExt_TakeWithSelectorFcn)(
|
|
void *stream_reader_data,
|
|
RTI_RoutingServiceSample **sample_array,
|
|
RTI_RoutingServiceSampleInfo **sample_info_array,
|
|
int *array_length,
|
|
const struct RTI_RoutingServiceSelectorState *selector,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_StreamReader_return_loan
|
|
*/
|
|
typedef void (*RTI_RoutingServiceStreamReaderExt_ReturnLoanFcn)(
|
|
void *stream_reader_data,
|
|
RTI_RoutingServiceSample *sample_list,
|
|
RTI_RoutingServiceSampleInfo *info_list,
|
|
int array_length,
|
|
RTI_RoutingServiceEnvironment *env);
|
|
|
|
/*i
|
|
* \dref_StreamReader_create_selector
|
|
*/
|
|
typedef RTI_RoutingServiceSelectorStateQueryData (
|
|
*RTI_RoutingServiceStreamReaderExt_CreateContentQueryFcn)(
|
|
void *stream_reader_data,
|
|
RTI_RoutingServiceSelectorStateQueryData old_query_data,
|
|
const struct RTI_RoutingServiceSelectorContent *content,
|
|
RTI_RoutingServiceEnvironment *env);
|
|
|
|
/*i
|
|
* \dref_StreamReader_delete_selector
|
|
*/
|
|
typedef void (*RTI_RoutingServiceStreamReaderExt_DeleteContentQueryFcn)(
|
|
void *stream_reader_data,
|
|
RTI_RoutingServiceSelectorStateQueryData query_data,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_StreamReader_delete_stream_request
|
|
*/
|
|
typedef void (*RTI_RoutingServiceStreamReaderExt_DeleteStreamRequestFcn)(
|
|
void *stream_reader_data,
|
|
int service_id,
|
|
const struct RTI_RoutingServiceGuid *request_guid,
|
|
RTI_RoutingServiceEnvironment *env);
|
|
|
|
/*i
|
|
* \dref_StreamReader_create_stream_request
|
|
*/
|
|
typedef void (*RTI_RoutingServiceStreamReaderExt_CreateStreamRequestFcn)(
|
|
void *stream_reader_data,
|
|
struct RTI_RoutingServiceStreamRequest *stream_request,
|
|
const RTI_RoutingServiceSampleInfo *stream_request_info,
|
|
RTI_RoutingServiceEnvironment *env);
|
|
|
|
/*i
|
|
* \dref_StreamReader
|
|
*/
|
|
struct RTI_RoutingServiceStreamReaderExt {
|
|
/*i @brief Handles the taking of samples (required) */
|
|
RTI_RoutingServiceStreamReaderExt_TakeFcn take;
|
|
/*i @brief Handles the reading of samples */
|
|
RTI_RoutingServiceStreamReaderExt_ReadFcn read;
|
|
/*i @brief Handles the taking the selection of the specified samples */
|
|
RTI_RoutingServiceStreamReaderExt_TakeWithSelectorFcn take_w_selector;
|
|
/*i @brief Handles the reading the selection of the specified samples */
|
|
RTI_RoutingServiceStreamReaderExt_ReadWithSelectorFcn read_w_selector;
|
|
/*i
|
|
* @brief Handles the returning the loan on the read samples and info
|
|
* (required)
|
|
*/
|
|
RTI_RoutingServiceStreamReaderExt_ReturnLoanFcn return_loan;
|
|
/*i @brief Handles the creation of a content query */
|
|
RTI_RoutingServiceStreamReaderExt_CreateContentQueryFcn
|
|
create_content_query;
|
|
/*i @brief Handles the deletion of a Selector */
|
|
RTI_RoutingServiceStreamReaderExt_DeleteContentQueryFcn
|
|
delete_content_query;
|
|
/*i @brief Handles the return of the StreamReader GUID */
|
|
RTI_RoutingServiceAdapterEntityExt_GetGuidFcn get_guid;
|
|
/*i @brief Handles the create of a stream request */
|
|
RTI_RoutingServiceStreamReaderExt_CreateStreamRequestFcn
|
|
create_stream_request;
|
|
/*i @brief Handles the deletion of a stream request */
|
|
RTI_RoutingServiceStreamReaderExt_DeleteStreamRequestFcn
|
|
delete_stream_request;
|
|
/*i @brief Handles the update of the StreamReader */
|
|
RTI_RoutingServiceAdapterEntityExt_UpdateFcn update;
|
|
/*i @brief implementation data */
|
|
void *stream_reader_data;
|
|
};
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
StreamReaderListener
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*i
|
|
* \dref_StreamReaderListener_on_data_available
|
|
*/
|
|
typedef
|
|
void (*RTI_RoutingServiceStreamReaderListenerExt_OnDataAvailableCallback)(
|
|
void *stream_reader_data,
|
|
void *listener_data);
|
|
|
|
/*i \dref_StreamReaderListener
|
|
*/
|
|
struct RTI_RoutingServiceStreamReaderListenerExt {
|
|
/*i
|
|
* \dref_StreamReaderListener_listener_data
|
|
*/
|
|
void *listener_data;
|
|
/*i
|
|
* \dref_StreamReaderListener_on_data_available
|
|
*/
|
|
RTI_RoutingServiceStreamReaderListenerExt_OnDataAvailableCallback
|
|
on_data_available;
|
|
};
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
StreamWriter
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
struct RTI_RoutingServiceStreamWriterExt;
|
|
|
|
/*i
|
|
* \dref_StreamWriter_write
|
|
*/
|
|
typedef int (*RTI_RoutingServiceStreamWriterExt_WriteFcn)(
|
|
void *stream_writer_data,
|
|
const RTI_RoutingServiceSample *sample_list,
|
|
const RTI_RoutingServiceSampleInfo *info_list,
|
|
int count,
|
|
RTI_RoutingServiceEnvironment *env);
|
|
|
|
/*i
|
|
* \dref_StreamWriter_write_w_params
|
|
*/
|
|
typedef void (*RTI_RoutingServiceStreamWriterExt_WriteWithParamsFcn)(
|
|
void *stream_writer_data,
|
|
const RTI_RoutingServiceSample sample,
|
|
struct RTI_RoutingServiceWriteParams *params,
|
|
RTI_RoutingServiceEnvironment *env);
|
|
|
|
/*i
|
|
* \dref_StreamWriter
|
|
*/
|
|
struct RTI_RoutingServiceStreamWriterExt {
|
|
/*i @brief Handles the writing of samples (required) */
|
|
RTI_RoutingServiceStreamWriterExt_WriteFcn write;
|
|
/*i @brief Handles the writing of sample with specific metadata */
|
|
RTI_RoutingServiceStreamWriterExt_WriteWithParamsFcn write_w_params;
|
|
/*i @brief Handles the return of the StreamReader GUID */
|
|
RTI_RoutingServiceAdapterEntityExt_GetGuidFcn get_guid;
|
|
/*i @brief Handles the update of the StreamWriter */
|
|
RTI_RoutingServiceAdapterEntityExt_UpdateFcn update;
|
|
/*i @brief implementation data */
|
|
void *stream_writer_data;
|
|
};
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
StreamWriterListener
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
#define RTI_RoutingServiceOutputStreamRequestStatus_INITIALIZER \
|
|
{DDS_HANDLE_NIL_NATIVE, 0, 0}
|
|
|
|
|
|
struct RTI_RoutingServiceOutputStreamRequestStatus {
|
|
/*e \dref_RTI_RoutingServiceOutputStreamRequestStatus_last_request_handle
|
|
*/
|
|
RTI_RoutingServiceInstanceHandle last_request_handle;
|
|
/*e \dref_RTI_RoutingServiceOutputStreamRequestStatus_service_id
|
|
*/
|
|
int service_id;
|
|
/*e \dref_RTI_RoutingServiceOutputStreamRequestStatus_current_count_change
|
|
*/
|
|
int current_count_change;
|
|
|
|
};
|
|
|
|
/*i
|
|
* \dref_StreamWriterListener_on_output_stream_request_received
|
|
*/
|
|
typedef
|
|
void (*RTI_RoutingServiceStreamWriterListenerExt_OnOutputStreamRequestReceivedCallback)(
|
|
void *stream_writer_data,
|
|
void *listener_data,
|
|
const struct RTI_RoutingServiceOutputStreamRequestStatus *status);
|
|
|
|
/*i
|
|
* \dref_StreamWriterListener
|
|
*/
|
|
struct RTI_RoutingServiceStreamWriterListenerExt {
|
|
/*i
|
|
* \dref_StreamWriterListener_listener_data
|
|
*/
|
|
void *listener_data;
|
|
/*i
|
|
* \dref_StreamWriterListener_on_output_stream_request_received
|
|
*/
|
|
RTI_RoutingServiceStreamWriterListenerExt_OnOutputStreamRequestReceivedCallback
|
|
on_output_stream_request_received;
|
|
};
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
Session
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
struct RTI_RoutingServiceSessionExt;
|
|
|
|
/*i
|
|
* \dref_Session
|
|
*/
|
|
struct RTI_RoutingServiceSessionExt {
|
|
/*i @brief Handles configuration changes in a session. */
|
|
RTI_RoutingServiceAdapterEntityExt_UpdateFcn update;
|
|
/*i @brief implementation data */
|
|
void *session_data;
|
|
};
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
Connection
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
struct RTI_RoutingServiceConnectionExt;
|
|
|
|
/*i
|
|
* \dref_Connection_to_string
|
|
*/
|
|
typedef const char *(*RTI_RoutingServiceConnectionExt_ToStringFcn)(
|
|
void *connection_data,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_Connection_create_session
|
|
*/
|
|
typedef struct RTI_RoutingServiceSessionExt *(
|
|
*RTI_RoutingServiceConnectionExt_CreateSessionFcn)(
|
|
void *connection_data,
|
|
const struct RTI_RoutingServiceProperties *properties,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_Connection_delete_session
|
|
*/
|
|
typedef void (*RTI_RoutingServiceConnectionExt_DeleteSessionFcn)(
|
|
void *connection_data,
|
|
struct RTI_RoutingServiceSessionExt *session,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_Connection_create_stream_reader
|
|
*/
|
|
typedef struct RTI_RoutingServiceStreamReaderExt *(
|
|
*RTI_RoutingServiceConnectionExt_CreateStreamReaderFcn)(
|
|
void *connection_data,
|
|
void *session_data,
|
|
const struct RTI_RoutingServiceStreamInfo *stream_info,
|
|
const struct RTI_RoutingServiceProperties *properties,
|
|
const struct RTI_RoutingServiceStreamReaderListenerExt *listener,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_Connection_delete_stream_reader
|
|
*/
|
|
typedef void (*RTI_RoutingServiceConnectionExt_DeleteStreamReaderFcn)(
|
|
void *connection_data,
|
|
struct RTI_RoutingServiceStreamReaderExt *stream_reader,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_Connection_create_stream_writer
|
|
*/
|
|
typedef struct RTI_RoutingServiceStreamWriterExt *(
|
|
*RTI_RoutingServiceConnectionExt_CreateStreamWriterFcn)(
|
|
void *connection_data,
|
|
void *session_data,
|
|
const struct RTI_RoutingServiceStreamInfo *stream_info,
|
|
const struct RTI_RoutingServiceProperties *properties,
|
|
const struct RTI_RoutingServiceStreamWriterListenerExt *listener,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_Connection_delete_stream_writer
|
|
*/
|
|
typedef void (*RTI_RoutingServiceConnectionExt_DeleteStreamWriterFcn)(
|
|
void *connection_data,
|
|
struct RTI_RoutingServiceStreamWriterExt *stream_writer,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \ingroup RTI_RoutingServiceAdapterExtModule
|
|
* \brief Prototype of the function that gets a built-in discovery StreamReader.
|
|
* @param environment \rs_st_inout Environment for error indications.
|
|
* @return Built-in dicovery StreamReader if successful. Otherwise, NULL.
|
|
*/
|
|
typedef struct RTI_RoutingServiceStreamReaderExt *(
|
|
*RTI_RoutingServiceConnectionExt_GetDiscoveryReaderFcn)(
|
|
void *connection_data,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_Connection_copy_type_representation
|
|
*/
|
|
typedef RTI_RoutingServiceTypeRepresentation (
|
|
*RTI_RoutingServiceConnectionExt_CopyTypeRepresentationFcn)(
|
|
void *connection_data,
|
|
RTI_RoutingServiceTypeRepresentationKind type_representation_kind,
|
|
RTI_RoutingServiceTypeRepresentation type_representation,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_Connection_delete_type_representation
|
|
*/
|
|
typedef void (*RTI_RoutingServiceConnectionExt_DeleteTypeRepresentationFcn)(
|
|
void *connection_data,
|
|
RTI_RoutingServiceTypeRepresentationKind type_representation_kind,
|
|
RTI_RoutingServiceTypeRepresentation type_representation,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_Connection_lookup_builtin_stream_reader
|
|
*/
|
|
typedef struct RTI_RoutingServiceStreamReaderExt *(
|
|
*RTI_RoutingServiceConnectionExt_LookupBuiltinStreamReaderFcn)(
|
|
void *connection_data,
|
|
const char *builtin_stream_name,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_Connection
|
|
*/
|
|
struct RTI_RoutingServiceConnectionExt {
|
|
/*i @brief Handles the creation of sessions (optional). */
|
|
RTI_RoutingServiceConnectionExt_CreateSessionFcn create_session;
|
|
/*i @brief Handles the deletion of sessions (optional). */
|
|
RTI_RoutingServiceConnectionExt_DeleteSessionFcn delete_session;
|
|
/*i
|
|
* @brief Handles the creation of stream readers (optional for write-only
|
|
* adapters).
|
|
*/
|
|
RTI_RoutingServiceConnectionExt_CreateStreamReaderFcn create_stream_reader;
|
|
/*i
|
|
* @brief Handles the deletion of stream readers (optional for write-only
|
|
* adapters).
|
|
*/
|
|
RTI_RoutingServiceConnectionExt_DeleteStreamReaderFcn delete_stream_reader;
|
|
/*i
|
|
* @brief Handles the creation of stream writers (optional for read-only
|
|
* adapters).
|
|
*/
|
|
RTI_RoutingServiceConnectionExt_CreateStreamWriterFcn create_stream_writer;
|
|
/*i
|
|
* @brief Handles the deletion of stream writers (optional for read-only
|
|
* adapters).
|
|
*/
|
|
RTI_RoutingServiceConnectionExt_DeleteStreamWriterFcn delete_stream_writer;
|
|
/*i @brief Gets the input stream discovery reader (optional). */
|
|
RTI_RoutingServiceConnectionExt_GetDiscoveryReaderFcn
|
|
get_input_stream_discovery_reader;
|
|
/*i @brief Gets the output stream discovery reader (optional). */
|
|
RTI_RoutingServiceConnectionExt_GetDiscoveryReaderFcn
|
|
get_output_stream_discovery_reader;
|
|
/*i @brief Returns the specified built-in StreamReader */
|
|
RTI_RoutingServiceConnectionExt_LookupBuiltinStreamReaderFcn
|
|
lookup_builtin_stream_reader;
|
|
/*i @brief Handles the copy of type representations (optional). */
|
|
RTI_RoutingServiceConnectionExt_CopyTypeRepresentationFcn
|
|
copy_type_representation;
|
|
/*i @brief Handles the deletion of type representations (optional). */
|
|
RTI_RoutingServiceConnectionExt_DeleteTypeRepresentationFcn
|
|
delete_type_representation;
|
|
/*i
|
|
* @brief Returns the string representation of a connection for logging
|
|
* purposes (optional).
|
|
*/
|
|
RTI_RoutingServiceConnectionExt_ToStringFcn to_string;
|
|
/*i
|
|
* @brief \not_supported Handles configuration changes in a connection
|
|
* (optional).
|
|
*/
|
|
RTI_RoutingServiceAdapterEntityExt_UpdateFcn update;
|
|
/*i @brief implementation data */
|
|
void *connection_data;
|
|
};
|
|
|
|
/*
|
|
-----------------------------------------------------------------------------
|
|
Adapter
|
|
-----------------------------------------------------------------------------
|
|
*/
|
|
struct RTI_RoutingServiceAdapterPluginExt;
|
|
|
|
/*i
|
|
* \dref_Adapter_delete_connection
|
|
*/
|
|
typedef void (*RTI_RoutingServiceAdapterPluginExt_DeleteConnectionFcn)(
|
|
void *adapter_plugin_data,
|
|
struct RTI_RoutingServiceConnectionExt *connection,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \dref_Adapter_create_connection
|
|
*/
|
|
typedef struct RTI_RoutingServiceConnectionExt *(
|
|
*RTI_RoutingServiceAdapterPluginExt_CreateConnectionFcn)(
|
|
void *adapter_plugin_data,
|
|
const char *routing_serviceName,
|
|
const char *routing_service_group_name,
|
|
const struct RTI_RoutingServiceStreamReaderListenerExt
|
|
*output_stream_discovery_listener,
|
|
const struct RTI_RoutingServiceStreamReaderListenerExt
|
|
*input_stream_discovery_listener,
|
|
const struct RTI_RoutingServiceTypeInfo **type_info_array,
|
|
int type_info_array_length,
|
|
const struct RTI_RoutingServiceProperties *properties,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \ingroup RTI_RoutingServiceAdapterExtModule
|
|
* \brief Prototype of the function that deletes an adapter plugin.
|
|
*
|
|
* Adapter plugins are deleted when \product is closed.
|
|
*
|
|
* <b>Required:</b> yes
|
|
*
|
|
* @param self \rs_st_in Adapter plugin to be deleted.
|
|
* @param env \rs_st_inout Environment for error indications.
|
|
*
|
|
* @see \ref RTI_RoutingServiceAdapterPluginExt_DeleteFcn
|
|
*/
|
|
typedef void (*RTI_RoutingServiceAdapterPluginExt_DeleteFcn)(
|
|
void *self,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
/*i
|
|
* \ingroup RTI_RoutingServiceAdapterExtModule
|
|
*/
|
|
struct RTI_RoutingServiceAdapterPluginExt {
|
|
/* Adapter interface */
|
|
int _init;
|
|
struct RTI_RoutingServiceVersion _rs_version;
|
|
/*i \brief The version of this adapter plugin */
|
|
struct RTI_RoutingServiceVersion plugin_version;
|
|
/*i @brief Deletes the AdapterPlugin */
|
|
RTI_RoutingServiceAdapterPluginExt_DeleteFcn plugin_delete;
|
|
/*i @brief Handles the creation of connections (required). */
|
|
RTI_RoutingServiceAdapterPluginExt_CreateConnectionFcn create_connection;
|
|
/*i @brief Handles the deletion of connections (required). */
|
|
RTI_RoutingServiceAdapterPluginExt_DeleteConnectionFcn delete_connection;
|
|
/*i @brief implementation data */
|
|
void *adapter_plugin_data;
|
|
};
|
|
|
|
/*i
|
|
@brief Prototype of the function that creates an adapter plugin.
|
|
|
|
The name of the function that implements this prototype
|
|
must be provided to \product using the tag <create_function>
|
|
when the adapter plugin is registered. For example:
|
|
|
|
\verbatim
|
|
<dds>
|
|
...
|
|
<plugin_library name="MyAdapterLib">
|
|
<adapter_plugin name="MyAdapterPlugin">
|
|
<dll>mycadapter</dll>
|
|
<create_function>
|
|
MyAdapterPlugin_create
|
|
</create_function>
|
|
</adapter_plugin>
|
|
...
|
|
</plugin_library>
|
|
...
|
|
<routing_service>
|
|
...
|
|
</routing_service>
|
|
...
|
|
</dds>
|
|
\endverbatim
|
|
|
|
<b>Required:</b> yes
|
|
|
|
@param properties Configuration properties for the adapter.
|
|
@param env \rs_st_inout Environment for error indications.
|
|
|
|
@return New plugin instance if successful. Otherwise, NULL.
|
|
|
|
@see \ref RTI_RoutingServiceAdapterPluginExt_DeleteFcn
|
|
@see \ref RTI_RoutingServiceAdapterPluginExt_initialize
|
|
*/
|
|
typedef struct RTI_RoutingServiceAdapterPluginExt *(
|
|
*RTI_RoutingServiceAdapterPluginExt_CreateFcn)(
|
|
const struct RTI_RoutingServiceProperties *properties,
|
|
RTI_RoutingServiceEnvironment *environment);
|
|
|
|
|
|
#define RTI_ROUTING_SERVICE_ADAPTER_PLUGIN_EXT_INIT_NUMBER (8283884)
|
|
/*i \ingroup RTI_RoutingServiceAdapterExtModule
|
|
\hideinitializer
|
|
@brief Initializes the adapter plugin structure.
|
|
|
|
This macro must be called to initialize the
|
|
return value of RTI_RoutingServiceAdapterPluginExt_CreateFcn
|
|
|
|
@param adapter Pointer to the adapter plugin structure
|
|
|
|
@see \ref RTI_RoutingServiceAdapterPluginExt_CreateFcn
|
|
*/
|
|
#define RTI_RoutingServiceAdapterPluginExt_initialize(adapter) \
|
|
{ \
|
|
struct RTI_RoutingServiceVersion rsVersion = RTI_ROUTING_SERVICE_VERSION; \
|
|
struct RTI_RoutingServiceVersion adapterVersion = {0,0,0,0}; \
|
|
(adapter)->_init = RTI_ROUTING_SERVICE_ADAPTER_PLUGIN_EXT_INIT_NUMBER; \
|
|
(adapter)->_rs_version = rsVersion; \
|
|
(adapter)->plugin_version = adapterVersion; \
|
|
(adapter)->plugin_delete = 0; \
|
|
(adapter)->create_connection = 0; \
|
|
(adapter)->delete_connection = 0; \
|
|
(adapter)->adapter_plugin_data = 0; \
|
|
}
|
|
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#endif /* routingservice_adapter_new_h */
|