RTI Connext Java API  Version 5.0.0
DynamicData Class Reference

A sample of any complex data type, which can be inspected and manipulated reflectively. More...

Inheritance diagram for DynamicData:
Copyable

Public Member Functions

void delete ()
 Finalize and deallocate this com.rti.dds.dynamicdata.DynamicData sample.
 
boolean equals (Object o)
 Indicate whether the contents of another com.rti.dds.dynamicdata.DynamicData sample are the same as those of this one.
 
Object copy_from (Object src)
 Deeply copy from the given object to this object.
 
void clear_all_members ()
 Clear the contents of all data members of this object, including key members.
 
void clear_nonkey_members ()
 Clear the contents of all data members of this object, not including key members.
 
void clear_member (String member_name, int member_id)
 Clear the contents of a single data member of this object.
 
void print (File fp, int indent)
 Output a textual representation of this object and its contents to the given file.
 
void get_info (DynamicDataInfo info_out)
 Fill in the given descriptor with information about this com.rti.dds.dynamicdata.DynamicData.
 
void bind_type (TypeCode type)
 If this com.rti.dds.dynamicdata.DynamicData object is not yet associated with a data type, set that type now to the given com.rti.dds.typecode.TypeCode.
 
void unbind_type ()
 Dissociate this com.rti.dds.dynamicdata.DynamicData object from any particular data type.
 
void bind_complex_member (DynamicData value_out, String member_name, int member_id)
 Use another com.rti.dds.dynamicdata.DynamicData object to provide access to a complex field of this com.rti.dds.dynamicdata.DynamicData object.
 
void unbind_complex_member (DynamicData value)
 Tear down the association created by a com.rti.dds.dynamicdata.DynamicData.bind_complex_member operation, committing any changes to the outer object since then.
 
TypeCode get_type ()
 Get the data type, of which this com.rti.dds.dynamicdata.DynamicData represents an instance.
 
TCKind get_type_kind ()
 Get the kind of this object's data type.
 
int get_member_count ()
 Get the number of members in this sample.
 
boolean member_exists (String member_name, int member_id)
 Indicates whether a member of a particular name/ID exists in this data sample.
 
boolean member_exists_in_type (String member_name, int member_id)
 Indicates whether a member of a particular name/ID exists in this data sample's type.
 
void get_member_info (DynamicDataMemberInfo info, String member_name, int member_id)
 Fill in the given descriptor with information about the identified member of this com.rti.dds.dynamicdata.DynamicData sample.
 
void get_member_info_by_index (DynamicDataMemberInfo info, int index)
 Fill in the given descriptor with information about the identified member of this com.rti.dds.dynamicdata.DynamicData sample.
 
TypeCode get_member_type (String member_name, int member_id)
 Get the type of the given member of this sample.
 
boolean is_member_key (String member_name, int member_id)
 Indicates whether a given member forms part of the key of this sample's data type.
 
int get_int (String member_name, int member_id)
 Get the value of the given field, which is of type com.rti.dds.infrastructure.int or another type implicitly convertible to it (byte, char, short, com.rti.dds.infrastructure.short, or com.rti.dds.util.Enum).
 
int get_int_array (int[] array, String member_name, int member_id)
 Get a copy of the given array member.
 
void get_int_seq (IntSeq seq, String member_name, int member_id)
 Get a copy of the given sequence member.
 
short get_short (String member_name, int member_id)
 Get the value of the given field, which is of type short or another type implicitly convertible to it (byte or char).
 
int get_short_array (short[] array, String member_name, int member_id)
 Get a copy of the given array member.
 
void get_short_seq (ShortSeq seq, String member_name, int member_id)
 Get a copy of the given sequence member.
 
float get_float (String member_name, int member_id)
 Get the value of the given field, which is of type float.
 
int get_float_array (float[] array, String member_name, int member_id)
 Get a copy of the given array member.
 
void get_float_seq (FloatSeq seq, String member_name, int member_id)
 Get a copy of the given sequence member.
 
double get_double (String member_name, int member_id)
 Get the value of the given field, which is of type double or another type implicitly convertible to it (float).
 
int get_double_array (double[] array, String member_name, int member_id)
 Get a copy of the given array member.
 
void get_double_seq (DoubleSeq seq, String member_name, int member_id)
 Get a copy of the given sequence member.
 
boolean get_boolean (String member_name, int member_id)
 Get the value of the given field, which is of type boolean.
 
int get_boolean_array (boolean[] array, String member_name, int member_id)
 Get a copy of the given array member.
 
void get_boolean_seq (BooleanSeq seq, String member_name, int member_id)
 Get a copy of the given sequence member.
 
char get_char (String member_name, int member_id)
 Get the value of the given field, which is of type char.
 
int get_char_array (char[] array, String member_name, int member_id)
 Get a copy of the given array member.
 
void get_char_seq (CharSeq seq, String member_name, int member_id)
 Get a copy of the given sequence member.
 
byte get_byte (String member_name, int member_id)
 Get the value of the given field, which is of type byte.
 
int get_byte_array (byte[] array, String member_name, int member_id)
 Get a copy of the given array member.
 
void get_byte_seq (ByteSeq seq, String member_name, int member_id)
 Get a copy of the given sequence member.
 
