5.6.16. APIs (Multiple Languages)

5.6.16.1. [Major] DynamicData Errors when operating on unions with unknown discriminator values

A union’s discriminator value may not select any member in the union. When this was the case, if the union was converted to a string with the FooTypeSupport::data_to_string() API (rti::topic::to_string() API in Modern C++) or printed using the DynamicData::print() API, the following errors were printed:

DDS_DynamicData2Visitor_visitMember:type not supported (DDS_TK_NULL)
DDS_DynamicData2Visitor_visitMember:!Error visiting union discriminator
DDS_DynamicData2Visitor_visitContainer: Error visiting MyUnion
DDS_DynamicData2_printI:!visit container

Now, the sample will be correctly printed with just the discriminator value and no associated member value.

The Modern C++ DynamicData::get_discriminator() API also failed to retrieve the discriminator value with an exception and the following errors:

DDS_DynamicData2UnionPlugin_getMemberInfo: Cannot find a member with id 0 in type MyUnion
DDS_DynamicData2_get_member_info_by_index:!get_member_info

This fix also addresses RTI Issue IDs [CORE-14055] and [CORE-14443].

[RTI Issue ID CORE-14582]

5.6.16.2. [Minor] Creating a DomainParticipant with a negative domain ID was incorrectly allowed

The API Reference documentation for create_participant states that the domainId has [range] [>=0]. However, this range was not enforced, and DomainParticipant creation incorrectly succeeded if the domainId was a negative integer. Now, DomainParticipant creation will fail with this error message:

DDS_DomainParticipantFactory_create_participant_disabledI:BAD PARAMETER FAILURE | domainId must be between 0 and 2147483647.

[RTI Issue ID CORE-5910]