In addition to being used locally, serialized type codes are typically published automatically during discovery as part of the built-in topics for publications and subscriptions. See Built-in DataReaders. This allows applications to publish or subscribe to topics of arbitrary types. This functionality is useful for generic system monitoring tools like the rtiddsspy debug tool. For details on using rtiddsspy, see the API Reference HTML documentation (select Modules, Programming Tools).
Note: Type codes are not cached by Connext DDS upon receipt and are therefore not available from the built-in data returned by the DataWriter's get_matched_subscription_data() operation or the DataReader's get_matched_publication_data() operation.
If your data type has an especially complex type code, you may need to increase the value of the type_code_max_serialized_length field in the DomainParticipant's DOMAIN_PARTICIPANT_RESOURCE_LIMITS QosPolicy (DDS Extension). Or, to prevent the propagation of type codes altogether, you can set this value to zero (0). Be aware that some features of monitoring tools, as well as some features of the middleware itself (such as ContentFilteredTopics) will not work correctly if you disable TypeCode propagation.
The type codes associated with the built-in types are generated from the following IDL type definitions:
module DDS { /* String */ struct String { string<max_size> value; }; /* KeyedString */ struct KeyedString { string<max_size> key; //@key string<max_size> value; }; /* Octets */ struct Octets { sequence<octet, max_size> value; }; /* KeyedOctets */ struct KeyedOctets { string<max_size> key; //@key sequence<octet, max_size> value; }; };
The maximum size (max_size) of the strings and sequences that will be included in the type code definitions can be configured on a per-DomainParticipant-basis by using the properties in .
© 2016 RTI