long get_long (String member_name, int member_id)
 Get the value of the given field, which is of type long or another type implicitly convertible to it (byte, char, short, com.rti.dds.infrastructure.short, com.rti.dds.infrastructure.int, com.rti.dds.infrastructure.long, or com.rti.dds.util.Enum).
 
int get_long_array (long[] array, String member_name, int member_id)
 Get a copy of the given array member.
 
void get_long_seq (LongSeq seq, String member_name, int member_id)
 Get a copy of the given sequence member.
 
String get_string (String member_name, int member_id)
 Get the value of the given field, which is of type com.rti.dds.infrastructure.String.
 
void get_complex_member (DynamicData value_out, String member_name, int member_id)
 Get a copy of the value of the given field, which is of some composed type.
 
void set_int (String member_name, int member_id, int value)
 Set the value of the given field, which is of type com.rti.dds.infrastructure.int.
 
void set_int_array (String member_name, int member_id, int[] array)
 Set the contents of the given array member.
 
void set_int_seq (String member_name, int member_id, IntSeq value)
 Set the contents of the given sequence member.
 
void set_short (String member_name, int member_id, short value)
 Set the value of the given field, which is of type short.
 
void set_short_array (String member_name, int member_id, short[] array)
 Set the contents of the given array member.
 
void set_short_seq (String member_name, int member_id, ShortSeq value)
 Set the contents of the given sequence member.
 
void set_float (String member_name, int member_id, float value)
 Set the value of the given field, which is of type float.
 
void set_float_array (String member_name, int member_id, float[] array)
 Set the contents of the given array member.
 
void set_float_seq (String member_name, int member_id, FloatSeq value)
 Set the contents of the given sequence member.
 
void set_double (String member_name, int member_id, double value)
 Set the value of the given field, which is of type double.
 
void set_double_array (String member_name, int member_id, double[] array)
 Set the contents of the given array member.
 
void set_double_seq (String member_name, int member_id, DoubleSeq value)
 Set the contents of the given sequence member.
 
void set_boolean (String member_name, int member_id, boolean value)
 Set the value of the given field, which is of type boolean.
 
void set_boolean_array (String member_name, int member_id, boolean[] array)
 Set the contents of the given array member.
 
void set_boolean_seq (String member_name, int member_id, BooleanSeq value)
 Set the contents of the given sequence member.
 
void set_char (String member_name, int member_id, char value)
 Set the value of the given field, which is of type char.
 
void set_char_array (String member_name, int member_id, char[] array)
 Set the contents of the given array member.
 
void set_char_seq (String member_name, int member_id, CharSeq value)
 Set the contents of the given sequence member.
 
void set_byte (String member_name, int member_id, byte value)
 Set the value of the given field, which is of type byte.
 
void set_byte_array (String member_name, int member_id, byte[] array)
 Set the contents of the given array member.
 
void set_byte_seq (String member_name, int member_id, ByteSeq value)
 Set the contents of the given sequence member.
 
void set_long (String member_name, int member_id, long value)
 Set the value of the given field, which is of type long.
 
void set_long_array (String member_name, int member_id, long[] array)
 Set the contents of the given array member.
 
void set_long_seq (String member_name, int member_id, LongSeq value)
 Set the contents of the given sequence member.
 
void set_string (String member_name, int member_id, String value)
 Set the value of the given field of type com.rti.dds.infrastructure.String.
 
void set_complex_member (String member_name, int member_id, DynamicData value)
 Copy the state of the given com.rti.dds.dynamicdata.DynamicData object into a member of this object.
 
 DynamicData (TypeCode type, DynamicDataProperty_t property)
 The constructor for new com.rti.dds.dynamicdata.DynamicData objects.
 
- Public Member Functions inherited from Copyable
Object copy_from (Object src)
 Copy value of a data type from source.
 

Static Public Attributes

static final int MEMBER_ID_UNSPECIFIED
 A sentinel value that indicates that no member ID is needed in order to perform some operation.
 
static final DynamicDataProperty_t PROPERTY_DEFAULT
 Sentinel constant indicating default values for com.rti.dds.dynamicdata.DynamicDataProperty_t.
 

Detailed Description

A sample of any complex data type, which can be inspected and manipulated reflectively.

Objects of type com.rti.dds.dynamicdata.DynamicData represent corresponding objects of the type identified by their com.rti.dds.typecode.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");

com.rti.dds.dynamicdata.DynamicData objects can represent any complex data type, including those of type kinds com.rti.dds.typecode.TCKind.TK_ARRAY, com.rti.dds.typecode.TCKind.TK_SEQUENCE, com.rti.dds.typecode.TCKind.TK_STRUCT, com.rti.dds.typecode.TCKind.TK_UNION, com.rti.dds.typecode.TCKind.TK_VALUE, and com.rti.dds.typecode.TCKind.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.

Member Names and IDs

The members of a data type can be identified in one of two ways: by their name or by their numeric ID. The former is often more transparent to human users; the latter is typically faster.

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;
};

For unions (com.rti.dds.typecode.TCKind.TK_UNION), the ID of a member is the discriminator value corresponding to that member.

Arrays and Sequences

The "members" of array and sequence types, unlike those of structure and union types, don't have names or explicit member IDs. However, they may nevertheless be accessed by "ID": the ID is one more than the index. (The first element has ID 1, the second 2, etc.)

Multi-dimensional arrays are effectively flattened by this pattern. 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.

