RTI Connext C API  Version 5.3.1
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
String Built-in Type

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* >.
 
typedef struct DDS_StringDataReader DDS_StringDataReader
 <<interface>> Instantiates DataReader < char* >.
 

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.
 
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.
 
const char * DDS_StringTypeSupport_get_type_name ()
 Get the default name for the char* type.
 
void DDS_StringTypeSupport_print_data (const char *a_data)
 <<extension>> Print value of data type to standard out.
 
DDS_TypeCodeDDS_StringTypeSupport_get_typecode ()
 <<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 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_StringDataWriterDDS_StringDataWriter_narrow (DDS_DataWriter *writer)
 Narrow the given DDS_DataWriter pointer to a DDS_StringDataWriter pointer.
 
DDS_DataWriterDDS_StringDataWriter_as_datawriter (DDS_StringDataWriter *writer)
 Widen the given DDS_StringDataWriter pointer to a DDS_DataWriter pointer.
 
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_StringDataReaderDDS_StringDataReader_narrow (DDS_DataReader *reader)
 Narrow the given DDS_DataReader pointer to a DDS_StringDataReader pointer.
 
DDS_DataReaderDDS_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.
 

Detailed Description

Built-in type consisting of a single character string.

Typedef Documentation

<<interface>> Instantiates DataWriter < char* >.

See Also
FooDataWriter
DDS_DataWriter
String Support

<<interface>> Instantiates DataReader < char* >.

See Also
FooDataReader
DDS_DataReader
String Support

Function Documentation

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.

Parameters
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.
Returns
One of the Standard Return Codes, DDS_RETCODE_PRECONDITION_NOT_MET or DDS_RETCODE_OUT_OF_RESOURCES.
MT Safety:
UNSAFE on the FIRST call. It is not safe for two threads to simultaneously make the first call to register a type. Subsequent calls are thread safe.
See Also
DDS_DomainParticipant_create_topic
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.

Precondition
The char* type with 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.
Postcondition
All information about the type is removed from RTI Connext. No further communication using this type is possible.
Parameters
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.
Returns
One of the Standard Return Codes, DDS_RETCODE_BAD_PARAMETER or DDS_RETCODE_ERROR
MT Safety:
SAFE.
See Also
DDS_StringTypeSupport_register_type
const char* DDS_StringTypeSupport_get_type_name ( )

Get the default name for the char* type.

Can be used for calling DDS_StringTypeSupport_register_type or creating DDS_Topic.

Returns
default name for the char* type.
See Also
DDS_StringTypeSupport_register_type
DDS_DomainParticipant_create_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.

Parameters
a_data<<in>> String to be printed.
DDS_TypeCode* DDS_StringTypeSupport_get_typecode ( )

<<extension>> Retrieves the TypeCode for the Type.

See Also
FooTypeSupport_get_typecode();
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 buffer of octets.

See Also
FooTypeSupport_serialize_data_to_cdr_buffer
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.

See Also
FooTypeSupport_deserialize_data_from_cdr_buffer
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.

See Also
FooTypeSupport_data_to_string
DDS_StringDataWriter* DDS_StringDataWriter_narrow ( DDS_DataWriter writer)

Narrow the given DDS_DataWriter pointer to a DDS_StringDataWriter pointer.

See Also
FooDataWriter_narrow
DDS_DataWriter* DDS_StringDataWriter_as_datawriter ( DDS_StringDataWriter writer)

Widen the given DDS_StringDataWriter pointer to a DDS_DataWriter pointer.

See Also
FooDataWriter_as_datawriter
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.

See Also
FooDataWriter_write
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.

See Also
FooDataWriter_write_w_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.

See Also
FooDataWriter_write_w_params
DDS_StringDataReader* DDS_StringDataReader_narrow ( DDS_DataReader reader)

Narrow the given DDS_DataReader pointer to a DDS_StringDataReader pointer.

See Also
FooDataReader_narrow
DDS_DataReader* DDS_StringDataReader_as_datareader ( DDS_StringDataReader reader)

Widen the given DDS_StringDataReader pointer to a DDS_DataReader pointer.

See Also
FooDataReader_as_datareader
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.

See Also
FooDataReader_read
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.

See Also
FooDataReader_take
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.

See Also
FooDataReader_read_w_condition
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.

See Also
FooDataReader_take_w_condition
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.

See Also
FooDataReader_read_next_sample
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.

See Also
FooDataReader_take_next_sample
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.

See Also
FooDataReader_return_loan

RTI Connext C API Version 5.3.1 Copyright © Mon Feb 19 2018 Real-Time Innovations, Inc