RTI Connext C API Version 7.4.0

APIs to configure compliance with certain standard specifications. More...

Macros

#define NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_VENDOR
 XTypes vendor compliance mask. This value is fully aligned with the XTypes specification. More...
 
#define NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_DEFAULT
 Default XTypes compliance mask. More...
 
#define NDDS_CONFIG_RPC_COMPLIANCE_MASK_VENDOR
 This mask configures compliance with the OMG DDS-RPC specification. More...
 
#define NDDS_CONFIG_RPC_COMPLIANCE_MASK_DEFAULT
 Default RPC compliance mask. More...
 

Typedefs

typedef DDS_UnsignedLong NDDS_Config_XTypesComplianceMask
 XTypes compliance mask. More...
 
typedef DDS_UnsignedLong NDDS_Config_RpcComplianceMask
 Mask to configure compliance with the OMG DDS-RPC specification. More...
 

Enumerations

enum  NDDS_Config_XTypesComplianceMaskBits {
  NDDS_CONFIG_XTYPES_DHEADER_IN_NON_PRIMITIVE_COLLECTIONS_BIT ,
  NDDS_CONFIG_XTYPES_ENUM_AS_PRIMITIVE_IN_COLLECTIONS_BIT ,
  NDDS_CONFIG_XTYPES_PARAMETER_LENGTH_WITH_PADDING_BIT ,
  NDDS_CONFIG_XTYPES_ENCAPSULATION_OPTIONS_WITH_PADDING_BIT ,
  NDDS_CONFIG_XTYPES_ACCEPT_UNKNOWN_ENUM_VALUE_BIT ,
  NDDS_CONFIG_XTYPES_ACCEPT_UNKNOWN_DISCRIMINATOR_BIT ,
  NDDS_CONFIG_XTYPES_SELECT_DEFAULT_DISCRIMINATOR_BIT
}
 The bits for the NDDS_Config_XTypesComplianceMask with different aspects of the Extended CDR encoding (XCDR and XCDR2). More...
 
enum  NDDS_Config_RpcComplianceMaskBits { NDDS_CONFIG_RPC_USE_STANDARD_RELATED_SAMPLE_PID_BIT }
 The bits for the NDDS_Config_RpcComplianceMask with different aspects of RPC and Request Reply. More...
 

Functions

NDDS_Config_XTypesComplianceMask NDDS_Config_get_xtypes_compliance_mask (void)
 Gets the XTypes compliance mask value for the application. More...
 
void NDDS_Config_set_xtypes_compliance_mask (NDDS_Config_XTypesComplianceMask mask)
 Sets the level of compliance of the application with the XTypes specification. More...
 
DDS_Boolean NDDS_Config_load_compliance_masks (void)
 Load the compliance masks from the environment variables. More...
 
NDDS_Config_RpcComplianceMask NDDS_Config_get_rpc_compliance_mask (void)
 Gets the RPC compliance mask value for the application. More...
 
void NDDS_Config_set_rpc_compliance_mask (NDDS_Config_RpcComplianceMask mask)
 Sets the level of compliance of the application with the DDS RPC specification. More...
 

Detailed Description

APIs to configure compliance with certain standard specifications.

Macro Definition Documentation

◆ NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_VENDOR

#define NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_VENDOR

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: 0x00000029.

◆ NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_DEFAULT

#define NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_DEFAULT

Default XTypes compliance mask.

The mask sets the following bits:

The HEX value for the mask is: 0x0000000C.

◆ NDDS_CONFIG_RPC_COMPLIANCE_MASK_VENDOR

#define NDDS_CONFIG_RPC_COMPLIANCE_MASK_VENDOR

This mask configures compliance with the OMG DDS-RPC specification.

The mask sets the following bits:

The HEX value for the mask is: 0x00000001.

◆ NDDS_CONFIG_RPC_COMPLIANCE_MASK_DEFAULT

#define NDDS_CONFIG_RPC_COMPLIANCE_MASK_DEFAULT

Default RPC compliance mask.

The mask does not sets any bits.

The HEX value for the mask is: 0x00000000.

Typedef Documentation

◆ NDDS_Config_XTypesComplianceMask

XTypes compliance mask.

The NDDS_Config_XTypesComplianceMask 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 DDS_DomainParticipantFactory is created. If you need to load it before that, use the function NDDS_Config_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 NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_DEFAULT.

To be fully compliant with the XTypes specification, set the mask to NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_VENDOR.

[default] NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_DEFAULT

