Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
topic_proxy::ServiceClient Class Reference

#include <service_client.h>

List of all members.

Classes

struct  Impl

Public Member Functions

template<class MReq , class MRes >
bool call (MReq &req, MRes &res)
 Call the service aliased by this handle with the specified request/response messages.
template<class Service >
bool call (Service &service)
 Call the service aliased by this handle with the specified service request/response.
template<typename MReq , typename MRes >
bool call (const MReq &req, MRes &resp, const std::string &service_md5sum)
 Mostly for internal use, the other templated versions of call() just call into this one.
bool call (const ros::SerializedMessage &req, ros::SerializedMessage &resp, const std::string &service_md5sum)
std::string getService ()
 Returns the name of the service this ServiceClient connects to.
template<typename Service >
bool init (const std::string &service_name, std::string host=std::string(), uint32_t port=0, const ros::M_string &header_values=ros::M_string())
bool init (const std::string &service_name, const std::string &service_md5sum, std::string host=std::string(), uint32_t port=0, const ros::M_string &header_values=ros::M_string())
bool isValid () const
 Returns whether or not this handle is valid. For a persistent service, this becomes false when the connection has dropped. Non-persistent service handles are always valid.
 ServiceClient ()
 ServiceClient (const ServiceClient &rhs)
template<typename Service >
 ServiceClient (const std::string &service_name, const std::string &host=std::string(), uint32_t port=0, const ros::M_string &header_values=ros::M_string())
void shutdown ()
 Shutdown the connection associated with this ServiceClient.
 ~ServiceClient ()

Private Types

typedef boost::shared_ptr< ImplImplPtr
typedef boost::weak_ptr< ImplImplWPtr

Private Member Functions

void deserializeFailed (const std::exception &e)

Private Attributes

ImplPtr impl_

Detailed Description

Definition at line 40 of file service_client.h.


Member Typedef Documentation

typedef boost::shared_ptr<Impl> topic_proxy::ServiceClient::ImplPtr [private]

Definition at line 176 of file service_client.h.

typedef boost::weak_ptr<Impl> topic_proxy::ServiceClient::ImplWPtr [private]

Definition at line 177 of file service_client.h.


Constructor & Destructor Documentation

template<typename Service >
topic_proxy::ServiceClient::ServiceClient ( const std::string &  service_name,
const std::string &  host = std::string(),
uint32_t  port = 0,
const ros::M_string header_values = ros::M_string() 
) [inline]

Definition at line 47 of file service_client.h.


Member Function Documentation

template<class MReq , class MRes >
bool topic_proxy::ServiceClient::call ( MReq &  req,
MRes &  res 
) [inline]

Call the service aliased by this handle with the specified request/response messages.

Note:
The request/response message types must match the types specified in the templated call to NodeHandle::serviceClient()/servicecreateClient()

Definition at line 65 of file service_client.h.

template<class Service >
bool topic_proxy::ServiceClient::call ( Service &  service) [inline]

Call the service aliased by this handle with the specified service request/response.

Definition at line 91 of file service_client.h.

template<typename MReq , typename MRes >
bool topic_proxy::ServiceClient::call ( const MReq &  req,
MRes &  resp,
const std::string &  service_md5sum 
) [inline]

Mostly for internal use, the other templated versions of call() just call into this one.

Definition at line 107 of file service_client.h.

bool topic_proxy::ServiceClient::call ( const ros::SerializedMessage req,
ros::SerializedMessage resp,
const std::string &  service_md5sum 
)
void topic_proxy::ServiceClient::deserializeFailed ( const std::exception &  e) [inline, private]

Definition at line 158 of file service_client.h.

Returns the name of the service this ServiceClient connects to.

template<typename Service >
bool topic_proxy::ServiceClient::init ( const std::string &  service_name,
std::string  host = std::string(),
uint32_t  port = 0,
const ros::M_string header_values = ros::M_string() 
) [inline]

Definition at line 53 of file service_client.h.

bool topic_proxy::ServiceClient::init ( const std::string &  service_name,
const std::string &  service_md5sum,
std::string  host = std::string(),
uint32_t  port = 0,
const ros::M_string header_values = ros::M_string() 
)

Returns whether or not this handle is valid. For a persistent service, this becomes false when the connection has dropped. Non-persistent service handles are always valid.

Shutdown the connection associated with this ServiceClient.

This method usually does not need to be explicitly called, as automatic shutdown happens when all copies of this ServiceClient go out of scope

This method overrides the automatic reference counted shutdown, and does so immediately.


Member Data Documentation

Definition at line 179 of file service_client.h.


The documentation for this class was generated from the following file:


topic_proxy
Author(s): Johannes Meyer
autogenerated on Thu Jun 6 2019 17:45:27