RTI Connext C API  Version 5.0.0
Octets Built-in Type

Built-in type consisting of a variable-length array of opaque bytes. More...

Data Structures

struct  DDS_Octets
 Built-in type consisting of a variable-length array of opaque bytes. More...
 
struct  DDS_OctetsSeq
 Instantiates FooSeq < DDS_Octets > . More...
 
struct  DDS_OctetsTypeSupport
 <<interface>> DDS_Octets type support. More...
 

Typedefs

typedef struct DDS_Octets DDS_Octets
 Built-in type consisting of a variable-length array of opaque bytes.
 
typedef struct DDS_OctetsDataWriter DDS_OctetsDataWriter
 <<interface>> Instantiates DataWriter < DDS_Octets >.
 
typedef struct DDS_OctetsDataReader DDS_OctetsDataReader
 <<interface>> Instantiates DataReader < DDS_Octets >.
 

Functions

DDS_OctetsDDS_Octets_new ()
 Constructor.
 
DDS_OctetsDDS_Octets_new_w_size (int size)
 Constructor that specifies the size of the allocated octets array.
 
void DDS_Octets_delete (DDS_Octets *self)
 Destructor.
 
DDS_ReturnCode_t DDS_OctetsTypeSupport_register_type (DDS_DomainParticipant *participant, const char *type_name)
 Allows an application to communicate to RTI Connext the existence of the DDS_Octets data type.
 
DDS_ReturnCode_t DDS_OctetsTypeSupport_unregister_type (DDS_DomainParticipant *participant, const char *type_name)
 Allows an application to unregister the DDS_Octets data type from RTI Connext. After calling unregister_type, no further communication using this type is possible.
 
const char * DDS_OctetsTypeSupport_get_type_name ()
 Get the default name for the DDS_Octets type.
 
void DDS_OctetsTypeSupport_print_data (const DDS_Octets *a_data)
 <<eXtension>> Print value of data type to standard out.
 
DDS_OctetsDataWriterDDS_OctetsDataWriter_narrow (DDS_DataWriter *writer)
 Narrow the given DDS_DataWriter pointer to a DDS_OctetsDataWriter pointer.
 
DDS_DataWriterDDS_OctetsDataWriter_as_datawriter (DDS_OctetsDataWriter *writer)
 Widen the given DDS_OctetsDataWriter pointer to a DDS_DataWriter pointer.
 
DDS_ReturnCode_t DDS_OctetsDataWriter_write (DDS_OctetsDataWriter *self, const DDS_Octets *instance_data, const DDS_InstanceHandle_t *handle)
 Modifies the value of a DDS_Octets data instance.
 
DDS_ReturnCode_t DDS_OctetsDataWriter_write_octets (DDS_OctetsDataWriter *self, const unsigned char *octets, int length, const DDS_InstanceHandle_t *handle)
 <<eXtension>> Modifies the value of a DDS_Octets data instance.
 
DDS_ReturnCode_t DDS_OctetsDataWriter_write_octets_seq (DDS_OctetsDataWriter *self, const struct DDS_OctetSeq *octets, const DDS_InstanceHandle_t *handle)
 <<eXtension>> Modifies the value of a DDS_Octets data instance.
 
DDS_ReturnCode_t DDS_OctetsDataWriter_write_w_timestamp (DDS_OctetsDataWriter *self, const DDS_Octets *instance_data, const DDS_InstanceHandle_t *handle, const struct DDS_Time_t *source_timestamp)
 Performs the same function as DDS_OctetsDataWriter_write except that it also provides the value for the source_timestamp.
 
DDS_ReturnCode_t DDS_OctetsDataWriter_write_octets_w_timestamp (DDS_OctetsDataWriter *self, const unsigned char *octets, int length, const DDS_InstanceHandle_t *handle, const struct DDS_Time_t *source_timestamp)
 <<eXtension>> Performs the same function as DDS_OctetsDataWriter_write_octets except that it also provides the value for the source_timestamp.
 
DDS_ReturnCode_t DDS_OctetsDataWriter_write_octets_seq_w_timestamp (DDS_OctetsDataWriter *self, const struct DDS_OctetSeq *octets, const DDS_InstanceHandle_t *handle, const struct DDS_Time_t *source_timestamp)
 <<eXtension>> Performs the same function as DDS_OctetsDataWriter_write_octets_seq except that it also provides the value for the source_timestamp.
 
DDS_ReturnCode_t DDS_OctetsDataWriter_write_w_params (DDS_OctetsDataWriter *self, const DDS_Octets *instance_data, struct DDS_WriteParams_t *params)
 Performs the same function as DDS_OctetsDataWriter_write except that it also allows specification of the instance handle, source timestamp, publication priority, and cookie.
 
