Manages an advertised service. More...
#include <service_publication.h>
Public Member Functions | |
void | addServiceClientLink (const ServiceClientLinkPtr &link) |
Adds a service link for us to manage. More... | |
void | drop () |
Terminate this service server. More... | |
const std::string & | getDataType () |
const std::string & | getMD5Sum () |
const std::string & | getName () |
const std::string & | getRequestDataType () |
const std::string & | getResponseDataType () |
bool | isDropped () |
Returns whether or not this service server is valid. More... | |
void | processRequest (boost::shared_array< uint8_t > buf, size_t num_bytes, const ServiceClientLinkPtr &link) |
Adds a request to the queue if our thread pool size is not 0, otherwise immediately calls the callback. More... | |
void | removeServiceClientLink (const ServiceClientLinkPtr &link) |
Removes a service link from our list. More... | |
ServicePublication (const std::string &name, const std::string &md5sum, const std::string &data_type, const std::string &request_data_type, const std::string &response_data_type, const ServiceCallbackHelperPtr &helper, CallbackQueueInterface *queue, const VoidConstPtr &tracked_object) | |
~ServicePublication () | |
Private Member Functions | |
void | dropAllConnections () |
Private Attributes | |
CallbackQueueInterface * | callback_queue_ |
V_ServiceClientLink | client_links_ |
boost::mutex | client_links_mutex_ |
std::string | data_type_ |
bool | dropped_ |
bool | has_tracked_object_ |
ServiceCallbackHelperPtr | helper_ |
std::string | md5sum_ |
std::string | name_ |
std::string | request_data_type_ |
std::string | response_data_type_ |
VoidConstWPtr | tracked_object_ |
Manages an advertised service.
ServicePublication manages all incoming service requests. If its thread pool size is not 0, it will queue the requests into a number of threads, calling the callback from within those threads. Otherwise it immediately calls the callback
Definition at line 61 of file service_publication.h.
ros::ServicePublication::ServicePublication | ( | const std::string & | name, |
const std::string & | md5sum, | ||
const std::string & | data_type, | ||
const std::string & | request_data_type, | ||
const std::string & | response_data_type, | ||
const ServiceCallbackHelperPtr & | helper, | ||
CallbackQueueInterface * | queue, | ||
const VoidConstPtr & | tracked_object | ||
) |
Definition at line 47 of file service_publication.cpp.
ros::ServicePublication::~ServicePublication | ( | ) |
Definition at line 67 of file service_publication.cpp.
void ros::ServicePublication::addServiceClientLink | ( | const ServiceClientLinkPtr & | link | ) |
Adds a service link for us to manage.
Definition at line 164 of file service_publication.cpp.
void ros::ServicePublication::drop | ( | ) |
Terminate this service server.
Definition at line 72 of file service_publication.cpp.
|
private |
Definition at line 182 of file service_publication.cpp.
|
inline |
Definition at line 95 of file service_publication.h.
|
inline |
Definition at line 92 of file service_publication.h.
|
inline |
Definition at line 96 of file service_publication.h.
|
inline |
Definition at line 93 of file service_publication.h.
|
inline |
Definition at line 94 of file service_publication.h.
|
inline |
Returns whether or not this service server is valid.
Definition at line 90 of file service_publication.h.
void ros::ServicePublication::processRequest | ( | boost::shared_array< uint8_t > | buf, |
size_t | num_bytes, | ||
const ServiceClientLinkPtr & | link | ||
) |
Adds a request to the queue if our thread pool size is not 0, otherwise immediately calls the callback.
Definition at line 158 of file service_publication.cpp.
void ros::ServicePublication::removeServiceClientLink | ( | const ServiceClientLinkPtr & | link | ) |
Removes a service link from our list.
Definition at line 171 of file service_publication.cpp.
|
private |
Definition at line 113 of file service_publication.h.
|
private |
Definition at line 108 of file service_publication.h.
|
private |
Definition at line 109 of file service_publication.h.
|
private |
Definition at line 103 of file service_publication.h.
|
private |
Definition at line 111 of file service_publication.h.
|
private |
Definition at line 114 of file service_publication.h.
|
private |
Definition at line 106 of file service_publication.h.
|
private |
Definition at line 102 of file service_publication.h.
|
private |
Definition at line 101 of file service_publication.h.
|
private |
Definition at line 104 of file service_publication.h.
|
private |
Definition at line 105 of file service_publication.h.
|
private |
Definition at line 115 of file service_publication.h.