To determine the length of a collection-typed member of a structure or union, you have two choices:

  1. Get the length along with the data: call the appropriate array accessor (see Getters and Setters) and check the resulting length.
  2. Get the length without getting the data itself: call com.rti.dds.dynamicdata.DynamicData.get_member_info and check the resulting com.rti.dds.dynamicdata.DynamicDataMemberInfo.element_count.

Available Functionality

The Dynamic Data API is large when measured by the number of methods it contains. But each method falls into one of a very small number of categories. You will find it easier to navigate this documentation if you understand these categories.

Lifecycle and Utility Methods

Managing the lifecycle of com.rti.dds.dynamicdata.DynamicData objects is simple. You have two choices:

  1. Usually, you will go through a com.rti.dds.dynamicdata.DynamicDataTypeSupport factory object, which will ensure that the type and property information for the new com.rti.dds.dynamicdata.DynamicData object corresponds to a registered type in your system.
  2. In certain advanced cases, such as when you're navigating a nested structure, you will want to have a com.rti.dds.dynamicdata.DynamicData object that is not bound up front to any particular type, or you will want to initialize the object in a custom way. In that case, you can call the constructor directly.
Lifecycle
com.rti.dds.dynamicdata.DynamicDataTypeSupport com.rti.dds.dynamicdata.DynamicData
com.rti.dds.dynamicdata.DynamicDataTypeSupport.create_data com.rti.dds.dynamicdata.DynamicData.DynamicData.DynamicData


You can also copy com.rti.dds.dynamicdata.DynamicData objects:

  • com.rti.dds.dynamicdata.DynamicData.copy

You can test them for equality:

  • com.rti.dds.dynamicdata.DynamicData.DynamicData.equals

And you can print their contents:

Getters and Setters

Most methods get or set the value of some field. These methods are named according to the type of the field they access.

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.

Integer Type Names Across Languages
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 com.rti.dds.dynamicdata.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 com.rti.dds.infrastructure.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).

Basic Types
GetSet
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_int com.rti.dds.dynamicdata.DynamicData.DynamicData.set_int
com.rti.dds.dynamicdata.DynamicData.get_short com.rti.dds.dynamicdata.DynamicData.set_short
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_long com.rti.dds.dynamicdata.DynamicData.DynamicData.set_long
com.rti.dds.dynamicdata.DynamicData.get_float com.rti.dds.dynamicdata.DynamicData.set_float
com.rti.dds.dynamicdata.DynamicData.get_double com.rti.dds.dynamicdata.DynamicData.set_double
com.rti.dds.dynamicdata.DynamicData.get_boolean com.rti.dds.dynamicdata.DynamicData.set_boolean
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_byte com.rti.dds.dynamicdata.DynamicData.DynamicData.set_byte
com.rti.dds.dynamicdata.DynamicData.get_char com.rti.dds.dynamicdata.DynamicData.set_char
com.rti.dds.dynamicdata.DynamicData.get_string com.rti.dds.dynamicdata.DynamicData.set_string
Structures, Arrays, and Other Complex Types
GetSet
com.rti.dds.dynamicdata.DynamicData.get_complex_member com.rti.dds.dynamicdata.DynamicData.set_complex_member
Arrays of Basic Types
GetSet
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_int_array com.rti.dds.dynamicdata.DynamicData.DynamicData.set_int_array
com.rti.dds.dynamicdata.DynamicData.get_short_array com.rti.dds.dynamicdata.DynamicData.set_short_array
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_long_array com.rti.dds.dynamicdata.DynamicData.DynamicData.set_long_array
com.rti.dds.dynamicdata.DynamicData.get_float_array com.rti.dds.dynamicdata.DynamicData.set_float_array
com.rti.dds.dynamicdata.DynamicData.get_double_array com.rti.dds.dynamicdata.DynamicData.set_double_array
com.rti.dds.dynamicdata.DynamicData.get_boolean_array com.rti.dds.dynamicdata.DynamicData.set_boolean
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_byte_array com.rti.dds.dynamicdata.DynamicData.DynamicData.set_byte_array
com.rti.dds.dynamicdata.DynamicData.get_char_array com.rti.dds.dynamicdata.DynamicData.set_char_array
Sequences of Basic Types
GetSet
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_int_seq com.rti.dds.dynamicdata.DynamicData.DynamicData.set_int_seq
com.rti.dds.dynamicdata.DynamicData.get_short_seq com.rti.dds.dynamicdata.DynamicData.set_short_seq
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_long_seq com.rti.dds.dynamicdata.DynamicData.DynamicData.set_long_seq
com.rti.dds.dynamicdata.DynamicData.get_float_seq com.rti.dds.dynamicdata.DynamicData.set_float_seq
com.rti.dds.dynamicdata.DynamicData.get_double_seq com.rti.dds.dynamicdata.DynamicData.set_double_seq
com.rti.dds.dynamicdata.DynamicData.get_boolean_seq com.rti.dds.dynamicdata.DynamicData.set_boolean_seq
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_byte_seq com.rti.dds.dynamicdata.DynamicData.DynamicData.set_byte_seq
com.rti.dds.dynamicdata.DynamicData.get_char_seq com.rti.dds.dynamicdata.DynamicData.set_char_seq

In addition to getting or setting a field, you can "clear" its value; that is, set it to a default zero value.

Query and Iteration

