Classes | |
struct | 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... | |
struct | DDS_StructMember |
A description of a member of a struct. More... | |
struct | DDS_StructMemberSeq |
Defines a sequence of struct members. More... | |
struct | DDS_UnionMember |
A description of a member of a union. More... | |
struct | DDS_UnionMemberSeq |
Defines a sequence of union members. More... | |
struct | DDS_EnumMember |
A description of a member of an enumeration. More... | |
struct | DDS_EnumMemberSeq |
Defines a sequence of enumerator members. More... | |
struct | DDS_ValueMember |
A description of a member of a value type. More... | |
struct | DDS_ValueMemberSeq |
Defines a sequence of value members. More... | |
struct | DDS_TypeCodeFactory |
A singleton factory for creating, copying, and deleting data type definitions dynamically. More... | |
Defines | |
#define | DDS_TYPECODE_MEMBER_ID_INVALID |
A sentinel indicating an invalid DDS_TypeCode member ID. | |
#define | DDS_TYPECODE_INDEX_INVALID |
A sentinel indicating an invalid DDS_TypeCode member index. | |
#define | DDS_TYPECODE_NOT_BITFIELD |
Indicates that a member of a type is not a bitfield. | |
#define | DDS_VM_NONE |
Constant used to indicate that a value type has no modifiers. | |
#define | DDS_VM_CUSTOM |
Constant used to indicate that a value type has the custom modifier. | |
#define | DDS_VM_ABSTRACT |
Constant used to indicate that a value type has the abstract modifier. | |
#define | DDS_VM_TRUNCATABLE |
Constant used to indicate that a value type has the truncatable modifier. | |
#define | DDS_PRIVATE_MEMBER |
Constant used to indicate that a value type member is private. | |
#define | DDS_PUBLIC_MEMBER |
Constant used to indicate that a value type member is public. | |
#define | DDS_TYPECODE_NONKEY_MEMBER |
A flag indicating that a type member is optional and not part of the key. | |
#define | DDS_TYPECODE_KEY_MEMBER |
A flag indicating that a type member is part of the key for that type, and therefore required. | |
#define | DDS_TYPECODE_NONKEY_REQUIRED_MEMBER |
A flag indicating that a type member is not part of the key but is nevertheless required. | |
Typedefs | |
typedef short | DDS_ValueModifier |
Modifier type for a value type. | |
typedef short | DDS_Visibility |
Type to indicate the visibility of a value type member. | |
Enumerations | |
enum | DDS_TCKind { DDS_TK_NULL, DDS_TK_SHORT, DDS_TK_LONG, DDS_TK_USHORT, DDS_TK_ULONG, DDS_TK_FLOAT, DDS_TK_DOUBLE, DDS_TK_BOOLEAN, DDS_TK_CHAR, DDS_TK_OCTET, DDS_TK_STRUCT, DDS_TK_UNION, DDS_TK_ENUM, DDS_TK_STRING, DDS_TK_SEQUENCE, DDS_TK_ARRAY, DDS_TK_ALIAS, DDS_TK_LONGLONG, DDS_TK_ULONGLONG, DDS_TK_LONGDOUBLE, DDS_TK_WCHAR, DDS_TK_WSTRING, DDS_TK_VALUE, DDS_TK_SPARSE } |
Enumeration type for DDS_TypeCode kinds. More... | |
Variables | |
DDS_TypeCode | DDS_g_tc_null |
Basic NULL type. | |
DDS_TypeCode | DDS_g_tc_long |
Basic 32-bit signed integer type. | |
DDS_TypeCode | DDS_g_tc_ushort |
Basic unsigned 16-bit integer type. | |
DDS_TypeCode | DDS_g_tc_ulong |
Basic unsigned 32-bit integer type. | |
DDS_TypeCode | DDS_g_tc_float |
Basic 32-bit floating point type. | |
DDS_TypeCode | DDS_g_tc_double |
Basic 64-bit floating point type. | |
DDS_TypeCode | DDS_g_tc_boolean |
Basic Boolean type. | |
DDS_TypeCode | DDS_g_tc_octet |
Basic octet/byte type. | |
DDS_TypeCode | DDS_g_tc_longlong |
Basic 64-bit integer type. | |
DDS_TypeCode | DDS_g_tc_ulonglong |
Basic unsigned 64-bit integer type. | |
DDS_TypeCode | DDS_g_tc_longdouble |
Basic 128-bit floating point type. | |
DDS_TypeCode | DDS_g_tc_wchar |
Basic four-byte character type. |
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::equal method is a more reliable test than comparing the string type names, requiring equivalent definitions of the types.
Foo_get_typecode
function for a type "Foo", which returns a DDS_TypeCode pointer. 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:
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 DDSDataWriter::get_matched_subscription_data or DDSDataReader::get_matched_publication_data.
The space available locally to deserialize a discovered remote DDS_TypeCode is specified by the DDSDomainParticipant'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.
#define DDS_TYPECODE_MEMBER_ID_INVALID |
A sentinel indicating an invalid DDS_TypeCode member ID.
#define DDS_TYPECODE_INDEX_INVALID |
A sentinel indicating an invalid DDS_TypeCode member index.
#define DDS_TYPECODE_NOT_BITFIELD |
Indicates that a member of a type is not a bitfield.
#define DDS_VM_NONE |
Constant used to indicate that a value type has no modifiers.
#define DDS_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.
#define DDS_VM_ABSTRACT |
Constant used to indicate that a value type has the abstract
modifier.
An abstract value type may not be instantiated.
#define DDS_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.
#define DDS_PRIVATE_MEMBER |
Constant used to indicate that a value type member is private.
#define DDS_PUBLIC_MEMBER |
#define DDS_TYPECODE_NONKEY_MEMBER |
A flag indicating that a type member is optional and not part of the key.
Only sparse value types (i.e. types of DDS_TCKind DDS_TK_SPARSE) support this flag. Non-key members of other type kinds should use the flag DDS_TYPECODE_NONKEY_REQUIRED_MEMBER.
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_long). The middleware will not assume any default value.
#define 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, even if the type is a sparse value type (i.e. of kind DDS_TK_SPARSE). If you do not set a value of the member explicitly (see, for example, DDS_DynamicData::set_long), the middleware will assume a default "zero" value: numeric values will be set to zero; strings and sequences will be of zero length.
#define 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, even if the type is a sparse value type (i.e. of kind DDS_TK_SPARSE). If you do not set a value of the member explicitly (see, for example, DDS_DynamicData::set_long), the middleware will assume a default "zero" value: numeric values will be set to zero; strings and sequences will be of zero length.
typedef short DDS_ValueModifier |
Modifier type for a value type.
typedef short DDS_Visibility |
enum DDS_TCKind |
Enumeration type for DDS_TypeCode kinds.
Type code kinds are modeled as values of this type.
DDS_TK_NULL | Indicates that a type code does not describe anything. |
DDS_TK_SHORT | short type. |
DDS_TK_LONG | long type. |
DDS_TK_USHORT | unsigned short type. |
DDS_TK_ULONG | unsigned long type. |
DDS_TK_FLOAT | float type. |
DDS_TK_DOUBLE | double type. |
DDS_TK_BOOLEAN | boolean type. |
DDS_TK_CHAR | char type. |
DDS_TK_OCTET | octet type. |
DDS_TK_STRUCT | struct type. |
DDS_TK_UNION | union type. |
DDS_TK_ENUM | enumerated type. |
DDS_TK_STRING | string type. |
DDS_TK_SEQUENCE | sequence type. |
DDS_TK_ARRAY | array type. |
DDS_TK_ALIAS | alias (typedef) type. |
DDS_TK_LONGLONG | long long type. |
DDS_TK_ULONGLONG | unsigned long long type. |
DDS_TK_LONGDOUBLE | long double type. |
DDS_TK_WCHAR | wide char type. |
DDS_TK_WSTRING | wide string type. |
DDS_TK_VALUE | value type. |
DDS_TK_SPARSE |
A sparse value type.
A sparse value type is one in which all of the fields are not necessarily sent on the network as a part of every sample. Fields of a sparse value type fall into one of three categories:
|
Basic NULL type.
For new code, DDS_TypeCodeFactory::get_primitive_tc is preferred to using this global variable.
Basic 32-bit signed integer type.
For new code, DDS_TypeCodeFactory::get_primitive_tc is preferred to using this global variable.
Basic unsigned 16-bit integer type.
For new code, DDS_TypeCodeFactory::get_primitive_tc is preferred to using this global variable.
Basic unsigned 32-bit integer type.
For new code, DDS_TypeCodeFactory::get_primitive_tc is preferred to using this global variable.
Basic 32-bit floating point type.
For new code, DDS_TypeCodeFactory::get_primitive_tc is preferred to using this global variable.
Basic 64-bit floating point type.
For new code, DDS_TypeCodeFactory::get_primitive_tc is preferred to using this global variable.
Basic Boolean type.
For new code, DDS_TypeCodeFactory::get_primitive_tc is preferred to using this global variable.
Basic octet/byte type.
For new code, DDS_TypeCodeFactory::get_primitive_tc is preferred to using this global variable.
Basic 64-bit integer type.
For new code, DDS_TypeCodeFactory::get_primitive_tc is preferred to using this global variable.
Basic unsigned 64-bit integer type.
For new code, DDS_TypeCodeFactory::get_primitive_tc is preferred to using this global variable.
Basic 128-bit floating point type.
For new code, DDS_TypeCodeFactory::get_primitive_tc is preferred to using this global variable.
Basic four-byte character type.
For new code, DDS_TypeCodeFactory::get_primitive_tc is preferred to using this global variable.