RTI Connext .Net APIs  Version 5.3.0

<<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 {
  DDS::TCKind::TK_NULL,
  DDS::TCKind::TK_SHORT,
  DDS::TCKind::TK_LONG,
  DDS::TCKind::TK_USHORT,
  DDS::TCKind::TK_ULONG,
  DDS::TCKind::TK_FLOAT,
  DDS::TCKind::TK_DOUBLE,
  DDS::TCKind::TK_BOOLEAN,
  DDS::TCKind::TK_CHAR,
  DDS::TCKind::TK_OCTET,
  DDS::TCKind::TK_STRUCT,
  DDS::TCKind::TK_UNION,
  DDS::TCKind::TK_ENUM,
  DDS::TCKind::TK_STRING,
  DDS::TCKind::TK_SEQUENCE,
  DDS::TCKind::TK_ARRAY,
  DDS::TCKind::TK_ALIAS,
  DDS::TCKind::TK_LONGLONG,
  DDS::TCKind::TK_ULONGLONG,
  DDS::TCKind::TK_LONGDOUBLE,
  DDS::TCKind::TK_WCHAR,
  DDS::TCKind::TK_WSTRING,
  DDS::TCKind::TK_VALUE
}
 Enumeration type for DDS::TypeCode kinds. More...
 
enum  DDS::ValueModifier : INT16 {
  DDS::ValueModifier::VM_NONE,
  DDS::ValueModifier::VM_CUSTOM,
  DDS::ValueModifier::VM_ABSTRACT,
  DDS::ValueModifier::VM_TRUNCATABLE
}
 Modifier type for a value type. More...
 
enum  DDS::Visibility : INT16 {
  DDS::Visibility::PRIVATE_MEMBER,
  DDS::Visibility::PUBLIC_MEMBER
}
 Type to indicate the visibility of a value type member. More...
 
enum  DDS::ExtensibilityKind : UINT32 {
  DDS::ExtensibilityKind::FINAL_EXTENSIBILITY,
  DDS::ExtensibilityKind::EXTENSIBLE_EXTENSIBILITY,
  DDS::ExtensibilityKind::MUTABLE_EXTENSIBILITY
}
 Type to indicate the extensibility of a type. More...
 

Variables

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

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

◆ TCKind

enum DDS::TCKind : UINT32
strong

Enumeration type for DDS::TypeCode kinds.

Type code kinds are modeled as values of this type.

Enumerator
TK_NULL 

Indicates that a type code does not describe anything.

TK_SHORT 

short type.

TK_LONG 

long type.

TK_USHORT 

unsigned short type.

TK_ULONG 

unsigned long type.

TK_FLOAT 

float type.

TK_DOUBLE 

double type.

TK_BOOLEAN 

boolean type.

TK_CHAR 

char type.

TK_OCTET 

octet type.

TK_STRUCT 

struct type.

TK_UNION 

union type.

TK_ENUM 

enumerated type.

TK_STRING 

string type.

TK_SEQUENCE 

sequence type.

TK_ARRAY 

array type.

TK_ALIAS 

alias (typedef) type.

TK_LONGLONG 

long long type.

TK_ULONGLONG 

unsigned long long type.

TK_LONGDOUBLE 

long double type.

TK_WCHAR 

wide char type.

TK_WSTRING 

wide string type.

TK_VALUE 

value type.

◆ ValueModifier

enum DDS::ValueModifier : INT16
strong

Modifier type for a value type.

See also
DDS::ValueModifier::VM_NONE
DDS::ValueModifier::VM_CUSTOM
DDS::ValueModifier::VM_ABSTRACT
DDS::ValueModifier::VM_TRUNCATABLE
Enumerator
VM_NONE 

Constant used to indicate that a value type has no modifiers.

See also
DDS::ValueModifier
VM_CUSTOM 

Constant used to indicate that a value type has the custom modifier.

This modifier is used to specify whether the value type uses custom marshaling.

See also
DDS::ValueModifier
VM_ABSTRACT 

Constant used to indicate that a value type has the abstract modifier.

An abstract value type may not be instantiated.

See also
DDS::ValueModifier
VM_TRUNCATABLE 

Constant used to indicate that a value type has the truncatable modifier.

A value with a state that derives from another value with a state can be declared as truncatable. A truncatable type means the object can be truncated to the base type.

See also
DDS::ValueModifier

◆ Visibility

enum DDS::Visibility : INT16
strong

Type to indicate the visibility of a value type member.

See also
DDS::Visibility::PRIVATE_MEMBER
DDS::Visibility::PUBLIC_MEMBER
Enumerator
PRIVATE_MEMBER 

