RTI Connext .Net APIs  Version 5.2.3
 All Classes Namespaces Functions Variables Enumerations Properties Groups Pages
Type Code Support

<<extension>> A DDS::TypeCode is a mechanism for representing a type at runtime. RTI Connext can use type codes to send type definitions on the network. You will need to understand this API in order to use the Dynamic Data capability or to inspect the type information you receive from remote readers and writers. More...

Classes

class  DDS::TypeCode
 The definition of a particular data type, which you can use to inspect the name, members, and other properties of types generated with rtiddsgen or to modify types you define yourself at runtime. More...
 
class  DDS::StructMember
 A description of a member of a struct. More...
 
class  DDS::StructMemberSeq
 Defines a sequence of struct members. More...
 
class  DDS::UnionMember
 A description of a member of a union. More...
 
class  DDS::UnionMemberSeq
 Defines a sequence of union members. More...
 
class  DDS::EnumMember
 A description of a member of an enumeration. More...
 
class  DDS::EnumMemberSeq
 Defines a sequence of enumerator members. More...
 
class  DDS::ValueMember
 A description of a member of a value type. More...
 
class  DDS::ValueMemberSeq
 Defines a sequence of value members. More...
 
class  DDS::TypeCodeFactory
 A singleton factory for creating, copying, and deleting data type definitions dynamically. More...
 

Enumerations

enum  DDS::TCKind : UINT32
 Enumeration type for DDS::TypeCode kinds. More...
 
enum  DDS::ValueModifier : INT16
 Modifier type for a value type. More...
 
enum  DDS::Visibility : INT16
 Type to indicate the visibility of a value type member. More...
 
enum  DDS::ExtensibilityKind : UINT32
 Type to indicate the extensibility of a type. More...
 

Variables

TypeCode^ DDS::TypeCode::TC_NULL
 Basic null type.
 
TypeCode^ DDS::TypeCode::TC_LONG
 Basic 32-bit signed integer type.
 
TypeCode^ DDS::TypeCode::TC_USHORT
 Basic unsigned 16-bit integer type.
 
TypeCode^ DDS::TypeCode::TC_ULONG
 Basic unsigned 32-bit integer type.
 
TypeCode^ DDS::TypeCode::TC_FLOAT
 Basic 32-bit floating point type.
 
TypeCode^ DDS::TypeCode::TC_DOUBLE
 Basic 64-bit floating point type.
 
TypeCode^ DDS::TypeCode::TC_BOOLEAN
 Basic Boolean type.
 
TypeCode^ DDS::TypeCode::TC_OCTET
 Basic octet/byte type.
 
TypeCode^ DDS::TypeCode::TC_LONGLONG
 Basic 64-bit integer type.
 
TypeCode^ DDS::TypeCode::TC_ULONGLONG
 Basic unsigned 64-bit integer type.
 
TypeCode^ DDS::TypeCode::TC_LONGDOUBLE
 Basic 128-bit floating point type.
 
TypeCode^ DDS::TypeCode::TC_WCHAR
 Basic four-byte character type.
 
System::Int32 DDS::TypeCode::MEMBER_ID_INVALID
 A sentinel indicating an invalid DDS::TypeCode member ID.
 
System::UInt32 DDS::TypeCode::INDEX_INVALID
 A sentinel indicating an invalid DDS::TypeCode member index.
 
System::Int16 DDS::TypeCode::NOT_BITFIELD
 Indicates that a member of a type is not a bitfield.
 
System::Byte DDS::TypeCode::NONKEY_MEMBER
 A flag indicating that a type member is optional and not part of the key.
 
System::Byte DDS::TypeCode::KEY_MEMBER
 A flag indicating that a type member is part of the key for that type, and therefore required.
 
System::Byte DDS::TypeCode::NONKEY_REQUIRED_MEMBER
 A flag indicating that a type member is not part of the key but is nevertheless required.
 

Detailed Description

<<extension>> A DDS::TypeCode is a mechanism for representing a type at runtime. RTI Connext can use type codes to send type definitions on the network. You will need to understand this API in order to use the Dynamic Data capability or to inspect the type information you receive from remote readers and writers.