DDS_ReturnCode_t DDS_OctetsDataWriter_write_octets_w_params (DDS_OctetsDataWriter *self, const unsigned char *octets, int length, struct DDS_WriteParams_t *params)
 <<eXtension>> Performs the same function as DDS_OctetsDataWriter_write_octets except that it also allows specification of the instance handle, source timestamp, publication priority, and cookie.
 
DDS_ReturnCode_t DDS_OctetsDataWriter_write_octets_seq_w_params (DDS_OctetsDataWriter *self, const struct DDS_OctetSeq *octets, struct DDS_WriteParams_t *params)
 <<eXtension>> Performs the same function as DDS_OctetsDataWriter_write_octets_seq except that it also allows specification of the instance handle, source timestamp, publication priority, and cookie.
 
DDS_OctetsDataReaderDDS_OctetsDataReader_narrow (DDS_DataReader *reader)
 Narrow the given DDS_DataReader pointer to a DDS_OctetsDataReader pointer.
 
DDS_DataReaderDDS_OctetsDataReader_as_datareader (DDS_OctetsDataReader *reader)
 Widen the given DDS_OctetsDataReader pointer to a DDS_DataReader pointer.
 
DDS_ReturnCode_t DDS_OctetsDataReader_read (DDS_OctetsDataReader *self, struct DDS_OctetsSeq *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_OctetsDataReader_take (DDS_OctetsDataReader *self, struct DDS_OctetsSeq *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_OctetsDataReader_read_w_condition (DDS_OctetsDataReader *self, struct DDS_OctetsSeq *received_data, struct DDS_SampleInfoSeq *info_seq, DDS_Long max_samples, DDS_ReadCondition *condition)
 Accesses via DDS_OctetsDataReader_read the samples that match the criteria specified in the DDS_ReadCondition.
 
DDS_ReturnCode_t DDS_OctetsDataReader_take_w_condition (DDS_OctetsDataReader *self, struct DDS_OctetsSeq *received_data, struct DDS_SampleInfoSeq *info_seq, DDS_Long max_samples, DDS_ReadCondition *condition)
 Analogous to DDS_OctetsDataReader_read_w_condition except it accesses samples via the DDS_OctetsDataReader_take operation.
 
DDS_ReturnCode_t DDS_OctetsDataReader_read_next_sample (DDS_OctetsDataReader *self, DDS_Octets *received_data, struct DDS_SampleInfo *sample_info)
 Copies the next not-previously-accessed data value from the DDS_DataReader.
 
DDS_ReturnCode_t DDS_OctetsDataReader_take_next_sample (DDS_OctetsDataReader *self, DDS_Octets *received_data, struct DDS_SampleInfo *sample_info)
 Copies the next not-previously-accessed data value from the DDS_DataReader.
 
DDS_ReturnCode_t DDS_OctetsDataReader_return_loan (DDS_OctetsDataReader *self, struct DDS_OctetsSeq *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.
 

Variables

int DDS_Octets::length
 Number of octets to serialize.
 
unsigned char * DDS_Octets::value
 DDS_Octets array value.
 

Detailed Description

Built-in type consisting of a variable-length array of opaque bytes.

Typedef Documentation

typedef struct DDS_Octets DDS_Octets

Built-in type consisting of a variable-length array of opaque bytes.

<<interface>> Instantiates DataReader < DDS_Octets >.

When reading or taking data with this reader, if you request a copy of the samples instead of a loan, and the byte array in a destination data sample is NULL, the middleware will allocate a new array for you of sufficient length to hold the received data. The new array will be allocated with DDS_OctetBuffer_alloc; the sample's destructor will delete it.

A non- NULL array is assumed to be allocated to sufficient length to store the incoming data. It will not be reallocated.

See Also
FooDataReader
DDS_DataReader

Function Documentation

DDS_Octets* DDS_Octets_new ( )

Constructor.

The default constructor initializes the newly created object with NULL value, and zero length.

Returns
A new DDS_Octets or NULL if failure.
DDS_Octets* DDS_Octets_new_w_size ( int  size)

Constructor that specifies the size of the allocated octets array.

After this function is called, length is set to zero.

Parameters
size<<in>> Size of the allocated octets array. Cannot be smaller than zero.
Returns
A new DDS_Octets or NULL if failure.
void DDS_Octets_delete ( DDS_Octets self)

Destructor.

DDS_ReturnCode_t DDS_OctetsTypeSupport_register_type ( DDS_DomainParticipant participant,
const char *  type_name 
)

Allows an application to communicate to RTI Connext the existence of the DDS_Octets data type.

By default, The DDS_Octets built-in type is automatically registered when a DomainParticipant is created using the type_name returned by DDS_OctetsTypeSupport_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_OctetsTypeSupport 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 DDS_Octets with. Cannot be NULL.
type_name<<in>> the type name under with the data type DDS_Octets 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_OctetsTypeSupport_unregister_type ( DDS_DomainParticipant participant,
const char *  type_name 
)

Allows an application to unregister the DDS_Octets data type from RTI Connext. After calling unregister_type, no further communication using this type is possible.

Precondition
The DDS_Octets 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 DDS_Octets from. Cannot be NULL.
type_name<<in>> the type name under with the data type DDS_Octets 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_OctetsTypeSupport_register_type
const char* DDS_OctetsTypeSupport_get_type_name ( )

Get the default name for the DDS_Octets type.

Can be used for calling DDS_OctetsTypeSupport_register_type or creating DDS_Topic.

Returns
default name for the DDS_Octets type.
See Also
DDS_OctetsTypeSupport_register_type
DDS_DomainParticipant_create_topic
void DDS_OctetsTypeSupport_print_data ( const DDS_Octets 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>> DDS_Octets to be printed.
DDS_OctetsDataWriter* DDS_OctetsDataWriter_narrow ( DDS_DataWriter writer)

Narrow the given DDS_DataWriter pointer to a DDS_OctetsDataWriter pointer.

See Also
FooDataWriter_narrow
DDS_DataWriter* DDS_OctetsDataWriter_as_datawriter ( DDS_OctetsDataWriter writer)

Widen the given DDS_OctetsDataWriter pointer to a DDS_DataWriter pointer.

See Also
FooDataWriter_as_datawriter
DDS_ReturnCode_t DDS_OctetsDataWriter_write ( DDS_OctetsDataWriter self,
const DDS_Octets instance_data,
const DDS_InstanceHandle_t handle 
)

Modifies the value of a DDS_Octets data instance.

See Also
FooDataWriter_write
DDS_ReturnCode_t DDS_OctetsDataWriter_write_octets ( DDS_OctetsDataWriter self,
const unsigned char *  octets,
int  length,
const DDS_InstanceHandle_t handle 
)

<<eXtension>> Modifies the value of a DDS_Octets data instance.

Parameters
self<<in>> Cannot be NULL.
octets<<in>> Array of octets to be published.
length<<in>> Number of octets to be published.
handle<<in>> The special value DDS_HANDLE_NIL should be used always.
See Also
FooDataWriter_write
DDS_ReturnCode_t DDS_OctetsDataWriter_write_octets_seq ( DDS_OctetsDataWriter self,
const struct DDS_OctetSeq octets,
const DDS_InstanceHandle_t handle 
)

<<eXtension>> Modifies the value of a DDS_Octets data instance.

Parameters
self<<in>> Cannot be NULL.
octets<<in>> Sequence of octets to be published.
handle<<in>> The special value DDS_HANDLE_NIL should be used always.
See Also
FooDataWriter_write
DDS_ReturnCode_t DDS_OctetsDataWriter_write_w_timestamp ( DDS_OctetsDataWriter self,
const DDS_Octets instance_data,
const DDS_InstanceHandle_t handle,
const struct DDS_Time_t source_timestamp 
)

Performs the same function as DDS_OctetsDataWriter_write except that it also provides the value for the source_timestamp.

See Also
FooDataWriter_write_w_timestamp
DDS_ReturnCode_t DDS_OctetsDataWriter_write_octets_w_timestamp ( DDS_OctetsDataWriter self,
const unsigned char *  octets,
int  length,
const DDS_InstanceHandle_t handle,
const struct DDS_Time_t source_timestamp 
)

<<eXtension>> Performs the same function as DDS_OctetsDataWriter_write_octets except that it also provides the value for the source_timestamp.

Parameters
self<<in>> Cannot be NULL.
octets<<in>> Array of octets to be published.
length<<in>> Number of octets to be published.
handle<<in>> The special value DDS_HANDLE_NIL should be used always.
source_timestamp<<in>> The timestamp value must be greater than or equal to the timestamp value used in the last writer operation. See FooDataWriter_write_w_timestamp. Cannot be NULL.
See Also
FooDataWriter_write_w_timestamp
DDS_ReturnCode_t DDS_OctetsDataWriter_write_octets_seq_w_timestamp ( DDS_OctetsDataWriter self,
const struct DDS_OctetSeq octets,
const DDS_InstanceHandle_t handle,
const struct DDS_Time_t source_timestamp 
)

<<eXtension>> Performs the same function as DDS_OctetsDataWriter_write_octets_seq except that it also provides the value for the source_timestamp.

Parameters
self<<in>> Cannot be NULL.
octets<<in>> Sequence of octets to be published.
handle<<in>> The special value DDS_HANDLE_NIL should be used always.
source_timestamp<<in>> The timestamp value must be greater than or equal to the timestamp value used in the last writer operation. See FooDataWriter_write_w_timestamp. Cannot be NULL.
See Also
FooDataWriter_write_w_timestamp
DDS_ReturnCode_t DDS_OctetsDataWriter_write_w_params ( DDS_OctetsDataWriter self,
const DDS_Octets instance_data,
struct DDS_WriteParams_t params 
)

Performs the same function as DDS_OctetsDataWriter_write except that it also allows specification of the instance handle, source timestamp, publication priority, and cookie.

See Also
FooDataWriter_write_w_params
DDS_ReturnCode_t DDS_OctetsDataWriter_write_octets_w_params ( DDS_OctetsDataWriter self,
const unsigned char *  octets,
int  length,
struct DDS_WriteParams_t params 
)

<<eXtension>> Performs the same function as DDS_OctetsDataWriter_write_octets except that it also allows specification of the instance handle, source timestamp, publication priority, and cookie.

Parameters
self<<in>> Cannot be NULL.
octets<<in>> Array of octets to be published.
length<<in>> Number of octets to be published.
params<<in>> The DDS_WriteParams_t parameter containing the instance handle, source timestamp, publication priority, and cookie to be used in write operation. See FooDataWriter_write_w_params. Cannot be NULL.
See Also
FooDataWriter_write_w_params
DDS_ReturnCode_t DDS_OctetsDataWriter_write_octets_seq_w_params ( DDS_OctetsDataWriter self,
const struct DDS_OctetSeq octets,
struct DDS_WriteParams_t params 
)

<<eXtension>> Performs the same function as DDS_OctetsDataWriter_write_octets_seq except that it also allows specification of the instance handle, source timestamp, publication priority, and cookie.

Parameters
self<<in>> Cannot be NULL.
octets<<in>> Sequence of octets to be published.
params<<in>> The DDS_WriteParams_t parameter containing the instance handle, source timestamp, publication priority, and cookie to be used in write operation. See FooDataWriter_write_w_params. Cannot be NULL.
See Also
FooDataWriter_write_w_params
DDS_OctetsDataReader* DDS_OctetsDataReader_narrow ( DDS_DataReader reader)

Narrow the given DDS_DataReader pointer to a DDS_OctetsDataReader pointer.

See Also
FooDataReader_narrow
DDS_DataReader* DDS_OctetsDataReader_as_datareader ( DDS_OctetsDataReader reader)

Widen the given DDS_OctetsDataReader pointer to a DDS_DataReader pointer.

See Also
FooDataReader_as_datareader
DDS_ReturnCode_t DDS_OctetsDataReader_read ( DDS_OctetsDataReader self,
struct DDS_OctetsSeq 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_OctetsDataReader_take ( DDS_OctetsDataReader self,
struct DDS_OctetsSeq 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_OctetsDataReader_read_w_condition ( DDS_OctetsDataReader self,
struct DDS_OctetsSeq received_data,
struct DDS_SampleInfoSeq info_seq,
DDS_Long  max_samples,
DDS_ReadCondition condition 
)

Accesses via DDS_OctetsDataReader_read the samples that match the criteria specified in the DDS_ReadCondition.

See Also
FooDataReader_read_w_condition
DDS_ReturnCode_t DDS_OctetsDataReader_take_w_condition ( DDS_OctetsDataReader self,
struct DDS_OctetsSeq received_data,
struct DDS_SampleInfoSeq info_seq,
DDS_Long  max_samples,
DDS_ReadCondition condition 
)

Analogous to DDS_OctetsDataReader_read_w_condition except it accesses samples via the DDS_OctetsDataReader_take operation.

See Also
FooDataReader_take_w_condition
DDS_ReturnCode_t DDS_OctetsDataReader_read_next_sample ( DDS_OctetsDataReader self,
DDS_Octets 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_OctetsDataReader_take_next_sample ( DDS_OctetsDataReader self,
DDS_Octets 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_OctetsDataReader_return_loan ( DDS_OctetsDataReader self,
struct DDS_OctetsSeq 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

Variable Documentation

int DDS_Octets::length

Number of octets to serialize.

unsigned char* DDS_Octets::value

DDS_Octets array value.


RTI Connext C API Version 5.0.0 Copyright © Thu Aug 30 2012 Real-Time Innovations, Inc