Go to the documentation of this file.
29 #ifndef ROSCPP_SERVICE_H
30 #define ROSCPP_SERVICE_H
33 #include "ros/common.h"
34 #include "ros/message.h"
35 #include "ros/forwards.h"
36 #include "ros/node_handle.h"
37 #include "ros/service_traits.h"
38 #include "ros/names.h"
45 class ServiceServerLink;
65 template<
class MReq,
class MRes>
66 bool call(
const std::string& service_name, MReq& req, MRes& res)
68 namespace st = service_traits;
72 return client.
call(req, res);
85 template<
class Service>
86 bool call(
const std::string& service_name, Service& service)
88 namespace st = service_traits;
93 return client.
call(service.request, service.response);
121 ROSCPP_DECL bool exists(
const std::string& service_name,
bool print_failure_reason);
133 template<
class MReq,
class MRes>
151 template<
class Service>
163 #endif // ROSCPP_SERVICE_H
const char * md5sum()
returns MD5Sum<M>::value();
Encapsulates all options available for creating a ServiceClient.
bool call(MReq &req, MRes &res)
Call the service aliased by this handle with the specified request/response messages.
std::map< std::string, std::string > M_string
ROSCPP_DECL bool waitForService(const std::string &service_name, int32_t timeout)
Wait for a service to be advertised and available. Blocks until it is.
ServiceClient createClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
Create a client for a service.
ROSCPP_DECL std::string resolve(const std::string &name, bool remap=true)
Resolve a graph resource name into a fully qualified graph resource name.
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
Create a client for a service, version templated on two message types.
Provides a handle-based interface to service client connections.
roscpp's interface for creating subscribers, publishers, etc.
std::shared_ptr< ServiceServerLink > ServiceServerLinkPtr
ROSCPP_DECL bool exists(const std::string &service_name, bool print_failure_reason)
Checks if a service is both advertised and available.
bool call(const std::string &service_name, MReq &req, MRes &res)
Invoke an RPC service.
sick_scan_xd
Author(s): Michael Lehning
, Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:10