RTI Connext Traditional C++ API Version 7.3.0

Built-in type consisting of a variable-length array of opaque bytes and a string that is the key. More...

Public Member Functions

 DDS_KeyedOctets ()
 Constructor. More...
 
 DDS_KeyedOctets (int key_size, int size)
 Constructor that specifies the allocated sizes. More...
 
 ~DDS_KeyedOctets ()
 Destructor. More...
 

Public Attributes

char * key
 Instance key associated with the specified value. More...
 
int length
 Number of octets to serialize. More...
 
unsigned char * value
 DDS_Octets array value. More...
 

Detailed Description

Built-in type consisting of a variable-length array of opaque bytes and a string that is the key.

Constructor & Destructor Documentation

◆ DDS_KeyedOctets() [1/2]

DDS_KeyedOctets::DDS_KeyedOctets ( )
inline

Constructor.

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

◆ DDS_KeyedOctets() [2/2]

DDS_KeyedOctets::DDS_KeyedOctets ( int  key_size,
int  size 
)
inline

Constructor that specifies the allocated sizes.

After this method is called, key is initialized with the empty string and length is set to zero.

If a memory allocation failure occurs, and the DDS_KeyedOctets structure is allocated but the array and/or key string inside of it cannot be, the unallocated member will be NULL.

Parameters
key_size<<in>> Size of the allocated key (with NULL-terminated character).
size<<in>> Size of the allocated octets array.

References DDS_OctetBuffer_alloc(), DDS_String_alloc(), DDS_String_free(), key, and value.

◆ ~DDS_KeyedOctets()

DDS_KeyedOctets::~DDS_KeyedOctets ( )
inline

Destructor.

References DDS_OctetBuffer_free(), DDS_String_free(), key, and value.

Member Data Documentation

◆ key

char* DDS_KeyedOctets::key

Instance key associated with the specified value.

Referenced by DDS_KeyedOctets(), and ~DDS_KeyedOctets().

◆ length

int DDS_KeyedOctets::length

Number of octets to serialize.

◆ value

unsigned char* DDS_KeyedOctets::value

DDS_Octets array value.

Referenced by DDS_KeyedOctets(), and ~DDS_KeyedOctets().