Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
topic_proxy::ServiceClient Class Reference

#include <service_client.h>

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. More...
 
template<class Service >
bool call (Service &service)
 Call the service aliased by this handle with the specified service request/response. More...
 
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. More...
 
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. More...
 
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. More...
 
 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. More...
 
 ~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

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

topic_proxy::ServiceClient::ServiceClient ( )
topic_proxy::ServiceClient::ServiceClient ( const ServiceClient rhs)
topic_proxy::ServiceClient::~ServiceClient ( )
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)
inlineprivate

Definition at line 158 of file service_client.h.

std::string topic_proxy::ServiceClient::getService ( )

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() 
)
bool topic_proxy::ServiceClient::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.

void topic_proxy::ServiceClient::shutdown ( )

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

ImplPtr topic_proxy::ServiceClient::impl_
private

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 Sat Jul 27 2019 03:35:25