Not all components of your application will have static knowledge of all of the fields of your type. Sometimes, you will want to query meta-data about the fields that appear in a given data sample.

Type/Object Association

Sometimes, you may want to change the association between a data object and its type. This is not something you can do with a typical object, but with com.rti.dds.dynamicdata.DynamicData objects, it is a powerful capability. It allows you to, for example, examine nested structures without copying them by using a "bound" com.rti.dds.dynamicdata.DynamicData object as a view into an enclosing com.rti.dds.dynamicdata.DynamicData object.

Keys

Keys can be specified in dynamically defined types just as they can in types defined in generated code. However, there are some minor restrictions when sparse value types are involved (see com.rti.dds.typecode.TCKind.TK_SPARSE).

  • If a type has a member that is of a sparse value type, that member cannot be a key for the enclosing type.
  • Sparse value types themselves may have at most a single key field. That field may itself be of any type.

Performance

Due to the way in which com.rti.dds.dynamicdata.DynamicData objects manage their internal state, it is typically more efficient, when setting the field values of a com.rti.dds.dynamicdata.DynamicData for the first time, to do so in the declared order of those fields.

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:

MT Safety:
UNSAFE. In general, using a single com.rti.dds.dynamicdata.DynamicData object concurrently from multiple threads is unsafe.

Constructor & Destructor Documentation

DynamicData ( TypeCode  type,
DynamicDataProperty_t  property 
)

The constructor for new com.rti.dds.dynamicdata.DynamicData objects.

The type parameter may be null. In that case, this com.rti.dds.dynamicdata.DynamicData must be bound with com.rti.dds.dynamicdata.DynamicData.bind_type or com.rti.dds.dynamicdata.DynamicData.bind_complex_member before it can be used.

If the com.rti.dds.typecode.TypeCode is not null, the newly constructed com.rti.dds.dynamicdata.DynamicData object will retain a reference to it. It is not safe to delete the com.rti.dds.typecode.TypeCode until all samples that use it have themselves been deleted. You have two options:

In most cases, it is not necessary to call this constructor explicitly. Instead, use com.rti.dds.dynamicdata.DynamicDataTypeSupport.create_data, and the com.rti.dds.typecode.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 com.rti.dds.dynamicdata.DynamicDataTypeSupport object maintains the com.rti.dds.typecode.TypeCode used by the samples it creates.

Parameters
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 com.rti.dds.dynamicdata.DYNAMIC_DATA_PROPERTY_DEFAULT.
See Also
com.rti.dds.dynamicdata.DynamicDataTypeSupport.create_data

Member Function Documentation

void delete ( )

Finalize and deallocate this com.rti.dds.dynamicdata.DynamicData sample.

MT Safety:
UNSAFE.
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.DynamicData
boolean equals ( Object  o)

Indicate whether the contents of another com.rti.dds.dynamicdata.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.

MT Safety:
UNSAFE.
See Also
http://java.sun.com/javase/6/docs/api/java/lang/Object.html#equals(java.lang.Object)
com.rti.dds.typecode.TCKind.TK_SPARSE
Object copy_from ( Object  src)

Deeply copy from the given object to this object.

MT Safety:
UNSAFE.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
void clear_all_members ( )

Clear the contents of all data members of this object, including key members.

MT Safety:
UNSAFE.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.clear_nonkey_members
com.rti.dds.dynamicdata.DynamicData.clear_member
void 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.

MT Safety:
UNSAFE.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.typecode.TCKind.TK_SPARSE
com.rti.dds.dynamicdata.DynamicData.clear_all_members
com.rti.dds.dynamicdata.DynamicData.clear_member
void clear_member ( String  member_name,
int  member_id 
)

Clear the contents of a single data member of this object.

This method is only applicable to sparse value types.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.typecode.TCKind.TK_SPARSE
com.rti.dds.dynamicdata.DynamicData.clear_all_members
com.rti.dds.dynamicdata.DynamicData.clear_nonkey_members
void print ( File  fp,
int  indent 
)

Output a textual representation of this object and its contents to the given file.

This method is equivalent to com.rti.dds.dynamicdata.DynamicDataTypeSupport.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.

MT Safety:
UNSAFE.
Parameters
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.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicDataTypeSupport.print_data
void get_info ( DynamicDataInfo  info_out)

Fill in the given descriptor with information about this com.rti.dds.dynamicdata.DynamicData.

MT Safety:
UNSAFE.
Parameters
info_out<<out>> The descriptor object whose contents will be overwritten by this operation.
void bind_type ( TypeCode  type)

If this com.rti.dds.dynamicdata.DynamicData object is not yet associated with a data type, set that type now to the given com.rti.dds.typecode.TypeCode.

This advanced operation allows you to reuse a single com.rti.dds.dynamicdata.DynamicData object with multiple data types.

DynamicData myData = new DynamicData(null, myProperties);
TypeCode myType = ...;
myData.bind_type(myType);
try {
// Do something...
} finally {
myData.unbind_type();
}
myData.delete();

Note that the com.rti.dds.dynamicdata.DynamicData object will retain a reference to the com.rti.dds.typecode.TypeCode object you provide. It is not safe to delete the com.rti.dds.typecode.TypeCode until after it is unbound. You have two options:

MT Safety:
UNSAFE.
Parameters
type<<in>> The type to associate with this com.rti.dds.dynamicdata.DynamicData object.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.unbind_type
void unbind_type ( )

