ros::ServiceEvent< MReq, MRes > Class Template Reference

Event type for services, ros::ServiceEvent<MReq, MRes>& can be used in your callback instead of MReq&, MRes&. More...

#include <service_callback_helper.h>

List of all members.

Public Types

typedef boost::function< bool(ServiceEvent
< RequestType, ResponseType > &)> 
CallbackType
typedef boost::shared_ptr
< RequestType
RequestPtr
typedef MReq RequestType
typedef boost::shared_ptr
< ResponseType
ResponsePtr
typedef MRes ResponseType

Public Member Functions

const std::string & getCallerName () const
 Returns the name of the node which called this service.
M_stringgetConnectionHeader () const
 Returns a reference to the connection header.
const RequestTypegetRequest () const
 Returns a const-reference to the request.
ResponseTypegetResponse () const
 Returns a non-const reference to the response.
 ServiceEvent (const boost::shared_ptr< MReq const > &req, const boost::shared_ptr< MRes > &res, const boost::shared_ptr< M_string > &connection_header)

Static Public Member Functions

static bool call (const CallbackType &cb, ServiceSpecCallParams< RequestType, ResponseType > &params)

Private Attributes

boost::shared_ptr< M_stringconnection_header_
boost::shared_ptr< RequestType
const > 
request_
boost::shared_ptr< ResponseTyperesponse_

Detailed Description

template<typename MReq, typename MRes>
class ros::ServiceEvent< MReq, MRes >

Event type for services, ros::ServiceEvent<MReq, MRes>& can be used in your callback instead of MReq&, MRes&.

Useful if you need to retrieve meta-data about the call, such as the full connection header, or the caller's node name

Definition at line 81 of file service_callback_helper.h.


Member Typedef Documentation

template<typename MReq, typename MRes>
typedef boost::function<bool(ServiceEvent<RequestType, ResponseType>&)> ros::ServiceEvent< MReq, MRes >::CallbackType

Definition at line 88 of file service_callback_helper.h.

template<typename MReq, typename MRes>
typedef boost::shared_ptr<RequestType> ros::ServiceEvent< MReq, MRes >::RequestPtr

Definition at line 86 of file service_callback_helper.h.

template<typename MReq, typename MRes>
typedef MReq ros::ServiceEvent< MReq, MRes >::RequestType

Definition at line 84 of file service_callback_helper.h.

template<typename MReq, typename MRes>
typedef boost::shared_ptr<ResponseType> ros::ServiceEvent< MReq, MRes >::ResponsePtr

Definition at line 87 of file service_callback_helper.h.

template<typename MReq, typename MRes>
typedef MRes ros::ServiceEvent< MReq, MRes >::ResponseType

Definition at line 85 of file service_callback_helper.h.


Constructor & Destructor Documentation

template<typename MReq, typename MRes>
ros::ServiceEvent< MReq, MRes >::ServiceEvent ( const boost::shared_ptr< MReq const > &  req,
const boost::shared_ptr< MRes > &  res,
const boost::shared_ptr< M_string > &  connection_header 
) [inline]

Definition at line 96 of file service_callback_helper.h.


Member Function Documentation

template<typename MReq, typename MRes>
static bool ros::ServiceEvent< MReq, MRes >::call ( const CallbackType cb,
ServiceSpecCallParams< RequestType, ResponseType > &  params 
) [inline, static]

Definition at line 90 of file service_callback_helper.h.

template<typename MReq, typename MRes>
const std::string& ros::ServiceEvent< MReq, MRes >::getCallerName (  )  const [inline]

Returns the name of the node which called this service.

Definition at line 118 of file service_callback_helper.h.

template<typename MReq, typename MRes>
M_string& ros::ServiceEvent< MReq, MRes >::getConnectionHeader (  )  const [inline]

Returns a reference to the connection header.

Definition at line 113 of file service_callback_helper.h.

template<typename MReq, typename MRes>
const RequestType& ros::ServiceEvent< MReq, MRes >::getRequest (  )  const [inline]

Returns a const-reference to the request.

Definition at line 105 of file service_callback_helper.h.

template<typename MReq, typename MRes>
ResponseType& ros::ServiceEvent< MReq, MRes >::getResponse (  )  const [inline]

Returns a non-const reference to the response.

Definition at line 109 of file service_callback_helper.h.


Member Data Documentation

template<typename MReq, typename MRes>
boost::shared_ptr<M_string> ros::ServiceEvent< MReq, MRes >::connection_header_ [private]

Definition at line 122 of file service_callback_helper.h.

template<typename MReq, typename MRes>
boost::shared_ptr<RequestType const> ros::ServiceEvent< MReq, MRes >::request_ [private]

Definition at line 120 of file service_callback_helper.h.

template<typename MReq, typename MRes>
boost::shared_ptr<ResponseType> ros::ServiceEvent< MReq, MRes >::response_ [private]

Definition at line 121 of file service_callback_helper.h.


The documentation for this class 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:41 2013