mrs_lib
Various reusable classes, functions and utilities for use in MRS projects
Loading...
Searching...
No Matches
service_server_handler.hpp
Go to the documentation of this file.
1
5#pragma once
6
8
9namespace mrs_lib
10{
11
12 // --------------------------------------------------------------
13 // | ServiceServerHandler |
14 // --------------------------------------------------------------
15
16 /* ServiceServerHandler() constructors //{ */
17
18 template <class ServiceType>
19 ServiceServerHandler<ServiceType>::ServiceServerHandler(rclcpp::Node::SharedPtr& node, const std::string& address, const callback_t& cbk, const rclcpp::QoS& qos)
20 : ServiceServerHandler(node, address, cbk, qos, node->create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive))
21 {
22 }
23
24 template <class ServiceType>
28
29 template <class ServiceType>
30 ServiceServerHandler<ServiceType>::ServiceServerHandler(rclcpp::Node::SharedPtr& node, const std::string& address, const callback_t& cbk, const rclcpp::QoS& qos, const rclcpp::CallbackGroup::SharedPtr& callback_group)
31 : callback_group_(callback_group),
32 service_server_(node->create_service<ServiceType>(address, cbk, qos, callback_group))
33 {
34 }
35
36 template <class ServiceType>
37 ServiceServerHandler<ServiceType>::ServiceServerHandler(rclcpp::Node::SharedPtr& node, const std::string& address, const callback_t& cbk, const rclcpp::CallbackGroup::SharedPtr& callback_group)
38 : ServiceServerHandler(node, address, cbk, rclcpp::ServicesQoS(), callback_group)
39 {
40 }
41
42 //}
43
44} // namespace mrs_lib
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:25
All mrs_lib functions, classes, variables and definitions are contained in this namespace.
Definition attitude_converter.h:24
Defines the ServiceServerHandler wrapper to ROS2's ServiceServer.