$search
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. | |
void | drop () |
Terminate this service server. | |
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. | |
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. | |
void | removeServiceClientLink (const ServiceClientLinkPtr &link) |
Removes a service link from our list. | |
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 45 of file service_publication.cpp.
ros::ServicePublication::~ServicePublication | ( | ) |
Definition at line 65 of file service_publication.cpp.
void ros::ServicePublication::addServiceClientLink | ( | const ServiceClientLinkPtr & | link | ) |
Adds a service link for us to manage.
Definition at line 152 of file service_publication.cpp.
void ros::ServicePublication::drop | ( | ) |
Terminate this service server.
Definition at line 70 of file service_publication.cpp.
void ros::ServicePublication::dropAllConnections | ( | ) | [private] |
Definition at line 170 of file service_publication.cpp.
const std::string& ros::ServicePublication::getDataType | ( | ) | [inline] |
Definition at line 95 of file service_publication.h.
const std::string& ros::ServicePublication::getMD5Sum | ( | ) | [inline] |
Definition at line 92 of file service_publication.h.
const std::string& ros::ServicePublication::getName | ( | ) | [inline] |
Definition at line 96 of file service_publication.h.
const std::string& ros::ServicePublication::getRequestDataType | ( | ) | [inline] |
Definition at line 93 of file service_publication.h.
const std::string& ros::ServicePublication::getResponseDataType | ( | ) | [inline] |
Definition at line 94 of file service_publication.h.
bool ros::ServicePublication::isDropped | ( | ) | [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 146 of file service_publication.cpp.
void ros::ServicePublication::removeServiceClientLink | ( | const ServiceClientLinkPtr & | link | ) |
Removes a service link from our list.
Definition at line 159 of file service_publication.cpp.
Definition at line 113 of file service_publication.h.
V_ServiceClientLink ros::ServicePublication::client_links_ [private] |
Definition at line 108 of file service_publication.h.
boost::mutex ros::ServicePublication::client_links_mutex_ [private] |
Definition at line 109 of file service_publication.h.
std::string ros::ServicePublication::data_type_ [private] |
Definition at line 103 of file service_publication.h.
bool ros::ServicePublication::dropped_ [private] |
Definition at line 111 of file service_publication.h.
bool ros::ServicePublication::has_tracked_object_ [private] |
Definition at line 114 of file service_publication.h.
ServiceCallbackHelperPtr ros::ServicePublication::helper_ [private] |
Definition at line 106 of file service_publication.h.
std::string ros::ServicePublication::md5sum_ [private] |
Definition at line 102 of file service_publication.h.
std::string ros::ServicePublication::name_ [private] |
Definition at line 101 of file service_publication.h.
std::string ros::ServicePublication::request_data_type_ [private] |
Definition at line 104 of file service_publication.h.
std::string ros::ServicePublication::response_data_type_ [private] |
Definition at line 105 of file service_publication.h.
VoidConstWPtr ros::ServicePublication::tracked_object_ [private] |
Definition at line 115 of file service_publication.h.