RTI Connext Modern C++ API Version 7.3.0

This mask configures different aspects of the Extended CDR encoding (XCDR and XCDR2). More...

#include <rti/config/Compliance.hpp>

Inherits std::bitset< 32 >.

Public Types

typedef std::bitset< 32 > MaskType
 A typedef of std::bitset<32> for convenience. More...
 

Public Member Functions

 XTypesMask ()
 Default XTypes compliance mask. More...
 
 XTypesMask (uint64_t mask)
 Construct a XTypesMask from an integer. More...
 
 XTypesMask (const MaskType &mask)
 Construct a XTypesMask from a MaskType object. More...
 

Static Public Member Functions

static const XTypesMask dheader_in_non_primitive_collections ()
 When this bit is set, the serialization of sequences and arrays with non-primitive members includes a DHEADER. More...
 
static const XTypesMask enum_as_primitive_in_collections ()
 When this bit is set, enums are considered primitive types in collection types. More...
 
static const XTypesMask parameter_length_with_padding ()
 When this bit is set, the length of a member header in a mutable type or an optional member will include padding bytes to a 4-byte boundary. More...
 
static const XTypesMask encapsulation_options_with_padding ()
 When this bit is set, RTI Connext will set the padding bits in the options field of the encapsulation header of a serialized payload. More...
 
static const XTypesMask vendor ()
 XTypes vendor compliance mask. This value is fully aligned with the XTypes specification. More...
 
static const XTypesMask default_mask ()
 Default XTypes compliance mask. More...
 

Detailed Description

This mask configures different aspects of the Extended CDR encoding (XCDR and XCDR2).

XTypes compliance mask.

The rti::config::compliance::XTypesMask configures different aspects of the Extended CDR encoding (XCDR and XCDR2).

Applications that don't use the exact same XTypes compliance mask may not be interoperable.

By default, data serialization is not fully compliant with Extended CDR encoding due to bugs when implementing the standard. These bugs do not result in breaking functional correctness. They only affect interoperability with other vendors.

You can change the default compliance mask for an application using any of the following mechanisms:

The environment variable will be automatically loaded when a DomainParticipantFactory is created. If you need to load it before that, use the function rti::config::compliance::load_compliance_masks().

The format of the environment variable is an unsigned integer, which can be in HEX notation. For example: 0x00000001.

The default value is rti::config::compliance::XTypesMask::default_mask().

To be fully compliant with the XTypes specification, set the mask to rti::config::compliance::XTypesMask::vendor().

[default] rti::config::compliance::XTypesMask::default_mask()

Member Typedef Documentation

◆ MaskType

A typedef of std::bitset<32> for convenience.

Constructor & Destructor Documentation

◆ XTypesMask() [1/3]

rti::config::compliance::XTypesMask::XTypesMask ( )
inline

Default XTypes compliance mask.

The mask sets the following bits:

The HEX value for the mask is: 0x0000000C.

◆ XTypesMask() [2/3]

rti::config::compliance::XTypesMask::XTypesMask ( uint64_t  mask)
inlineexplicit

Construct a XTypesMask from an integer.

Parameters
maskValue whose bits are copied to the bitset positions

◆ XTypesMask() [3/3]

rti::config::compliance::XTypesMask::XTypesMask ( const MaskType mask)
inline

Construct a XTypesMask from a MaskType object.

Parameters
maskA std::bitset<32> to construct this XTypesMask from

Member Function Documentation

◆ dheader_in_non_primitive_collections()

static const XTypesMask rti::config::compliance::XTypesMask::dheader_in_non_primitive_collections ( )
inlinestatic

When this bit is set, the serialization of sequences and arrays with non-primitive members includes a DHEADER.

Value: 0x00000001

To be compatible with the XTypes specification, this bit must be set.

This bit only applies to XCDR2 encoding.

Limitation: For FlatData, the compliant encoding is applied to arrays and sequences of mutable types, but not final types . The serialization of final types containing arrays of non-primitive types in the FlatData language binding is not compliant with Extended CDR encoding version 2 in any case.

◆ enum_as_primitive_in_collections()

static const XTypesMask rti::config::compliance::XTypesMask::enum_as_primitive_in_collections ( )
inlinestatic

When this bit is set, enums are considered primitive types in collection types.

Value: 0x00000002

A DHEADER will not be added to collections of enums if rti::config::compliance::XTypesMask::dheader_in_non_primitive_collections() is set.

To be compatible with the XTypes specification, this bit must be unset.

This bit only applies to XCDR2 encoding.

◆ parameter_length_with_padding()

static const XTypesMask rti::config::compliance::XTypesMask::parameter_length_with_padding ( )
inlinestatic

When this bit is set, the length of a member header in a mutable type or an optional member will include padding bytes to a 4-byte boundary.

Value: 0x00000004

To be compatible with the XTypes specification, this bit must be unset.

This bit only applies to XCDR encoding.

◆ encapsulation_options_with_padding()

static const XTypesMask rti::config::compliance::XTypesMask::encapsulation_options_with_padding ( )
inlinestatic

When this bit is set, RTI Connext will set the padding bits in the options field of the encapsulation header of a serialized payload.

Value: 0x00000008

When this bit is set RTI Connext will set the least significant two bits in the second byte of the options field to a value that encodes the number of padding bytes needed after the end of the serialized payload in order to reach the next 4-byte aligned offset. Specifically, the least significant two bits shall be set to binary 00 if no padding bits would be needed and binary 01, 10, or 11 if, respectively, there would be one, two, or three bytes of padding needed. These bits in the options field will be interpreted by a DataReader to determine where the serialized data exactly ended.

To be compatible with the XTypes specification, this bit must be set.

To be compatible with the following Micro versions this bit must be unset because those versions of Micro did not support padding bits and will discard any data with encapsulations options not set to 0.

  • RTI Connext Micro 3.x.y.z
  • RTI Connext Micro 2.4.15.1
  • RTI Connext Micro 2.4.14.0 and 2.4.14.1
  • RTI Connext Micro 2.4.13.1 through 2.4.13.5
  • RTI Connext Micro 2.4.12.z

This bit applies to both, XCDR and XCDR2 encodings.

◆ vendor()

static const XTypesMask rti::config::compliance::XTypesMask::vendor ( )
inlinestatic

XTypes vendor compliance mask. This value is fully aligned with the XTypes specification.

The mask sets the following bits:

The HEX value for the mask is: 0x00000009.

◆ default_mask()

static const XTypesMask rti::config::compliance::XTypesMask::default_mask ( )
inlinestatic

Default XTypes compliance mask.

The mask sets the following bits:

The HEX value for the mask is: 0x0000000C.