Dissociate this com.rti.dds.dynamicdata.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.

MT Safety:
UNSAFE.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.bind_type
com.rti.dds.dynamicdata.DynamicData.clear_all_members
void bind_complex_member ( DynamicData  value_out,
String  member_name,
int  member_id 
)

Use another com.rti.dds.dynamicdata.DynamicData object to provide access to a complex field of this com.rti.dds.dynamicdata.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 com.rti.dds.dynamicdata.DynamicData object to that member. This operation will bind the type code of the member to the provided com.rti.dds.dynamicdata.DynamicData object and perform additional initialization.

The following example demonstrates the usage pattern. Note that error handling has been omitted for brevity.

DynamicData outer = ...;
DynamicData toBeBound = new DynamicData(null, myProperties);
outer.bind_complex_member(
toBeBound,
"complexMember",
DynamicData.MEMBER_ID_UNSPECIFIED);
try {
float theFloatValue = toBeBound.get_float(
"theFloat"
DynamicData.MEMBER_ID_UNSPECIFIED);
} finally {
outer.unbind_complex_member(toBeBound);
}
toBeBound.delete();

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 com.rti.dds.typecode.TypeCode.

Only a single member of a given com.rti.dds.dynamicdata.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 com.rti.dds.dynamicdata.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 com.rti.dds.dynamicdata.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 com.rti.dds.dynamicdata.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.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.unbind_complex_member
com.rti.dds.dynamicdata.DynamicData.get_complex_member
void unbind_complex_member ( DynamicData  value)

Tear down the association created by a com.rti.dds.dynamicdata.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 com.rti.dds.dynamicdata.DynamicData.bind_complex_member on a data sample, you must unbind before writing or deleting the sample.

MT Safety:
UNSAFE.
Parameters
value<<in>> The same object you passed to com.rti.dds.dynamicdata.DynamicData.bind_complex_member. This argument is used for error checking purposes.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.bind_complex_member
TypeCode get_type ( )

Get the data type, of which this com.rti.dds.dynamicdata.DynamicData represents an instance.

MT Safety:
UNSAFE.
TCKind get_type_kind ( )

Get the kind of this object's data type.

This is a convenience method. It's equivalent to calling com.rti.dds.dynamicdata.DynamicData.get_type followed by com.rti.dds.typecode.TypeCode.kind.

MT Safety:
UNSAFE.
int get_member_count ( )

Get the number of members in this sample.

For objects of type kind com.rti.dds.typecode.TCKind.TK_ARRAY or com.rti.dds.typecode.TCKind.TK_SEQUENCE, this method returns the number of elements in the collection.

For objects of type kind com.rti.dds.typecode.TCKind.TK_STRUCT or com.rti.dds.typecode.TCKind.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 com.rti.dds.typecode.TCKind.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.

MT Safety:
UNSAFE.
See Also
com.rti.dds.dynamicdata.DynamicData.get_member_info_by_index
boolean member_exists ( String  member_name,
int  member_id 
)

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 com.rti.dds.typecode.TCKind.TK_SPARSE, the result of this method will always be the same as that of com.rti.dds.dynamicdata.DynamicData.member_exists_in_type.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
See Also
com.rti.dds.dynamicdata.DynamicData.member_exists_in_type
com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED
boolean member_exists_in_type ( String  member_name,
int  member_id 
)

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 com.rti.dds.typecode.TCKind.TK_SPARSE, the result of this method will always be the same as that of com.rti.dds.dynamicdata.DynamicData.member_exists.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
See Also
com.rti.dds.dynamicdata.DynamicData.member_exists
com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED
void get_member_info ( DynamicDataMemberInfo  info,
String  member_name,
int  member_id 
)

Fill in the given descriptor with information about the identified member of this com.rti.dds.dynamicdata.DynamicData sample.

This operation is valid for objects of com.rti.dds.typecode.TCKind com.rti.dds.typecode.TCKind.TK_ARRAY, com.rti.dds.typecode.TCKind.TK_SEQUENCE, com.rti.dds.typecode.TCKind.TK_STRUCT, com.rti.dds.typecode.TCKind.TK_VALUE, and com.rti.dds.typecode.TCKind.TK_SPARSE.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.get_member_info_by_index
com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED
void get_member_info_by_index ( DynamicDataMemberInfo  info,
int  index 
)

Fill in the given descriptor with information about the identified member of this com.rti.dds.dynamicdata.DynamicData sample.

This operation is valid for objects of com.rti.dds.typecode.TCKind com.rti.dds.typecode.TCKind.TK_ARRAY, com.rti.dds.typecode.TCKind.TK_SEQUENCE, com.rti.dds.typecode.TCKind.TK_STRUCT, com.rti.dds.typecode.TCKind.TK_VALUE, and com.rti.dds.typecode.TCKind.TK_SPARSE.

