RTI Connext DDS Micro C API  Version 3.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
User Data Type Support

Defines generic classes and macros to support user data types. More...

Data Structures

struct  FooTypeSupport
 <<interface>> <<generic>> User data type specific interface. More...

Macros

#define DDS_DATAWRITER_C(TDataWriter, TData)
 Declares the interface required to support a user data type specific data writer.
#define DDS_TYPESUPPORT_C(TTypeSupport, TData)
 Declares the interface required to support a user data type.
#define DDS_DATAREADER_C(TDataReader, TDataSeq, TData)
 Declares the interface required to support a user data type-specific data reader.

Typedefs

typedef DDS_HANDLE_TYPE_NATIVE DDS_InstanceHandle_t
 Type definition for an instance handle.

Functions

Foo * FooTypeSupport_create_data (void)
 <<eXtension>> Create a data type and initialize it.
void FooTypeSupport_delete_data (Foo *sample)
 <<eXtension>> Destroy a user data type instance.
DDS_Boolean DDS_InstanceHandle_is_nil (const DDS_InstanceHandle_t *self)
 Compare this handle to DDS_HANDLE_NIL.

Variables

const DDS_InstanceHandle_t DDS_HANDLE_NIL
 The NIL instance handle.

Detailed Description

Defines generic classes and macros to support user data types.

Defines the DDS user data type support.

DDS specifies strongly typed interfaces to read and write user data. For each data class defined by the application, there is a number of specialised classes that are required to facilitate the type-safe interaction of the application with RTI Connext DDS Micro.

RTI Connext DDS Micro provides an automatic means to generate all these type-specific classes with the RTI IDL Compiler User Manual utility. The complete set of automatic classes created for a hypothetical user data type named Foo are shown below.

DDSUserDataSupport.png
"Classes auto-created for an application data type named Foo"

The macros defined here declare the strongly typed APIs needed to support an arbitrary user defined data of type Foo.


Macro Definition Documentation

#define DDS_DATAWRITER_C (   TDataWriter,
  TData 
)

Declares the interface required to support a user data type specific data writer.

Uses:
FooTypeSupport user data type, Foo
Defines:
FooDataWriter DDS_DataWriter of type Foo, i.e. FooDataWriter
#define DDS_TYPESUPPORT_C (   TTypeSupport,
  TData 
)

Declares the interface required to support a user data type.

Defines:
FooTypeSupport TypeSupport of type Foo, i.e. FooTypeSupport
#define DDS_DATAREADER_C (   TDataReader,
  TDataSeq,
  TData 
)

Declares the interface required to support a user data type-specific data reader.

Uses:
FooTypeSupport user data type, Foo FooSeq sequence of user data type, sequence<Foo>
Defines:
FooDataReader DDS_DataReader of type Foo, i.e. FooDataReader
See also:
FooSeq

Typedef Documentation

typedef DDS_HANDLE_TYPE_NATIVE DDS_InstanceHandle_t

Type definition for an instance handle.

Handle to identiy different instances of the same DDS_Topic of a certain type.

See also:
::DDS_DataWriter_register_instance_untyped
DDS_SampleInfo::instance_handle

Function Documentation

Foo* FooTypeSupport_create_data ( void  )

<<eXtension>> Create a data type and initialize it.

The generated implementation of the operation knows how to instantiate a data type and initialize it properly.

All memory for the type is deeply allocated.

Returns:
newly created data type
See also:
FooTypeSupport_delete_data
void FooTypeSupport_delete_data ( Foo *  sample)

<<eXtension>> Destroy a user data type instance.

The generated implementation of the operation knows how to destroy a data type and return all resources.

Parameters:
sample<<in>> Cannot be NULL.
Returns:
One of the Standard Return Codes
See also:
FooTypeSupport_create_data
DDS_Boolean DDS_InstanceHandle_is_nil ( const DDS_InstanceHandle_t self)

Compare this handle to DDS_HANDLE_NIL.

Returns:
DDS_BOOLEAN_TRUE if the given instance handle is equal to DDS_HANDLE_NIL or DDS_BOOLEAN_FALSE otherwise.
See also:
DDS_InstanceHandle_equals

Variable Documentation

const DDS_InstanceHandle_t DDS_HANDLE_NIL

The NIL instance handle.

Special DDS_InstanceHandle_t value

See also:
DDS_InstanceHandle_is_nil

RTI Connext DDS Micro C API Version 3.0.0 Copyright © Fri Mar 22 2019 Real-Time Innovations, Inc