Public Member Functions | |
DDS_DynamicData (const DDS_TypeCode *type, const DDS_DynamicDataProperty_t &property) | |
The constructor for new DDS_DynamicData objects. | |
DDS_Boolean | is_valid () const |
Indicates whether the object was constructed properly. | |
DDS_ReturnCode_t | copy (const DDS_DynamicData &src) |
Deeply copy from the given object to this object. | |
DDS_Boolean | equal (const DDS_DynamicData &other) const |
Indicate whether the contents of another DDS_DynamicData sample are the same as those of this one. | |
DDS_DynamicData & | operator= (const DDS_DynamicData &src) |
Deeply copy from the given object to this object. | |
DDS_Boolean | operator== (const DDS_DynamicData &other) const |
Indicate whether the contents of another DDS_DynamicData sample are the same as those of this one. | |
DDS_ReturnCode_t | clear_all_members () |
Clear the contents of all data members of this object, including key members. | |
DDS_ReturnCode_t | clear_nonkey_members () |
Clear the contents of all data members of this object, not including key members. | |
DDS_ReturnCode_t | clear_member (const char *member_name, DDS_DynamicDataMemberId member_id) |
Clear the contents of a single data member of this object. | |
DDS_ReturnCode_t | print (FILE *fp, int indent) const |
Output a textual representation of this object and its contents to the given file. | |
void | get_info (DDS_DynamicDataInfo &info_out) const |
Fill in the given descriptor with information about this DDS_DynamicData. | |
DDS_ReturnCode_t | bind_type (const DDS_TypeCode *type) |
If this DDS_DynamicData object is not yet associated with a data type, set that type now to the given DDS_TypeCode. | |
DDS_ReturnCode_t | unbind_type () |
Dissociate this DDS_DynamicData object from any particular data type. | |
DDS_ReturnCode_t | bind_complex_member (DDS_DynamicData &value_out, const char *member_name, DDS_DynamicDataMemberId member_id) |
Use another DDS_DynamicData object to provide access to a complex field of this DDS_DynamicData object. | |
DDS_ReturnCode_t | unbind_complex_member (DDS_DynamicData &value) |
Tear down the association created by a DDS_DynamicData::bind_complex_member operation, committing any changes to the outer object since then. | |
const DDS_TypeCode * | get_type () const |
Get the data type, of which this DDS_DynamicData represents an instance. | |
DDS_TCKind | get_type_kind () const |
Get the kind of this object's data type. | |
DDS_UnsignedLong | get_member_count () const |
Get the number of members in this sample. | |
DDS_Boolean | member_exists (const char *member_name, DDS_DynamicDataMemberId member_id) const |
Indicates whether a member of a particular name/ID exists in this data sample. | |
DDS_Boolean | member_exists_in_type (const char *member_name, DDS_DynamicDataMemberId member_id) const |
Indicates whether a member of a particular name/ID exists in this data sample's type. | |
DDS_ReturnCode_t | get_member_info (DDS_DynamicDataMemberInfo &info, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Fill in the given descriptor with information about the identified member of this DDS_DynamicData sample. | |
DDS_ReturnCode_t | get_member_info_by_index (struct DDS_DynamicDataMemberInfo &info, DDS_UnsignedLong index) const |
Fill in the given descriptor with information about the identified member of this DDS_DynamicData sample. | |
DDS_ReturnCode_t | get_member_type (const DDS_TypeCode *&type_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the type of the given member of this sample. | |
DDS_ReturnCode_t | is_member_key (DDS_Boolean &is_key_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Indicates whether a given member forms part of the key of this sample's data type. | |
DDS_ReturnCode_t | get_long (DDS_Long &value_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the value of the given field, which is of type DDS_Long or another type implicitly convertible to it (DDS_Octet, DDS_Char, DDS_Short, DDS_UnsignedShort, or DDS_Enum). | |
DDS_ReturnCode_t | get_short (DDS_Short &value_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the value of the given field, which is of type DDS_Short or another type implicitly convertible to it (DDS_Octet or DDS_Char). | |
DDS_ReturnCode_t | get_ulong (DDS_UnsignedLong &value_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the value of the given field, which is of type DDS_UnsignedLong or another type implicitly convertible to it (DDS_Octet, DDS_Char, DDS_Short, DDS_UnsignedShort, or DDS_Enum). | |
DDS_ReturnCode_t | get_ushort (DDS_UnsignedShort &value_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the value of the given field, which is of type DDS_UnsignedShort or another type implicitly convertible to it (DDS_Octet or DDS_Char). | |
DDS_ReturnCode_t | get_float (DDS_Float &value_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the value of the given field, which is of type DDS_Float. | |
DDS_ReturnCode_t | get_double (DDS_Double &value_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the value of the given field, which is of type DDS_Double or another type implicitly convertible to it (DDS_Float). | |
DDS_ReturnCode_t | get_boolean (DDS_Boolean &value_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the value of the given field, which is of type DDS_Boolean. | |
DDS_ReturnCode_t | get_char (DDS_Char &value_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the value of the given field, which is of type DDS_Char. | |
DDS_ReturnCode_t | get_octet (DDS_Octet &value_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the value of the given field, which is of type DDS_Octet. | |
DDS_ReturnCode_t | get_longlong (DDS_LongLong &value_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the value of the given field, which is of type DDS_LongLong or another type implicitly convertible to it (DDS_Octet, DDS_Char, DDS_Short, DDS_UnsignedShort, DDS_Long, DDS_UnsignedLong, or DDS_Enum). | |
DDS_ReturnCode_t | get_ulonglong (DDS_UnsignedLongLong &value_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the value of the given field, which is of type DDS_UnsignedLongLong or another type implicitly convertible to it (DDS_Octet, DDS_Char, DDS_Short, DDS_UnsignedShort, DDS_Long, DDS_UnsignedLong, or DDS_Enum). | |
DDS_ReturnCode_t | get_longdouble (DDS_LongDouble &value_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the value of the given field, which is of type DDS_LongDouble or another type implicitly convertible to it (DDS_Float or DDS_Double). | |
DDS_ReturnCode_t | get_wchar (DDS_Wchar &value_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the value of the given field, which is of type DDS_Wchar or another type implicitly convertible to it (DDS_Char). | |
DDS_ReturnCode_t | get_string (char *&value, DDS_UnsignedLong *size, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the value of the given field, which is of type char*. | |
DDS_ReturnCode_t | get_wstring (DDS_Wchar *&value, DDS_UnsignedLong *size, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get the value of the given field, which is of type DDS_Wchar*. | |
DDS_ReturnCode_t | get_complex_member (DDS_DynamicData &value_out, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the value of the given field, which is of some composed type. | |
DDS_ReturnCode_t | get_long_array (DDS_Long *array, DDS_UnsignedLong *length, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given array member. | |
DDS_ReturnCode_t | get_short_array (DDS_Short *array, DDS_UnsignedLong *length, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given array member. | |
DDS_ReturnCode_t | get_ulong_array (DDS_UnsignedLong *array, DDS_UnsignedLong *length, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given array member. | |
DDS_ReturnCode_t | get_ushort_array (DDS_UnsignedShort *array, DDS_UnsignedLong *length, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given array member. | |
DDS_ReturnCode_t | get_float_array (DDS_Float *array, DDS_UnsignedLong *length, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given array member. | |
DDS_ReturnCode_t | get_double_array (DDS_Double *array, DDS_UnsignedLong *length, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given array member. | |
DDS_ReturnCode_t | get_boolean_array (DDS_Boolean *array, DDS_UnsignedLong *length, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given array member. | |
DDS_ReturnCode_t | get_char_array (DDS_Char *array, DDS_UnsignedLong *length, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given array member. | |
DDS_ReturnCode_t | get_octet_array (DDS_Octet *array, DDS_UnsignedLong *length, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given array member. | |
DDS_ReturnCode_t | get_longlong_array (DDS_LongLong *array, DDS_UnsignedLong *length, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given array member. | |
DDS_ReturnCode_t | get_ulonglong_array (DDS_UnsignedLongLong *array, DDS_UnsignedLong *length, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given array member. | |
DDS_ReturnCode_t | get_longdouble_array (DDS_LongDouble *array, DDS_UnsignedLong *length, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given array member. | |
DDS_ReturnCode_t | get_wchar_array (DDS_Wchar *array, DDS_UnsignedLong *length, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given array member. | |
DDS_ReturnCode_t | get_long_seq (DDS_LongSeq &seq, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given sequence member. | |
DDS_ReturnCode_t | get_short_seq (DDS_ShortSeq &seq, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given sequence member. | |
DDS_ReturnCode_t | get_ulong_seq (DDS_UnsignedLongSeq &seq, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given sequence member. | |
DDS_ReturnCode_t | get_ushort_seq (DDS_UnsignedShortSeq &seq, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given sequence member. | |
DDS_ReturnCode_t | get_float_seq (DDS_FloatSeq &seq, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given sequence member. | |
DDS_ReturnCode_t | get_double_seq (DDS_DoubleSeq &seq, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given sequence member. | |
DDS_ReturnCode_t | get_boolean_seq (DDS_BooleanSeq &seq, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given sequence member. | |
DDS_ReturnCode_t | get_char_seq (DDS_CharSeq &seq, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given sequence member. | |
DDS_ReturnCode_t | get_octet_seq (DDS_OctetSeq &seq, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given sequence member. | |
DDS_ReturnCode_t | get_longlong_seq (DDS_LongLongSeq &seq, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given sequence member. | |
DDS_ReturnCode_t | get_ulonglong_seq (DDS_UnsignedLongLongSeq &seq, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given sequence member. | |
DDS_ReturnCode_t | get_longdouble_seq (DDS_LongDoubleSeq &seq, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given sequence member. | |
DDS_ReturnCode_t | get_wchar_seq (DDS_WcharSeq &seq, const char *member_name, DDS_DynamicDataMemberId member_id) const |
Get a copy of the given sequence member. | |
DDS_ReturnCode_t | set_long (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_Long value) |
Set the value of the given field, which is of type DDS_Long. | |
DDS_ReturnCode_t | set_short (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_Short value) |
Set the value of the given field, which is of type DDS_Short. | |
DDS_ReturnCode_t | set_ulong (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedLong value) |
Set the value of the given field, which is of type DDS_UnsignedLong. | |
DDS_ReturnCode_t | set_ushort (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedShort value) |
Set the value of the given field, which is of type DDS_UnsignedShort. | |
DDS_ReturnCode_t | set_float (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_Float value) |
Set the value of the given field, which is of type DDS_Float. | |
DDS_ReturnCode_t | set_double (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_Double value) |
Set the value of the given field, which is of type DDS_Double. | |
DDS_ReturnCode_t | set_boolean (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_Boolean value) |
Set the value of the given field, which is of type DDS_Boolean. | |
DDS_ReturnCode_t | set_char (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_Char value) |
Set the value of the given field, which is of type DDS_Char. | |
DDS_ReturnCode_t | set_octet (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_Octet value) |
Set the value of the given field, which is of type DDS_Octet. | |
DDS_ReturnCode_t | set_longlong (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_LongLong value) |
Set the value of the given field, which is of type DDS_LongLong. | |
DDS_ReturnCode_t | set_ulonglong (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedLongLong value) |
Set the value of the given field, which is of type DDS_UnsignedLongLong. | |
DDS_ReturnCode_t | set_longdouble (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_LongDouble value) |
Set the value of the given field, which is of type DDS_LongDouble. | |
DDS_ReturnCode_t | set_wchar (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_Wchar value) |
Set the value of the given field, which is of type DDS_Wchar. | |
DDS_ReturnCode_t | set_string (const char *member_name, DDS_DynamicDataMemberId member_id, const char *value) |
Set the value of the given field of type char*. | |
DDS_ReturnCode_t | set_wstring (const char *member_name, DDS_DynamicDataMemberId member_id, const DDS_Wchar *value) |
Set the value of the given field of type DDS_Wchar*. | |
DDS_ReturnCode_t | set_complex_member (const char *member_name, DDS_DynamicDataMemberId member_id, const DDS_DynamicData &value) |
Copy the state of the given DDS_DynamicData object into a member of this object. | |
DDS_ReturnCode_t | set_long_array (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedLong length, const DDS_Long *array) |
Set the contents of the given array member. | |
DDS_ReturnCode_t | set_short_array (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedLong length, const DDS_Short *array) |
Set the contents of the given array member. | |
DDS_ReturnCode_t | set_ulong_array (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedLong length, const DDS_UnsignedLong *array) |
Set the contents of the given array member. | |
DDS_ReturnCode_t | set_ushort_array (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedLong length, const DDS_UnsignedShort *array) |
Set the contents of the given array member. | |
DDS_ReturnCode_t | set_float_array (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedLong length, const DDS_Float *array) |
Set the contents of the given array member. | |
DDS_ReturnCode_t | set_double_array (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedLong length, const DDS_Double *array) |
Set the contents of the given array member. | |
DDS_ReturnCode_t | set_boolean_array (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedLong length, const DDS_Boolean *array) |
Set the contents of the given array member. | |
DDS_ReturnCode_t | set_char_array (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedLong length, const DDS_Char *array) |
Set the contents of the given array member. | |
DDS_ReturnCode_t | set_octet_array (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedLong length, const DDS_Octet *array) |
Set the contents of the given array member. | |
DDS_ReturnCode_t | set_longlong_array (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedLong length, const DDS_LongLong *array) |
Set the contents of the given array member. | |
DDS_ReturnCode_t | set_ulonglong_array (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedLong length, const DDS_UnsignedLongLong *array) |
Set the contents of the given array member. | |
DDS_ReturnCode_t | set_longdouble_array (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedLong length, const DDS_LongDouble *array) |
Set the contents of the given array member. | |
DDS_ReturnCode_t | set_wchar_array (const char *member_name, DDS_DynamicDataMemberId member_id, DDS_UnsignedLong length, const DDS_Wchar *array) |
Set the contents of the given array member. | |
DDS_ReturnCode_t | set_long_seq (const char *member_name, DDS_DynamicDataMemberId member_id, const DDS_LongSeq &value) |
Set the contents of the given sequence member. | |
DDS_ReturnCode_t | set_short_seq (const char *member_name, DDS_DynamicDataMemberId member_id, const DDS_ShortSeq &value) |
Set the contents of the given sequence member. | |
DDS_ReturnCode_t | set_ulong_seq (const char *member_name, DDS_DynamicDataMemberId member_id, const DDS_UnsignedLongSeq &value) |
Set the contents of the given sequence member. | |
DDS_ReturnCode_t | set_ushort_seq (const char *member_name, DDS_DynamicDataMemberId member_id, const DDS_UnsignedShortSeq &value) |
Set the contents of the given sequence member. | |
DDS_ReturnCode_t | set_float_seq (const char *member_name, DDS_DynamicDataMemberId member_id, const DDS_FloatSeq &value) |
Set the contents of the given sequence member. | |
DDS_ReturnCode_t | set_double_seq (const char *member_name, DDS_DynamicDataMemberId member_id, const DDS_DoubleSeq &value) |
Set the contents of the given sequence member. | |
DDS_ReturnCode_t | set_boolean_seq (const char *member_name, DDS_DynamicDataMemberId member_id, const DDS_BooleanSeq &value) |
Set the contents of the given sequence member. | |
DDS_ReturnCode_t | set_char_seq (const char *member_name, DDS_DynamicDataMemberId member_id, const DDS_CharSeq &value) |
Set the contents of the given sequence member. | |
DDS_ReturnCode_t | set_octet_seq (const char *member_name, DDS_DynamicDataMemberId member_id, const DDS_OctetSeq &value) |
Set the contents of the given sequence member. | |
DDS_ReturnCode_t | set_longlong_seq (const char *member_name, DDS_DynamicDataMemberId member_id, const DDS_LongLongSeq &value) |
Set the contents of the given sequence member. | |
DDS_ReturnCode_t | set_ulonglong_seq (const char *member_name, DDS_DynamicDataMemberId member_id, const DDS_UnsignedLongLongSeq &value) |
Set the contents of the given sequence member. | |
DDS_ReturnCode_t | set_longdouble_seq (const char *member_name, DDS_DynamicDataMemberId member_id, const DDS_LongDoubleSeq &value) |
Set the contents of the given sequence member. | |
DDS_ReturnCode_t | set_wchar_seq (const char *member_name, DDS_DynamicDataMemberId member_id, const DDS_WcharSeq &value) |
Set the contents of the given sequence member. |
Objects of type DDS_DynamicData represent corresponding objects of the type identified by their DDS_TypeCode. Because the definition of these types may not have existed at compile time on the system on which the application is running, you will interact with the data using an API of reflective getters and setters.
For example, if you had access to your data types at compile time, you could do this:
theValue = theObject.theField;
Instead, you will do something like this:
theValue = get(theObject, "theField");
DDS_DynamicData objects can represent any complex data type, including those of type kinds DDS_TK_ARRAY, DDS_TK_SEQUENCE, DDS_TK_STRUCT, DDS_TK_UNION, DDS_TK_VALUE, and DDS_TK_SPARSE. They cannot represent objects of basic types (e.g. integers and strings). Since those type definitions always exist on every system, you can examine their objects directly.
You define the name and ID of a type member when you add that member to that type. When you define a sparse type, you will typically choose both explicitly. If you define your type in IDL or XML, the name will be the field name that appears in the type definition; the ID will be the one-based index of the field in declaration order. For example, in the following IDL structure, the ID of theLong
is 2.
struct MyType { short theShort; long theLong; };
IDs work the same way for DDS_DynamicData objects representing arrays and sequences, since the elements of these collections have no explicit IDs: the ID is one more than the index. (The first element is ID 1, the second is 2, etc.) Array and sequence elements do not have names.
Multi-dimensional arrays are effectively flattened by the DDS_DynamicData API. For example, for an array theArray
[4][5], accessing ID 7 is equivalent to index 6, or the second element of the second group of 5.
For unions (DDS_TK_UNION), the ID of a member is the discriminator value corresponding to that member.
DDSDynamicDataTypeSupport | DDS_DynamicData |
---|---|
DDSDynamicDataTypeSupport::create_data | DDS_DynamicData::DDS_DynamicData |
DDSDynamicDataTypeSupport::delete_data | DDS_DynamicData::~DDS_DynamicData |
You can also copy DDS_DynamicData objects:
You can test them for equality:
And you can print their contents:
The names of integer types vary across languages. The programming API for each language reflects that programming language. However, if your chosen language does not use the same names as the language that you used to define your types (e.g., IDL), or if you need to interoperate among programming languages, you will need to understand these differences. They are explained the following table.
Type | IDL | C, C++ | C# | Java |
---|---|---|---|---|
16-bit integer | short | DDS_Short | short | short |
32-bit integer | long | DDS_Long | int | int |
64-bit integer | long long | DDS_LongLong | long | long |
When working with a DDS_DynamicData object representing an array or sequence, calling one of the "get" methods below for an index that is out of bounds will result in DDS_RETCODE_NO_DATA. Calling "set" for an index that is past the end of a sequence will cause that sequence to automatically lengthen (filling with default contents).
Get | Set |
---|---|
DDS_DynamicData::get_complex_member | DDS_DynamicData::set_complex_member |
In addition to getting or setting a field, you can "clear" its value; that is, set it to a default zero value.
For example, suppose a type definition like the following:
struct MyType { float my_float; sequence<octet> my_bytes; short my_short; };
The richness of the type system makes it difficult to fully characterize the performance differences between all access patterns. Nevertheless, the following are generally true:
my_float
, then my_bytes
, and finally my_short
. DDS_DynamicData::DDS_DynamicData | ( | const DDS_TypeCode * | type, | |
const DDS_DynamicDataProperty_t & | property | |||
) |
The constructor for new DDS_DynamicData objects.
The type parameter may be NULL. In that case, this DDS_DynamicData must be bound with DDS_DynamicData::bind_type or DDS_DynamicData::bind_complex_member before it can be used.
If the DDS_TypeCode is not NULL, the newly constructed DDS_DynamicData object will retain a reference to it. It is not safe to delete the DDS_TypeCode until all samples that use it have themselves been deleted.
In most cases, it is not necessary to call this constructor explicitly. Instead, use DDSDynamicDataTypeSupport::create_data, and the DDS_TypeCode and properties will be specified for you. Using the factory method also ensures that the memory management contract documented above is followed correctly, because the DDSDynamicDataTypeSupport object maintains the DDS_TypeCode used by the samples it creates.
However you create a DDS_DynamicData object, you must delete it when you are finished with it. If you choose to use this constructor, delete the object with the destructor: DDS_DynamicData::~DDS_DynamicData.
DDS_DynamicData* sample = new DDS_DynamicData( myType, myProperties); // Failure indicated by is_valid() method. // Do something... delete sample;
NOTE that RTI Data Distribution Service does not explicitly generate any exceptions in this constructor, because C++ exception support is not consistent across all platforms on which RTI Data Distribution Service runs. Therefore, to check whether construction succeeded, you must use the DDS_DynamicData::is_valid method. Alternatively, you can create an DDS_DynamicData object with DDSDynamicDataTypeSupport::create_data, which returns NULL on failure, eliminating the need to call DDS_DynamicData::is_valid.
type | <<in>> The type of which the new object will represent an object. | |
property | <<in>> Properties that configure the behavior of the new object. Most users can simply use DDS_DYNAMIC_DATA_PROPERTY_DEFAULT. |
DDS_DynamicData::~DDS_DynamicData
DDS_Boolean DDS_DynamicData::is_valid | ( | ) | const |
Indicates whether the object was constructed properly.
This method returns DDS_BOOLEAN_TRUE if the constructor succeeded; it returns DDS_BOOLEAN_FALSE if the constructor failed for any reason, which should also have resulted in a log message. It is only necessary to call this method if you created the DDS_DynamicData object using the constructor, DDS_DynamicData::DDS_DynamicData.
Possible failure reasons include passing an invalid type or invalid properties to the constructor.
This method is necessary because C++ exception support is not consistent across all of the platforms on which RTI Data Distribution Service runs. Therefore, the implementation does not throw any exceptions in the constructor.
DDS_ReturnCode_t DDS_DynamicData::copy | ( | const DDS_DynamicData & | src | ) |
Deeply copy from the given object to this object.
DDS_Boolean DDS_DynamicData::equal | ( | const DDS_DynamicData & | other | ) | const |
Indicate whether the contents of another DDS_DynamicData sample are the same as those of this one.
This operation compares the data and type of existing members. The types of non-instantiated members may differ in sparse types.
DDS_DynamicData& DDS_DynamicData::operator= | ( | const DDS_DynamicData & | src | ) |
DDS_Boolean DDS_DynamicData::operator== | ( | const DDS_DynamicData & | other | ) | const |
Indicate whether the contents of another DDS_DynamicData sample are the same as those of this one.
This operation compares the data and type of existing members. The types of non-instantiated members may differ in sparse types.
DDS_ReturnCode_t DDS_DynamicData::clear_all_members | ( | ) |
Clear the contents of all data members of this object, including key members.
DDS_ReturnCode_t DDS_DynamicData::clear_nonkey_members | ( | ) |
Clear the contents of all data members of this object, not including key members.
This method is only applicable to sparse value types.
DDS_ReturnCode_t DDS_DynamicData::clear_member | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id | |||
) |
Clear the contents of a single data member of this object.
This method is only applicable to sparse value types.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::print | ( | FILE * | fp, | |
int | indent | |||
) | const |
Output a textual representation of this object and its contents to the given file.
This method is equivalent to DDSDynamicDataTypeSupport::print_data.
Warning: This operation may not display any data for members at the end of a data structure that have not been explicitly set before the data sample is serialized. This will not be a problem on a received data sample, which should always correctly display all members.
fp | <<in>> The file to which the object should be printed. | |
indent | <<in>> The output of this method will be pretty-printed. This argument indicates the amount of initial indentation of the output. |
void DDS_DynamicData::get_info | ( | DDS_DynamicDataInfo & | info_out | ) | const |
Fill in the given descriptor with information about this DDS_DynamicData.
info_out | <<out>> The descriptor object whose contents will be overwritten by this operation. |
DDS_ReturnCode_t DDS_DynamicData::bind_type | ( | const DDS_TypeCode * | type | ) |
If this DDS_DynamicData object is not yet associated with a data type, set that type now to the given DDS_TypeCode.
This advanced operation allows you to reuse a single DDS_DynamicData object with multiple data types.
DDS_DynamicData* myData = new DDS_DynamicData(NULL, myProperties); DDS_TypeCode* myType = ...; myData->bind_type(myType); // Do something... myData->unbind_type(); delete myData;
Note that the DDS_DynamicData object will retain a reference to the DDS_TypeCode object you provide. It is not safe to delete the DDS_TypeCode until after it is unbound.
type | <<in>> The type to associate with this DDS_DynamicData object. |
DDS_ReturnCode_t DDS_DynamicData::unbind_type | ( | ) |
Dissociate this DDS_DynamicData object from any particular data type.
This step is necessary before the object can be associated with a new data type.
This operation clears all members as a side effect.
DDS_ReturnCode_t DDS_DynamicData::bind_complex_member | ( | DDS_DynamicData & | value_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) |
Use another DDS_DynamicData object to provide access to a complex field of this DDS_DynamicData object.
For example, consider the following data types:
struct MyFieldType { float theFloat; }; struct MyOuterType { MyFieldType complexMember; };
Suppose you have an instance of MyOuterType
, and you would like to examine the contents of its member complexMember
. To do this, you must bind another DDS_DynamicData object to that member. This operation will bind the type code of the member to the provided DDS_DynamicData object and perform additional initialization.
The following example demonstrates the usage pattern. Note that error handling has been omitted for brevity.
DDS_DynamicData outer = ...; DDS_DynamicData toBeBound(NULL, myProperties); outer.bind_complex_member( toBeBound, "complexMember", DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED); float theFloatValue = 0.0f; toBeBound.get_float( theFloat, "theFloat" DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED); outer.unbind_complex_member(toBeBound);
This operation is only permitted when the object toBeBound
(named as in the example above) is not currently associated with any type, including already being bound to another member. You can see in the example that this object is created directly with the constructer and is not provided with a DDS_TypeCode.
Only a single member of a given DDS_DynamicData object may be bound at one time -- however, members of members may be recursively bound to any depth. Furthermore, while the outer object has a bound member, it may only be modified through that bound member. That is, after calling this member, all "set" operations on the outer object will be disabled until DDS_DynamicData::unbind_complex_member has been called. Furthermore, any bound member must be unbound before a sample can be written or deleted.
This method is logically related to DDS_DynamicData::get_complex_member in that both allow you to examine the state of nested objects. They are different in an important way: this method provides a view into an outer object, such that any change made to the inner object will be reflected in the outer. But the DDS_DynamicData::get_complex_member operation copies the state of the nested object; changes to it will not be reflected in the source object.
Note that you can bind to a member of a sequence at an index that is past the current length of that sequence. In that case, this method behaves like a "set" method: it automatically lengthens the sequence (filling in default elements) to allow the bind to take place. See Getters and Setters.
value_out | <<out>> The object that you wish to bind to the field. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::unbind_complex_member | ( | DDS_DynamicData & | value | ) |
Tear down the association created by a DDS_DynamicData::bind_complex_member operation, committing any changes to the outer object since then.
Some changes to the outer object will not be observable until after you have performed this operation.
If you have called DDS_DynamicData::bind_complex_member on a data sample, you must unbind before writing or deleting the sample.
value | <<in>> The same object you passed to DDS_DynamicData::bind_complex_member. This argument is used for error checking purposes. |
const DDS_TypeCode* DDS_DynamicData::get_type | ( | ) | const |
DDS_TCKind DDS_DynamicData::get_type_kind | ( | ) | const |
Get the kind of this object's data type.
This is a convenience method. It's equivalent to calling DDS_DynamicData::get_type followed by DDS_TypeCode::kind.
DDS_UnsignedLong DDS_DynamicData::get_member_count | ( | ) | const |
Get the number of members in this sample.
For objects of type kind DDS_TK_ARRAY or DDS_TK_SEQUENCE, this method returns the number of elements in the collection.
For objects of type kind DDS_TK_STRUCT or DDS_TK_VALUE, it returns the number of fields in the sample, which will always be the same as the number of fields in the type.
For objects of type kind DDS_TK_SPARSE, it returns the number of fields in the sample, which may be less than or equal to the number of fields in the type.
DDS_Boolean DDS_DynamicData::member_exists | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id | |||
) | const |
Indicates whether a member of a particular name/ID exists in this data sample.
Only one of the name and/or ID need by specified.
For objects of type kinds other than DDS_TK_SPARSE, the result of this method will always be the same as that of DDS_DynamicData::member_exists_in_type.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_Boolean DDS_DynamicData::member_exists_in_type | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id | |||
) | const |
Indicates whether a member of a particular name/ID exists in this data sample's type.
Only one of the name and/or ID need by specified.
For objects of type kinds other than DDS_TK_SPARSE, the result of this method will always be the same as that of DDS_DynamicData::member_exists.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_member_info | ( | DDS_DynamicDataMemberInfo & | info, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Fill in the given descriptor with information about the identified member of this DDS_DynamicData sample.
This operation is valid for objects of DDS_TCKind DDS_TK_ARRAY, DDS_TK_SEQUENCE, DDS_TK_STRUCT, DDS_TK_VALUE, and DDS_TK_SPARSE.
info | <<out>> The descriptor object whose contents will be overwritten by this operations. | |
member_name | <<in>> The name of the member for which to get the info or NULL to look up the member by its ID. Only one of the name and the ID may be unspecified. | |
member_id | <<in>> The ID of the member for which to get the info, or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_member_info_by_index | ( | struct DDS_DynamicDataMemberInfo & | info, | |
DDS_UnsignedLong | index | |||
) | const |
Fill in the given descriptor with information about the identified member of this DDS_DynamicData sample.
This operation is valid for objects of DDS_TCKind DDS_TK_ARRAY, DDS_TK_SEQUENCE, DDS_TK_STRUCT, DDS_TK_VALUE, and DDS_TK_SPARSE.
info | <<out>> The descriptor object whose contents will be overwritten by this operations. | |
index | <<in>> The zero-based of the member for which to get the info. |
DDS_ReturnCode_t DDS_DynamicData::get_member_type | ( | const DDS_TypeCode *& | type_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the type of the given member of this sample.
The member can be looked up either by name or by ID.
This operation is valid for objects of DDS_TCKind DDS_TK_ARRAY, DDS_TK_SEQUENCE, DDS_TK_STRUCT, DDS_TK_VALUE, and DDS_TK_SPARSE. For type kinds DDS_TK_ARRAY and DDS_TK_SEQUENCE, the index into the collection is taken to be one less than the ID, if specified. If this index is valid, this operation will return the content type of this collection.
type_out | <<out>> If this method returned success, this argument refers to the found member's type. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::is_member_key | ( | DDS_Boolean & | is_key_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Indicates whether a given member forms part of the key of this sample's data type.
This operation is only valid for samples of types of kind DDS_TK_STRUCT, DDS_TK_VALUE, or DDS_TK_SPARSE.
Note to users of sparse types: A key member may only have a single representation and is required to exist in every sample.
is_key_out | <<out>> If this method returned success, this argument indicates whether the indicated member is part of the key. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_long | ( | DDS_Long & | value_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the value of the given field, which is of type DDS_Long or another type implicitly convertible to it (DDS_Octet, DDS_Char, DDS_Short, DDS_UnsignedShort, or DDS_Enum).
The member may be specified by name or by ID.
value_out | <<out>> If this method returned success, this argument will contain the value of the indicated member. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_short | ( | DDS_Short & | value_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the value of the given field, which is of type DDS_Short or another type implicitly convertible to it (DDS_Octet or DDS_Char).
The member may be specified by name or by ID.
value_out | <<out>> If this method returned success, this argument will contain the value of the indicated member. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_ulong | ( | DDS_UnsignedLong & | value_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the value of the given field, which is of type DDS_UnsignedLong or another type implicitly convertible to it (DDS_Octet, DDS_Char, DDS_Short, DDS_UnsignedShort, or DDS_Enum).
The member may be specified by name or by ID.
value_out | <<out>> If this method returned success, this argument will contain the value of the indicated member. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_ushort | ( | DDS_UnsignedShort & | value_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the value of the given field, which is of type DDS_UnsignedShort or another type implicitly convertible to it (DDS_Octet or DDS_Char).
The member may be specified by name or by ID.
value_out | <<out>> If this method returned success, this argument will contain the value of the indicated member. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_float | ( | DDS_Float & | value_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the value of the given field, which is of type DDS_Float.
The member may be specified by name or by ID.
value_out | <<out>> If this method returned success, this argument will contain the value of the indicated member. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_double | ( | DDS_Double & | value_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the value of the given field, which is of type DDS_Double or another type implicitly convertible to it (DDS_Float).
The member may be specified by name or by ID.
value_out | <<out>> If this method returned success, this argument will contain the value of the indicated member. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_boolean | ( | DDS_Boolean & | value_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the value of the given field, which is of type DDS_Boolean.
The member may be specified by name or by ID.
value_out | <<out>> If this method returned success, this argument will contain the value of the indicated member. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_char | ( | DDS_Char & | value_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the value of the given field, which is of type DDS_Char.
The member may be specified by name or by ID.
value_out | <<out>> If this method returned success, this argument will contain the value of the indicated member. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_octet | ( | DDS_Octet & | value_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the value of the given field, which is of type DDS_Octet.
The member may be specified by name or by ID.
value_out | <<out>> If this method returned success, this argument will contain the value of the indicated member. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_longlong | ( | DDS_LongLong & | value_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the value of the given field, which is of type DDS_LongLong or another type implicitly convertible to it (DDS_Octet, DDS_Char, DDS_Short, DDS_UnsignedShort, DDS_Long, DDS_UnsignedLong, or DDS_Enum).
The member may be specified by name or by ID.
value_out | <<out>> If this method returned success, this argument will contain the value of the indicated member. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_ulonglong | ( | DDS_UnsignedLongLong & | value_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the value of the given field, which is of type DDS_UnsignedLongLong or another type implicitly convertible to it (DDS_Octet, DDS_Char, DDS_Short, DDS_UnsignedShort, DDS_Long, DDS_UnsignedLong, or DDS_Enum).
The member may be specified by name or by ID.
value_out | <<out>> If this method returned success, this argument will contain the value of the indicated member. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_longdouble | ( | DDS_LongDouble & | value_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the value of the given field, which is of type DDS_LongDouble or another type implicitly convertible to it (DDS_Float or DDS_Double).
The member may be specified by name or by ID.
value_out | <<out>> If this method returned success, this argument will contain the value of the indicated member. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_wchar | ( | DDS_Wchar & | value_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the value of the given field, which is of type DDS_Wchar or another type implicitly convertible to it (DDS_Char).
The member may be specified by name or by ID.
value_out | <<out>> If this method returned success, this argument will contain the value of the indicated member. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_string | ( | char *& | value, | |
DDS_UnsignedLong * | size, | |||
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the value of the given field, which is of type char*.
The member may be specified by name or by ID.
value | <<out>> The string into which the middleware should copy the string member. The allocated size of this string is indicated by size argument. If the size is sufficient to hold the contents of the member, they will be copied into this string. If value is a pointer to NULL, the middleware will allocate a new string for you of sufficient length; it will be your responsibility to free that string. If the size is insufficient but greater than zero, the middleware will not free your string; instead, this operation will fail and size will contain the minimum required size. | |
size | <<inout>> As an input argument, the allocated size of the string. As an output argument, the actual size of the contents. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_wstring | ( | DDS_Wchar *& | value, | |
DDS_UnsignedLong * | size, | |||
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get the value of the given field, which is of type DDS_Wchar*.
The member may be specified by name or by ID.
value | <<out>> The string into which the middleware should copy the string member. The allocated size of this string is indicated by size argument. If the size is sufficient to hold the contents of the member, they will be copied into this string. If value is a pointer to NULL, the middleware will allocate a new string for you of sufficient length; it will be your responsibility to free that string. If the size is insufficient but greater than zero, the middleware will not free your string; instead, this operation will fail and size will contain the minimum required size. | |
size | <<inout>> As an input argument, the allocated size of the string. As an output argument, the actual size of the contents. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_complex_member | ( | DDS_DynamicData & | value_out, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the value of the given field, which is of some composed type.
The member may be of type kind DDS_TK_ARRAY, DDS_TK_SEQUENCE, DDS_TK_STRUCT, DDS_TK_VALUE, DDS_TK_UNION, or DDS_TK_SPARSE. It may be specified by name or by ID.
This method is logically related to DDS_DynamicData::bind_complex_member in that both allow you to examine the state of nested objects. They are different in an important way: this method provides a copy of the data; changes to it will not be reflected in the source object.
value_out | <<out>> The DDS_DynamicData sample whose contents will be overwritten by this operation. This object must not be a bound member of another DDS_DynamicData sample. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_long_array | ( | DDS_Long * | array, | |
DDS_UnsignedLong * | length, | |||
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given array member.
This method will perform an automatic conversion from DDS_LongSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
array | <<out>> An already-allocated array, into which the elements will be copied. | |
length | <<inout>> As an input, the allocated length of array . As an output, the number of elements that were copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_short_array | ( | DDS_Short * | array, | |
DDS_UnsignedLong * | length, | |||
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given array member.
This method will perform an automatic conversion from DDS_ShortSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
array | <<out>> An already-allocated array, into which the elements will be copied. | |
length | <<inout>> As an input, the allocated length of array . As an output, the number of elements that were copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_ulong_array | ( | DDS_UnsignedLong * | array, | |
DDS_UnsignedLong * | length, | |||
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given array member.
This method will perform an automatic conversion from DDS_UnsignedLongSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
array | <<out>> An already-allocated array, into which the elements will be copied. | |
length | <<inout>> As an input, the allocated length of array . As an output, the number of elements that were copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_ushort_array | ( | DDS_UnsignedShort * | array, | |
DDS_UnsignedLong * | length, | |||
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given array member.
This method will perform an automatic conversion from DDS_UnsignedShortSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
array | <<out>> An already-allocated array, into which the elements will be copied. | |
length | <<inout>> As an input, the allocated length of array . As an output, the number of elements that were copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_float_array | ( | DDS_Float * | array, | |
DDS_UnsignedLong * | length, | |||
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given array member.
This method will perform an automatic conversion from DDS_FloatSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
array | <<out>> An already-allocated array, into which the elements will be copied. | |
length | <<inout>> As an input, the allocated length of array . As an output, the number of elements that were copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_double_array | ( | DDS_Double * | array, | |
DDS_UnsignedLong * | length, | |||
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given array member.
This method will perform an automatic conversion from DDS_DoubleSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
array | <<out>> An already-allocated array, into which the elements will be copied. | |
length | <<inout>> As an input, the allocated length of array . As an output, the number of elements that were copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_boolean_array | ( | DDS_Boolean * | array, | |
DDS_UnsignedLong * | length, | |||
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given array member.
This method will perform an automatic conversion from DDS_BooleanSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
array | <<out>> An already-allocated array, into which the elements will be copied. | |
length | <<inout>> As an input, the allocated length of array . As an output, the number of elements that were copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_char_array | ( | DDS_Char * | array, | |
DDS_UnsignedLong * | length, | |||
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given array member.
This method will perform an automatic conversion from DDS_CharSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
array | <<out>> An already-allocated array, into which the elements will be copied. | |
length | <<inout>> As an input, the allocated length of array . As an output, the number of elements that were copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_octet_array | ( | DDS_Octet * | array, | |
DDS_UnsignedLong * | length, | |||
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given array member.
This method will perform an automatic conversion from DDS_OctetSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
array | <<out>> An already-allocated array, into which the elements will be copied. | |
length | <<inout>> As an input, the allocated length of array . As an output, the number of elements that were copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_longlong_array | ( | DDS_LongLong * | array, | |
DDS_UnsignedLong * | length, | |||
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given array member.
This method will perform an automatic conversion from DDS_LongLongSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
array | <<out>> An already-allocated array, into which the elements will be copied. | |
length | <<inout>> As an input, the allocated length of array . As an output, the number of elements that were copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_ulonglong_array | ( | DDS_UnsignedLongLong * | array, | |
DDS_UnsignedLong * | length, | |||
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given array member.
This method will perform an automatic conversion from DDS_UnsignedLongLongSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
array | <<out>> An already-allocated array, into which the elements will be copied. | |
length | <<inout>> As an input, the allocated length of array . As an output, the number of elements that were copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_longdouble_array | ( | DDS_LongDouble * | array, | |
DDS_UnsignedLong * | length, | |||
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given array member.
This method will perform an automatic conversion from DDS_LongDoubleSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
array | <<out>> An already-allocated array, into which the elements will be copied. | |
length | <<inout>> As an input, the allocated length of array . As an output, the number of elements that were copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_wchar_array | ( | DDS_Wchar * | array, | |
DDS_UnsignedLong * | length, | |||
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given array member.
This method will perform an automatic conversion from DDS_WcharSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
array | <<out>> An already-allocated array, into which the elements will be copied. | |
length | <<inout>> As an input, the allocated length of array . As an output, the number of elements that were copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_long_seq | ( | DDS_LongSeq & | seq, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given sequence member.
The provided sequence will be automatically resized as necessary.
This method will perform an automatic conversion from an array of DDS_Long.
seq | <<out>> A sequence, into which the elements will be copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_short_seq | ( | DDS_ShortSeq & | seq, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given sequence member.
The provided sequence will be automatically resized as necessary.
This method will perform an automatic conversion from an array of DDS_Short.
seq | <<out>> A sequence, into which the elements will be copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_ulong_seq | ( | DDS_UnsignedLongSeq & | seq, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given sequence member.
The provided sequence will be automatically resized as necessary.
This method will perform an automatic conversion from an array of DDS_UnsignedLong.
seq | <<out>> A sequence, into which the elements will be copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_ushort_seq | ( | DDS_UnsignedShortSeq & | seq, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given sequence member.
The provided sequence will be automatically resized as necessary.
This method will perform an automatic conversion from an array of DDS_UnsignedShort.
seq | <<out>> A sequence, into which the elements will be copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_float_seq | ( | DDS_FloatSeq & | seq, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given sequence member.
The provided sequence will be automatically resized as necessary.
This method will perform an automatic conversion from an array of DDS_Long.
seq | <<out>> A sequence, into which the elements will be copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_double_seq | ( | DDS_DoubleSeq & | seq, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given sequence member.
The provided sequence will be automatically resized as necessary.
This method will perform an automatic conversion from an array of DDS_Double.
seq | <<out>> A sequence, into which the elements will be copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_boolean_seq | ( | DDS_BooleanSeq & | seq, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given sequence member.
The provided sequence will be automatically resized as necessary.
This method will perform an automatic conversion from an array of DDS_Boolean.
seq | <<out>> A sequence, into which the elements will be copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_char_seq | ( | DDS_CharSeq & | seq, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given sequence member.
The provided sequence will be automatically resized as necessary.
This method will perform an automatic conversion from an array of DDS_Char.
seq | <<out>> A sequence, into which the elements will be copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_octet_seq | ( | DDS_OctetSeq & | seq, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given sequence member.
The provided sequence will be automatically resized as necessary.
This method will perform an automatic conversion from an array of DDS_Octet.
seq | <<out>> A sequence, into which the elements will be copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_longlong_seq | ( | DDS_LongLongSeq & | seq, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given sequence member.
The provided sequence will be automatically resized as necessary.
This method will perform an automatic conversion from an array of DDS_LongLong.
seq | <<out>> A sequence, into which the elements will be copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_ulonglong_seq | ( | DDS_UnsignedLongLongSeq & | seq, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given sequence member.
The provided sequence will be automatically resized as necessary.
This method will perform an automatic conversion from an array of DDS_UnsignedLongLong.
seq | <<out>> A sequence, into which the elements will be copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_longdouble_seq | ( | DDS_LongDoubleSeq & | seq, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given sequence member.
The provided sequence will be automatically resized as necessary.
This method will perform an automatic conversion from an array of DDS_LongDouble.
seq | <<out>> A sequence, into which the elements will be copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::get_wchar_seq | ( | DDS_WcharSeq & | seq, | |
const char * | member_name, | |||
DDS_DynamicDataMemberId | member_id | |||
) | const |
Get a copy of the given sequence member.
The provided sequence will be automatically resized as necessary.
This method will perform an automatic conversion from an array of DDS_Wchar.
seq | <<out>> A sequence, into which the elements will be copied. | |
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. |
DDS_ReturnCode_t DDS_DynamicData::set_long | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_Long | value | |||
) |
Set the value of the given field, which is of type DDS_Long.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The value to which to set the member. |
DDS_ReturnCode_t DDS_DynamicData::set_short | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_Short | value | |||
) |
Set the value of the given field, which is of type DDS_Short.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The value to which to set the member. |
DDS_ReturnCode_t DDS_DynamicData::set_ulong | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedLong | value | |||
) |
Set the value of the given field, which is of type DDS_UnsignedLong.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The value to which to set the member. |
DDS_ReturnCode_t DDS_DynamicData::set_ushort | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedShort | value | |||
) |
Set the value of the given field, which is of type DDS_UnsignedShort.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The value to which to set the member. |
DDS_ReturnCode_t DDS_DynamicData::set_float | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_Float | value | |||
) |
Set the value of the given field, which is of type DDS_Float.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The value to which to set the member. |
DDS_ReturnCode_t DDS_DynamicData::set_double | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_Double | value | |||
) |
Set the value of the given field, which is of type DDS_Double.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The value to which to set the member. |
DDS_ReturnCode_t DDS_DynamicData::set_boolean | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_Boolean | value | |||
) |
Set the value of the given field, which is of type DDS_Boolean.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The value to which to set the member. |
DDS_ReturnCode_t DDS_DynamicData::set_char | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_Char | value | |||
) |
Set the value of the given field, which is of type DDS_Char.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The value to which to set the member. |
DDS_ReturnCode_t DDS_DynamicData::set_octet | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_Octet | value | |||
) |
Set the value of the given field, which is of type DDS_Octet.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The value to which to set the member. |
DDS_ReturnCode_t DDS_DynamicData::set_longlong | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_LongLong | value | |||
) |
Set the value of the given field, which is of type DDS_LongLong.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The value to which to set the member. |
DDS_ReturnCode_t DDS_DynamicData::set_ulonglong | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedLongLong | value | |||
) |
Set the value of the given field, which is of type DDS_UnsignedLongLong.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The value to which to set the member. |
DDS_ReturnCode_t DDS_DynamicData::set_longdouble | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_LongDouble | value | |||
) |
Set the value of the given field, which is of type DDS_LongDouble.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The value to which to set the member. |
DDS_ReturnCode_t DDS_DynamicData::set_wchar | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_Wchar | value | |||
) |
Set the value of the given field, which is of type DDS_Wchar.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The value to which to set the member. |
DDS_ReturnCode_t DDS_DynamicData::set_string | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const char * | value | |||
) |
Set the value of the given field of type char*.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The value to which to set the member. |
DDS_ReturnCode_t DDS_DynamicData::set_wstring | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const DDS_Wchar * | value | |||
) |
Set the value of the given field of type DDS_Wchar*.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The value to which to set the member. |
DDS_ReturnCode_t DDS_DynamicData::set_complex_member | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const DDS_DynamicData & | value | |||
) |
Copy the state of the given DDS_DynamicData object into a member of this object.
The member may be of type kind DDS_TK_ARRAY, DDS_TK_SEQUENCE, DDS_TK_STRUCT, DDS_TK_VALUE, DDS_TK_UNION, or DDS_TK_SPARSE. It may be specified by name or by ID.
Example: Copying Data
This method can be used with DDS_DynamicData::bind_complex_member to copy from one DDS_DynamicData object to another efficiently. Suppose the following data structure:
struct Bar { short theShort; }; struct Foo { Bar theBar; };
Support we have two instances of Foo:
foo_dst
and foo_src
. We want to replace the contents of foo_dst.theBar
with the contents of foo_src.theBar
. Error handling has been omitted for the sake of brevity.
DDS_DynamicData* foo_dst = ...; DDS_DynamicData* foo_src = ...; DDS_DynamicData* bar = new DDS_DynamicData(NULL, myProperties); // Point to the source of the copy: foo_src->bind_complex_member( "theBar", DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED, bar); // Just one copy: foo_dst->set_complex_member( "theBar", DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED, bar); // Tear down: foo_src->unbind_complex_member(bar); delete bar;
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<in>> The source DDS_DynamicData object whose contents will be copied. |
DDS_ReturnCode_t DDS_DynamicData::set_long_array | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedLong | length, | |||
const DDS_Long * | array | |||
) |
Set the contents of the given array member.
This method will perform an automatic conversion to DDS_LongSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
length | <<in>> The length of array . | |
array | <<in>> The elements to copy. |
DDS_ReturnCode_t DDS_DynamicData::set_short_array | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedLong | length, | |||
const DDS_Short * | array | |||
) |
Set the contents of the given array member.
This method will perform an automatic conversion to DDS_ShortSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
length | <<in>> The length of array . | |
array | <<in>> The elements to copy. |
DDS_ReturnCode_t DDS_DynamicData::set_ulong_array | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedLong | length, | |||
const DDS_UnsignedLong * | array | |||
) |
Set the contents of the given array member.
This method will perform an automatic conversion to DDS_UnsignedLongSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
length | <<in>> The length of array . | |
array | <<in>> The elements to copy. |
DDS_ReturnCode_t DDS_DynamicData::set_ushort_array | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedLong | length, | |||
const DDS_UnsignedShort * | array | |||
) |
Set the contents of the given array member.
This method will perform an automatic conversion to DDS_UnsignedShortSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
length | <<in>> The length of array . | |
array | <<in>> The elements to copy. |
DDS_ReturnCode_t DDS_DynamicData::set_float_array | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedLong | length, | |||
const DDS_Float * | array | |||
) |
Set the contents of the given array member.
This method will perform an automatic conversion to DDS_FloatSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
length | <<in>> The length of array . | |
array | <<in>> The elements to copy. |
DDS_ReturnCode_t DDS_DynamicData::set_double_array | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedLong | length, | |||
const DDS_Double * | array | |||
) |
Set the contents of the given array member.
This method will perform an automatic conversion to DDS_DoubleSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
length | <<in>> The length of array . | |
array | <<in>> The elements to copy. |
DDS_ReturnCode_t DDS_DynamicData::set_boolean_array | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedLong | length, | |||
const DDS_Boolean * | array | |||
) |
Set the contents of the given array member.
This method will perform an automatic conversion to DDS_BooleanSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
length | <<in>> The length of array . | |
array | <<in>> The elements to copy. |
DDS_ReturnCode_t DDS_DynamicData::set_char_array | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedLong | length, | |||
const DDS_Char * | array | |||
) |
Set the contents of the given array member.
This method will perform an automatic conversion to DDS_CharSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
length | <<in>> The length of array . | |
array | <<in>> The elements to copy. |
DDS_ReturnCode_t DDS_DynamicData::set_octet_array | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedLong | length, | |||
const DDS_Octet * | array | |||
) |
Set the contents of the given array member.
This method will perform an automatic conversion to DDS_OctetSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
length | <<in>> The length of array . | |
array | <<in>> The elements to copy. |
DDS_ReturnCode_t DDS_DynamicData::set_longlong_array | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedLong | length, | |||
const DDS_LongLong * | array | |||
) |
Set the contents of the given array member.
This method will perform an automatic conversion to DDS_LongLongSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
length | <<in>> The length of array . | |
array | <<in>> The elements to copy. |
DDS_ReturnCode_t DDS_DynamicData::set_ulonglong_array | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedLong | length, | |||
const DDS_UnsignedLongLong * | array | |||
) |
Set the contents of the given array member.
This method will perform an automatic conversion to DDS_UnsignedLongLongSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
length | <<in>> The length of array . | |
array | <<in>> The elements to copy. |
DDS_ReturnCode_t DDS_DynamicData::set_longdouble_array | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedLong | length, | |||
const DDS_LongDouble * | array | |||
) |
Set the contents of the given array member.
This method will perform an automatic conversion to DDS_LongDoubleSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
length | <<in>> The length of array . | |
array | <<in>> The elements to copy. |
DDS_ReturnCode_t DDS_DynamicData::set_wchar_array | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
DDS_UnsignedLong | length, | |||
const DDS_Wchar * | array | |||
) |
Set the contents of the given array member.
This method will perform an automatic conversion to DDS_WcharSeq.
If the destination array is insufficiently long to store the data, this operation will fail without copying anything.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
length | <<in>> The length of array . | |
array | <<in>> The elements to copy. |
DDS_ReturnCode_t DDS_DynamicData::set_long_seq | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const DDS_LongSeq & | value | |||
) |
Set the contents of the given sequence member.
This method will perform an automatic conversion to an array of DDS_Long.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<out>> A sequence, from which the elements will be copied. |
DDS_ReturnCode_t DDS_DynamicData::set_short_seq | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const DDS_ShortSeq & | value | |||
) |
Set the contents of the given sequence member.
This method will perform an automatic conversion to an array of DDS_Short.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<out>> A sequence, from which the elements will be copied. |
DDS_ReturnCode_t DDS_DynamicData::set_ulong_seq | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const DDS_UnsignedLongSeq & | value | |||
) |
Set the contents of the given sequence member.
This method will perform an automatic conversion to an array of DDS_UnsignedLong.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<out>> A sequence, from which the elements will be copied. |
DDS_ReturnCode_t DDS_DynamicData::set_ushort_seq | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const DDS_UnsignedShortSeq & | value | |||
) |
Set the contents of the given sequence member.
This method will perform an automatic conversion to an array of DDS_UnsignedShort.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<out>> A sequence, from which the elements will be copied. |
DDS_ReturnCode_t DDS_DynamicData::set_float_seq | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const DDS_FloatSeq & | value | |||
) |
Set the contents of the given sequence member.
This method will perform an automatic conversion to an array of DDS_Float.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<out>> A sequence, from which the elements will be copied. |
DDS_ReturnCode_t DDS_DynamicData::set_double_seq | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const DDS_DoubleSeq & | value | |||
) |
Set the contents of the given sequence member.
This method will perform an automatic conversion to an array of DDS_Double.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<out>> A sequence, from which the elements will be copied. |
DDS_ReturnCode_t DDS_DynamicData::set_boolean_seq | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const DDS_BooleanSeq & | value | |||
) |
Set the contents of the given sequence member.
This method will perform an automatic conversion to an array of DDS_Boolean.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<out>> A sequence, from which the elements will be copied. |
DDS_ReturnCode_t DDS_DynamicData::set_char_seq | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const DDS_CharSeq & | value | |||
) |
Set the contents of the given sequence member.
This method will perform an automatic conversion to an array of DDS_Char.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<out>> A sequence, from which the elements will be copied. |
DDS_ReturnCode_t DDS_DynamicData::set_octet_seq | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const DDS_OctetSeq & | value | |||
) |
Set the contents of the given sequence member.
This method will perform an automatic conversion to an array of DDS_Octet.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<out>> A sequence, from which the elements will be copied. |
DDS_ReturnCode_t DDS_DynamicData::set_longlong_seq | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const DDS_LongLongSeq & | value | |||
) |
Set the contents of the given sequence member.
This method will perform an automatic conversion to an array of DDS_LongLong.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<out>> A sequence, from which the elements will be copied. |
DDS_ReturnCode_t DDS_DynamicData::set_ulonglong_seq | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const DDS_UnsignedLongLongSeq & | value | |||
) |
Set the contents of the given sequence member.
This method will perform an automatic conversion to an array of DDS_UnsignedLongLong.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<out>> A sequence, from which the elements will be copied. |
DDS_ReturnCode_t DDS_DynamicData::set_longdouble_seq | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const DDS_LongDoubleSeq & | value | |||
) |
Set the contents of the given sequence member.
This method will perform an automatic conversion to an array of DDS_LongDouble.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<out>> A sequence, from which the elements will be copied. |
DDS_ReturnCode_t DDS_DynamicData::set_wchar_seq | ( | const char * | member_name, | |
DDS_DynamicDataMemberId | member_id, | |||
const DDS_WcharSeq & | value | |||
) |
Set the contents of the given sequence member.
This method will perform an automatic conversion to an array of DDS_Wchar.
member_name | <<in>> The name of the member or NULL to look up the member by its ID. | |
member_id | <<in>> The ID of the member or DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs. | |
value | <<out>> A sequence, from which the elements will be copied. |