MT Safety:
UNSAFE.
Parameters
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.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.get_member_info
com.rti.dds.dynamicdata.DynamicData.get_member_count
com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED
TypeCode get_member_type ( String  member_name,
int  member_id 
)

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 com.rti.dds.typecode.TCKind com.rti.dds.typecode.TCKind.TK_ARRAY, com.rti.dds.typecode.TCKind.TK_SEQUENCE, com.rti.dds.typecode.TCKind.TK_STRUCT, com.rti.dds.typecode.TCKind.TK_VALUE, and com.rti.dds.typecode.TCKind.TK_SPARSE. For type kinds com.rti.dds.typecode.TCKind.TK_ARRAY and com.rti.dds.typecode.TCKind.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.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.get_member_info
com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED
boolean is_member_key ( String  member_name,
int  member_id 
)

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 com.rti.dds.typecode.TCKind.TK_STRUCT, com.rti.dds.typecode.TCKind.TK_VALUE, or com.rti.dds.typecode.TCKind.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.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
int get_int ( String  member_name,
int  member_id 
)

Get the value of the given field, which is of type com.rti.dds.infrastructure.int or another type implicitly convertible to it (byte, char, short, com.rti.dds.infrastructure.short, or com.rti.dds.util.Enum).

The member may be specified by name or by ID.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.set_int
int get_int_array ( int[]  array,
String  member_name,
int  member_id 
)

Get a copy of the given array member.

This method will perform an automatic conversion from com.rti.dds.infrastructure.IntSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
array<<out>> An already-allocated array, 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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.set_int_array
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_int_seq
void get_int_seq ( IntSeq  seq,
String  member_name,
int  member_id 
)

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 com.rti.dds.infrastructure.int.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.set_int_seq
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_int_array
short get_short ( String  member_name,
int  member_id 
)

Get the value of the given field, which is of type short or another type implicitly convertible to it (byte or char).

The member may be specified by name or by ID.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.set_short
int get_short_array ( short[]  array,
String  member_name,
int  member_id 
)

Get a copy of the given array member.

This method will perform an automatic conversion from com.rti.dds.infrastructure.ShortSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
array<<out>> An already-allocated array, 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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.set_short_array
com.rti.dds.dynamicdata.DynamicData.get_short_seq
void get_short_seq ( ShortSeq  seq,
String  member_name,
int  member_id 
)

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 short.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.set_short_seq
com.rti.dds.dynamicdata.DynamicData.get_short_array
float get_float ( String  member_name,
int  member_id 
)

Get the value of the given field, which is of type float.

The member may be specified by name or by ID.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.set_float
int get_float_array ( float[]  array,
String  member_name,
int  member_id 
)

Get a copy of the given array member.

This method will perform an automatic conversion from com.rti.dds.infrastructure.FloatSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
array<<out>> An already-allocated array, 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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.set_float_array
com.rti.dds.dynamicdata.DynamicData.get_float_seq
void get_float_seq ( FloatSeq  seq,
String  member_name,
int  member_id 
)

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 float.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.set_float_seq
com.rti.dds.dynamicdata.DynamicData.get_float_array
double get_double ( String  member_name,
int  member_id 
)

Get the value of the given field, which is of type double or another type implicitly convertible to it (float).

The member may be specified by name or by ID.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.set_double
int get_double_array ( double[]  array,
String  member_name,
int  member_id 
)

Get a copy of the given array member.

This method will perform an automatic conversion from com.rti.dds.infrastructure.DoubleSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
array<<out>> An already-allocated array, 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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.set_double_array
com.rti.dds.dynamicdata.DynamicData.get_double_seq
void get_double_seq ( DoubleSeq  seq,
String  member_name,
int  member_id 
)

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 double.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.set_double_seq
com.rti.dds.dynamicdata.DynamicData.get_double_array
boolean get_boolean ( String  member_name,
int  member_id 
)

Get the value of the given field, which is of type boolean.

The member may be specified by name or by ID.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.set_boolean
int get_boolean_array ( boolean[]  array,
String  member_name,
int  member_id 
)

Get a copy of the given array member.

This method will perform an automatic conversion from com.rti.dds.infrastructure.BooleanSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
array<<out>> An already-allocated array, 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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.set_boolean_array
com.rti.dds.dynamicdata.DynamicData.get_boolean_seq
void get_boolean_seq ( BooleanSeq  seq,
String  member_name,
int  member_id 
)

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 boolean.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.set_boolean_seq
com.rti.dds.dynamicdata.DynamicData.get_boolean_array
char get_char ( String  member_name,
int  member_id 
)

Get the value of the given field, which is of type char.

The member may be specified by name or by ID.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.set_char
int get_char_array ( char[]  array,
String  member_name,
int  member_id 
)

Get a copy of the given array member.

This method will perform an automatic conversion from com.rti.dds.infrastructure.CharSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
array<<out>> An already-allocated array, 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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.set_char_array
com.rti.dds.dynamicdata.DynamicData.get_char_seq
void get_char_seq ( CharSeq  seq,
String  member_name,
int  member_id 
)

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 char.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.set_char_seq
com.rti.dds.dynamicdata.DynamicData.get_char_array
byte get_byte ( String  member_name,
int  member_id 
)

Get the value of the given field, which is of type byte.

The member may be specified by name or by ID.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.set_byte
int get_byte_array ( byte[]  array,
String  member_name,
int  member_id 
)

Get a copy of the given array member.

This method will perform an automatic conversion from com.rti.dds.infrastructure.ByteSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
array<<out>> An already-allocated array, 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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.set_byte_array
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_byte_seq
void get_byte_seq ( ByteSeq  seq,
String  member_name,
int  member_id 
)

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 byte.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.set_byte_seq
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_byte_array
long get_long ( String  member_name,
int  member_id 
)