Type codes are values that are used to describe arbitrarily complex types at runtime. Type code values are manipulated via the DDS::TypeCode class, which has an analogue in CORBA.

A DDS::TypeCode value consists of a type code kind (represented by the ::DDS::TCKind enumeration) and a list of members (that is, fields). These members are recursive: each one has its own DDS::TypeCode, and in the case of complex types (structures, arrays, and so on), these contained type codes contain their own members.

There are a number of uses for type codes. The type code mechanism can be used to unambiguously match type representations. The DDS::TypeCode::Equals method is a more reliable test than comparing the string type names, requiring equivalent definitions of the types.

Accessing a Local ::DDS::TypeCode

When generating types with rtiddsgen, type codes are enabled by default. (The -notypecode option can be used to disable generation of DDS::TypeCode information.) For these types, a DDS::TypeCode may be accessed via the FooTypeCode.VALUE member. This API also includes support for dynamic creation of DDS::TypeCode values, typically for use with the Dynamic Data API. You can create a DDS::TypeCode using the DDS::TypeCodeFactory class. You will construct the DDS::TypeCode recursively, from the outside in: start with the type codes for primitive types, then compose them into complex types like arrays, structures, and so on. You will find the following methods helpful:

Accessing a Remote ::DDS::TypeCode

In addition to being used locally, RTI Connext can transmit DDS::TypeCode on the network between participants. This information can be used to access information about types used remotely at runtime, for example to be able to publish or subscribe to topics of arbitrarily types (see Dynamic Data). This functionality is useful for a generic system monitoring tool like rtiddsspy.

Remote DDS::TypeCode information is shared during discovery over the publication and subscription built-in topics and can be accessed using the built-in readers for these topics; see Built-in Topics. Discovered DDS::TypeCode values are not cached by RTI Connext upon receipt and are therefore not available from the built-in topic data returned by DDS::DataWriter::get_matched_subscription_data or DDS::DataReader::get_matched_publication_data.

The space available locally to deserialize a discovered remote DDS::TypeCode is specified by the DDS::DomainParticipant's DDS::DomainParticipantResourceLimitsQosPolicy::type_code_max_serialized_length QoS parameter. To support especially complex type codes, it may be necessary for you to increase the value of this parameter.

See Also
DDS::TypeCode
Dynamic Data
rtiddsgen
DDS::SubscriptionBuiltinTopicData
DDS::PublicationBuiltinTopicData

Enumeration Type Documentation

enum DDS::TCKind : UINT32

Enumeration type for DDS::TypeCode kinds.

Type code kinds are modeled as values of this type.

enum DDS::ValueModifier : INT16

Modifier type for a value type.

See Also
::DDS::ValueModifier::VM_NONE
::DDS::ValueModifier::VM_CUSTOM
::DDS::ValueModifier::VM_ABSTRACT
::DDS::ValueModifier::VM_TRUNCATABLE
enum DDS::Visibility : INT16

Type to indicate the visibility of a value type member.

See Also
::DDS::Visibility::PRIVATE_MEMBER
::DDS::Visibility::PUBLIC_MEMBER
enum DDS::ExtensibilityKind : UINT32

Type to indicate the extensibility of a type.

Variable Documentation

TypeCode DDS::TypeCode::TC_NULL

Basic null type.

Basic 16-bit signed integer type.

See Also
DDS::TypeCodeFactory::get_primitive_tc
TypeCode ^ DDS::TypeCode::TC_LONG

Basic 32-bit signed integer type.

See Also
DDS::TypeCodeFactory::get_primitive_tc
TypeCode ^ DDS::TypeCode::TC_USHORT

Basic unsigned 16-bit integer type.

See Also
DDS::TypeCodeFactory::get_primitive_tc
TypeCode ^ DDS::TypeCode::TC_ULONG

Basic unsigned 32-bit integer type.

See Also
DDS::TypeCodeFactory::get_primitive_tc
TypeCode ^ DDS::TypeCode::TC_FLOAT

Basic 32-bit floating point type.

See Also
DDS::TypeCodeFactory::get_primitive_tc
TypeCode ^ DDS::TypeCode::TC_DOUBLE

Basic 64-bit floating point type.

