RTI Connext C API Version 7.3.0
|
Built-in type consisting of a single character string. More...
Data Structures | |
struct | DDS_StringTypeSupport |
<<interface>> String type support. More... | |
Typedefs | |
typedef struct DDS_StringDataWriter | DDS_StringDataWriter |
<<interface>> Instantiates DataWriter < char* >. More... | |
typedef struct DDS_StringDataReader | DDS_StringDataReader |
<<interface>> Instantiates DataReader < char* >. More... | |
Functions | |
DDS_ReturnCode_t | DDS_StringTypeSupport_register_type (DDS_DomainParticipant *participant, const char *type_name) |
Allows an application to communicate to RTI Connext the existence of the char* data type. More... | |
DDS_ReturnCode_t | DDS_StringTypeSupport_unregister_type (DDS_DomainParticipant *participant, const char *type_name) |
Allows an application to unregister the char* data type from RTI Connext. After calling unregister_type, no further communication using this type is possible. More... | |
const char * | DDS_StringTypeSupport_get_type_name (void) |
Get the default name for the char* type. More... | |
void | DDS_StringTypeSupport_print_data (const char *a_data) |
<<extension>> Print value of data type to standard out. More... | |
DDS_TypeCode * | DDS_StringTypeSupport_get_typecode (void) |
<<extension>> Retrieves the TypeCode for the Type. More... | |
DDS_ReturnCode_t | DDS_StringTypeSupport_serialize_data_to_cdr_buffer (char *buffer, unsigned int *length, const char *a_data) |
<<extension>> Serializes the input sample into a CDR buffer of octets. More... | |
DDS_ReturnCode_t | DDS_StringTypeSupport_serialize_data_to_cdr_buffer_ex (char *buffer, unsigned int *length, const char *a_data, DDS_DataRepresentationId_t representation) |
<<extension>> Serializes the input sample into a buffer of octets. More... | |
DDS_ReturnCode_t | DDS_StringTypeSupport_deserialize_data_from_cdr_buffer (char **a_data, const char *buffer, unsigned int length) |
<<extension>> Deserializes a sample from a buffer of octets. More... | |
DDS_ReturnCode_t | DDS_StringTypeSupport_data_to_string (const char *sample, char *str, DDS_UnsignedLong *str_size, DDS_PrintFormatProperty *property) |
<<extension>> Get the string representation of an input sample. More... | |
DDS_StringDataWriter * | DDS_StringDataWriter_narrow (DDS_DataWriter *writer) |
Narrow the given DDS_DataWriter pointer to a DDS_StringDataWriter pointer. More... | |
DDS_DataWriter * | DDS_StringDataWriter_as_datawriter (DDS_StringDataWriter *writer) |
Widen the given DDS_StringDataWriter pointer to a DDS_DataWriter pointer. More... | |
char * | DDS_StringDataWriter_create_data (DDS_StringDataWriter *self) |
Creates a string data instance. More... | |
DDS_Boolean | DDS_StringDataWriter_delete_data (DDS_StringDataWriter *self, char *sample) |
Destroys a string data instance created by DDS_StringDataWriter_create_data. More... | |
DDS_ReturnCode_t | DDS_StringDataWriter_write (DDS_StringDataWriter *self, const char *instance_data, const DDS_InstanceHandle_t *handle) |
Modifies the value of a string data instance. More... | |
DDS_ReturnCode_t | DDS_StringDataWriter_write_w_timestamp (DDS_StringDataWriter *self, const char *instance_data, const DDS_InstanceHandle_t *handle, const struct DDS_Time_t *source_timestamp) |
Performs the same function as DDS_StringDataWriter_write except that it also provides the value for the source_timestamp . More... | |
DDS_ReturnCode_t | DDS_StringDataWriter_write_w_params (DDS_StringDataWriter *self, const char *instance_data, struct DDS_WriteParams_t *params) |
Performs the same function as DDS_StringDataWriter_write except that it also allows specification of the instance handle, source timestamp, publication priority, and cookie. More... | |
DDS_StringDataReader * | DDS_StringDataReader_narrow (DDS_DataReader *reader) |
Narrow the given DDS_DataReader pointer to a DDS_StringDataReader pointer. More... | |
DDS_DataReader * | DDS_StringDataReader_as_datareader (DDS_StringDataReader *reader) |
Widen the given DDS_StringDataReader pointer to a DDS_DataReader pointer. More... | |
DDS_ReturnCode_t | DDS_StringDataReader_read (DDS_StringDataReader *self, struct DDS_StringSeq *received_data, struct DDS_SampleInfoSeq *info_seq, DDS_Long max_samples, DDS_SampleStateMask sample_states, DDS_ViewStateMask view_states, DDS_InstanceStateMask instance_states) |
Access a collection of data samples from the DDS_DataReader. More... | |
DDS_ReturnCode_t | DDS_StringDataReader_take (DDS_StringDataReader *self, struct DDS_StringSeq *received_data, struct DDS_SampleInfoSeq *info_seq, DDS_Long max_samples, DDS_SampleStateMask sample_mask, DDS_ViewStateMask view_mask, DDS_InstanceStateMask instance_mask) |
Access a collection of data-samples from the DDS_DataReader. More... | |
DDS_ReturnCode_t | DDS_StringDataReader_read_w_condition (DDS_StringDataReader *self, struct DDS_StringSeq *received_data, struct DDS_SampleInfoSeq *info_seq, DDS_Long max_samples, DDS_ReadCondition *condition) |
Accesses via DDS_StringDataReader_read the samples that match the criteria specified in the DDS_ReadCondition. More... | |
DDS_ReturnCode_t | DDS_StringDataReader_take_w_condition (DDS_StringDataReader *self, struct DDS_StringSeq *received_data, struct DDS_SampleInfoSeq *info_seq, DDS_Long max_samples, DDS_ReadCondition *condition) |
Analogous to DDS_StringDataReader_read_w_condition except it accesses samples via the DDS_StringDataReader_take operation. More... | |
DDS_ReturnCode_t | DDS_StringDataReader_read_next_sample (DDS_StringDataReader *self, char *received_data, struct DDS_SampleInfo *sample_info) |
Copies the next not-previously-accessed data value from the DDS_DataReader. More... | |
DDS_ReturnCode_t | DDS_StringDataReader_take_next_sample (DDS_StringDataReader *self, char *received_data, struct DDS_SampleInfo *sample_info) |
Copies the next not-previously-accessed data value from the DDS_DataReader. More... | |
DDS_ReturnCode_t | DDS_StringDataReader_return_loan (DDS_StringDataReader *self, struct DDS_StringSeq *received_data, struct DDS_SampleInfoSeq *info_seq) |
Indicates to the DDS_DataReader that the application is done accessing the collection of received_data and info_seq obtained by some earlier invocation of read or take on the DDS_DataReader. More... | |
Built-in type consisting of a single character string.
typedef struct DDS_StringDataWriter DDS_StringDataWriter |
<<interface>> Instantiates DataWriter
< char* >.
typedef struct DDS_StringDataReader DDS_StringDataReader |
<<interface>> Instantiates DataReader
< char* >.
DDS_ReturnCode_t DDS_StringTypeSupport_register_type | ( | DDS_DomainParticipant * | participant, |
const char * | type_name | ||
) |
Allows an application to communicate to RTI Connext the existence of the char* data type.
By default, The char* built-in type is automatically registered when a DomainParticipant is created using the type_name returned by DDS_StringTypeSupport_get_type_name. Therefore, the usage of this function is optional and it is only required when the automatic built-in type registration is disabled using the participant property "dds.builtin_type.auto_register".
This function can also be used to register the same DDS_StringTypeSupport with a DDS_DomainParticipant using different values for the type_name.
If register_type
is called multiple times with the same DDS_DomainParticipant and type_name
, the second (and subsequent) registrations are ignored by the operation.
participant | <<in>> the DDS_DomainParticipant to register the data type char* with. Cannot be NULL. |
type_name | <<in>> the type name under with the data type char* is registered with the participant; this type name is used when creating a new DDS_Topic. (See DDS_DomainParticipant_create_topic.) The name may not be NULL or longer than 255 characters. |
DDS_ReturnCode_t DDS_StringTypeSupport_unregister_type | ( | DDS_DomainParticipant * | participant, |
const char * | type_name | ||
) |
Allows an application to unregister the char* data type from RTI Connext. After calling unregister_type, no further communication using this type is possible.
type_name
is registered with the participant and all DDS_Topic objects referencing the type have been destroyed. If the type is not registered with the participant, or if any DDS_Topic is associated with the type, the operation will fail with DDS_RETCODE_ERROR. participant | <<in>> the DDS_DomainParticipant to unregister the data type char* from. Cannot be NULL. |
type_name | <<in>> the type name under with the data type char* is registered with the participant. The name should match a name that has been previously used to register a type with the participant. Cannot be NULL. |
const char * DDS_StringTypeSupport_get_type_name | ( | void | ) |
Get the default name for the char* type.
Can be used for calling DDS_StringTypeSupport_register_type or creating DDS_Topic.
void DDS_StringTypeSupport_print_data | ( | const char * | a_data | ) |
<<extension>> Print value of data type to standard out.
The generated implementation of the operation knows how to print value of a data type.
a_data | <<in>> String to be printed. |
DDS_TypeCode * DDS_StringTypeSupport_get_typecode | ( | void | ) |
<<extension>> Retrieves the TypeCode for the Type.
DDS_ReturnCode_t DDS_StringTypeSupport_serialize_data_to_cdr_buffer | ( | char * | buffer, |
unsigned int * | length, | ||
const char * | a_data | ||
) |
<<extension>> Serializes the input sample into a CDR buffer of octets.
DDS_ReturnCode_t DDS_StringTypeSupport_serialize_data_to_cdr_buffer_ex | ( | char * | buffer, |
unsigned int * | length, | ||
const char * | a_data, | ||
DDS_DataRepresentationId_t | representation | ||
) |
<<extension>> Serializes the input sample into a buffer of octets.
DDS_ReturnCode_t DDS_StringTypeSupport_deserialize_data_from_cdr_buffer | ( | char ** | a_data, |
const char * | buffer, | ||
unsigned int | length | ||
) |
<<extension>> Deserializes a sample from a buffer of octets.
DDS_ReturnCode_t DDS_StringTypeSupport_data_to_string | ( | const char * | sample, |
char * | str, | ||
DDS_UnsignedLong * | str_size, | ||
DDS_PrintFormatProperty * | property | ||
) |
<<extension>> Get the string representation of an input sample.
DDS_StringDataWriter * DDS_StringDataWriter_narrow | ( | DDS_DataWriter * | writer | ) |
Narrow the given DDS_DataWriter pointer to a DDS_StringDataWriter pointer.
DDS_DataWriter * DDS_StringDataWriter_as_datawriter | ( | DDS_StringDataWriter * | writer | ) |
Widen the given DDS_StringDataWriter pointer to a DDS_DataWriter pointer.
char * DDS_StringDataWriter_create_data | ( | DDS_StringDataWriter * | self | ) |
Creates a string data instance.
The size of the instance including the NULL terminated character is determined by the DataWriter property dds.builtin_type.string.alloc_size.
Default size: dds.builtin_type.string.max_size property of DomainParticipant if defined. Otherwise 1024.
Created instances must be deleted with DDS_StringDataWriter_delete_data.
DDS_Boolean DDS_StringDataWriter_delete_data | ( | DDS_StringDataWriter * | self, |
char * | sample | ||
) |
Destroys a string data instance created by DDS_StringDataWriter_create_data.
DDS_ReturnCode_t DDS_StringDataWriter_write | ( | DDS_StringDataWriter * | self, |
const char * | instance_data, | ||
const DDS_InstanceHandle_t * | handle | ||
) |
Modifies the value of a string data instance.
DDS_ReturnCode_t DDS_StringDataWriter_write_w_timestamp | ( | DDS_StringDataWriter * | self, |
const char * | instance_data, | ||
const DDS_InstanceHandle_t * | handle, | ||
const struct DDS_Time_t * | source_timestamp | ||
) |
Performs the same function as DDS_StringDataWriter_write except that it also provides the value for the source_timestamp
.
DDS_ReturnCode_t DDS_StringDataWriter_write_w_params | ( | DDS_StringDataWriter * | self, |
const char * | instance_data, | ||
struct DDS_WriteParams_t * | params | ||
) |
Performs the same function as DDS_StringDataWriter_write except that it also allows specification of the instance handle, source timestamp, publication priority, and cookie.
DDS_StringDataReader * DDS_StringDataReader_narrow | ( | DDS_DataReader * | reader | ) |
Narrow the given DDS_DataReader pointer to a DDS_StringDataReader pointer.
DDS_DataReader * DDS_StringDataReader_as_datareader | ( | DDS_StringDataReader * | reader | ) |
Widen the given DDS_StringDataReader pointer to a DDS_DataReader pointer.
DDS_ReturnCode_t DDS_StringDataReader_read | ( | DDS_StringDataReader * | self, |
struct DDS_StringSeq * | received_data, | ||
struct DDS_SampleInfoSeq * | info_seq, | ||
DDS_Long | max_samples, | ||
DDS_SampleStateMask | sample_states, | ||
DDS_ViewStateMask | view_states, | ||
DDS_InstanceStateMask | instance_states | ||
) |
Access a collection of data samples from the DDS_DataReader.
DDS_ReturnCode_t DDS_StringDataReader_take | ( | DDS_StringDataReader * | self, |
struct DDS_StringSeq * | received_data, | ||
struct DDS_SampleInfoSeq * | info_seq, | ||
DDS_Long | max_samples, | ||
DDS_SampleStateMask | sample_mask, | ||
DDS_ViewStateMask | view_mask, | ||
DDS_InstanceStateMask | instance_mask | ||
) |
Access a collection of data-samples from the DDS_DataReader.
DDS_ReturnCode_t DDS_StringDataReader_read_w_condition | ( | DDS_StringDataReader * | self, |
struct DDS_StringSeq * | received_data, | ||
struct DDS_SampleInfoSeq * | info_seq, | ||
DDS_Long | max_samples, | ||
DDS_ReadCondition * | condition | ||
) |
Accesses via DDS_StringDataReader_read the samples that match the criteria specified in the DDS_ReadCondition.
DDS_ReturnCode_t DDS_StringDataReader_take_w_condition | ( | DDS_StringDataReader * | self, |
struct DDS_StringSeq * | received_data, | ||
struct DDS_SampleInfoSeq * | info_seq, | ||
DDS_Long | max_samples, | ||
DDS_ReadCondition * | condition | ||
) |
Analogous to DDS_StringDataReader_read_w_condition except it accesses samples via the DDS_StringDataReader_take operation.
DDS_ReturnCode_t DDS_StringDataReader_read_next_sample | ( | DDS_StringDataReader * | self, |
char * | received_data, | ||
struct DDS_SampleInfo * | sample_info | ||
) |
Copies the next not-previously-accessed data value from the DDS_DataReader.
DDS_ReturnCode_t DDS_StringDataReader_take_next_sample | ( | DDS_StringDataReader * | self, |
char * | received_data, | ||
struct DDS_SampleInfo * | sample_info | ||
) |
Copies the next not-previously-accessed data value from the DDS_DataReader.
DDS_ReturnCode_t DDS_StringDataReader_return_loan | ( | DDS_StringDataReader * | self, |
struct DDS_StringSeq * | received_data, | ||
struct DDS_SampleInfoSeq * | info_seq | ||
) |
Indicates to the DDS_DataReader that the application is done accessing the collection of received_data
and info_seq
obtained by some earlier invocation of read or take on the DDS_DataReader.