11#ifndef RTI_ROUTING_SERVICE_HPP_
12#define RTI_ROUTING_SERVICE_HPP_
14#include <dds/core/Reference.hpp>
15#include <rti/config/Logger.hpp>
17#include "routingservice/routingservice_adapter_new.h"
19#include <rti/routing/Logger.hpp>
20#include <rti/routing/ServiceProperty.hpp>
21#include <rti/routing/detail/RoutingServiceImpl.hpp>
25namespace rti {
namespace routing {
86class Service :
public dds::core::Reference<RoutingServiceImpl> {
88 typedef dds::core::Reference<RoutingServiceImpl> Base;
89 OMG_DDS_REF_TYPE_NOTYPENAME(
107 : Base(new RoutingServiceImpl(property))
109 this->delegate()->remember_reference(this->delegate());
164 template <
typename HookFunc>
167 HookFunc& shutdown_hook)
168 : Base(new RoutingServiceImpl(property, shutdown_hook))
170 this->delegate()->remember_reference(this->delegate());
173 Service(
const RTI_RoutingServiceProperty& property)
174 : Base(new RoutingServiceImpl(property))
176 this->delegate()->remember_reference(this->delegate());
179 explicit Service(Base::DELEGATE_REF_T reference) : Base(reference)
181 if (this->delegate()) {
182 this->delegate()->remember_reference(this->delegate());
194 this->delegate()->start();
204 this->delegate()->stop();
271 const std::string& plugin_name)
273 this->delegate()->attach_adapter_plugin(
286 const std::string& plugin_name)
288 this->delegate()->attach_processor_plugin(
301 const std::string& plugin_name)
303 this->delegate()->attach_transformation_plugin(
304 transformation_plugin,
315 rti::routing::Logger::instance().
warn(
316 "Calling 'rti::routing::Service::finalize_globals()' is no "
317 "longer necessary and the function will be removed in future "
323typedef Service RoutingService;
RTI Routing Service C++ Adapter API.
RTI Routing Service C++ Processor API.
void warn(const std::string &msg)
Logs as message with WARNING level.
Definition: Logger.hpp:111
Configuration for a RTI Routing Service object.
Definition: ServiceProperty.hpp:114
The RTI Routing Service.
Definition: Service.hpp:86
Service(const ServiceProperty &property, HookFunc &shutdown_hook)
Creates a RTI Routing Service instance.
Definition: Service.hpp:165
static void finalize_globals()
Definition: Service.hpp:313
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.
Definition: Service.hpp:284
void start()
Starts RTI Routing Service.
Definition: Service.hpp:192
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.
Definition: Service.hpp:299
void stop()
Stops RTI Routing Service.
Definition: Service.hpp:202
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.
Definition: Service.hpp:269
Service(const ServiceProperty &property)
Creates a RTI Routing Service instance.
Definition: Service.hpp:106
The top-level plug-in class.
Definition: AdapterPlugin.hpp:34
The top-level plug-in class.
Definition: ProcessorPlugin.hpp:202