When changing the the mask for an application is not desired, the property dds.xtypes.compliance_mask will change the mask at Participant or DataWriter level. When set in the Participant it configures the mask for all DataWriters in the Participant. See the section Extensible Types Compliance Mask in the Extensible Types Compliance Mask section in the RTI Connext Core Libraries Extensible Types Guide

◆ NDDS_Config_RpcComplianceMask

Mask to configure compliance with the OMG DDS-RPC specification.

The NDDS_Config_RpcComplianceMask configures different aspects of RPC communication.

By default, the PID_RELATED_SAMPLE_IDENTITY used in RPC is not compliant with DDS RPC specification. This issue 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 DDS_DomainParticipantFactory is created. If you need to load it before that, use the function NDDS_Config_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 NDDS_CONFIG_RPC_COMPLIANCE_MASK_DEFAULT.

To be fully compliant with the DDS RPC specification, set the mask to NDDS_CONFIG_RPC_COMPLIANCE_MASK_VENDOR.

[default] NDDS_CONFIG_RPC_COMPLIANCE_MASK_DEFAULT

If changing the the mask in an application is not desired, the property dds.rpc.compliance_mask will change the mask at Participant or DataWriter level. When set in the Participant it configures the mask for all DataWriters in the Participant. See Using RPC compliance mask in the RTI Connext Core Libraries User’s Manual.

Enumeration Type Documentation

◆ NDDS_Config_XTypesComplianceMaskBits

The bits for the NDDS_Config_XTypesComplianceMask with different aspects of the Extended CDR encoding (XCDR and XCDR2).

See also
NDDS_Config_XTypesComplianceMask
Enumerator
NDDS_CONFIG_XTYPES_DHEADER_IN_NON_PRIMITIVE_COLLECTIONS_BIT 

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.

This bit is unset by default. See NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_DEFAULT

NDDS_CONFIG_XTYPES_ENUM_AS_PRIMITIVE_IN_COLLECTIONS_BIT 

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 NDDS_CONFIG_XTYPES_DHEADER_IN_NON_PRIMITIVE_COLLECTIONS_BIT is set.

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

This bit only applies to XCDR2 encoding.

This bit is unset by default. See NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_DEFAULT

NDDS_CONFIG_XTYPES_PARAMETER_LENGTH_WITH_PADDING_BIT 

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.

This bit is set by default. See NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_DEFAULT

NDDS_CONFIG_XTYPES_ENCAPSULATION_OPTIONS_WITH_PADDING_BIT 

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.

This bit is set by default. See NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_DEFAULT

NDDS_CONFIG_XTYPES_ACCEPT_UNKNOWN_ENUM_VALUE_BIT 

When this bit is set, samples containing an unknown enumerator can be successfully deserialized to the default enumeration value.

Value: 0x00000010

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

This bit is unset by default. See NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_DEFAULT

NDDS_CONFIG_XTYPES_ACCEPT_UNKNOWN_DISCRIMINATOR_BIT 

When this bit is set, samples containing an unknown discriminator can be successfully deserialized, and the sample won't be dropped.

Value: 0x00000020

When this bit is set, samples containing an unknown discriminator won't be dropped, and the discriminator value assigned to the sample will depend on whether or not the bit NDDS_CONFIG_XTYPES_SELECT_DEFAULT_DISCRIMINATOR_BIT is set.

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

This bit is unset by default. See NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_DEFAULT

NDDS_CONFIG_XTYPES_SELECT_DEFAULT_DISCRIMINATOR_BIT 

When this bit is set, samples containing an unknown discriminator will be assigned the default discriminator value; if the bit is not set, the sample will preserve the discriminator value.

Value: 0x00000040

This bit is only relevant when the bit NDDS_CONFIG_XTYPES_ACCEPT_UNKNOWN_DISCRIMINATOR_BIT is set, and it is used to determine the value of the discriminator when the sample contains an unknown discriminator.

When this bit is set, samples containing an unknown discriminator will be assigned the default discriminator value, if one is defined; otherwise, they will be set to the lowest value associated with any member. In addition, the value of the member associated with the discriminator is set to the default value for its corresponding type.

If the bit is unset, the sample will preserve the discriminator value and does not select any union member.

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

This bit is unset by default. See NDDS_CONFIG_XTYPES_COMPLIANCE_MASK_DEFAULT

◆ NDDS_Config_RpcComplianceMaskBits

The bits for the NDDS_Config_RpcComplianceMask with different aspects of RPC and Request Reply.