Constant used to indicate that a value type member is private.

See also
DDS::Visibility
DDS::Visibility::PUBLIC_MEMBER
PUBLIC_MEMBER 

Constant used to indicate that a value type member is public.

See also
DDS::Visibility
DDS::Visibility::PRIVATE_MEMBER

◆ ExtensibilityKind

enum DDS::ExtensibilityKind : UINT32
strong

Type to indicate the extensibility of a type.

Enumerator
FINAL_EXTENSIBILITY 

Specifies that a type has FINAL extensibility.

A type may be final, indicating that the range of its possible values is strictly defined. In particular, it is not possible to add elements to members of collection or aggregated types while maintaining type assignability.

The following types are always final:

EXTENSIBLE_EXTENSIBILITY 

Specifies that a type has EXTENSIBLE extensibility.

A type may be extensible, indicating that two types, where one contains all of the elements/members of the other plus additional elements/members appended to the end, may remain assignable.

MUTABLE_EXTENSIBILITY 

Specifies that a type has MUTABLE extensibility.

A type may be mutable, indicating that two types may differ from one another in the additional, removal, and/or transposition of elements/members while remaining assignable.

The following types are always mutable:

Variable Documentation

◆ TC_NULL

TypeCode ^ DDS::TypeCode::TC_NULL

Basic null type.

See also
DDS::TypeCodeFactory::get_primitive_tc

◆ TC_SHORT

TypeCode ^ DDS::TypeCode::TC_SHORT

Basic 16-bit signed integer type.

See also
DDS::TypeCodeFactory::get_primitive_tc

◆ TC_LONG

TypeCode ^ DDS::TypeCode::TC_LONG

Basic 32-bit signed integer type.

See also
DDS::TypeCodeFactory::get_primitive_tc

◆ TC_USHORT

TypeCode ^ DDS::TypeCode::TC_USHORT

Basic unsigned 16-bit integer type.

See also
DDS::TypeCodeFactory::get_primitive_tc

◆ TC_ULONG

TypeCode ^ DDS::TypeCode::TC_ULONG

Basic unsigned 32-bit integer type.

See also
DDS::TypeCodeFactory::get_primitive_tc

◆ TC_FLOAT

TypeCode ^ DDS::TypeCode::TC_FLOAT

Basic 32-bit floating point type.

See also
DDS::TypeCodeFactory::get_primitive_tc

◆ TC_DOUBLE

TypeCode ^ DDS::TypeCode::TC_DOUBLE

Basic 64-bit floating point type.

See also
DDS::TypeCodeFactory::get_primitive_tc

◆ TC_BOOLEAN

TypeCode ^ DDS::TypeCode::TC_BOOLEAN

Basic Boolean type.

See also
DDS::TypeCodeFactory::get_primitive_tc

◆ TC_CHAR

TypeCode ^ DDS::TypeCode::TC_CHAR

Basic single-byte character type.

See also
DDS::TypeCodeFactory::get_primitive_tc

◆ TC_OCTET

TypeCode ^ DDS::TypeCode::TC_OCTET

Basic octet/byte type.

See also
DDS::TypeCodeFactory::get_primitive_tc

◆ TC_LONGLONG

TypeCode ^ DDS::TypeCode::TC_LONGLONG

Basic 64-bit integer type.

See also
DDS::TypeCodeFactory::get_primitive_tc

◆ TC_ULONGLONG

TypeCode ^ DDS::TypeCode::TC_ULONGLONG

Basic unsigned 64-bit integer type.

See also
DDS::TypeCodeFactory::get_primitive_tc

◆ TC_LONGDOUBLE

TypeCode ^ DDS::TypeCode::TC_LONGDOUBLE

Basic 128-bit floating point type.

See also
DDS::TypeCodeFactory::get_primitive_tc

◆ TC_WCHAR

TypeCode ^ DDS::TypeCode::TC_WCHAR

Basic four-byte character type.

See also
DDS::TypeCodeFactory::get_primitive_tc

◆ MEMBER_ID_INVALID

System::Int32 DDS::TypeCode::MEMBER_ID_INVALID

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

◆ INDEX_INVALID

System::UInt32 DDS::TypeCode::INDEX_INVALID

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

◆ NOT_BITFIELD

System::Int16 DDS::TypeCode::NOT_BITFIELD

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

◆ NONKEY_MEMBER

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

◆ KEY_MEMBER

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

◆ NONKEY_REQUIRED_MEMBER

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.3.0 Copyright © Sun Jun 25 2017 Real-Time Innovations, Inc