Sending Type Codes on the Network

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.

Type Codes for Built-in Types

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 Properties for Allocating Size of Built-in Types, per DomainParticipant.

Properties for Allocating Size of Built-in Types, per DomainParticipant

Built-in Type

Property

Description

String

dds.builtin_type.string.max_size

Maximum size of the strings published by the DataWriters and received by the DataReaders belonging to a DomainParticipant (includes the NULL-terminated character).

Default: 1024

KeyedString

dds.builtin_type.keyed_string.
max_key_size

Maximum size of the keys used by the DataWriters and DataReaders belonging to a DomainParticipant (includes the NULL-terminated character).

Default: 1024

dds.builtin_type.keyed_string.
max_size

Maximum size of the strings published by the DataWriters and received by the DataReaders belonging to a DomainParticipant using the built-in type (includes the NULL-terminated character).

Default: 1024

Octets

dds.builtin_type.octets.max_size

Maximum size of the octet sequences published by the DataWriters and DataReaders belonging to a DomainParticipant.

Default: 2048

Keyed-Octets

dds.builtin_type.keyed_octets.
max_key_size

Maximum size of the key published by the DataWriter and received by the DataReaders belonging to the DomainParticipant (includes the NULL-terminated character).

Default: 1024.

dds.builtin_type.keyed_octets.
max_size

Maximum size of the octet sequences published by the DataWriters and DataReaders belonging to a DomainParticipant.

Default: 2048

© 2018 RTI