Get the value of the given field, which is of type long or another type implicitly convertible to it (byte, char, short, com.rti.dds.infrastructure.short, com.rti.dds.infrastructure.int, com.rti.dds.infrastructure.long, or com.rti.dds.util.Enum).

The member may be specified by name or by ID.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.set_long
int get_long_array ( long[]  array,
String  member_name,
int  member_id 
)

Get a copy of the given array member.

This method will perform an automatic conversion from com.rti.dds.infrastructure.LongSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
array<<out>> An already-allocated array, 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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.set_long_array
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_long_seq
void get_long_seq ( LongSeq  seq,
String  member_name,
int  member_id 
)

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 long.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.set_long_seq
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_long_array
String get_string ( String  member_name,
int  member_id 
)

Get the value of the given field, which is of type com.rti.dds.infrastructure.String.

The member may be specified by name or by ID.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.set_string
void get_complex_member ( DynamicData  value_out,
String  member_name,
int  member_id 
)

Get a copy of the value of the given field, which is of some composed type.

The member may be of type kind com.rti.dds.typecode.TCKind.TK_ARRAY, com.rti.dds.typecode.TCKind.TK_SEQUENCE, com.rti.dds.typecode.TCKind.TK_STRUCT, com.rti.dds.typecode.TCKind.TK_VALUE, com.rti.dds.typecode.TCKind.TK_UNION, or com.rti.dds.typecode.TCKind.TK_SPARSE. It may be specified by name or by ID.

This method is logically related to com.rti.dds.dynamicdata.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.

MT Safety:
UNSAFE.
Parameters
value_out<<out>> The com.rti.dds.dynamicdata.DynamicData sample whose contents will be overwritten by this operation. This object must not be a bound member of another com.rti.dds.dynamicdata.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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.set_complex_member
com.rti.dds.dynamicdata.DynamicData.bind_complex_member
void set_int ( String  member_name,
int  member_id,
int  value 
)

Set the value of the given field, which is of type com.rti.dds.infrastructure.int.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<in>> The value to which to set the member.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_int
void set_int_array ( String  member_name,
int  member_id,
int[]  array 
)

Set the contents of the given array member.

This method will perform an automatic conversion to com.rti.dds.infrastructure.IntSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
array<<in>> The elements to copy.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_int_array
com.rti.dds.dynamicdata.DynamicData.DynamicData.set_int_seq
void set_int_seq ( String  member_name,
int  member_id,
IntSeq  value 
)

Set the contents of the given sequence member.

This method will perform an automatic conversion to an array of com.rti.dds.infrastructure.int.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<out>> A sequence, from which the elements will be copied.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_int_seq
com.rti.dds.dynamicdata.DynamicData.DynamicData.set_int_array
void set_short ( String  member_name,
int  member_id,
short  value 
)

Set the value of the given field, which is of type short.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<in>> The value to which to set the member.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_short
void set_short_array ( String  member_name,
int  member_id,
short[]  array 
)

Set the contents of the given array member.

This method will perform an automatic conversion to com.rti.dds.infrastructure.ShortSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
array<<in>> The elements to copy.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_short_array
com.rti.dds.dynamicdata.DynamicData.set_short_seq
void set_short_seq ( String  member_name,
int  member_id,
ShortSeq  value 
)

Set the contents of the given sequence member.

This method will perform an automatic conversion to an array of short.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<out>> A sequence, from which the elements will be copied.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_short_seq
com.rti.dds.dynamicdata.DynamicData.set_short_array
void set_float ( String  member_name,
int  member_id,
float  value 
)

Set the value of the given field, which is of type float.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<in>> The value to which to set the member.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_float
void set_float_array ( String  member_name,
int  member_id,
float[]  array 
)

Set the contents of the given array member.

This method will perform an automatic conversion to com.rti.dds.infrastructure.FloatSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
array<<in>> The elements to copy.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_float_array
com.rti.dds.dynamicdata.DynamicData.set_float_seq
void set_float_seq ( String  member_name,
int  member_id,
FloatSeq  value 
)

Set the contents of the given sequence member.

This method will perform an automatic conversion to an array of float.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<out>> A sequence, from which the elements will be copied.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_float_seq
com.rti.dds.dynamicdata.DynamicData.set_float_array
void set_double ( String  member_name,
int  member_id,
double  value 
)

Set the value of the given field, which is of type double.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<in>> The value to which to set the member.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_double
void set_double_array ( String  member_name,
int  member_id,
double[]  array 
)

Set the contents of the given array member.

This method will perform an automatic conversion to com.rti.dds.infrastructure.DoubleSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
array<<in>> The elements to copy.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_double_array
com.rti.dds.dynamicdata.DynamicData.set_double_seq
void set_double_seq ( String  member_name,
int  member_id,
DoubleSeq  value 
)

Set the contents of the given sequence member.

This method will perform an automatic conversion to an array of double.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<out>> A sequence, from which the elements will be copied.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_double_seq
com.rti.dds.dynamicdata.DynamicData.set_double_array
void set_boolean ( String  member_name,
int  member_id,
boolean  value 
)

Set the value of the given field, which is of type boolean.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<in>> The value to which to set the member.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_boolean
void set_boolean_array ( String  member_name,
int  member_id,
boolean[]  array 
)

Set the contents of the given array member.

