#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. | |
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< Impl > | ImplPtr |
typedef boost::weak_ptr< Impl > | ImplWPtr |
Private Member Functions | |
void | deserializeFailed (const std::exception &e) |
Private Attributes | |
ImplPtr | impl_ |
Definition at line 40 of file service_client.h.
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.
topic_proxy::ServiceClient::ServiceClient | ( | const ServiceClient & | rhs | ) |
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.
bool topic_proxy::ServiceClient::call | ( | MReq & | req, |
MRes & | res | ||
) | [inline] |
Call the service aliased by this handle with the specified request/response messages.
Definition at line 65 of file service_client.h.
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.
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.
std::string topic_proxy::ServiceClient::getService | ( | ) |
Returns the name of the service this ServiceClient connects to.
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.
ImplPtr topic_proxy::ServiceClient::impl_ [private] |
Definition at line 179 of file service_client.h.