See Also
DDS::TypeCodeFactory::get_primitive_tc
TypeCode ^ DDS::TypeCode::TC_BOOLEAN

Basic Boolean type.

See Also
DDS::TypeCodeFactory::get_primitive_tc
TypeCode ^ DDS::TypeCode::TC_OCTET

Basic octet/byte type.

See Also
DDS::TypeCodeFactory::get_primitive_tc
TypeCode ^ DDS::TypeCode::TC_LONGLONG

Basic 64-bit integer type.

See Also
DDS::TypeCodeFactory::get_primitive_tc
TypeCode ^ DDS::TypeCode::TC_ULONGLONG

Basic unsigned 64-bit integer type.

See Also
DDS::TypeCodeFactory::get_primitive_tc
TypeCode ^ DDS::TypeCode::TC_LONGDOUBLE

Basic 128-bit floating point type.

See Also
DDS::TypeCodeFactory::get_primitive_tc
TypeCode ^ DDS::TypeCode::TC_WCHAR

Basic four-byte character type.

See Also
DDS::TypeCodeFactory::get_primitive_tc
System::Int32 DDS::TypeCode::MEMBER_ID_INVALID

A sentinel indicating an invalid DDS::TypeCode member ID.

System::UInt32 DDS::TypeCode::INDEX_INVALID

A sentinel indicating an invalid DDS::TypeCode member index.

System::Int16 DDS::TypeCode::NOT_BITFIELD

Indicates that a member of a type is not a bitfield.

System::Byte DDS::TypeCode::NONKEY_MEMBER

A flag indicating that a type member is optional and not part of the key.

If a type is used with the Dynamic Data facility, a DDS::DynamicData sample of the type will only contain a value for a DDS::TypeCode::NONKEY_MEMBER field if one has been explicitly set (see, for example, DDS::DynamicData::set_int). The middleware will not assume any default value.

See Also
DDS::TypeCode::KEY_MEMBER
DDS::TypeCode::NONKEY_REQUIRED_MEMBER
DDS::TypeCode::KEY_MEMBER
DDS::TypeCode::add_member
DDS::TypeCode::add_member_ex
DDS::TypeCode::is_member_key
DDS::TypeCode::is_member_required
DDS::StructMember::is_key
DDS::ValueMember::is_key
System::Byte DDS::TypeCode::KEY_MEMBER

A flag indicating that a type member is part of the key for that type, and therefore required.

If a type is used with the Dynamic Data facility, all DDS::DynamicData samples of the type will contain a value for all DDS::TypeCode::KEY_MEMBER fields. If you do not set a value of the member explicitly (see, for example, DDS::DynamicData::set_int), the middleware will assume a default "zero" value: numeric values will be set to zero; strings and sequences will be of zero length.

See Also
DDS::TypeCode::NONKEY_REQUIRED_MEMBER
DDS::TypeCode::NONKEY_MEMBER
DDS::TypeCode::add_member
DDS::TypeCode::add_member_ex
DDS::TypeCode::is_member_key
DDS::TypeCode::is_member_required
DDS::StructMember::is_key
DDS::ValueMember::is_key
System::Byte DDS::TypeCode::NONKEY_REQUIRED_MEMBER

A flag indicating that a type member is not part of the key but is nevertheless required.

This is the most common kind of member.

If a type is used with the Dynamic Data facility, all DDS::DynamicData samples of the type will contain a value for all DDS::TypeCode::NONKEY_REQUIRED_MEMBER fields. If you do not set a value of the member explicitly (see, for example, DDS::DynamicData::set_int), the middleware will assume a default "zero" value: numeric values will be set to zero; strings and sequences will be of zero length.

See Also
DDS::TypeCode::KEY_MEMBER
DDS::TypeCode::NONKEY_MEMBER
DDS::TypeCode::KEY_MEMBER
DDS::TypeCode::add_member
DDS::TypeCode::add_member_ex
DDS::TypeCode::is_member_key
DDS::TypeCode::is_member_required
DDS::StructMember::is_key
DDS::ValueMember::is_key

RTI Connext .Net APIs Version 5.2.3 Copyright © Wed Apr 27 2016 Real-Time Innovations, Inc