8.4.21. What’s New in 2.4.6

8.4.21.1. Important API Changes

This version of Connext Micro includes a number of API changes to improve compatibility with rticore and make the API more robust to input argument errors such as string length violations. Please note that some of the changes are incompatible with earlier version of Connext Micro.

Changed and Incompatible APIs:

  • DDS_SEQUENCE_INITIALIZER(t) has changed to DDS_SEQUENCE_INITIALIZER. That is, the sequence element type is no longer passed in.

  • Foo_seq_get_contiguous_buffer replaces Foo_seq_get_buffer.

  • DDSTopic now uses multiple inheritance. Thus, it is no longer necessary to explicitly convert a topic to a topic description with the as_topicdescription() method when creating calling create_datareader() in C++.

  • The idref_DiscoveryComponent_name value has changed type from a char pointer to a RT_ComponentFactoryId_T type. Use ref RT_ComponentFactoryId_set_name to set the name of the discovery plugin name.

  • All C++ statuses are passed as a const reference instead of a const pointer to the listeners.

New APIs:

  • By default the full sequence API has been enabled. In previous versions only a limited subset was enabled. NOTE: For RTI_CERT the default sequence API is still the limited API.

  • The following new sequence methods have been added to the full sequence API (excluding the DDSConditionSeq):

    • ensure_length

    • to_array

    • from_array

    • operator[] in C++ is equivalent to get_reference()

    • operator= is equivalent to _copy()

    • operator== is equivalent to _is_equal()

    • operator!= is equivalent to !_is_equal()

  • The following new sequence methods have been added to the DDSConditionSeq:

    • ensure_length

    • operator[] in C++ is equivalent to get_reference()

    • operator= is equivalent to _copy()

    • operator== is equivalent to _is_equal()

    • operator!= is equivalent to !_is_equal()

  • RTIBool has been added (it is used by rticore) and is equivalent to RTI_BOOL in Connext Micro.

  • A new method idref_EntityNameQosPolicy_set_name has been added to set the idref_EntityNameQosPolicy_name field.

  • Please refer to ref rl_new_246_MICRO-1512 for new C++ APIs.

8.4.21.2. Run-time Memory Footprint Has Been Significantly Reduced

The internal representation of state information has been refactored, significantly reducing run-time memory usage.

Please refer to the ref DDSUserManuals_ResourceModule guide for details.

8.4.21.3. New FooTypeSupport operations

The FooTypeSupport code generated for a user-defined Foo data type now includes three additional operations:

  • FooTypeSupport::get_type_name

  • FooTypeSupport::create_data

  • FooTypeSupport::delete_data

These operations are available to users of both the C and C++ APIs.

8.4.21.4. All public C API now natively available to C++ users

The missing parts of RTI Connext Micro’s public C API have now been added to the public C++ API, so that C++ users don’t have to rely on C operations to implement their applications.

C++ developers are also not required to include any C header file anymore, but they must instead rely on newly available C++ header files.

Please refer to ref CPPApiModule for a list of APIs.

8.4.21.5. Status data passed by reference to C++ listeners

All callbacks exposed by the DDS listeners of the C++ API (DDSDataReaderListener, DDSDataWriterListener, DDSTopicListener, and other derived classes) now accept the status data passed in by the middleware as a C++ reference, rather than a pointer.

8.4.21.6. TheParticipantFactory now available to C++ users

The variable TheParticipantFactory is now available to users of the C++ API to reference the singleton instance of DDSDomainParticipantFactory.

8.4.21.7. Status types now available in DDS:: C++ namespace

All the status types (e.g. DDS_SubscriptionMatchedStatus) have been exposed to C++ users as part of the DDS:: namespace (e.g. DDS::SubscriptionMatchedStatus).

8.4.21.8. Foo::copy_data() takes const argument

The pointer specifying the source sample passed to the generated operation Foo::copy_data() (C++ API) is now of “const” type.

8.4.21.9. ConditionSeq added to C++ DDS namespace

C++ developers can now refer to data type DDS_ConditionSeq as DDS::ConditionSeq.

8.4.21.10. First 2-Bytes Of GUID Assigned to Vendor ID

In order to be interoperable with the Real-Time Publish-Subscribe Wire Protocol DDS Interoperability Wire Protocol (DDSI-RTPS), version 2.2, the first 2-bytes of every GUID are now automatically assigned to the OMG-specified Vendor ID.

8.4.22. What’s Fixed in 2.4.6

8.4.22.1. POSIX Threads Were Created Without Names

Previous releases on POSIX platforms created threads with no names. In this release, if thread naming is supported, a POSIX thread created with the Connext Micro OSAPI_Thread_new() function will have its thread name set.

[RTI Issue ID MICRO-638]

8.4.22.2. Prerequisite for HelloWorld_android updated in README.txt

The README.txt file for Android did not clarify that is it necessary to install the NDK tool-chain as a standalone toolchain. This has been fixed.

[RTI Issue ID MICRO-807]

8.4.22.3. CPP/HelloWorld_dpde example does not overwrite RTIMEHOME

In previous releases of Connext Micro, the CPP/HelloWorld_dpde example overwrote the RTIMEHOME environment variable, making it impossible for developers to point it to any custom value.

This error was fixed and the example can now be compiled with any valid value of RTIMEHOME.

[RTI Issue ID MICRO-834]

8.4.22.4. Transport Not Supporting Multicast Did Not Ignore Multicast

