Public Member Functions | Private Member Functions | Private Attributes
ros::ServicePublication Class Reference

Manages an advertised service. More...

#include <service_publication.h>

List of all members.

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

CallbackQueueInterfacecallback_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_

Detailed Description

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.


Constructor & Destructor Documentation

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.

Definition at line 67 of file service_publication.cpp.


Member Function Documentation

void ros::ServicePublication::addServiceClientLink ( const ServiceClientLinkPtr &  link)

Adds a service link for us to manage.

Definition at line 164 of file service_publication.cpp.

Terminate this service server.

Definition at line 72 of file service_publication.cpp.

Definition at line 182 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.

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.


Member Data Documentation

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.

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.

Definition at line 111 of file service_publication.h.

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.

Definition at line 104 of file service_publication.h.

Definition at line 105 of file service_publication.h.

Definition at line 115 of file service_publication.h.


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


roscpp
Author(s): Morgan Quigley mquigley@cs.stanford.edu, Josh Faust jfaust@willowgarage.com, Brian Gerkey gerkey@willowgarage.com, Troy Straszheim straszheim@willowgarage.com
autogenerated on Sat Dec 28 2013 17:35:53