10. Built-in DDS data typesΒΆ

The Vortex OpenSplice IDL Pre-processor and the Vortex OpenSplice runtime system support the following DDS data types to be used in application IDL definitions:

  • Duration_t

  • Time_t

When building C or Java application programs, no special actions have to be taken other than enabling the Vortex OpenSplice IDL Pre-processor built-in DDS data types using the -o dds-types option.

For C++, however, attention must be paid to the ORB IDL compiler, which is also involved in the application building process. The ORB IDL compiler is not aware of any DDS data types, so the supported DDS types must be provided by means of inclusion of an IDL file (dds_dcps.idl) that defines these types. This file must not be included for the Vortex OpenSplice IDL Pre-processor, which has the type definitions built-in. Therefore dds_dcps.idl must be included conditionally. The condition can be controlled via the macro definition OSPL_IDL_COMPILER, which is defined when the Vortex OpenSplice IDL Pre-processor is invoked, but not when the ORB IDL compiler is invoked:

#ifndef OSPL_IDL_COMPILER
#include <dds_dcps.idl>
#endif

module example {
  struct example_struct {
    DDS::Time_ttime;
  };
};

caution

The ORB IDL compiler must be called with the -I$OSPL_HOME/etc/idlpp option in order to define the include path for the dds_dcps.idl file. The Vortex OpenSplice IDL Pre-processor must be called without this option.