RTI Connext Modern C++ API Version 7.3.0
rti::core::xtypes::DynamicDataTypeSerializationProperty Class Reference

<<extension>> <<value-type>> Configures aspects of the memory management in the serialization of dds::core::xtypes::DynamicData samples. More...

#include <rti/core/xtypes/DynamicDataProperty.hpp>

Public Member Functions

 DynamicDataTypeSerializationProperty ()
 Default configuration. More...
 
 DynamicDataTypeSerializationProperty (int32_t the_max_size_serialized, int32_t the_min_size_serialized, bool the_trim_to_size, bool the_skip_deserialization=false)
 Specifies all the serialization parameters. More...
 
uint32_t max_size_serialized () const
 Getter (see setter with the same name) More...
 
DynamicDataTypeSerializationPropertymax_size_serialized (uint32_t value)
 
uint32_t min_size_serialized () const
 Getter (see setter with the same name) More...
 
DynamicDataTypeSerializationPropertymin_size_serialized (uint32_t value)
 
bool trim_to_size () const
 Getter (see setter with the same name) More...
 
DynamicDataTypeSerializationPropertytrim_to_size (bool value)
 
bool skip_deserialization () const
 Getter (see setter with the same name) More...
 
DynamicDataTypeSerializationPropertyskip_deserialization (bool value)
 

Static Public Attributes

static OMG_DDS_API_CLASS_VARIABLE const DynamicDataTypeSerializationProperty DEFAULT
 Default configuration. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ DynamicDataTypeSerializationProperty() [1/2]

rti::core::xtypes::DynamicDataTypeSerializationProperty::DynamicDataTypeSerializationProperty ( )
inline

Default configuration.

◆ DynamicDataTypeSerializationProperty() [2/2]

rti::core::xtypes::DynamicDataTypeSerializationProperty::DynamicDataTypeSerializationProperty ( int32_t  the_max_size_serialized,
int32_t  the_min_size_serialized,
bool  the_trim_to_size,
bool  the_skip_deserialization = false 
)
inline

Specifies all the serialization parameters.

Member Function Documentation

◆ max_size_serialized() [1/2]

uint32_t rti::core::xtypes::DynamicDataTypeSerializationProperty::max_size_serialized ( ) const
inline

Getter (see setter with the same name)

◆ max_size_serialized() [2/2]

DynamicDataTypeSerializationProperty & rti::core::xtypes::DynamicDataTypeSerializationProperty::max_size_serialized ( uint32_t  value)
inline

This value is used to set the sizes of certain internal middleware buffers.

The effective value of the maximum serialized size will be the value of this field or the size automatically inferred from the type's dds::core::xtypes::DynamicType, whichever is smaller.

◆ min_size_serialized() [1/2]

uint32_t rti::core::xtypes::DynamicDataTypeSerializationProperty::min_size_serialized ( ) const
inline

Getter (see setter with the same name)

◆ min_size_serialized() [2/2]

DynamicDataTypeSerializationProperty & rti::core::xtypes::DynamicDataTypeSerializationProperty::min_size_serialized ( uint32_t  value)
inline

This value is used to set the sizes of certain internal middleware buffers.

Default: 0xFFFFFFFF, a sentinel that indicates that this value must be equal to the value specified in max_size_serialized.

◆ trim_to_size() [1/2]

bool rti::core::xtypes::DynamicDataTypeSerializationProperty::trim_to_size ( ) const
inline

Getter (see setter with the same name)

◆ trim_to_size() [2/2]

DynamicDataTypeSerializationProperty & rti::core::xtypes::DynamicDataTypeSerializationProperty::trim_to_size ( bool  value)
inline

This property only applies to DynamicData samples that are obtained from the sample pool that is created by each DynamicData DataReader.

If set to 0 (default): The buffer will not be reallocated unless the deserialized size of the incoming sample is greater than the current buffer size.

If set to 1: The buffer of a DynamicData object obtained from the DDS sample pool will be freed and re-allocated for each sample to just fit the size of the deserialized data of the incoming sample. The newly allocated size will not be smaller than rti::core::xtypes::DynamicDataProperty::buffer_initial_size.

◆ skip_deserialization() [1/2]

bool rti::core::xtypes::DynamicDataTypeSerializationProperty::skip_deserialization ( ) const
inline

Getter (see setter with the same name)

◆ skip_deserialization() [2/2]

DynamicDataTypeSerializationProperty & rti::core::xtypes::DynamicDataTypeSerializationProperty::skip_deserialization ( bool  value)
inline

Setting this member to true boosts the performance for use cases in which the application does not require accessing the value of the different members of the received DynamicData object. Those use cases include recording, replaying, and bridging. You can access the CDR buffer of a DynamicData object by calling the method dds::core::xtypes::DynamicData::get_cdr_buffer. This configuration option is only available in C, Traditional C++, Modern C++, and Python language bindings.

When this option is set to true, many of the DynamicData APIs cannot be used to access or manipulate the received DynamicData object. See each functions's documentation for whether or not the function is supported for DynamicData objects in CDR format.

See also
dds::core::xtypes::DynamicData::is_cdr
dds::core::xtypes::DynamicData::get_cdr_buffer
dds::core::xtypes::DynamicData::set_cdr_buffer

[default] false

Member Data Documentation

◆ DEFAULT

OMG_DDS_API_CLASS_VARIABLE const DynamicDataTypeSerializationProperty rti::core::xtypes::DynamicDataTypeSerializationProperty::DEFAULT
static

Default configuration.