RTI Routing Service  Version 6.1.2
RTI Routing Service Transformation API

This module describes the Transformation API. More...

Data Structures

class  rti::routing::transf::Transformation
 Provides a way to transform input samples into output samples of a different format and/or content. More...
 
class  rti::routing::transf::TypedTransformation< Data, Info >
 A wrapper implementation of a Transformation that provides a strongly-typed interface through template parameters for data and info representation. More...
 
class  rti::routing::transf::TransformationPlugin
 The top-level plug-in class. More...
 

Macros

#define RTI_TRANSFORMATION_PLUGIN_CREATE_FUNCTION_DECL(TRANSFORMATION_PLUGIN_CLASS)
 Utility macro that declares a native extern function that can be used to load a TransformationPlugin through a shared library. More...
 
#define RTI_TRANSFORMATION_PLUGIN_CREATE_FUNCTION_DEF(TRANSFORMATION_PLUGIN_CLASS)
 Utility macro that implements the TransformationPlugin entry point declared with RTI_TRANSFORMATION_PLUGIN_CREATE_FUNCTION_DECL. More...
 

Typedefs

typedef TypedTransformation< dds::core::xtypes::DynamicData, dds::sub::SampleInfo > rti::routing::transf::DynamicDataTransformation
 Convenient definition of TypedTransformation that requires dds::core::xtypes::DynamicData for data samples and dds::sub::SampleInfo for info samples. More...
 

Detailed Description

This module describes the Transformation API.

An RTI Routing Service Output transforms the incoming data using a transformation, which is an object created by a transformation plugin.

Macro Definition Documentation

◆ RTI_TRANSFORMATION_PLUGIN_CREATE_FUNCTION_DECL

#define RTI_TRANSFORMATION_PLUGIN_CREATE_FUNCTION_DECL (   TRANSFORMATION_PLUGIN_CLASS)
Value:
extern "C" RTI_USER_DLL_EXPORT struct RTI_RoutingServiceTransformationPlugin * \
TRANSFORMATION_PLUGIN_CLASS ## _create_transformation_plugin(\
const struct RTI_RoutingServiceProperties *, \
RTI_RoutingServiceEnvironment *); \

Utility macro that declares a native extern function that can be used to load a TransformationPlugin through a shared library.

The prototype of the function is given by RTI_RoutingServiceTransformationPlugin_CreateFcn.

To register a transformation plugin with RTI Routing Service, you must use the tag <transformation_plugin> within <plugin_library>. For example:

<dds>
...
<plugin_library name="MyPluginLib">
<transformation_plugin name="MyTransfPlugin">
<dll>mytransformation</dll>
<create_function>
MyTransfPlugin_create
</create_function>
</transformation_plugin>
...
</plugin_library>
...
<routing_service>
...
</routing_service>
...
</dds>

Once a transformation plugin is registered, an Output can use it to create a data transformation.

For example:

<topic_route name="SquareSwitchCoord">
<input participant="1">
<topic_name>Square</topic_name>
<registered_type_name>ShapeType</registered_type_name>
</input>
<output>
<topic_name>Square</topic_name>
<registered_type_name>ShapeType</registered_type_name>
<transformation plugin_name="MyPluginLib::MyTransPlugin">
<property>
<value>
<element>
<name>X</name>
<value>Y</value>
</element>
<element>
<name>Y</name>
<value>X</value>
</element>
</value>
</property>
</transformation>
</output>
</topic_route>

For additional information on configuring transformations, see the RTI Routing Service User's Manual.

Parameters
TRANSFORMATION_PLUGIN_CLASSClass name of a TransformationPlugin implementation

◆ RTI_TRANSFORMATION_PLUGIN_CREATE_FUNCTION_DEF

#define RTI_TRANSFORMATION_PLUGIN_CREATE_FUNCTION_DEF (   TRANSFORMATION_PLUGIN_CLASS)
Value:
struct RTI_RoutingServiceTransformationPlugin * \
TRANSFORMATION_PLUGIN_CLASS ## _create_transformation_plugin( \
const struct RTI_RoutingServiceProperties * native_properties, \
RTI_RoutingServiceEnvironment *environment) \
{ \
rti::routing::PropertyAdapter::add_properties_from_native(\
properties,\
native_properties); \
try { \
return rti::routing::transf::detail::TransformationPluginForwarder::create_plugin(\
new TRANSFORMATION_PLUGIN_CLASS(properties)); \
} catch (const std::exception& ex) {\
RTI_RoutingServiceEnvironment_set_error(\
environment,\
"%s",\
ex.what());\
} catch (...) {}\
\
return NULL; \
}
std::map< std::string, std::string > PropertySet
The definition of a pluggable entity’s configuration properties.
Definition: PropertySet.hpp:60

Utility macro that implements the TransformationPlugin entry point declared with RTI_TRANSFORMATION_PLUGIN_CREATE_FUNCTION_DECL.

Typedef Documentation

◆ DynamicDataTransformation

typedef TypedTransformation<dds::core::xtypes::DynamicData, dds::sub::SampleInfo> rti::routing::transf::DynamicDataTransformation

Convenient definition of TypedTransformation that requires dds::core::xtypes::DynamicData for data samples and dds::sub::SampleInfo for info samples.