This method will perform an automatic conversion to com.rti.dds.infrastructure.BooleanSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
array<<in>> The elements to copy.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_boolean_array
com.rti.dds.dynamicdata.DynamicData.set_boolean_seq
void set_boolean_seq ( String  member_name,
int  member_id,
BooleanSeq  value 
)

Set the contents of the given sequence member.

This method will perform an automatic conversion to an array of boolean.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<out>> A sequence, from which the elements will be copied.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_boolean_seq
com.rti.dds.dynamicdata.DynamicData.set_boolean_array
void set_char ( String  member_name,
int  member_id,
char  value 
)

Set the value of the given field, which is of type char.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<in>> The value to which to set the member.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_char
void set_char_array ( String  member_name,
int  member_id,
char[]  array 
)

Set the contents of the given array member.

This method will perform an automatic conversion to com.rti.dds.infrastructure.CharSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
array<<in>> The elements to copy.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_char_array
com.rti.dds.dynamicdata.DynamicData.set_char_seq
void set_char_seq ( String  member_name,
int  member_id,
CharSeq  value 
)

Set the contents of the given sequence member.

This method will perform an automatic conversion to an array of char.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<out>> A sequence, from which the elements will be copied.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_char_seq
com.rti.dds.dynamicdata.DynamicData.set_char_array
void set_byte ( String  member_name,
int  member_id,
byte  value 
)

Set the value of the given field, which is of type byte.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<in>> The value to which to set the member.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_byte
void set_byte_array ( String  member_name,
int  member_id,
byte[]  array 
)

Set the contents of the given array member.

This method will perform an automatic conversion to com.rti.dds.infrastructure.ByteSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
array<<in>> The elements to copy.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_byte_array
com.rti.dds.dynamicdata.DynamicData.DynamicData.set_byte_seq
void set_byte_seq ( String  member_name,
int  member_id,
ByteSeq  value 
)

Set the contents of the given sequence member.

This method will perform an automatic conversion to an array of byte.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<out>> A sequence, from which the elements will be copied.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_byte_seq
com.rti.dds.dynamicdata.DynamicData.DynamicData.set_byte_array
void set_long ( String  member_name,
int  member_id,
long  value 
)

Set the value of the given field, which is of type long.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<in>> The value to which to set the member.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_long
void set_long_array ( String  member_name,
int  member_id,
long[]  array 
)

Set the contents of the given array member.

This method will perform an automatic conversion to com.rti.dds.infrastructure.LongSeq.

If the destination array is insufficiently long to store the data, this operation will fail without copying anything.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
array<<in>> The elements to copy.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_long_array
com.rti.dds.dynamicdata.DynamicData.DynamicData.set_long_seq
void set_long_seq ( String  member_name,
int  member_id,
LongSeq  value 
)

Set the contents of the given sequence member.

This method will perform an automatic conversion to an array of long.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<out>> A sequence, from which the elements will be copied.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.DynamicData.get_long_seq
com.rti.dds.dynamicdata.DynamicData.DynamicData.set_long_array
void set_string ( String  member_name,
int  member_id,
String  value 
)

Set the value of the given field of type com.rti.dds.infrastructure.String.

MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<in>> The value to which to set the member.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_string
void set_complex_member ( String  member_name,
int  member_id,
DynamicData  value 
)

Copy the state of the given com.rti.dds.dynamicdata.DynamicData object into a member of this object.

The member may be of type kind com.rti.dds.typecode.TCKind.TK_ARRAY, com.rti.dds.typecode.TCKind.TK_SEQUENCE, com.rti.dds.typecode.TCKind.TK_STRUCT, com.rti.dds.typecode.TCKind.TK_VALUE, com.rti.dds.typecode.TCKind.TK_UNION, or com.rti.dds.typecode.TCKind.TK_SPARSE. It may be specified by name or by ID.

Example: Copying Data

This method can be used with com.rti.dds.dynamicdata.DynamicData.bind_complex_member to copy from one com.rti.dds.dynamicdata.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.

DynamicData foo_dst = ...;
DynamicData foo_src = ...;
DynamicData bar = new DynamicData(null, myProperties);
// Point to the source of the copy:
foo_src.bind_complex_member(
"theBar",
DynamicData.MEMBER_ID_UNSPECIFIED,
bar);
try {
// Just one copy:
foo_dst.set_complex_member(
"theBar",
DynamicData.MEMBER_ID_UNSPECIFIED,
bar);
} finally {
// Tear down:
foo_src.unbind_complex_member(bar);
}
bar.delete();
MT Safety:
UNSAFE.
Parameters
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 com.rti.dds.dynamicdata.DynamicData.MEMBER_ID_UNSPECIFIED to look up by name. See Member Names and IDs.
value<<in>> The source com.rti.dds.dynamicdata.DynamicData object whose contents will be copied.
Exceptions
Oneof the Standard Return Codes or com.rti.dds.infrastructure.RETCODE_OUT_OF_RESOURCES
See Also
com.rti.dds.dynamicdata.DynamicData.get_complex_member
com.rti.dds.dynamicdata.DynamicData.bind_complex_member

Member Data Documentation

final int MEMBER_ID_UNSPECIFIED
static

A sentinel value that indicates that no member ID is needed in order to perform some operation.

Most commonly, this constant will be used in "get" operations to indicate that a lookup should be performed based on a name, not on an ID.


RTI Connext Java API Version 5.0.0 Copyright © Thu Aug 30 2012 Real-Time Innovations, Inc