SetBool.h
Go to the documentation of this file.
1 #ifndef RTT_STD_SRVS_SETBOOL_H
2 #define RTT_STD_SRVS_SETBOOL_H
3 
5 #include <std_srvs/SetBool.h>
6 
7 // Specialized implementation of ROSServiceServerOperationCaller for std_srvs/SetBool.
8 //
9 // Accepted signatures:
10 // - bool setBool(std_srvs::SetBool::Request&, std_srvs::SetBool::Response&)
11 // - bool setBool(bool, std::string &message_out)
12 // - bool setBool(bool) // response.message will be empty
13 // - std::string setBool(bool) // response.success = true
14 // - void setBool(bool) // response.success = true and response.message will be empty
15 //
16 
17 template<> struct ROSServiceServerOperationCallerWrapper<std_srvs::SetBool,1> {
18  typedef bool Signature(bool, std::string&);
20  template <typename Callable> static bool call(Callable& call, std_srvs::SetBool::Request& request, std_srvs::SetBool::Response& response) {
21  response.success = call(request.data, response.message);
22  return true;
23  }
24 };
25 
26 template<> struct ROSServiceServerOperationCallerWrapper<std_srvs::SetBool,2> {
27  typedef bool Signature(bool);
29  template <typename Callable> static bool call(Callable& call, std_srvs::SetBool::Request& request, std_srvs::SetBool::Response& response) {
30  response.success = call(request.data);
31  return true;
32  }
33 };
34 
35 template<> struct ROSServiceServerOperationCallerWrapper<std_srvs::SetBool,3> {
36  typedef std::string Signature(bool);
38  template <typename Callable> static bool call(Callable& call, std_srvs::SetBool::Request& request, std_srvs::SetBool::Response& response) {
39  response.message = call(request.data);
40  response.success = true;
41  return true;
42  }
43 };
44 
45 template<> struct ROSServiceServerOperationCallerWrapper<std_srvs::SetBool,4> {
46  typedef void Signature(bool);
48  template <typename Callable> static bool call(Callable& call, std_srvs::SetBool::Request& request, std_srvs::SetBool::Response& response) {
49  call(request.data);
50  response.success = true;
51  return true;
52  }
53 };
54 
55 #endif // RTT_STD_SRVS_SETBOOL_H
static bool call(Callable &call, std_srvs::SetBool::Request &request, std_srvs::SetBool::Response &response)
Definition: SetBool.h:38
RTT::OperationCaller< Signature > ProxyOperationCallerType
Definition: SetBool.h:19
static bool call(Callable &call, std_srvs::SetBool::Request &request, std_srvs::SetBool::Response &response)
Definition: SetBool.h:29
RTT::OperationCaller< Signature > ProxyOperationCallerType
Definition: SetBool.h:37
static bool call(Callable &call, std_srvs::SetBool::Request &request, std_srvs::SetBool::Response &response)
Definition: SetBool.h:20
RTT::OperationCaller< Signature > ProxyOperationCallerType
Definition: SetBool.h:47
RTT::OperationCaller< Signature > ProxyOperationCallerType
Definition: SetBool.h:28
static bool call(Callable &call, std_srvs::SetBool::Request &request, std_srvs::SetBool::Response &response)
Definition: SetBool.h:48


rtt_std_srvs
Author(s):
autogenerated on Mon May 10 2021 02:45:49