RTI Connext Traditional C++ API  Version 6.1.1

<<extension>> The Dynamic Data API provides a way to interact with arbitrarily complex data types at runtime without the need for code generation. More...

Classes

struct  DDS_DynamicDataProperty_t
 A collection of attributes used to configure DDS_DynamicData objects. More...
 
struct  DDS_DynamicDataTypeSerializationProperty_t
 Properties that govern how data of a certain type will be serialized on the network. More...
 
struct  DDS_DynamicDataInfo
 A descriptor for a DDS_DynamicData object. More...
 
struct  DDS_DynamicDataMemberInfo
 A descriptor for a single member (i.e. field) of dynamically defined data type. More...
 
struct  DDS_DynamicData
 A sample of any complex data type, which can be inspected and manipulated reflectively. More...
 
struct  DDS_DynamicDataSeq
 An ordered collection of DDS_DynamicData elements. More...
 
struct  DDS_DynamicDataTypeProperty_t
 A collection of attributes used to configure DDSDynamicDataTypeSupport objects. More...
 
struct  DDS_DynamicDataJsonParserProperties_t
 A collection of attributes used to configure DDS_DynamicData objects. More...
 
class  DDSDynamicDataTypeSupport
 A factory for registering a dynamically defined type and creating DDS_DynamicData objects. More...
 
class  DDSDynamicDataReader
 Reads (subscribes to) objects of type DDS_DynamicData. More...
 
class  DDSDynamicDataWriter
 Writes (publishes) objects of type DDS_DynamicData. More...
 

Macros

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

Typedefs

typedef DDS_Long DDS_DynamicDataMemberId
 An integer that uniquely identifies some member of a data type within that type. More...
 

Variables

const struct DDS_DynamicDataProperty_t DDS_DYNAMIC_DATA_PROPERTY_DEFAULT
 Sentinel constant indicating default values for DDS_DynamicDataProperty_t. More...
 
const struct DDS_DynamicDataTypeProperty_t DDS_DYNAMIC_DATA_TYPE_PROPERTY_DEFAULT
 Sentinel constant indicating default values for DDS_DynamicDataTypeProperty_t. More...
 
struct DDS_DynamicDataJsonParserProperties_t DDS_DYNAMIC_DATA_JSON_PARSER_PROPERTIES_DEFAULT
 Sentinel constant indicating default values for DDS_DynamicDataProperty_t. More...
 

Detailed Description

<<extension>> The Dynamic Data API provides a way to interact with arbitrarily complex data types at runtime without the need for code generation.

This API allows you to define new data types, modify existing data types, and interact reflectively with samples. To use it, you will take the following steps:

1. Obtain a DDS_TypeCode (see Type Code Support) that defines the type definition you want to use.
A DDS_TypeCode includes a type's kind (DDS_TCKind), name, and members (that is, fields). You can create your own DDS_TypeCode using the DDS_TypeCodeFactory class – see, for example, the DDS_TypeCodeFactory::create_struct_tc method. Alternatively, you can use a remote DDS_TypeCode that you discovered on the network (see Built-in Topics) or one generated by rtiddsgen.

2. Wrap the DDS_TypeCode in a DDSDynamicDataTypeSupport object.
See the constructor DDSDynamicDataTypeSupport::DDSDynamicDataTypeSupport. This object lets you connect the type definition to a DDSDomainParticipant and manage data samples (of type DDS_DynamicData).

3. Register the DDSDynamicDataTypeSupport with one or more domain participants.
See DDSDynamicDataTypeSupport::register_type. This action associates the data type with a logical name that you can use to create topics. (Starting with this step, working with a dynamically defined data type is almost exactly the same as working with a generated one.)

4. Create a DDSTopic from the DDSDomainParticipant.
Use the name under which you registered your data type – see DDSDomainParticipant::create_topic. This DDSTopic is what you will use to produce and consume data.

5. Create a DDSDynamicDataWriter and/or DDSDynamicDataReader.
These objects will produce and/or consume data (of type DDS_DynamicData) on the DDSTopic. You can create these objects directly from the DDSDomainParticipant – see DDSDomainParticipant::create_datawriter and DDSDomainParticipant::create_datareader – or by first creating intermediate DDSPublisher and DDSSubscriber objects – see DDSDomainParticipant::create_publisher and DDSDomainParticipant::create_subscriber.

6. Write and/or read the data of interest.

7. Tear down the objects described above.
You should delete them in the reverse order in which you created them. Note that unregistering your data type with the DDSDomainParticipant is optional; all types are automatically unregistered when the DDSDomainParticipant itself is deleted.

Macro Definition Documentation

◆ DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED

#define DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED

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.

See also
DDS_DynamicDataMemberId

Typedef Documentation

◆ DDS_DynamicDataMemberId

An integer that uniquely identifies some member of a data type within that type.

The range of a member ID is the range of an unsigned short integer, except for the value 0, which is reserved.

See also
DDS_DYNAMIC_DATA_MEMBER_ID_UNSPECIFIED

Variable Documentation

◆ DDS_DYNAMIC_DATA_PROPERTY_DEFAULT

const struct DDS_DynamicDataProperty_t DDS_DYNAMIC_DATA_PROPERTY_DEFAULT

Sentinel constant indicating default values for DDS_DynamicDataProperty_t.

Pass this object instead of your own DDS_DynamicDataProperty_t object to use the default property values:

See also
DDS_DynamicDataProperty_t
Examples:
HelloWorldPlugin.cxx.

◆ DDS_DYNAMIC_DATA_TYPE_PROPERTY_DEFAULT

const struct DDS_DynamicDataTypeProperty_t DDS_DYNAMIC_DATA_TYPE_PROPERTY_DEFAULT

Sentinel constant indicating default values for DDS_DynamicDataTypeProperty_t.

Pass this object instead of your own DDS_DynamicDataTypeProperty_t object to use the default property values:

DDS_DynamicDataTypeSupport* support = new DDS_DynamicDataTypeSupport(
myTypeCode,
See also
DDS_DynamicDataTypeProperty_t

◆ DDS_DYNAMIC_DATA_JSON_PARSER_PROPERTIES_DEFAULT

struct DDS_DynamicDataJsonParserProperties_t DDS_DYNAMIC_DATA_JSON_PARSER_PROPERTIES_DEFAULT

Sentinel constant indicating default values for DDS_DynamicDataProperty_t.

Pass this object instead of your own DDS_DynamicDataProperty_t object to use the default property values:

See also
DDS_DynamicDataProperty_t