User login

When do I need to send TypeCode or TypeObject?

Sending TypeCode/TypeObject on the wire provides convenience over specifying the type via XML configuration, but has the disadvantage that more data must be sent during endpoint discovery. This can cause network congestion problems when the TypeCode/TypeObject is large or must be sent many times.

To determine if sending TypeObject/TypeCode is necessary for your system, you should consider the three main types of Connext DDS applications which you may be running, as well as which features you’re making use of in each case:

A user application with type support generated by rtiddsgen and compiled into your program does not need to receive TypeCode/TypeObject from the wire.

Note: In scenario 1 above, be aware that by not sending the type on the wire, the user loses the ability to use Type Matching, and type evolution cannot be enforced. See "Type Safety and System Evolution" in the Addendum for Extensible Types for more information.

A user application which uses the DynamicData API is flexible, and can have the type specified via XML, constructed programmatically, or received from the wire.

An RTI service or tool that publishes/subscribes to a topic is flexible, and can have the type specified via XML or received from the wire.

If your use-case does not call for receiving the type from the wire, you can avoid unnecessary endpoint discovery traffic by disabling the TypeCode and TypeObject propagation via the DomainParticipantResourceLimits QoS. The XML snippets below shows how to configure this for Connext DDS 5.x and 6.x:

<!-- To disable sending the type on the wire in Connext 5.x, the max serialized length for both TypeCode and TypeObject must be set to 0 -->
<participant_qos>
<resource_limits>
<type_code_max_serialized_length>0</type_code_max_serialized_length>
<type_object_max_serialized_length>0</type_object_max_serialized_length>
</resource_limits>
</participant_qos>

To save on bandwidth, Connext 6.0.0 and later releases compress the TypeObject by default and do not send TypeCode by default. If you don't require TypeObject to be sent, you can further reduce bandwidth with this snippet:

<!-- To disable sending the type on the wire in Connext 6.x, only the max serialized length for TypeObject must be set to 0.
Type_code_max_serialized_length defaults to 0 -->
<participant_qos>
<resource_limits>
<type_object_max_serialized_length>0</type_object_max_serialized_length>
</resource_limits>
</participant_qos>

Disabling TypeCode Only (Connext DDS 5.x)

Users of Connext DDS 5.x should consider that in many scenarios, only TypeObject or TypeCode needs to be sent, but usually not both. TypeCode only needs to be sent if there are DDS applications running within your system that do not support TypeObject, such as applications running RTI Connext DDS 4.x. In many cases, users of Connext DDS 5.x can set type_code_max_serialized_length to 0 so that only TypeObject is sent. The XML snippet below shows how to configure this:

RTI Community Portal Terms of Use

NOTICE: Any content you submit to the RTI Research Community Portal, including personal information, is not subject to the protections which may be afforded to information collected under other sections of RTI's Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via RTI Community Portal. RTI does not control the content posted by visitors to RTI Community Portal and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will RTI be liable in any way for any content not authored by RTI, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via RTI Community Portal. Read the complete Terms prior to use.