Public Member Functions | Private Member Functions | Private Attributes | List of all members
roswrap::ServicePublication Class Reference

Manages an advertised service. More...

#include <service_publication.h>

Inheritance diagram for roswrap::ServicePublication:
Inheritance graph
[legend]

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

CallbackQueueInterfacecallback_queue_
 
V_ServiceClientLink client_links_
 
std::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 62 of file service_publication.h.

Constructor & Destructor Documentation

◆ ServicePublication()

roswrap::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 
)

◆ ~ServicePublication()

roswrap::ServicePublication::~ServicePublication ( )

Member Function Documentation

◆ addServiceClientLink()

void roswrap::ServicePublication::addServiceClientLink ( const ServiceClientLinkPtr link)

Adds a service link for us to manage.

◆ drop()

void roswrap::ServicePublication::drop ( )

Terminate this service server.

◆ dropAllConnections()

void roswrap::ServicePublication::dropAllConnections ( )
private

◆ getDataType()

const std::string& roswrap::ServicePublication::getDataType ( )
inline

Definition at line 96 of file service_publication.h.

◆ getMD5Sum()

const std::string& roswrap::ServicePublication::getMD5Sum ( )
inline

Definition at line 93 of file service_publication.h.

◆ getName()

const std::string& roswrap::ServicePublication::getName ( )
inline

Definition at line 97 of file service_publication.h.

◆ getRequestDataType()

const std::string& roswrap::ServicePublication::getRequestDataType ( )
inline

Definition at line 94 of file service_publication.h.

◆ getResponseDataType()

const std::string& roswrap::ServicePublication::getResponseDataType ( )
inline

Definition at line 95 of file service_publication.h.

◆ isDropped()

bool roswrap::ServicePublication::isDropped ( )
inline

Returns whether or not this service server is valid.

Definition at line 91 of file service_publication.h.

◆ processRequest()

void roswrap::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.

◆ removeServiceClientLink()

void roswrap::ServicePublication::removeServiceClientLink ( const ServiceClientLinkPtr link)

Removes a service link from our list.

Member Data Documentation

◆ callback_queue_

CallbackQueueInterface* roswrap::ServicePublication::callback_queue_
private

Definition at line 114 of file service_publication.h.

◆ client_links_

V_ServiceClientLink roswrap::ServicePublication::client_links_
private

Definition at line 109 of file service_publication.h.

◆ client_links_mutex_

std::mutex roswrap::ServicePublication::client_links_mutex_
private

Definition at line 110 of file service_publication.h.

◆ data_type_

std::string roswrap::ServicePublication::data_type_
private

Definition at line 104 of file service_publication.h.

◆ dropped_

bool roswrap::ServicePublication::dropped_
private

Definition at line 112 of file service_publication.h.

◆ has_tracked_object_

bool roswrap::ServicePublication::has_tracked_object_
private

Definition at line 115 of file service_publication.h.

◆ helper_

ServiceCallbackHelperPtr roswrap::ServicePublication::helper_
private

Definition at line 107 of file service_publication.h.

◆ md5sum_

std::string roswrap::ServicePublication::md5sum_
private

Definition at line 103 of file service_publication.h.

◆ name_

std::string roswrap::ServicePublication::name_
private

Definition at line 102 of file service_publication.h.

◆ request_data_type_

std::string roswrap::ServicePublication::request_data_type_
private

Definition at line 105 of file service_publication.h.

◆ response_data_type_

std::string roswrap::ServicePublication::response_data_type_
private

Definition at line 106 of file service_publication.h.

◆ tracked_object_

VoidConstWPtr roswrap::ServicePublication::tracked_object_
private

Definition at line 116 of file service_publication.h.


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


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:15