11 #ifndef RTI_RECORDING_SERVICE_HPP_ 12 #define RTI_RECORDING_SERVICE_HPP_ 14 #include <dds/core/Reference.hpp> 15 #include <rti/config/Logger.hpp> 17 #include <rti/recording/Logger.hpp> 18 #include <rti/recording/ServiceProperty.hpp> 19 #include <rti/recording/detail/RecordingServiceImpl.hpp> 21 namespace rti {
namespace recording {
83 class Service :
public dds::core::Reference<RecordingServiceImpl> {
85 typedef RTI::Service::Admin::CommandRequest CommandRequest;
86 typedef RTI::Service::Admin::CommandReply CommandReply;
88 typedef dds::core::Reference<RecordingServiceImpl> Base;
89 OMG_DDS_REF_TYPE_NOTYPENAME(
92 RecordingServiceImpl);
102 : Base(new RecordingServiceImpl(property))
104 this->delegate()->remember_reference(this->delegate());
153 template <
typename HookFunc>
156 const HookFunc& shutdown_hook)
157 : Base(new RecordingServiceImpl(
159 new
rti::routing::detail::ShutdownHookForwarder<HookFunc>(shutdown_hook)))
161 this->delegate()->remember_reference(this->delegate());
165 explicit Service(Base::DELEGATE_REF_T reference) : Base(reference)
167 if (this->delegate()) {
168 this->delegate()->remember_reference(this->delegate());
180 this->delegate()->start();
190 this->delegate()->stop();
245 return this->delegate()->execute_command(request);
262 const CommandRequest& request)
264 return this->delegate()->execute_command(reply, request);
286 RecordingServiceImpl::finalize_globals();
295 #endif // RTI_RECORDING_SERVICE_HPP_ Service(const ServiceProperty &property, const HookFunc &shutdown_hook)
Creates a RTI Recording Service instance.
Definition: Service.hpp:154
static void finalize_globals()
Finalizes global resources that RTI Recording Service requires to operate.
Definition: Service.hpp:284
Configuration for a RTI Recording Service object.
Definition: ServiceProperty.hpp:105
void start()
Starts RTI Recording Service.
Definition: Service.hpp:178
Service(const ServiceProperty &property)
Creates a RTI Recording Service instance.
Definition: Service.hpp:101
The RTI Recording Service.
Definition: Service.hpp:83
void stop()
Stops RTI Recording Service.
Definition: Service.hpp:188
The RTI namespace.
Definition: RecordingServiceImpl.hpp:22
CommandReply & execute_command(CommandReply &reply, const CommandRequest &request)
Executes an Administration command on this service.
Definition: Service.hpp:260
CommandReply execute_command(const CommandRequest &request)
Executes an Administration command on this service.
Definition: Service.hpp:243