Data Structures | |
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... | |
Functions | |
DDS_TCKind | DDS_TypeCode_kind (const DDS_TypeCode *self, DDS_ExceptionCode_t *ex) |
Gets the DDS_TCKind value of a type code. | |
DDS_Boolean | DDS_TypeCode_equal (const DDS_TypeCode *self, const DDS_TypeCode *tc, DDS_ExceptionCode_t *ex) |
Compares two DDS_TypeCode objects for equality. | |
const char * | DDS_TypeCode_name (const DDS_TypeCode *self, DDS_ExceptionCode_t *ex) |
Retrieves the simple name identifying this DDS_TypeCode object within its enclosing scope. | |
DDS_UnsignedLong | DDS_TypeCode_member_count (const DDS_TypeCode *self, DDS_ExceptionCode_t *ex) |
Returns the number of members of the type code. | |
const char * | DDS_TypeCode_member_name (const DDS_TypeCode *self, DDS_UnsignedLong index, DDS_ExceptionCode_t *ex) |
Returns the name of a type code member identified by the given index. | |
DDS_UnsignedLong | DDS_TypeCode_find_member_by_name (const DDS_TypeCode *self, const char *name, DDS_ExceptionCode_t *ex) |
Get the index of the member of the given name. | |
DDS_TypeCode * | DDS_TypeCode_member_type (const DDS_TypeCode *self, DDS_UnsignedLong index, DDS_ExceptionCode_t *ex) |
Retrieves the DDS_TypeCode object describing the type of the member identified by the given index. | |
DDS_UnsignedLong | DDS_TypeCode_member_label_count (const DDS_TypeCode *self, DDS_UnsignedLong index, DDS_ExceptionCode_t *ex) |
Returns the number of labels associated to the index-th union member. | |
DDS_Long | DDS_TypeCode_member_label (const DDS_TypeCode *self, DDS_UnsignedLong member_index, DDS_UnsignedLong label_index, DDS_ExceptionCode_t *ex) |
Return the label_index-th label associated to the member_index-th member. | |
DDS_Long | DDS_TypeCode_member_ordinal (const DDS_TypeCode *self, DDS_UnsignedLong index, DDS_ExceptionCode_t *ex) |
Returns the ordinal that corresponds to the index-th enum value. | |
DDS_Boolean | DDS_TypeCode_is_member_key (const DDS_TypeCode *self, DDS_UnsignedLong index, DDS_ExceptionCode_t *ex) |
Function that tells if a member is a key or not. | |
DDS_Boolean | DDS_TypeCode_is_member_required (const DDS_TypeCode *self, DDS_UnsignedLong index, DDS_ExceptionCode_t *ex) |
Indicates whether a given member of a type is required to be present in every sample of that type. | |
DDS_Boolean | DDS_TypeCode_is_member_pointer (const DDS_TypeCode *self, DDS_UnsignedLong index, DDS_ExceptionCode_t *ex) |
Function that tells if a member is a pointer or not. | |
DDS_Boolean | DDS_TypeCode_is_member_bitfield (const DDS_TypeCode *self, DDS_UnsignedLong index, DDS_ExceptionCode_t *ex) |
Function that tells if a member is a bitfield or not. | |
DDS_Short | DDS_TypeCode_member_bitfield_bits (const DDS_TypeCode *self, DDS_UnsignedLong index, DDS_ExceptionCode_t *ex) |
Returns the number of bits of a bitfield member. | |
DDS_Visibility | DDS_TypeCode_member_visibility (const DDS_TypeCode *self, DDS_UnsignedLong index, DDS_ExceptionCode_t *ex) |
Returns the constant that indicates the visibility of the index-th member. | |
DDS_TypeCode * | DDS_TypeCode_discriminator_type (const DDS_TypeCode *self, DDS_ExceptionCode_t *ex) |
Returns the discriminator type code. | |
DDS_UnsignedLong | DDS_TypeCode_length (const DDS_TypeCode *self, DDS_ExceptionCode_t *ex) |
Returns the number of elements in the type described by this type code. | |
DDS_UnsignedLong | DDS_TypeCode_array_dimension_count (const DDS_TypeCode *self, DDS_ExceptionCode_t *ex) |
This function returns the number of dimensions of an array type code. | |
DDS_UnsignedLong | DDS_TypeCode_array_dimension (const DDS_TypeCode *self, DDS_UnsignedLong index, DDS_ExceptionCode_t *ex) |
This function returns the index-th dimension of an array type code. | |
DDS_UnsignedLong | DDS_TypeCode_element_count (const DDS_TypeCode *self, DDS_ExceptionCode_t *ex) |
The number of elements in an array. | |
DDS_TypeCode * | DDS_TypeCode_content_type (const DDS_TypeCode *self, DDS_ExceptionCode_t *ex) |
Returns the DDS_TypeCode object representing the type for the members of the object described by this DDS_TypeCode object. | |
DDS_Boolean | DDS_TypeCode_is_alias_pointer (const DDS_TypeCode *self, DDS_ExceptionCode_t *ex) |
Function that tells if an alias is a pointer or not. | |
DDS_Long | DDS_TypeCode_default_index (const DDS_TypeCode *self, DDS_ExceptionCode_t *ex) |
Returns the index of the default member, or -1 if there is no default member. | |
DDS_TypeCode * | DDS_TypeCode_concrete_base_type (const DDS_TypeCode *self, DDS_ExceptionCode_t *ex) |
Returns the DDS_TypeCode that describes the concrete base type of the value type that this DDS_TypeCode object describes. | |
DDS_ValueModifier | DDS_TypeCode_type_modifier (const DDS_TypeCode *self, DDS_ExceptionCode_t *ex) |
Returns a constant indicating the modifier of the value type that this DDS_TypeCode object describes. | |
DDS_UnsignedLong | DDS_TypeCode_find_member_by_id (const DDS_TypeCode *self, DDS_Long id, DDS_ExceptionCode_t *ex) |
Get the index of the member of the given ID. | |
DDS_Long | DDS_TypeCode_member_id (const DDS_TypeCode *self, DDS_UnsignedLong index, DDS_ExceptionCode_t *ex) |
Returns the ID of a sparse type code member identified by the given index. | |
DDS_UnsignedLong | DDS_TypeCode_add_member_to_enum (DDS_TypeCode *self, const char *name, DDS_Long ordinal, DDS_ExceptionCode_t *ex) |
Add a new enumerated constant to this enum DDS_TypeCode. | |
DDS_UnsignedLong | DDS_TypeCode_add_member (DDS_TypeCode *self, const char *name, DDS_Long id, const DDS_TypeCode *tc, DDS_Octet member_flags, DDS_ExceptionCode_t *ex) |
Add a new member to this DDS_TypeCode. | |
DDS_UnsignedLong | DDS_TypeCode_add_member_ex (DDS_TypeCode *self, const char *name, DDS_Long id, const DDS_TypeCode *tc, DDS_Octet member_flags, DDS_Visibility visibility, DDS_Boolean is_pointer, DDS_Short bits, DDS_ExceptionCode_t *ex) |
Add a new member to this DDS_TypeCode. | |
void | DDS_TypeCode_print_IDL (const DDS_TypeCode *self, DDS_UnsignedLong indent, DDS_ExceptionCode_t *ex) |
Prints a DDS_TypeCode in a pseudo-IDL notation. | |
DDS_TypeCodeFactory * | DDS_TypeCodeFactory_get_instance () |
Gets the singleton instance of this class. | |
DDS_TypeCode * | DDS_TypeCodeFactory_clone_tc (DDS_TypeCodeFactory *self, const DDS_TypeCode *tc, DDS_ExceptionCode_t *ex) |
Creates and returns a copy of the input DDS_TypeCode. | |
void | DDS_TypeCodeFactory_delete_tc (DDS_TypeCodeFactory *self, DDS_TypeCode *tc, DDS_ExceptionCode_t *ex) |
Deletes the input DDS_TypeCode. | |
const DDS_TypeCode * | DDS_TypeCodeFactory_get_primitive_tc (DDS_TypeCodeFactory *self, DDS_TCKind tc_kind) |
Get the DDS_TypeCode for a primitive type (integers, floating point values, etc.) identified by the given DDS_TCKind. | |
DDS_TypeCode * | DDS_TypeCodeFactory_create_struct_tc (DDS_TypeCodeFactory *self, const char *name, const struct DDS_StructMemberSeq *members, DDS_ExceptionCode_t *ex) |
Constructs a DDS_TK_STRUCT DDS_TypeCode. | |
DDS_TypeCode * | DDS_TypeCodeFactory_create_value_tc (DDS_TypeCodeFactory *self, const char *name, DDS_ValueModifier type_modifier, const DDS_TypeCode *concrete_base, const struct DDS_ValueMemberSeq *members, DDS_ExceptionCode_t *ex) |
Constructs a DDS_TK_VALUE DDS_TypeCode. | |
DDS_TypeCode * | DDS_TypeCodeFactory_create_union_tc (DDS_TypeCodeFactory *self, const char *name, const DDS_TypeCode *discriminator_type, DDS_Long default_index, const struct DDS_UnionMemberSeq *members, DDS_ExceptionCode_t *ex) |
Constructs a DDS_TK_UNION DDS_TypeCode. | |
DDS_TypeCode * | DDS_TypeCodeFactory_create_enum_tc (DDS_TypeCodeFactory *self, const char *name, const struct DDS_EnumMemberSeq *members, DDS_ExceptionCode_t *ex) |
Constructs a DDS_TK_ENUM DDS_TypeCode. | |
DDS_TypeCode * | DDS_TypeCodeFactory_create_alias_tc (DDS_TypeCodeFactory *self, const char *name, const DDS_TypeCode *original_type, DDS_Boolean is_pointer, DDS_ExceptionCode_t *ex) |
Constructs a DDS_TK_ALIAS (typedef) DDS_TypeCode. | |
DDS_TypeCode * | DDS_TypeCodeFactory_create_string_tc (DDS_TypeCodeFactory *self, DDS_UnsignedLong bound, DDS_ExceptionCode_t *ex) |
Constructs a DDS_TK_STRING DDS_TypeCode. | |
DDS_TypeCode * | DDS_TypeCodeFactory_create_wstring_tc (DDS_TypeCodeFactory *self, DDS_UnsignedLong bound, DDS_ExceptionCode_t *ex) |
Constructs a DDS_TK_WSTRING DDS_TypeCode. | |
DDS_TypeCode * | DDS_TypeCodeFactory_create_sequence_tc (DDS_TypeCodeFactory *self, DDS_UnsignedLong bound, const DDS_TypeCode *element_type, DDS_ExceptionCode_t *ex) |
Constructs a DDS_TK_SEQUENCE DDS_TypeCode. | |
DDS_TypeCode * | DDS_TypeCodeFactory_create_array_tc (DDS_TypeCodeFactory *self, const struct DDS_UnsignedLongSeq *dimensions, const DDS_TypeCode *element_type, DDS_ExceptionCode_t *ex) |
Constructs a DDS_TK_ARRAY DDS_TypeCode. | |
DDS_TypeCode * | DDS_TypeCodeFactory_create_sparse_tc (DDS_TypeCodeFactory *self, const char *name, DDS_ValueModifier type_modifier, const DDS_TypeCode *concrete_base, DDS_ExceptionCode_t *ex) |
Constructs a DDS_TK_SPARSE DDS_TypeCode. | |
Variables | |
DDS_TypeCode | DDS_g_tc_null |
Basic NULL type. | |
DDS_TypeCode | DDS_g_tc_short |
Basic 16-bit signed integer 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_char |
Basic single-byte character 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 function 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 Data Distribution Service 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.
#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:
|
DDS_TCKind DDS_TypeCode_kind | ( | const DDS_TypeCode * | self, | |
DDS_ExceptionCode_t * | ex | |||
) |
Gets the DDS_TCKind value of a type code.
self | <<in>> Cannot be NULL. | |
ex | <<out>> Parameter for error indications. The values that it can take are: |
DDS_Boolean DDS_TypeCode_equal | ( | const DDS_TypeCode * | self, | |
const DDS_TypeCode * | tc, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Compares two DDS_TypeCode objects for equality.
self | <<in>> Cannot be NULL. | |
tc | <<in>> Type code that will be compared with this DDS_TypeCode. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
const char* DDS_TypeCode_name | ( | const DDS_TypeCode * | self, | |
DDS_ExceptionCode_t * | ex | |||
) |
Retrieves the simple name identifying this DDS_TypeCode object within its enclosing scope.
self | <<in>> Cannot be NULL. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_UnsignedLong DDS_TypeCode_member_count | ( | const DDS_TypeCode * | self, | |
DDS_ExceptionCode_t * | ex | |||
) |
Returns the number of members of the type code.
The function member_count can be invoked on structure, union, and enumeration DDS_TypeCode objects.
self | <<in>> Cannot be NULL. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
const char* DDS_TypeCode_member_name | ( | const DDS_TypeCode * | self, | |
DDS_UnsignedLong | index, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Returns the name of a type code member identified by the given index.
The function member_name can be invoked on structure, union, and enumeration DDS_TypeCode objects.
self | <<in>> Cannot be NULL. | |
index | <<in>> Member index in the interval [0,(member count-1)]. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_UnsignedLong DDS_TypeCode_find_member_by_name | ( | const DDS_TypeCode * | self, | |
const char * | name, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Get the index of the member of the given name.
DDS_TypeCode* DDS_TypeCode_member_type | ( | const DDS_TypeCode * | self, | |
DDS_UnsignedLong | index, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Retrieves the DDS_TypeCode object describing the type of the member identified by the given index.
The function member_type can be invoked on structure and union type codes.
self | <<in>> Cannot be NULL. | |
index | <<in>> Member index in the interval [0,(member count-1)]. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_UnsignedLong DDS_TypeCode_member_label_count | ( | const DDS_TypeCode * | self, | |
DDS_UnsignedLong | index, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Returns the number of labels associated to the index-th union member.
The function can be invoked on union DDS_TypeCode objects.
This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.
self | <<in>> Cannot be NULL. | |
index | <<in>> Member index in the interval [0,(member count-1)]. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_Long DDS_TypeCode_member_label | ( | const DDS_TypeCode * | self, | |
DDS_UnsignedLong | member_index, | |||
DDS_UnsignedLong | label_index, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Return the label_index-th label associated to the member_index-th member.
This function has been modified for RTI Data Distribution Service from the CORBA Type code Specification.
Example:
case 1: Label index 0
case 2: Label index 1
short short_member;
The function can be invoked on union DDS_TypeCode objects.
self | <<in>> Cannot be NULL. | |
member_index | <<in>> Member index. | |
label_index | <<in>> Label index. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_Long DDS_TypeCode_member_ordinal | ( | const DDS_TypeCode * | self, | |
DDS_UnsignedLong | index, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Returns the ordinal that corresponds to the index-th enum value.
The function can be invoked on enum DDS_TypeCode objects.
This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.
self | <<in>> Cannot be NULL. | |
index | <<in>> Member index in the interval [0,(member count-1)]. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_Boolean DDS_TypeCode_is_member_key | ( | const DDS_TypeCode * | self, | |
DDS_UnsignedLong | index, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Function that tells if a member is a key or not.
This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.
self | <<in>> Cannot be NULL. | |
index | <<in>> Member index in the interval [0,(member count-1)]. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_Boolean DDS_TypeCode_is_member_required | ( | const DDS_TypeCode * | self, | |
DDS_UnsignedLong | index, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Indicates whether a given member of a type is required to be present in every sample of that type.
Which fields are required depends on the DDS_TCKind of the type. For example, in a type of kind DDS_TK_SPARSE, key fields are required. In DDS_TK_STRUCT and DDS_TK_VALUE types, all fields are required.
DDS_Boolean DDS_TypeCode_is_member_pointer | ( | const DDS_TypeCode * | self, | |
DDS_UnsignedLong | index, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Function that tells if a member is a pointer or not.
The function is_member_pointer can be invoked on union and structs type objects
This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.
self | <<in>> Cannot be NULL. | |
index | <<in>> Index of the member for which type information is begin requested. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_Boolean DDS_TypeCode_is_member_bitfield | ( | const DDS_TypeCode * | self, | |
DDS_UnsignedLong | index, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Function that tells if a member is a bitfield or not.
The function can be invoked on struct type objects.
This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.
self | <<in>> Cannot be NULL. | |
index | <<in>> Member index in the interval [0,(member count-1)]. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_Short DDS_TypeCode_member_bitfield_bits | ( | const DDS_TypeCode * | self, | |
DDS_UnsignedLong | index, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Returns the number of bits of a bitfield member.
The function can be invoked on struct type objects.
This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.
self | <<in>> Cannot be NULL. | |
index | <<in>> Member index in the interval [0,(member count-1)]. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_Visibility DDS_TypeCode_member_visibility | ( | const DDS_TypeCode * | self, | |
DDS_UnsignedLong | index, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Returns the constant that indicates the visibility of the index-th member.
self | <<in>> Cannot be NULL. | |
index | <<in>> Member index in the interval [0,(member count-1)]. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_TypeCode* DDS_TypeCode_discriminator_type | ( | const DDS_TypeCode * | self, | |
DDS_ExceptionCode_t * | ex | |||
) |
Returns the discriminator type code.
The function discriminator_type can be invoked only on union DDS_TypeCode objects.
self | <<in>> Cannot be NULL. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_UnsignedLong DDS_TypeCode_length | ( | const DDS_TypeCode * | self, | |
DDS_ExceptionCode_t * | ex | |||
) |
Returns the number of elements in the type described by this type code.
Length is:
self | <<in>> Cannot be NULL. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_UnsignedLong DDS_TypeCode_array_dimension_count | ( | const DDS_TypeCode * | self, | |
DDS_ExceptionCode_t * | ex | |||
) |
This function returns the number of dimensions of an array type code.
This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.
self | <<in>> Cannot be NULL. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_UnsignedLong DDS_TypeCode_array_dimension | ( | const DDS_TypeCode * | self, | |
DDS_UnsignedLong | index, | |||
DDS_ExceptionCode_t * | ex | |||
) |
This function returns the index-th dimension of an array type code.
This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.
self | <<in>> Cannot be NULL. | |
index | <<in>> Dimension index in the interval [0,(dimensions count-1)]. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_UnsignedLong DDS_TypeCode_element_count | ( | const DDS_TypeCode * | self, | |
DDS_ExceptionCode_t * | ex | |||
) |
The number of elements in an array.
This operation isn't relevant for other kinds of types.
DDS_TypeCode* DDS_TypeCode_content_type | ( | const DDS_TypeCode * | self, | |
DDS_ExceptionCode_t * | ex | |||
) |
Returns the DDS_TypeCode object representing the type for the members of the object described by this DDS_TypeCode object.
For sequences and arrays, it returns the element type. For aliases, it returns the original type.
self | <<in>> Cannot be NULL. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_Boolean DDS_TypeCode_is_alias_pointer | ( | const DDS_TypeCode * | self, | |
DDS_ExceptionCode_t * | ex | |||
) |
Function that tells if an alias is a pointer or not.
This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.
self | <<in>> Cannot be NULL. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_Long DDS_TypeCode_default_index | ( | const DDS_TypeCode * | self, | |
DDS_ExceptionCode_t * | ex | |||
) |
Returns the index of the default member, or -1 if there is no default member.
The function default_index can be invoked only on union DDS_TypeCode objects.
self | <<in>> Cannot be NULL. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_TypeCode* DDS_TypeCode_concrete_base_type | ( | const DDS_TypeCode * | self, | |
DDS_ExceptionCode_t * | ex | |||
) |
Returns the DDS_TypeCode that describes the concrete base type of the value type that this DDS_TypeCode object describes.
self | <<in>> Cannot be NULL. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_ValueModifier DDS_TypeCode_type_modifier | ( | const DDS_TypeCode * | self, | |
DDS_ExceptionCode_t * | ex | |||
) |
Returns a constant indicating the modifier of the value type that this DDS_TypeCode object describes.
self | <<in>> Cannot be NULL. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_UnsignedLong DDS_TypeCode_find_member_by_id | ( | const DDS_TypeCode * | self, | |
DDS_Long | id, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Get the index of the member of the given ID.
DDS_Long DDS_TypeCode_member_id | ( | const DDS_TypeCode * | self, | |
DDS_UnsignedLong | index, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Returns the ID of a sparse type code member identified by the given index.
The function can be invoked on sparse DDS_TypeCode objects.
This function is an RTI Data Distribution Service extension to the CORBA Type Code Specification.
self | <<in>> Cannot be NULL. | |
index | <<in>> Member index in the interval [0,(member count-1)]. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_UnsignedLong DDS_TypeCode_add_member_to_enum | ( | DDS_TypeCode * | self, | |
const char * | name, | |||
DDS_Long | ordinal, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Add a new enumerated constant to this enum DDS_TypeCode.
This method is applicable to DDS_TypeCode objects representing enumerations (DDS_TK_ENUM). To add a field to a structured type, see DDS_TypeCode_add_member_to_enum.
Modifying a DDS_TypeCode -- such as by adding a member -- is important if you are using the Dynamic Data APIs.
self | <<in>> Cannot be NULL. | |
name | <<in>> The name of the new member. This string must be unique within this type and must not be NULL. | |
ordinal | <<in>> The relative order of the new member in this enum or a custom integer value. The value must be unique within the type. | |
ex | <<out>> If this method fails, this argument will contain information about the failure. Possible values include: |
DDS_UnsignedLong DDS_TypeCode_add_member | ( | DDS_TypeCode * | self, | |
const char * | name, | |||
DDS_Long | id, | |||
const DDS_TypeCode * | tc, | |||
DDS_Octet | member_flags, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Add a new member to this DDS_TypeCode.
This method is applicable to DDS_TypeCode objects representing structures (DDS_TK_STRUCT), value types (DDS_TK_VALUE), sparse value types (DDS_TK_SPARSE), and unions (DDS_TK_UNION). To add a constant to an enumeration, see DDS_TypeCode_add_member_to_enum.
Modifying a DDS_TypeCode -- such as by adding a member -- is important if you are using the Dynamic Data APIs.
Here's a simple code example that adds two fields to a data type, one an integer and another a sequence of integers.
// Integer: DDS_TypeCode_add_member( myTypeCode, "myFieldName", // If the type is sparse, specify an ID. Otherwise, use this sentinel: DDS_TYPECODE_MEMBER_ID_INVALID, DDS_TypeCodeFactory_get_primitive_tc(DDS_TheTypeCodeFactory, DDS_TK_LONG), // New field is not a key: DDS_TYPECODE_NONKEY_REQUIRED_MEMBER); // Sequence of 10 or fewer integers: DDS_TypeCode_add_member( myTypeCode, "myFieldName", // If the type is sparse, specify an ID. Otherwise, use this sentinel: DDS_TYPECODE_MEMBER_ID_INVALID, DDS_TypeCodeFactory_create_sequence_tc( DDS_TheTypeCodeFactory, 10, DDS_TypeCodeFactory_get_primitive_tc(DDS_TheTypeCodeFactory, DDS_TK_LONG)), // New field is not a key: DDS_TYPECODE_NONKEY_REQUIRED_MEMBER);
self | <<in>> Cannot be NULL. | |
name | <<in>> The name of the new member. | |
id | <<in>> The ID of the new member. This should only be specified for members of kind DDS_TK_SPARSE and DDS_TK_UNION; otherwise, it should be DDS_TYPECODE_MEMBER_ID_INVALID. | |
tc | <<in>> The type of the new member. You can get or create this DDS_TypeCode with the DDS_TypeCodeFactory. | |
member_flags | <<in>> Indicates whether the member is part of the key and whether it is required. | |
ex | <<out>> If this method fails, this argument will contain information about the failure. Possible values include: |
DDS_UnsignedLong DDS_TypeCode_add_member_ex | ( | DDS_TypeCode * | self, | |
const char * | name, | |||
DDS_Long | id, | |||
const DDS_TypeCode * | tc, | |||
DDS_Octet | member_flags, | |||
DDS_Visibility | visibility, | |||
DDS_Boolean | is_pointer, | |||
DDS_Short | bits, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Add a new member to this DDS_TypeCode.
Modifying a DDS_TypeCode -- such as by adding a member -- is important if you are using the Dynamic Data APIs.
self | <<in>> Cannot be NULL. | |
name | <<in>> The name of the new member. | |
id | <<in>> The ID of the new member. This should only be specified for members of kind DDS_TK_SPARSE and DDS_TK_UNION; otherwise, it should be DDS_TYPECODE_MEMBER_ID_INVALID. | |
tc | <<in>> The type of the new member. You can get or create this DDS_TypeCode with the DDS_TypeCodeFactory. | |
member_flags | <<in>> Indicates whether the member is part of the key and whether it is required. | |
visibility | <<in>> Whether the new member is public or private. Non-public members are only relevant for types of kind DDS_TK_VALUE and DDS_TK_SPARSE. | |
is_pointer | <<in>> Whether the data member, in its deserialized form, should be stored by pointer as opposed to by value. | |
bits | <<in>> The number of bits, if this new member is a bit field, or DDS_TYPECODE_NOT_BITFIELD. | |
ex | <<out>> If this method fails, this argument will contain information about the failure. Possible values include: |
void DDS_TypeCode_print_IDL | ( | const DDS_TypeCode * | self, | |
DDS_UnsignedLong | indent, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Prints a DDS_TypeCode in a pseudo-IDL notation.
DDS_TypeCodeFactory* DDS_TypeCodeFactory_get_instance | ( | ) |
Gets the singleton instance of this class.
DDS_TypeCode* DDS_TypeCodeFactory_clone_tc | ( | DDS_TypeCodeFactory * | self, | |
const DDS_TypeCode * | tc, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Creates and returns a copy of the input DDS_TypeCode.
self | <<in>> Cannot be NULL. | |
tc | <<in>> Type code that will be copied. Cannot be NULL. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
void DDS_TypeCodeFactory_delete_tc | ( | DDS_TypeCodeFactory * | self, | |
DDS_TypeCode * | tc, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Deletes the input DDS_TypeCode.
All the type codes created through the DDS_TypeCodeFactory must be deleted using this function.
const DDS_TypeCode* DDS_TypeCodeFactory_get_primitive_tc | ( | DDS_TypeCodeFactory * | self, | |
DDS_TCKind | tc_kind | |||
) |
Get the DDS_TypeCode for a primitive type (integers, floating point values, etc.) identified by the given DDS_TCKind.
This method is equivalent to, and replaces, the DDS_g_tc_*
constants.
DDS_TypeCode* DDS_TypeCodeFactory_create_struct_tc | ( | DDS_TypeCodeFactory * | self, | |
const char * | name, | |||
const struct DDS_StructMemberSeq * | members, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Constructs a DDS_TK_STRUCT DDS_TypeCode.
self | <<in>> Cannot be NULL. | |
name | <<in>> Name of the struct type. Cannot be NULL. | |
members | <<in>> Initial members of the structure. This list may be empty (that is, FooSeq_get_length may return zero). If the list is not empty, the elements must describe valid struct members. (For example, the names must be unique within the type.) | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_TypeCode* DDS_TypeCodeFactory_create_value_tc | ( | DDS_TypeCodeFactory * | self, | |
const char * | name, | |||
DDS_ValueModifier | type_modifier, | |||
const DDS_TypeCode * | concrete_base, | |||
const struct DDS_ValueMemberSeq * | members, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Constructs a DDS_TK_VALUE DDS_TypeCode.
self | <<in>> Cannot be NULL. | |
name | <<in>> Name of the value type. Cannot be NULL. | |
type_modifier | <<in>> One of the value type modifier constants: DDS_VM_NONE, DDS_VM_CUSTOM, DDS_VM_ABSTRACT or DDS_VM_TRUNCATABLE. | |
concrete_base | <<in>> DDS_TypeCode object describing the concrete valuetype base. It may be NULL if the valuetype does not have a concrete base. | |
members | <<in>> Initial members of the value type. This list may be empty. If the list is not empty, the elements must describe valid value type members. (For example, the names must be unique within the type.) | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_TypeCode* DDS_TypeCodeFactory_create_union_tc | ( | DDS_TypeCodeFactory * | self, | |
const char * | name, | |||
const DDS_TypeCode * | discriminator_type, | |||
DDS_Long | default_index, | |||
const struct DDS_UnionMemberSeq * | members, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Constructs a DDS_TK_UNION DDS_TypeCode.
self | <<in>> Cannot be NULL. | |
name | <<in>> Name of the union type. Cannot be NULL. | |
discriminator_type | <<in>> Discriminator Type Code. Cannot be NULL. | |
default_index | <<in>> Index of the default member, or -1 if there is no default member. | |
members | <<in>> Initial members of the union. This list may be empty. If the list is not empty, the elements must describe valid struct members. (For example, the names must be unique within the type.) | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_TypeCode* DDS_TypeCodeFactory_create_enum_tc | ( | DDS_TypeCodeFactory * | self, | |
const char * | name, | |||
const struct DDS_EnumMemberSeq * | members, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Constructs a DDS_TK_ENUM DDS_TypeCode.
self | <<in>> Cannot be NULL. | |
name | <<in>> Name of the enum type. Cannot be NULL. | |
members | <<in>> Initial members of the enumeration. All members must have non-NULL names, and both names and ordinal values must be unique within the type. Note that it is also possible to add members later with DDS_TypeCode_add_member_to_enum. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_TypeCode* DDS_TypeCodeFactory_create_alias_tc | ( | DDS_TypeCodeFactory * | self, | |
const char * | name, | |||
const DDS_TypeCode * | original_type, | |||
DDS_Boolean | is_pointer, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Constructs a DDS_TK_ALIAS (typedef) DDS_TypeCode.
self | <<in>> Cannot be NULL. | |
name | <<in>> Name of the alias. Cannot be NULL. | |
original_type | <<in>> Aliased type code. Cannot be NULL. | |
is_pointer | <<in>> Indicates if the alias is a pointer to the aliased type code. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_TypeCode* DDS_TypeCodeFactory_create_string_tc | ( | DDS_TypeCodeFactory * | self, | |
DDS_UnsignedLong | bound, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Constructs a DDS_TK_STRING DDS_TypeCode.
self | <<in>> Cannot be NULL. | |
bound | <<in>> Maximum length of the string. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_TypeCode* DDS_TypeCodeFactory_create_wstring_tc | ( | DDS_TypeCodeFactory * | self, | |
DDS_UnsignedLong | bound, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Constructs a DDS_TK_WSTRING DDS_TypeCode.
self | <<in>> Cannot be NULL. | |
bound | <<in>> Maximum length of the wide string. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_TypeCode* DDS_TypeCodeFactory_create_sequence_tc | ( | DDS_TypeCodeFactory * | self, | |
DDS_UnsignedLong | bound, | |||
const DDS_TypeCode * | element_type, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Constructs a DDS_TK_SEQUENCE DDS_TypeCode.
self | <<in>> Cannot be NULL. | |
bound | <<in>> The bound for the sequence (> 0). | |
element_type | <<in>> DDS_TypeCode object describing the sequence elements. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_TypeCode* DDS_TypeCodeFactory_create_array_tc | ( | DDS_TypeCodeFactory * | self, | |
const struct DDS_UnsignedLongSeq * | dimensions, | |||
const DDS_TypeCode * | element_type, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Constructs a DDS_TK_ARRAY DDS_TypeCode.
self | <<in>> Cannot be NULL. | |
dimensions | <<in>> Dimensions of the array. Each dimension has to be greater than 0. | |
element_type | <<in>> DDS_TypeCode describing the array elements. Cannot be NULL. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
DDS_TypeCode* DDS_TypeCodeFactory_create_sparse_tc | ( | DDS_TypeCodeFactory * | self, | |
const char * | name, | |||
DDS_ValueModifier | type_modifier, | |||
const DDS_TypeCode * | concrete_base, | |||
DDS_ExceptionCode_t * | ex | |||
) |
Constructs a DDS_TK_SPARSE DDS_TypeCode.
A sparse value type is similar to other value types but with one major difference: not all members need to be present in every sample.
It is not possible to generate code for sparse value types; they must be created at runtime using these APIs. You will interact with samples of sparse types using the Dynamic Data APIs.
self | <<in>> Cannot be NULL. | |
name | <<in>> Name of the value type. Cannot be NULL. | |
type_modifier | <<in>> One of the value type modifier constants: DDS_VM_NONE, DDS_VM_CUSTOM, DDS_VM_ABSTRACT or DDS_VM_TRUNCATABLE. | |
concrete_base | <<in>> DDS_TypeCode object describing the concrete valuetype base. It may be NULL if the valuetype does not have a concrete base. | |
ex | <<out>> Parameter for error indications. The values that can take are: |
Basic NULL type.
For new code, DDS_TypeCodeFactory_get_primitive_tc is preferred to using this global variable.
Basic 16-bit signed integer 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 single-byte character 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.