RTI Connext Java API  Version 5.1.0
Type Code Support

<<eXtension>> A com.rti.dds.typecode.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  EnumMember
 A description of a member of an enumeration. More...
 
class  ExtensibilityKind
 Type to indicate the extensibility of a type. More...
 
class  PRIVATE_MEMBER
 Constant used to indicate that a value type member is private. More...
 
class  PUBLIC_MEMBER
 Constant used to indicate that a value type member is public. More...
 
class  StructMember
 A description of a member of a struct. More...
 
class  TCKind
 Enumeration type for com.rti.dds.typecode.TypeCode kinds. More...
 
class  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  TypeCodeFactory
 A singleton factory for creating, copying, and deleting data type definitions dynamically. More...
 
class  UnionMember
 A description of a member of a union. More...
 
class  ValueMember
 A description of a member of a value type. More...
 
class  VM_ABSTRACT
 Constant used to indicate that a value type has the abstract modifier. More...
 
class  VM_CUSTOM
 Constant used to indicate that a value type has the custom modifier. More...
 
class  VM_NONE
 Constant used to indicate that a value type has no modifiers. More...
 
class  VM_TRUNCATABLE
 Constant used to indicate that a value type has the truncatable modifier. More...
 

Variables

static final ExtensibilityKind FINAL_EXTENSIBILITY
 Specifies that a type has FINAL extensibility.
 
static final ExtensibilityKind EXTENSIBLE_EXTENSIBILITY
 Specifies that a type has EXTENSIBLE extensibility.
 
static final ExtensibilityKind MUTABLE_EXTENSIBILITY
 Specifies that a type has MUTABLE extensibility.
 

Detailed Description

<<eXtension>> A com.rti.dds.typecode.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 com.rti.dds.typecode.TypeCode class, which has an analogue in CORBA.

A com.rti.dds.typecode.TypeCode value consists of a type code kind (represented by the com.rti.dds.typecode.TCKind enumeration) and a list of members (that is, fields). These members are recursive: each one has its own com.rti.dds.typecode.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 com.rti.dds.typecode.TypeCode.TypeCode.equals method is a more reliable test than comparing the string type names, requiring equivalent definitions of the types.

Accessing a Local com.rti.dds.typecode.TypeCode

When generating types with rtiddsgen, type codes are enabled by default. (The -notypecode option can be used to disable generation of com.rti.dds.typecode.TypeCode information.) For these types, a com.rti.dds.typecode.TypeCode may be accessed via the FooTypeCode.VALUE member.

This API also includes support for dynamic creation of com.rti.dds.typecode.TypeCode values, typically for use with the Dynamic Data API. You can create a com.rti.dds.typecode.TypeCode using the com.rti.dds.typecode.TypeCodeFactory class. You will construct the com.rti.dds.typecode.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 com.rti.dds.typecode.TypeCode

In addition to being used locally, RTI Connext can transmit com.rti.dds.typecode.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 com.rti.dds.typecode.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 com.rti.dds.typecode.TypeCode values are not cached by RTI Connext upon receipt and are therefore not available from the built-in topic data returned by com.rti.dds.publication.DataWriter.get_matched_subscription_data or com.rti.dds.subscription.DataReader.get_matched_publication_data.

The space available locally to deserialize a discovered remote com.rti.dds.typecode.TypeCode is specified by the com.rti.dds.domain.DomainParticipant's com.rti.dds.infrastructure.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
com.rti.dds.typecode.TypeCode
Dynamic Data
rtiddsgen
builtin.SubscriptionBuiltinTopicData
builtin.PublicationBuiltinTopicData

Variable Documentation

final ExtensibilityKind FINAL_EXTENSIBILITY
static

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:

final ExtensibilityKind EXTENSIBLE_EXTENSIBILITY
static

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.

final ExtensibilityKind MUTABLE_EXTENSIBILITY
static

Specifies that a type has MUTABLE extensibility.

[Not supported.]

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:

The support for type mutability in this release is limited to com.rti.dds.typecode.TCKind.TK_SEQUENCE, com.rti.dds.typecode.TCKind.TK_STRING, and com.rti.dds.typecode.TCKind.TK_WSTRING.

Mutability in com.rti.dds.typecode.TCKind.TK_STRUCT, com.rti.dds.typecode.TCKind.TK_UNION, com.rti.dds.typecode.TCKind.TK_VALUE, and com.rti.dds.typecode.TCKind.TK_ENUM is not supported.


RTI Connext Java API Version 5.1.0 Copyright © Mon Feb 3 2014 Real-Time Innovations, Inc