CDX_DynamicType is an object that enhances CoreDX DDS with the facilities to process dynamic data types (in other words, data types that are not defined at compile time). More...
Related Functions | |
(Note that these are not member functions.) | |
DDS_TypeCodeKind | CDX_DynamicType_get_type (CDX_DynamicType t) |
Provides access to the 'type' of the DynamicType object. Applicable to any DynamicType. More... | |
unsigned char | CDX_DynamicType_get_octet (CDX_DynamicType t) |
Provides access to data held in an OCTET DynamicType object. More... | |
unsigned char | CDX_DynamicType_get_boolean (CDX_DynamicType t) |
Provides access to data held in an BOOLEAN DynamicType object. More... | |
char | CDX_DynamicType_get_char (CDX_DynamicType t) |
Provides access to data held in an CHAR DynamicType object. More... | |
int16_t | CDX_DynamicType_get_short (CDX_DynamicType t) |
Provides access to data held in an SHORT DynamicType object. More... | |
uint16_t | CDX_DynamicType_get_ushort (CDX_DynamicType t) |
Provides access to data held in an UNSIGNED SHORT DynamicType object. More... | |
int32_t | CDX_DynamicType_get_long (CDX_DynamicType t) |
Provides access to data held in an LONG DynamicType object. More... | |
uint32_t | CDX_DynamicType_get_ulong (CDX_DynamicType t) |
Provides access to data held in an UNSIGNED LONG DynamicType object. More... | |
int64_t | CDX_DynamicType_get_longlong (CDX_DynamicType t) |
Provides access to data held in an LONG LONG DynamicType object. More... | |
uint64_t | CDX_DynamicType_get_ulonglong (CDX_DynamicType t) |
Provides access to data held in an UNSIGNED LONG LONG DynamicType object. More... | |
float | CDX_DynamicType_get_float (CDX_DynamicType t) |
Provides access to data held in an FLOAT DynamicType object. More... | |
double | CDX_DynamicType_get_double (CDX_DynamicType t) |
Provides access to data held in an DOUBLE DynamicType object. More... | |
int32_t | CDX_DynamicType_enum_get_size (CDX_DynamicType t) |
Gets the 'size' of this ENUM type in bytes (either 4 bytes or 2 bytes). More... | |
int32_t | CDX_DynamicType_enum_get_num_constants (CDX_DynamicType t) |
Provides access to the number of constants defined for this ENUM type. More... | |
void | CDX_DynamicType_EnumConstant_delete (CDX_DynamicType_EnumConstant_t *ec) |
Provides method to reclaim memory held by a CDX_DynamicType_EnumConstant_t. Use this to reclaim the memory returned by one of the following routines: CDX_DynamicType_enum_get_constant() CDX_DynamicType_enum_get_constant_by_name() CDX_DynamicType_enum_get_constant_by_value() | |
CDX_DynamicType_EnumConstant_t * | CDX_DynamicType_enum_get_constant (CDX_DynamicType t, int32_t index) |
Provides access to a specific constant (name,value pair) within the ENUM type. More... | |
CDX_DynamicType_EnumConstant_t * | CDX_DynamicType_enum_get_constant_by_name (CDX_DynamicType t, const char *name) |
Provides access EnumConstant associated with an 'name' in the provided ENUM. More... | |
CDX_DynamicType_EnumConstant_t * | CDX_DynamicType_enum_get_constant_by_value (CDX_DynamicType t, uint32_t val) |
Provides access to the EnumConstant associated with a 'value' in the provided ENUM. More... | |
uint32_t | CDX_DynamicType_enum_get_value (CDX_DynamicType t) |
Provides access to the 'value' of an instance of type ENUM. | |
int32_t | CDX_DynamicType_bitset_get_size (CDX_DynamicType t) |
Gets the 'size' of this BITSET type in bytes (either 8, 4, 2, or 1 bytes) More... | |
uint64_t | CDX_DynamicType_bitset_get_value (CDX_DynamicType t) |
Provides access to the 'value' of an instance of type BITSET. | |
int32_t | CDX_DynamicType_bitset_get_num_flags (CDX_DynamicType t) |
Provides access to the number of flags defined for this BITSET type. More... | |
void | CDX_DynamicType_BitsetFlag_delete (CDX_DynamicType_BitsetFlag_t *bf) |
Provides method to reclaim memory held by a CDX_DynamicType_BitsetFlag_t. Use this to reclaim the memory returned by one of the following routines: CDX_DynamicType_bitset_get_flag() CDX_DynamicType_bitset_get_flag_by_name() | |
CDX_DynamicType_BitsetFlag_t * | CDX_DynamicType_bitset_get_flag (CDX_DynamicType t, int32_t index) |
Provides access to a specific flag (name,value pair) within the BITSET type. More... | |
CDX_DynamicType_BitsetFlag_t * | CDX_DynamicType_bitset_get_flag_by_name (CDX_DynamicType t, const char *name) |
Provides access BitsetFlag associated with an 'name' in the provided BITSET. More... | |
const char * | CDX_DynamicType_get_string (CDX_DynamicType t) |
Provides access to data held in an STRING DynamicType object. More... | |
uint32_t | CDX_DynamicType_get_max_length (CDX_DynamicType t) |
Provides access to the maximum length of a DynamicType object. More... | |
uint32_t | CDX_DynamicType_get_length (CDX_DynamicType t) |
Provides access to the length of data held in a DynamicType object. More... | |
CDX_DynamicType | CDX_DynamicType_get_element_type (CDX_DynamicType t) |
Provides access to the type of the of data held in an ARRAY or SEQUENCE DynamicType object. More... | |
CDX_DynamicType | CDX_DynamicType_get_element (CDX_DynamicType t, uint32_t n) |
Provides access to the a data element held in an ARRAY or SEQUENCE DynamicType object. More... | |
uint32_t | CDX_DynamicType_get_num_fields (CDX_DynamicType t) |
Provides access to the number of fields held by a STRUCT or UNION DynamicType object. More... | |
CDX_DynamicType | CDX_DynamicType_get_field (CDX_DynamicType t, uint32_t n) |
Provides access to a field held by a STRUCT or UNION DynamicType object. More... | |
const char * | CDX_DynamicType_get_field_name (CDX_DynamicType t, uint32_t n) |
Provides access to the name of a field held by a STRUCT or UNION DynamicType object. More... | |
unsigned char | CDX_DynamicType_get_field_key (CDX_DynamicType t, uint32_t n) |
Provides access to the 'key' indication for a field held by a STRUCT DynamicType object. More... | |
CDX_DynamicType | CDX_DynamicType_get_discriminator (CDX_DynamicType t) |
Provides access to the 'discriminator' type of a UNION DynamicType object. More... | |
int32_t | CDX_DynamicType_get_default_field (CDX_DynamicType t) |
Provides access to the 'default' field of a UNION DynamicType object. More... | |
uint32_t | CDX_DynamicType_get_field_num_labels (CDX_DynamicType t, uint32_t field) |
Provides access to the number of labels assigned to a field in the UNION DynamicType object. More... | |
int32_t | CDX_DynamicType_get_field_label (CDX_DynamicType t, uint32_t field, uint32_t label_idx) |
Provides access to a label value assigned to a field in the UNION DynamicType object. More... | |
CDX_DynamicType | CDX_DynamicType_get_selected_field (CDX_DynamicType t) |
Provides access to the selected field of a UNION DynamicType object. More... | |
CDX_DynamicType | CDX_DynamicType_alloc (DDS_TypeCodeKind type_code) |
Allocates and returns a DynamicType configured to hold the specified 'type_code' type. More... | |
CDX_DynamicType | CDX_DynamicType_alloc_basic (DDS_TypeCodeKind type_code) |
Allocates and returns a DynamicType configured to hold the specified 'type_code' basic type. More... | |
CDX_DynamicType | CDX_DynamicType_alloc_enum () |
Allocates and returns an ENUM DynamicType. More... | |
CDX_DynamicType | CDX_DynamicType_alloc_bitset () |
Allocates and returns a BITSET DynamicType. More... | |
CDX_DynamicType | CDX_DynamicType_alloc_string () |
Allocates and returns a STRING DynamicType. More... | |
CDX_DynamicType | CDX_DynamicType_alloc_array () |
Allocates and returns an ARRAY DynamicType. More... | |
CDX_DynamicType | CDX_DynamicType_alloc_sequence () |
Allocates and returns a SEQUENCE DynamicType. More... | |
CDX_DynamicType | CDX_DynamicType_alloc_struct () |
Allocates and returns a STRUCT DynamicType. More... | |
CDX_DynamicType | CDX_DynamicType_alloc_union () |
Allocates and returns a UNION DynamicType. More... | |
void | CDX_DynamicType_free (CDX_DynamicType t) |
Reclaims all memory used by an allocated DynamicType object. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_octet (CDX_DynamicType t, unsigned char c) |
Assigns a value to the provided OCTET DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_boolean (CDX_DynamicType t, unsigned char c) |
Assigns a value to the provided BOOLEAN DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_char (CDX_DynamicType t, char c) |
Assigns a value to the provided CHAR DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_short (CDX_DynamicType t, short c) |
Assigns a value to the provided SHORT DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_ushort (CDX_DynamicType t, unsigned short c) |
Assigns a value to the provided USHORT DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_long (CDX_DynamicType t, long c) |
Assigns a value to the provided LONG DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_ulong (CDX_DynamicType t, unsigned long c) |
Assigns a value to the provided ULONG DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_longlong (CDX_DynamicType t, int64_t c) |
Assigns a value to the provided LONGLONG DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_ulonglong (CDX_DynamicType t, uint64_t c) |
Assigns a value to the provided ULONGLONG DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_float (CDX_DynamicType t, float c) |
Assigns a value to the provided FLOAT DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_double (CDX_DynamicType t, double c) |
Assigns a value to the provided DOUBLE DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_enum_set_size (CDX_DynamicType t, int32_t size) |
Sets the 'size' of this ENUM type in bytes (either 4 bytes or 2 bytes). More... | |
DDS_ReturnCode_t | CDX_DynamicType_enum_set_num_constants (CDX_DynamicType t, int32_t num) |
Sets the number of constants defined by this ENUM type. More... | |
DDS_ReturnCode_t | CDX_DynamicType_enum_set_constant (CDX_DynamicType t, int32_t n, const char *name, uint32_t val) |
Assigns a 'name' to a 'value' in the provided ENUM DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_enum_set_value (CDX_DynamicType t, uint32_t val) |
Assigns a value to this instance of an ENUM. More... | |
DDS_ReturnCode_t | CDX_DynamicType_bitset_set_size (CDX_DynamicType t, int32_t size) |
Sets the 'size' of this BITSET type in bytes (either 8, 4, 2, or 1 bytes). More... | |
DDS_ReturnCode_t | CDX_DynamicType_bitset_set_num_flags (CDX_DynamicType t, int32_t num) |
Sets the number of flags defined by this BITSET type. More... | |
DDS_ReturnCode_t | CDX_DynamicType_bitset_set_flag (CDX_DynamicType t, int32_t n, const char *name, uint64_t val) |
Assigns a 'name' to a 'value' in the provided BITSET DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_bitset_set_value (CDX_DynamicType t, uint64_t val) |
Assigns a value to this instance of an BITSET. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_string (CDX_DynamicType t, const char *c) |
Assigns a value to the provided STRING DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_max_length (CDX_DynamicType t, uint32_t n) |
Assigns a 'max_length' value to the provided STRING, ARRAY, or SEQUENCE DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_length (CDX_DynamicType t, uint32_t n) |
Assigns a 'length' value to the provided ARRAY or SEQUENCE DynamicType. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_element_type (CDX_DynamicType t, CDX_DynamicType e) |
Defines the element type of an ARRAY or SEQUENCE. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_element (CDX_DynamicType t, uint32_t n, CDX_DynamicType e) |
Assigns a value to an element of an ARRAY or SEQUENCE. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_num_fields (CDX_DynamicType t, uint32_t n) |
Defines the number of fields held by a STRUCT or UNION DynamicType object. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_field (CDX_DynamicType t, uint32_t n, const char *field_name, CDX_DynamicType e, unsigned char key) |
Assigns a value to a field of a STRUCT or UNION DynamicType object. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_discriminator (CDX_DynamicType t, CDX_DynamicType d) |
Defines the type and value of the UNION discriminator. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_default_field (CDX_DynamicType t, int field) |
Defines the index of the default field within the UNION. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_field_num_labels (CDX_DynamicType t, uint32_t field, uint32_t n) |
Defines the number of labels associated with a field within the UNION. More... | |
DDS_ReturnCode_t | CDX_DynamicType_set_field_label (CDX_DynamicType t, uint32_t field, uint32_t label, int32_t val) |
Assigns a label to the specified field within the UNION. More... | |
CDX_DynamicType is an object that enhances CoreDX DDS with the facilities to process dynamic data types (in other words, data types that are not defined at compile time).
The ability to process dynamic types adds significant flexibility to CoreDX DDS. The type information can be discovered at run-time, constructed programmatically, or based on existing type information. The DynamicType support allows the application to process a data type without compiling and linking type specific source code. For an application that must support a large number of data types, this can offer a savings in code size.
|
related |
Allocates and returns a DynamicType configured to hold the specified 'type_code' type.
This can be used to create a DynamicType for any of the the defined data types.
|
related |
Allocates and returns an ARRAY DynamicType.
The type of the array elements must be specified by calling CDX_DynamicType_set_element_type(). The size of the array must be specified by calling CDX_DynamicType_set_max_length(). Before adding data to the array, memory for the elements must be allocated by calling CDX_DynamicType_set_length(). Data can be added to the array by calling CDX_DynamicType_set_element().
|
related |
Allocates and returns a DynamicType configured to hold the specified 'type_code' basic type.
This can be used to create a DynamicType for the following data types: SHORT, LONG, LONGLONG, USHORT, ULONG, ULONGLONG, FLOAT, DOUBLE, BOOLEAN, CHAR, or OCTET.
|
related |
Allocates and returns a BITSET DynamicType.
By default the bitset has zero flags defined (that is, [name,value] pairs). CDX_DynamicType_bitset_set_flag() is used to add (name, value) pairs to the BITSET. CDX_DynamicType_bitset_get_flag_by_name() is useful for querying the 'value' associated with a specified 'name'. Use CDX_DynamicType_bitset_set_value() to set the value of a specific BITSET instance. This creates an BITSET with a default BitBound of 32 bits (4 bytes).
|
related |
Allocates and returns an ENUM DynamicType.
By default the enum has zero (name,value) pairs. CDX_DynamicType_enum_set_constant() is used to add (name, value) pairs to the ENUM. CDX_DynamicType_enum_get_constant_by_name() is useful for querying the 'value' associated with a specified 'name'. CDX_DynamicType_enum_get_constant_by_value() is useful for querying the 'name' associated with a specified 'value'. Use CDX_DynamicType_enum_set_value() to set the value of a specific ENUM instance. This creates an enum with a default size of 32 bits (4 bytes). Use CDX_DynamicType_set_enum_size() to change the 'size' of this ENUM type.
|
related |
Allocates and returns a SEQUENCE DynamicType.
The type of the sequence elements must be specified by calling CDX_DynamicType_set_element_type(). The size of the sequence must be specified by by calling CDX_DynamicType_set_max_length(). Before adding data to the sequence, memory for the elements must be allocated by calling CDX_DynamicType_set_length(). Data can be added to the sequence by calling CDX_DynamicType_set_element().
|
related |
Allocates and returns a STRING DynamicType.
By default the string is unbounded. The length of the string may be bounded (if desired) by calling CDX_DynamicType_set_max_length().
|
related |
Allocates and returns a STRUCT DynamicType.
The CDX_DynamicType_set_num_fields() must be called to define the number of fields in the structure. For each field, CDX_DynamicType_set_field() must be used to define the type of the field.
|
related |
Allocates and returns a UNION DynamicType.
The CDX_DynamicType_set_discriminator() function must be used to define the discriminator that is ued to select one of the union fields. The CDX_DynamicType_set_num_fields() must be called to define the number of fields in the union. For each field:
The CDX_DynamicType_set_default_field() function is used to (optionally) specify a field that is used as a 'default:' case.
|
related |
Provides access to a specific flag (name,value pair) within the BITSET type.
An | allocated BitsetFlag structure |
NULL | if the 'name' is not found. |
|
related |
Provides access BitsetFlag associated with an 'name' in the provided BITSET.
An | allocated BitsetFlag structure |
NULL | if the 'name' is not found. |
|
related |
Provides access to the number of flags defined for this BITSET type.
-1 | if the DynamicType is not of BITSET type. |
number | of flags defined in this BITSET. |
|
related |
Gets the 'size' of this BITSET type in bytes (either 8, 4, 2, or 1 bytes)
-1 | if the DynamicType is not of type BITSET. |
number | of bytes used to represent this BITSET type. |
|
related |
Assigns a 'name' to a 'value' in the provided BITSET DynamicType.
BAD_PARAMETER | if 't' is not of type BITSET. |
BAD_PARAMETER | if a flag with 'name' already exists with a different 'val' |
OUT_OF_RESOURCES | if unable to add new flag |
OK | upon success. |
|
related |
Sets the number of flags defined by this BITSET type.
BAD_PARAMETER | if 't' is not of type BITSET. |
OUT_OF_RESOURCES | if unable to configure requested number of flags. |
OK | upon success. |
|
related |
Sets the 'size' of this BITSET type in bytes (either 8, 4, 2, or 1 bytes).
BAD_PARAMETER | if 't' is not of type BITSET, or size is not one of 8, 4, 2, or 1. |
OK | upon success. |
|
related |
Assigns a value to this instance of an BITSET.
BAD_PARAMETER | if 't' is not of type BITSET, or if 'val' requires more bits than supported by this BITSET. |
OK | upon success. |
|
related |
Provides access to a specific constant (name,value pair) within the ENUM type.
An | allocated EnumConstant structure |
NULL | if the 'name' is not found. |
|
related |
Provides access EnumConstant associated with an 'name' in the provided ENUM.
An | allocated EnumConstant structure |
NULL | if the 'name' is not found. |
|
related |
Provides access to the EnumConstant associated with a 'value' in the provided ENUM.
An | allocated EnumConstant structure |
NULL | if the 'value' is not found. |
|
related |
Provides access to the number of constants defined for this ENUM type.
-1 | if the DynamicType is not of ENUM type. |
number | of constants defined in this ENUM. |
|
related |
Gets the 'size' of this ENUM type in bytes (either 4 bytes or 2 bytes).
-1 | if the DynamicType is not of type ENUM. |
number | of bytes used to represent this ENUM type. |
|
related |
Assigns a 'name' to a 'value' in the provided ENUM DynamicType.
BAD_PARAMETER | if 't' is not of type ENUM. |
BAD_PARAMETER | if a constant with 'name' already exists with a different 'val' |
BAD_PARAMETER | if a constant with 'val' already exists with a different 'name' |
OUT_OF_RESOURCES | if unable to add new value |
OK | upon success. |
|
related |
Sets the number of constants defined by this ENUM type.
BAD_PARAMETER | if 't' is not of type ENUM. |
OUT_OF_RESOURCES | if unable to configure requested number of constants |
OK | upon success. |
|
related |
Sets the 'size' of this ENUM type in bytes (either 4 bytes or 2 bytes).
BAD_PARAMETER | if 't' is not of type ENUM, or size is not 4 or 2. |
OK | upon success. |
|
related |
Assigns a value to this instance of an ENUM.
BAD_PARAMETER | if 't' is not of type ENUM. |
OK | upon success. |
|
related |
Reclaims all memory used by an allocated DynamicType object.
Call this routine to free memory associated with a DynamicType object created by one of the CDX_DynamicType_alloc_xxx() routines or by CDX_TypeDefinition_create_dynamictype(). This routines frees the type information as well as any data values contained in the DynamicType object.
|
related |
Provides access to data held in an BOOLEAN DynamicType object.
unsigned_char | 0 indicates FALSE, non-zero indicates TRUE. |
|
related |
Provides access to data held in an CHAR DynamicType object.
char | the data value held by 't'. |
|
related |
Provides access to the 'default' field of a UNION DynamicType object.
This is applicable only for a UNION DynamicType object. This returns the index of the 'default' field in the UNION, if there is no field marked with a 'default:' case label.
int32_t | the index of the 'default' field. -1 if there is no defined 'default' case. |
|
related |
Provides access to the 'discriminator' type of a UNION DynamicType object.
This is applicable only for a UNION DynamicType object. This returns the DynamicType that serves as a discriminator for the UNION data structure.
CDX_DynamicType | the discriminator data. |
|
related |
Provides access to data held in an DOUBLE DynamicType object.
double | the data value held by 't'. |
|
related |
Provides access to the a data element held in an ARRAY or SEQUENCE DynamicType object.
This is applicable for a SEQUENCE or ARRAY DynamicType object. For a SEQUENCE, this returns the element 'n' of the sequence. For an ARRAY, this returns the element 'n' of the array elements. Elements are indexed starting at 0.
uint32_t | the data element held in the SEQUENCE or ARRAY 't' at index 'n'. |
|
related |
Provides access to the type of the of data held in an ARRAY or SEQUENCE DynamicType object.
This is applicable for a SEQUENCE or ARRAY DynamicType object. For a SEQUENCE, this returns the 'type' of the sequence elements. For an ARRAY, this returns the 'type' of the array elements.
uint32_t | the 'type' of the data value held in the SEQUENCE or ARRAY 't'. |
|
related |
Provides access to a field held by a STRUCT or UNION DynamicType object.
This is applicable for a STRUCT or UNION DynamicType object. For a STRUCT or UNION, this returns a field held in the data structure.
CDX_DynamicType | the number of data fields in the STRUCT or UNION 't'. |
|
related |
Provides access to the 'key' indication for a field held by a STRUCT DynamicType object.
This is applicable for a STRUCT DynamicType object. For a STRUCT, this returns an indication that field 'n' is (or is not) a key in the data structure.
unsigned_char | if non-zero, the field at index 'n' is a key field. if zero, the field at index 'n' is not a key field. |
|
related |
Provides access to a label value assigned to a field in the UNION DynamicType object.
This is applicable only for a UNION DynamicType object. This the value of the indicated label associated with a particular field in the UNION. [The 'default:' label is not included in these values - as a result, it is possible for one field to have 'zero' labels.]
int32_t | : the value of the requested label identified by label_idx, of field identified by index 'field'. |
|
related |
Provides access to the name of a field held by a STRUCT or UNION DynamicType object.
This is applicable for a STRUCT or UNION DynamicType object. For a STRUCT or UNION, this returns the name of a field held in the data structure.
const_char_* | field name of field 'n' in STRUCT or UNION 't'. |
|
related |
Provides access to the number of labels assigned to a field in the UNION DynamicType object.
This is applicable only for a UNION DynamicType object. This returns the count of the number of labels used to select a particular field in the UNION. The 'default:' label is not included in this count.
int32_t | the number of labels assigned to field identified by index 'field'. |
|
related |
Provides access to data held in an FLOAT DynamicType object.
float | the data value held by 't'. |
|
related |
Provides access to the length of data held in a DynamicType object.
This is applicable for a SEQUENCE or ARRAY DynamicType object. For a SEQUENCE, this returns the 'length' of the sequence. For an ARRAY, this returns the size of the array.
uint32_t | the length of the data value held by 't'. |
|
related |
Provides access to data held in an LONG DynamicType object.
int32_t | the data value held by 't'. |
|
related |
Provides access to data held in an LONG LONG DynamicType object.
int64_t | the data value held by 't'. |
|
related |
Provides access to the maximum length of a DynamicType object.
This is applicable for a STRING, SEQUENCE, or ARRAY DynamicType object. For a STRING, this returns the 'fixed length' of the string, or zero if the string is not fixed length. For a SEQUENCE, this returns the 'fixed length' of the sequence, or zero if the sequence is unbounded. For an ARRAY, this returns the size of the array.
int32_t | the maximum length of the data value held by 't'. |
|
related |
Provides access to the number of fields held by a STRUCT or UNION DynamicType object.
This is applicable for a STRUCT or UNION DynamicType object. For a STRUCT, this returns the number of fields held in the structure. For a UNION, this returns the number of fields contained by the UNION where a field is selectable by one or more case labels.
uint32_t | the number of data fields in the STRUCT or UNION 't'. |
|
related |
Provides access to data held in an OCTET DynamicType object.
unsigned_char | the data value held by 't'. |
|
related |
Provides access to the selected field of a UNION DynamicType object.
This is useful to access the field that is selected by the current value of the union's 'discriminator'.
|
related |
Provides access to data held in an SHORT DynamicType object.
int16_t | the data value held by 't'. |
|
related |
Provides access to data held in an STRING DynamicType object.
const_char_* | the data value held by 't'. |
|
related |
Provides access to the 'type' of the DynamicType object. Applicable to any DynamicType.
DDS_TypeCodeKind | the type of object 't'. |
|
related |
Provides access to data held in an UNSIGNED LONG DynamicType object.
uint32_t | the data value held by 't'. |
|
related |
Provides access to data held in an UNSIGNED LONG LONG DynamicType object.
uint64_t | the data value held by 't'. |
|
related |
Provides access to data held in an UNSIGNED SHORT DynamicType object.
uint16_t | the data value held by 't'. |
|
related |
Assigns a value to the provided BOOLEAN DynamicType.
BAD_PARAMETER | if 't' is not of type BOOLEAN. |
OK | upon success. |
|
related |
Assigns a value to the provided CHAR DynamicType.
BAD_PARAMETER | if 't' is not of type CHAR. |
OK | upon success. |
|
related |
Defines the index of the default field within the UNION.
The active field in the UNION is selected by considering the value of the discriminator and the values of the field labels. Any value of the discriminator not explicitly listed in the labels will select the default field. The default field may have other labels assigned to it, or it may have zero labels.
BAD_PARAMETER | if 't' is not of type UNION. |
OK | upon success. |
|
related |
Defines the type and value of the UNION discriminator.
The discriminator is used to identify which one of the UNION fields is active. Only one field within the UNION is active at a given time. The active field is selected by considering the value of the discriminator and the values of the field labels. Each field can have a set of labels containing zero or more unique discriminator values. Field labels are defined with the CDX_DynamicType_set_field_num_labels() and CDX_DynamicType_set_field_label() functions.
BAD_PARAMETER | if 't' is not of type UNION. |
OK | upon success. |
|
related |
Assigns a value to the provided DOUBLE DynamicType.
BAD_PARAMETER | if 't' is not of type DOUBLE. |
OK | upon success. |
|
related |
Assigns a value to an element of an ARRAY or SEQUENCE.
BAD_PARAMETER | if 't' is not of type ARRAY or SEQUENCE or if 'n' is beyond the specified length of the ARRAY or SEQUENCE. |
OK | upon success. |
|
related |
Defines the element type of an ARRAY or SEQUENCE.
BAD_PARAMETER | if 't' is not of type ARRAY or SEQUENCE. |
OK | upon success. |
|
related |
Assigns a value to a field of a STRUCT or UNION DynamicType object.
The 'nth' field of the struct or union is assigned the provided field_name, type e. The key parameter is used only for STRUCT types. If key is non-zero, then the field is added to the 'key set' for this data type. This routine makes a copy of the 'field_name' argument.
BAD_PARAMETER | if 't' is not of type STRUCT or UNION. |
OUT_OF_MEMORY | if memory allocation (to hold a copy of field_name) fails. |
OK | upon success. |
|
related |
Assigns a label to the specified field within the UNION.
BAD_PARAMETER | if 't' is not of type UNION or if field does not specify a valid field index, or if label does not specify a valid label index for the field. |
OUT_OF_RESOURCES | if memory allocation fails. |
OK | upon success. |
|
related |
Defines the number of labels associated with a field within the UNION.
Each field in a UNION has zero or more labels associated. The active field in the UNION is selected by considering the value of the discriminator and the values of the field labels. A field is selected when the value of the discriminator matches the value of one of its labels. Any value of the discriminator not explicitly listed in the all of the labels will select the default field. [The default field may have other labels assigned to it, or it may have zero labels.]
BAD_PARAMETER | if 't' is not of type UNION. |
OUT_OF_RESOURCES | if memory allocation fails. |
OK | upon success. |
|
related |
Assigns a value to the provided FLOAT DynamicType.
BAD_PARAMETER | if 't' is not of type FLOAT. |
OK | upon success. |
|
related |
Assigns a 'length' value to the provided ARRAY or SEQUENCE DynamicType.
This defines the actual size of the array or sequence data. This will allocate memory to hold 'n' entries. The entries are not initialized, and must be initialized by calling CDX_DynamicType_set_element() 'n' times.
BAD_PARAMETER | if 't' is not of type ARRAY or SEQUENCE; OUT_OF_RESOURCES if memory allocation fails. |
OK | upon success. |
|
related |
Assigns a value to the provided LONG DynamicType.
BAD_PARAMETER | if 't' is not of type LONG. |
OK | upon success. |
|
related |
Assigns a value to the provided LONGLONG DynamicType.
BAD_PARAMETER | if 't' is not of type LONGLONG. |
OK | upon success. |
|
related |
Assigns a 'max_length' value to the provided STRING, ARRAY, or SEQUENCE DynamicType.
For STRINGS and SEQUENCES, this defines the bound on the string length or sequence length. For arrays, this defines the size of the array.
BAD_PARAMETER | if 't' is not of type STRING, ARRAY, or SEQUENCE. |
OK | upon success. |
|
related |
Defines the number of fields held by a STRUCT or UNION DynamicType object.
BAD_PARAMETER | if 't' is not of type STRUCT or UNION. |
OK | upon success. |
|
related |
Assigns a value to the provided OCTET DynamicType.
BAD_PARAMETER | if 't' is not of type OCTET. |
OK | upon success. |
|
related |
Assigns a value to the provided SHORT DynamicType.
BAD_PARAMETER | if 't' is not of type SHORT. |
OK | upon success. |
|
related |
Assigns a value to the provided STRING DynamicType.
This routine will make a copy of the provided string data. If the STRING has a defined 'max_length', then the copied data will be truncated to 'max_length' characters. [A 0x00 (nul) character will be added after the truncated data.]
DDS_ReturnCode_t | BAD_PARAMETER if 't' is not of type STRING. |
OUT_OF_RESOURCES | if memory allocation fails. |
OK | upon success. |
|
related |
Assigns a value to the provided ULONG DynamicType.
BAD_PARAMETER | if 't' is not of type ULONG. |
OK | upon success. |
|
related |
Assigns a value to the provided ULONGLONG DynamicType.
BAD_PARAMETER | if 't' is not of type ULONGLONG. |
OK | upon success. |
|
related |
Assigns a value to the provided USHORT DynamicType.
BAD_PARAMETER | if 't' is not of type USHORT. |
OK | upon success. |