Chapter 1 Extensible Types

This release of Connext includes partial support for the OMG 'Extensible and Dynamic Topic Types for DDS' specification, version 1.3 from the Object Management Group. This support allows systems to define data types in a more flexible way, and to evolve data types over time without giving up portability, interoperability, or the expressiveness of the DDS type system.

Specifically, these are supported:

  • Type definitions are now checked as part of the Connext discovery process to ensure that DataReaders will not deserialize the data sent to them incorrectly.
  • Type definitions need not match exactly between a DataWriter and its matching DataReaders. For example, a DataWriter may publish a subclass while a DataReader subscribes to a superclass, or a new version of a component may add a field to a preexisting data type.
  • Data-type designers can annotate type definitions to indicate the degree of flexibility allowed when the middleware enforces type consistency.
  • Type members can be declared as optional, allowing applications to set or omit them in every published sample.
  • QoS policies DataRepresentationQosPolicy and TypeConsistencyEnforcementQosPolicy.
  • The following standard builtin-annotations that are described in the OMG 'Extensible and Dynamic Topic Types for DDS' specification, version 1.3 are supported: @value, @id, @hashid, @autoid, @external, @extensibility, @appendable, @mutable, @final, @key, @optional, @nested, @default_nested, @topic, @default_literal, @data_representation. (In Connext, you can use either @data_representation or @allowed_data_representation.) For a complete list of supported built-in annotations, including RTI-specific annotations, see Using Builtin Annotations, in the RTI Connext Core Libraries User's Manual.
  • Standard syntax to apply annotations.
  • The following fixed-width integer types introduced in Interface Definition Language (IDL) 4.2, shown here with their old type names:
  • IDL 4.2

    Old Type Name

    int16

    short

    int32

    long

    int64

    long long

    uint16

    unsigned short

    uint32

    unsigned long

    uint64

    unsigned long long

    Note: You can continue to use the old type names; however, it is preferable to use the new type names because they make the value range explicit.

  • Custom annotation definition in IDL. Custom annotations can be defined in IDL, although they are ignored by the middleware (i.e., they will not be part of the typeobject).
  • TypeObject v1.
  • Extended Common Data Representation (CDR) encoding version 1 and 2.
  • The above features are supported in the RTI core middleware in all programming languages except Ada.

The following Extensible Types features are not supported:

  • These types: BitMask, BitSet, Map.
  • Fixed-width integer types int8 and uint8 are not fully supported, both are always mapped to octets on the wire. However, some language bindings offer support for these types; following is the support by language:
    • In Java, both uint8 and int8 map to a byte, which is signed.
    • In .NET, uint8 maps to byte, and int8 maps to a sbyte, which is signed.
    • In Python, uint8 maps to idl.uint8, and int8 maps to idl.int8, which are subtypes of the built-in int type.
    • In Modern C++, uint8 maps to uint8_t, and int8 maps to int8_t.
    • In C and Traditional C++, uint8 maps to DDS_UInt8, and int8 maps to DDS_Int8.
  • Union inheritance
  • Custom annotation definition in IDL. Custom annotations can be defined in IDL, although they are ignored by the middleware (i.e., they will not be part of the typeobject).
  • TypeObject v2.
  • Builtin TypeLookup service.
  • The following builtin-annotations can be defined in IDL, although they will be ignored by the middleware (i.e., they will not be part of the typeobject): verbatim, must_understand, bit_bound, non_serialized, oneway, position, try_construct.
  • XML data representation (XML type representation is supported).
  • Dynamic language binding compliant with the Extensible Types specification: DynamicType and DynamicData (see Chapter 7 DynamicData API).
  • The type member in PublicationBuiltinTopicData and SubscriptionBuiltinTopicData.
  • Association of a topic to multiple types within a single DomainParticipant

To see a demonstration of Extensible Types, run RTI Shapes Demo, which can publish and subscribe to two different data types: the "Shape" type or the "Shape Extended" type. If you don't have Shapes Demo installed already, you can download it from https://www.rti.com/free-trial/shapes-demo. If you are not already familiar with how to start Shapes Demo, please see the Shapes Demo User's Manual.

Besides RTI Shapes Demo, several other RTI components include partial support for Extensible Types.