RTI Routing Service  Version 6.0.1
 All Data Structures Files Functions Typedefs Enumerations Enumerator Groups Pages
rti::routing::RoutingService Class Reference

The RTI Routing Service. More...

#include <RoutingService.hpp>

Inherits Reference< RoutingServiceImpl >.

Public Member Functions

 RoutingService (const ServiceProperty &property)
 Creates a RTI Routing Service instance.
 
void start ()
 Starts RTI Routing Service.
 
void stop ()
 Stops RTI Routing Service.
 
void attach_adapter_plugin (rti::routing::adapter::AdapterPlugin *adapter_plugin, const std::string &plugin_name)
 Attaches an Adapter plugin to be used by RTI Routing Service when it is started.
 
void attach_processor_plugin (rti::routing::processor::ProcessorPlugin *processor_plugin, const std::string &plugin_name)
 Attaches a Processor plugin to be used by RTI Routing Service when it is started.
 
void attach_transformation_plugin (rti::routing::transf::TransformationPlugin *transformation_plugin, const std::string &plugin_name)
 Attaches a Transformation plugin to be used by RTI Routing Service when it is started.
 

Static Public Member Functions

static void finalize_globals ()
 Finalizes global resources that RTI Routing Service requires to operate.
 

Detailed Description

The RTI Routing Service.

Constructor & Destructor Documentation

rti::routing::RoutingService::RoutingService ( const ServiceProperty property)
inlineexplicit

Creates a RTI Routing Service instance.

Parameters
property<<in>> The property to configure RTI Routing Service instance.

Member Function Documentation

void rti::routing::RoutingService::start ( )
inline

Starts RTI Routing Service.

This is a non-blocking operation. RTI Routing Service will create its own set of threads to perform its tasks.

void rti::routing::RoutingService::stop ( )
inline

Stops RTI Routing Service.

This operation will bloc the instance is fully stopped.

void rti::routing::RoutingService::attach_adapter_plugin ( rti::routing::adapter::AdapterPlugin adapter_plugin,
const std::string &  plugin_name 
)
inline

Attaches an Adapter plugin to be used by RTI Routing Service when it is started.

By using this function an adapter can be statically compiled, created in your application and have the service load it, instead of registering a shared library and a create function in the configuration.

The name passed in this function is the name that has to be used in the configuration to instantiate connections from the plugin.

Example:

rti::routing::RoutingService service(property);
service.attach_adapter_plugin(myAdapter, "rti.test.cpp.TestAdapter");
service.start();
...

And our configuration would look like this:

<dds>
<!-- No need to register the plugin in
<adapter_library><adpater_plugin>
-->
<routing_service name="example">
<domain_route name="myadapter_to_dds">
<connection name="MyConnection" plugin_name="MyAdapter">
...
</connection>
...
</domain_route>
</routing_service>
</dds>

This function can be called as many times as desired to attach several plugins.

Precondition
Routing Service must not be started
Parameters
adapter_plugin<<in>> The adapter plugin object to be attached. The object shall remain alive during the execution of the service. Once the plugin is attached, the memory is owned by RTI Routing Service and will delete it upon service stop.
plugin_name<<in>> The name used for this plugin in the <connection> tag in the configuration.
void rti::routing::RoutingService::attach_processor_plugin ( rti::routing::processor::ProcessorPlugin processor_plugin,
const std::string &  plugin_name 
)
inline

Attaches a Processor plugin to be used by RTI Routing Service when it is started.

See Also
attach_adapter_plugin
void rti::routing::RoutingService::attach_transformation_plugin ( rti::routing::transf::TransformationPlugin transformation_plugin,
const std::string &  plugin_name 
)
inline

Attaches a Transformation plugin to be used by RTI Routing Service when it is started.

See Also
attach_adapter_plugin
static void rti::routing::RoutingService::finalize_globals ( )
inlinestatic

Finalizes global resources that RTI Routing Service requires to operate.

This operation releases resources specific to RTI Routing Service only. RTI Connext global state shall be released separately through the DomainParticipantFactory's finalize_instance().

This operation should be called by your application only upon exit, after all service instances have been deleted. Calling it at a different time may cause the application to crash.

Multi-threading safety:
unsafe. Applications are not allowed to call this operation concurrently
Exceptions
std::exception

RTI Routing Service Version 6.0.1 Copyright © Sun Nov 17 2019 Real-Time Innovations, Inc