Chapter 53 Standard Compliance

By default, the Connext RPC and Request-Reply communication patterns are not fully compliant with the OMG DDS RPC specification. The discrepancy is the PID value used to represent PID_RELATED_SAMPLE_IDENTITY. The specification states this value should be 0x0083; however, Connext uses 0x800f. This PID is used in Connext RPC and Request-Reply.

Starting with Connext 7.4.0, there is a way for you to change PID_RELATED_SAMPLE_IDENTITY to the standard value, in order to be compliant with the specification. Note, however, that doing so will break compatibility with previous Connext releases (7.3.0.x and lower).

Therefore you have a choice when configuring your 7.4.0 (or higher) Connext application:

  • Use the Connext default value for PID_RELATED_SAMPLE_IDENTITY, 0x800f. This protects compatibility with applications that use older Connext releases. However, using this non-standard value affects interoperability with other DDS vendors.

or

  • Change the Connext default for PID_RELATED_SAMPLE_IDENTITY to match the specification. This option provides compliance with the specification and interoperability with other vendors. However, it breaks compatibility with older Connext applications (7.3.0.x and lower). The instructions below explain how to make this change.

53.1 Setting the Compliance Mask

To make Connext compatible with the OMG DDS RPC specification, use the RPC compliance mask to change the PID_RELATED_SAMPLE_IDENTITY to the standard value. This mask allows you to set and unset serialization features in order to be compatible with the specification or to allow backward compatibility with previous Connext releases (and not be compatible with the specification).

Note: Although the mask and environment variable have RPC in their names, they are also used for Request-Reply.

Modify the compliance mask using the environment variable NDDS_RPC_COMPLIANCE_MASK or the Modern C++ function rti::config::compliance::set_rpc_mask(), also available in Traditional C++ and C.

For the Java, C#, and Python APIs, you must use the environment variable. APIs for modifying the compliance mask are not available in these languages.

There are two defined masks that you can set as the default mask:

  • rti::config::compliance::default_mask() (0x00000000). This mask is enabled by default and is not compliant with the specification.
  • rti::config::compliance::vendor() (0x00000001). This mask is fully compliant with the specification.

The mask will affect data sent with samples from DataWriters whose DomainParticipants are created after the mask is set. This mask will not affect DataReaders.

In general, applications should only set the mask once before calling any other Connext APIs.

The NDDS_RPC_COMPLIANCE_MASK environment variable will be automatically loaded when the DomainParticipantFactory is created. If you need to load it before that, use the Modern C++ function rti::config::compliance::load_compliance_masks(), also available in Traditional C++ and C.

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

To obtain the current value of the compliance mask, use the function rti::config::compliance::get_rpc_mask().

53.2 Setting the Compliance Mask for Specific Connext Endpoints

To configure the behavior of the RPC compliance mask for only specific endpoints (DataWriters), set the property dds.rpc.compliance_mask on the endpoint or the DomainParticipant that owns the endpoint. When set on the DomainParticipant, the mask applies to all the endpoints created by the DomainParticipant.

The value of the property dds.rpc.compliance_mask is an unsigned integer, which can be in HEX notation. For example: 0x00000001.