Enumerator
NDDS_CONFIG_RPC_USE_STANDARD_RELATED_SAMPLE_PID_BIT 

This bit configures a standard value for PID_RELATED_SAMPLE_IDENTITY.

Value: 0x00000001

Set this bit to be compliant with the OMG DDS-RPC specification. The PID_RELATED_SAMPLE_IDENTITY will be 0x0083 as is defined as is defined in the RPC over DDS OMG specification. See https://www.omg.org/spec/DDS-RPC

Using NDDS_CONFIG_RPC_USE_STANDARD_RELATED_SAMPLE_PID_BIT will affect both RPC and Request-Reply communtications. The PID_RELATED_SAMPLE_IDENTITY is a parameter identifier (PID) used by the RTPS wire protocol and required for Request-Reply and RPC communications. By default, this PID takes a non-standard value that is compatible with previous versions of Connext.

This bit is unset by default. See NDDS_CONFIG_RPC_COMPLIANCE_MASK_DEFAULT

Function Documentation

◆ NDDS_Config_get_xtypes_compliance_mask()

NDDS_Config_XTypesComplianceMask NDDS_Config_get_xtypes_compliance_mask ( void  )

Gets the XTypes compliance mask value for the application.

The NDDS_Config_XTypesComplianceMask configures different aspects of the Extended CDR encoding (XCDR and XCDR2) for the application.

Returns
The NDDS_Config_XTypesComplianceMask value.
See also
NDDS_Config_XTypesComplianceMask
NDDS_Config_get_xtypes_compliance_mask
NDDS_Config_load_compliance_masks

◆ NDDS_Config_set_xtypes_compliance_mask()

void NDDS_Config_set_xtypes_compliance_mask ( NDDS_Config_XTypesComplianceMask  mask)

Sets the level of compliance of the application with the XTypes specification.

The NDDS_Config_XTypesComplianceMask configures different aspects of the Extended CDR encoding (XCDR and XCDR2) for the application.

Once you call this function the value of the mask will apply to all the DomainParticipants created after the call. It won't apply to DomainParticipants created before the call.

In general, applications should only set the mask once, before executing any other RTI Connext API. The mask can also be set using the environment variable NDDS_XTYPES_COMPLIANCE_MASK.

Parameters
mask<<in>> Compliance mask.
See also
NDDS_Config_XTypesComplianceMask
NDDS_Config_get_xtypes_compliance_mask
NDDS_Config_load_compliance_masks

◆ NDDS_Config_load_compliance_masks()

DDS_Boolean NDDS_Config_load_compliance_masks ( void  )

Load the compliance masks from the environment variables.

This function loads the XTypes and RPC compliance masks from the environment, which can be set using the environment variables NDDS_XTYPES_COMPLIANCE_MASK and NDDS_RPC_COMPLIANCE_MASK.

See also
NDDS_Config_XTypesComplianceMask
NDDS_Config_set_xtypes_compliance_mask
NDDS_Config_get_xtypes_compliance_mask
NDDS_Config_RpcComplianceMask
NDDS_Config_set_rpc_compliance_mask
NDDS_Config_get_rpc_compliance_mask

◆ NDDS_Config_get_rpc_compliance_mask()

NDDS_Config_RpcComplianceMask NDDS_Config_get_rpc_compliance_mask ( void  )

Gets the RPC compliance mask value for the application.

The NDDS_Config_RpcComplianceMask configures different aspects of RPC communication.

Returns
The NDDS_Config_RpcComplianceMask value.
See also
NDDS_Config_RpcComplianceMask
NDDS_Config_get_rpc_compliance_mask
NDDS_Config_load_compliance_masks

◆ NDDS_Config_set_rpc_compliance_mask()

void NDDS_Config_set_rpc_compliance_mask ( NDDS_Config_RpcComplianceMask  mask)

Sets the level of compliance of the application with the DDS RPC specification.

The NDDS_Config_RpcComplianceMask configures different aspects of RPC communication.

Once you call this function the value of the mask will apply to all the DomainParticipants created after the call. It won't apply to DomainParticipants created before the call.

In general, applications should only set the mask once, before executing any other RTI Connext API. The mask can also be set using the environment variable NDDS_RPC_COMPLIANCE_MASK.

Parameters
mask<<in>> Compliance mask.
See also
NDDS_Config_RpcComplianceMask
NDDS_Config_get_rpc_compliance_mask
NDDS_Config_load_compliance_masks