Previously, if a multicast address was specified as a discovery or user_traffic address, it was not correctly ignored by transports that did not support multicast. Consequently, an application may have failed to create a DomainParticipant. This has been fixed in this release.

[RTI Issue ID MICRO-1153]

8.4.22.5. Discovery Messages Incorrectly Dropped When Containing Non-Standard Locators

When a discovery message was received with a non-standard locator, such as for an unsupported transport, rather than just ignore the locator, the entire discovery message was discarded. This incorrect behavior prevented discovery of the entity that sent the discovery message. This issue has been fixed in this release.

[RTI Issue ID MICRO-1270]

8.4.22.6. HEARTBEAT Not Sent in Response To Initial ACKNACK

In Connext Micro, a newly matched reliable DataReader will send an initial ACKNACK submessage to the matching DataWriter in order to expedite reliable communication. The initial ACKNACK is zero-valued, and a DataWriter receiving it will not resend any samples but instead will send a HEARTBEAT that the DataReader will respond with a proper ACKNACK.

In the previous release, however, a DataWriter receiving this initial ACKNACK did not respond with a HEARTBEAT. Consequently, reliable resend of historical samples did not start as soon as it should have, and instead would start with the next HEARTBEAT sent by the DataWriter, either a periodic HEARTBEAT or a piggyback HEARTBEAT sent with newly written samples. This issue has been fixed in this release.

[RTI Issue ID MICRO-1443]

8.4.22.7. Incorrect Return Code From DataReader’s Read or Take APIs When Max_Outstanding_Reads Exceeded

When a DataReader’s read or take APIs are called, depending on the input parameters of the sample sequence and sample-info sequence, the DataReader may loan to the caller its memory containing sample and sample-info entries. A resource limit, DATA_READER_RESOURCE_LIMITS max_outstanding_reads, sets the maximum number of samples (and corresponding sample-info entries) that may be loaned.

In previous releases, when max_oustanding_reads was exceeded, the read/take APIs incorrectly returned DDS_RETCODE_NO_DATA instead of DDS_RETCODE_OUT_OF_RESOURCES. This bug has been fixed in this release.

[RTI Issue ID MICRO-1460]

8.4.22.8. DataReader Did Not Replace Historical Samples When max_samples_per_instance Equaled History Depth

Previously, given a DataReader with RESOURCE_LIMITS max_samples_per_instance equal to HISTORY depth, when the DataReader exceeded its depth (or max_samples_per_instance), it incorrectly did not replace the oldest historical sample with the newest sample. Instead, the oldest historical sample was kept in the queue, and subsequent calls to read() could return it. Note, calls to take() would remove all taken sample from the queue.

This issue has been fixed in this release.

[RTI Issue ID MICRO-1463]

8.4.22.9. A Disposed Instance Could Be Updated By A DataWriter That Is Not Its Exclusive Owner

When EXCLUSIVE_OWNERSHIP was used, a disposed instance could incorrectly be updated by a DataWriter with a lower strength than the DataWriter that disposed the instance, even if that DataWriter had not unregistered the instance. This has been corrected: when an instance is disposed, a lower strength DataWriter is not allowed to update the instance as long as the DataWriter that disposed the instance is still registered as an updater for the instance. Only when the DataWriter unregisters from the instance can a lower strength DataWriter update the instance again.

[RTI Issue ID MICRO-1464]

8.4.22.10. Fixed code generation for user-defined enum constants.

The previous version of rtiddsgen shipped with Connext Micro contained a bug which prevented the numerical constants assigned to an enum’s values to be correctly handled in the generated code.

This error has been fixed and IDL enum types are now correctly translated into C/C++ data types with the correct constants.

[RTI Issue ID MICRO-1483]

8.4.22.11. Hostname is verified as specified in RFC-952 and RFC-1123

Connext Micro relied on gethostbyname() to resolve hostnames. However, if a name resolver was not available it was possible to specify illegal names.

This has been corrected and only legal names, as defined by RFC-952 and RFC-1123, are resolved.

[RTI Issue ID MICRO-1489]

8.4.22.12. DDS_<Foo>Seq APIs Were Missing

The DDS sequence APIs for the built-in DDS types, such as DDS_LongSeq etc, were missing. The workaround was to use CDR_<Foo>Seq instead.

This issue has been corrected in this release, with the missing sequence APIs now included.

[RTI Issue ID MICRO-1493]

8.4.22.13. DataReader Could Reject All Subsequent Samples From a DataWriter

In the previous release, given a DataReader receiving samples from a DataWriter, after the DataWriter had written approximately (2^32) - max_samples_per_remote_writer number of samples, no more samples from that DataWriter would be received by the DataReader. Instead, every subsequent sample from the DataWriter would be rejected. This was caused by an incorrect update of an internal counter of the DataReader.

[RTI Issue ID MICRO-1500]

8.4.22.14. POSIX Thread Priorities Not Changeable

It was not possible to change the priority of POSIX threads created in previous releases of Connext Micro. Instead, a POSIX thread inherited the priority of its parent. This has been fixed in this release.

[RTI Issue ID MICRO-1502]

8.4.22.15. RTPS DATA Submessages with K-flag Set Were Dropped

Previously, RTPS DATA submessages with the K-flag set (indicating a serialized key payload) were not processed and instead dropped by a DataReader. This has been fixed and such DATA submessages are now processed and accepted.

[RTI Issue ID MICRO-1511]