RTI Connext Java API
Version 5.1.0
|
<<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... | |
<<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.
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:
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.