ros::AdvertiseServiceOptions Struct Reference

Encapsulates all options available for creating a ServiceServer. More...

#include <advertise_service_options.h>

List of all members.

Public Member Functions

 AdvertiseServiceOptions ()
template<class Service >
void init (const std::string &_service, const boost::function< bool(typename Service::Request &, typename Service::Response &)> &_callback)
 Templated convenience method for filling out md5sum/etc. based on the service type.
template<class MReq , class MRes >
void init (const std::string &_service, const boost::function< bool(MReq &, MRes &)> &_callback)
 Templated convenience method for filling out md5sum/etc. based on the service request/response types.
template<class Spec >
void initBySpecType (const std::string &_service, const typename Spec::CallbackType &_callback)
 Templated convenience method for filling out md5sum/etc. based on the service spec type.

Static Public Member Functions

template<class Service >
static AdvertiseServiceOptions create (const std::string &service, const boost::function< bool(typename Service::Request &, typename Service::Response &)> &callback, const VoidConstPtr &tracked_object, CallbackQueueInterface *queue)
 Templated helper function for creating an AdvertiseServiceOptions with all of its options.

Public Attributes

CallbackQueueInterfacecallback_queue
 Queue to add callbacks to. If NULL, the global callback queue will be used.
std::string datatype
 Datatype of the service.
ServiceCallbackHelperPtr helper
 Helper object used for creating messages and calling callbacks.
std::string md5sum
 MD5 of the service.
std::string req_datatype
 Request message datatype.
std::string res_datatype
 Response message datatype.
std::string service
 Service name.
VoidConstPtr tracked_object
 An object whose destruction will prevent the callback associated with this service from being called.

Detailed Description

Encapsulates all options available for creating a ServiceServer.

Definition at line 38 of file advertise_service_options.h.


Constructor & Destructor Documentation

ros::AdvertiseServiceOptions::AdvertiseServiceOptions (  )  [inline]

Definition at line 34 of file advertise_service_options.h.


Member Function Documentation

template<class Service >
static AdvertiseServiceOptions ros::AdvertiseServiceOptions::create ( const std::string &  service,
const boost::function< bool(typename Service::Request &, typename Service::Response &)> &  callback,
const VoidConstPtr tracked_object,
CallbackQueueInterface queue 
) [inline, static]

Templated helper function for creating an AdvertiseServiceOptions with all of its options.

Parameters:
service Service name to advertise on
callback The callback to invoke when the service is called
tracked_object The tracked object to use (see AdvertiseServiceOptions::tracked_object)
queue The callback queue to use (see AdvertiseServiceOptions::callback_queue)

Definition at line 137 of file advertise_service_options.h.

template<class Service >
void ros::AdvertiseServiceOptions::init ( const std::string &  _service,
const boost::function< bool(typename Service::Request &, typename Service::Response &)> &  _callback 
) [inline]

Templated convenience method for filling out md5sum/etc. based on the service type.

Parameters:
_service Service name to advertise on
_callback Callback to call when this service is called

Definition at line 73 of file advertise_service_options.h.

template<class MReq , class MRes >
void ros::AdvertiseServiceOptions::init ( const std::string &  _service,
const boost::function< bool(MReq &, MRes &)> &  _callback 
) [inline]

Templated convenience method for filling out md5sum/etc. based on the service request/response types.

Parameters:
_service Service name to advertise on
_callback Callback to call when this service is called

Definition at line 45 of file advertise_service_options.h.

template<class Spec >
void ros::AdvertiseServiceOptions::initBySpecType ( const std::string &  _service,
const typename Spec::CallbackType &  _callback 
) [inline]

Templated convenience method for filling out md5sum/etc. based on the service spec type.

Parameters:
_service Service name to advertise on
_callback Callback to call when this service is called

Definition at line 93 of file advertise_service_options.h.


Member Data Documentation

Queue to add callbacks to. If NULL, the global callback queue will be used.

Definition at line 115 of file advertise_service_options.h.

Datatype of the service.

Definition at line 109 of file advertise_service_options.h.

Helper object used for creating messages and calling callbacks.

Definition at line 113 of file advertise_service_options.h.

MD5 of the service.

Definition at line 108 of file advertise_service_options.h.

Request message datatype.

Definition at line 110 of file advertise_service_options.h.

Response message datatype.

Definition at line 111 of file advertise_service_options.h.

Service name.

Definition at line 107 of file advertise_service_options.h.

An object whose destruction will prevent the callback associated with this service from being called.

A shared pointer to an object to track for these callbacks. If set, the a weak_ptr will be created to this object, and if the reference count goes to 0 the subscriber callbacks will not get called.

Note:
Note that setting this will cause a new reference to be added to the object before the callback, and for it to go out of scope (and potentially be deleted) in the code path (and therefore thread) that the callback is invoked from.

Definition at line 127 of file advertise_service_options.h.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


roscpp
Author(s): Morgan Quigley mquigley@cs.stanford.edu, Josh Faust jfaust@willowgarage.com, Brian Gerkey gerkey@willowgarage.com
autogenerated on Fri Jan 11 10:08:40 2013