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 {
89class Service :
public dds::core::Reference<RoutingServiceImpl> {
92 typedef RTI::Service::Admin::CommandRequest CommandRequest;
93 typedef RTI::Service::Admin::CommandReply CommandReply;
95 typedef dds::core::Reference<RoutingServiceImpl> Base;
96 OMG_DDS_REF_TYPE_NOTYPENAME(
114 : Base(new RoutingServiceImpl(property))
116 this->delegate()->remember_reference(this->delegate());
170 template <
typename HookFunc>
173 HookFunc& shutdown_hook)
174 : Base(new RoutingServiceImpl(property, shutdown_hook))
176 this->delegate()->remember_reference(this->delegate());
179 Service(
const RTI_RoutingServiceProperty& property)
180 : Base(new RoutingServiceImpl(property))
182 this->delegate()->remember_reference(this->delegate());
185 explicit Service(Base::DELEGATE_REF_T reference) : Base(reference)
187 if (this->delegate()) {
188 this->delegate()->remember_reference(this->delegate());
200 this->delegate()->start();
210 this->delegate()->stop();
277 const std::string& plugin_name)
279 this->delegate()->attach_adapter_plugin(
292 const std::string& plugin_name)
294 this->delegate()->attach_processor_plugin(
307 const std::string& plugin_name)
309 this->delegate()->attach_transformation_plugin(
310 transformation_plugin,
364 return this->delegate()->execute_command(request);
381 const CommandRequest& request)
383 return this->delegate()->execute_command(reply, request);
392 rti::routing::Logger::instance().
warn(
393 "Calling 'rti::routing::Service::finalize_globals()' is no "
394 "longer necessary and the function will be removed in future "
400typedef 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:110
Configuration for a RTI Routing Service object.
Definition: ServiceProperty.hpp:114
The RTI Routing Service.
Definition: Service.hpp:89
CommandReply & execute_command(CommandReply &reply, const CommandRequest &request)
Executes an Administration command on this service.
Definition: Service.hpp:379
Service(const ServiceProperty &property, HookFunc &shutdown_hook)
Creates a RTI Routing Service instance.
Definition: Service.hpp:171
static void finalize_globals()
Definition: Service.hpp:390
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:290
void start()
Starts RTI Routing Service.
Definition: Service.hpp:198
CommandReply execute_command(const CommandRequest &request)
Executes an Administration command on this service.
Definition: Service.hpp:362
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:305
void stop()
Stops RTI Routing Service.
Definition: Service.hpp:208
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:275
Service(const ServiceProperty &property)
Creates a RTI Routing Service instance.
Definition: Service.hpp:113
The top-level plug-in class.
Definition: AdapterPlugin.hpp:34
The top-level plug-in class.
Definition: ProcessorPlugin.hpp:202