mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
Loading...
Searching...
No Matches
service_server_handler.h
Go to the documentation of this file.
1
5#pragma once
6
7#include <rclcpp/rclcpp.hpp>
8
9namespace mrs_lib
10{
11
12 /* class ServiceServerHandler //{ */
13
17 template <class ServiceType>
19 {
20
21 public:
22 using callback_t = typename rclcpp::Service<ServiceType>::CallbackType;
23
35 ServiceServerHandler(rclcpp::Node::SharedPtr& node, const std::string& address, const callback_t& cbk, const rclcpp::QoS& qos = rclcpp::ServicesQoS());
36
44
55 ServiceServerHandler(rclcpp::Node::SharedPtr& node, const std::string& address, const callback_t& cbk, const rclcpp::QoS& qos,
56 const rclcpp::CallbackGroup::SharedPtr& callback_group);
57
67 ServiceServerHandler(rclcpp::Node::SharedPtr& node, const std::string& address, const callback_t& cbk,
68 const rclcpp::CallbackGroup::SharedPtr& callback_group);
69
70 private:
71 rclcpp::CallbackGroup::SharedPtr callback_group_;
72 typename rclcpp::Service<ServiceType>::SharedPtr service_server_;
73 };
74
75 //}
76
77} // namespace mrs_lib
78
user wrapper of the service client handler implementation
Definition service_server_handler.h:19
ServiceServerHandler()
Default constructor to avoid having to use pointers.
Definition service_server_handler.hpp:26
All mrs_lib functions, classes, variables and definitions are contained in this namespace.
Definition attitude_converter.h:24
Implements the ServiceServerHandler wrapper to ROS2's ServiceServer.