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


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