All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes
ros::session::abstractSession Class Reference

#include <session.h>

Inheritance diagram for ros::session::abstractSession:
Inheritance graph
[legend]

List of all members.

Classes

class  AsyncCall
class  AsyncCallBase

Public Member Functions

 abstractSession (const std::string session_name, int sessionid)
template<class MReq , class MRes >
bool call (const std::string &service_name, MReq &req, MRes &res, bool bAsync=false)
virtual bool close_connections ()
 close all the persistent service connections (does not terminate the service)
int GetSessionId () const
const std::string & GetSessionName () const
 get the full session name
virtual bool isterminated () const
virtual bool terminate ()=0
 terminate the session instance
virtual ~abstractSession ()

Protected Member Functions

virtual void _flush_async ()
 wait for all async messages to complete

Protected Attributes

boost::condition _condAsyncCallsFlushed
boost::condition _condHasAsyncCalls
boost::mutex async_mutex
bool bterminated
 true if session is terminated
boost::mutex serv_mutex

Private Types

typedef boost::shared_ptr
< AsyncCallBase
AsyncCallBasePtr

Private Member Functions

void _AsyncWorkerThread ()

Private Attributes

std::map< std::string,
ServiceClient
_mapservices
ros::NodeHandle _nh
std::string _session_dir
std::string _session_name
M_string _sessionheader
int _sessionid
 unique session id to session_name
boost::thread _threadasync
 async worker thread
std::list< AsyncCallBasePtrlistAsyncCalls
 calls that are running asynchronously waiting for responses

Detailed Description

Definition at line 54 of file session.h.


Member Typedef Documentation

typedef boost::shared_ptr<AsyncCallBase> ros::session::abstractSession::AsyncCallBasePtr [private]

Definition at line 206 of file session.h.


Constructor & Destructor Documentation

ros::session::abstractSession::abstractSession ( const std::string  session_name,
int  sessionid 
) [inline]

Definition at line 57 of file session.h.

virtual ros::session::abstractSession::~abstractSession ( ) [inline, virtual]

Definition at line 69 of file session.h.


Member Function Documentation

Definition at line 225 of file session.h.

virtual void ros::session::abstractSession::_flush_async ( ) [inline, protected, virtual]

wait for all async messages to complete

Definition at line 262 of file session.h.

template<class MReq , class MRes >
bool ros::session::abstractSession::call ( const std::string &  service_name,
MReq &  req,
MRes &  res,
bool  bAsync = false 
) [inline]

call a service part of a session, all services are relative to the session's scope, NOT the calling node's scope. This enables users to call session services without worrying about where its services are

Definition at line 86 of file session.h.

close all the persistent service connections (does not terminate the service)

Definition at line 167 of file session.h.

Definition at line 162 of file session.h.

const std::string& ros::session::abstractSession::GetSessionName ( ) const [inline]

get the full session name

Definition at line 159 of file session.h.

virtual bool ros::session::abstractSession::isterminated ( ) const [inline, virtual]

Definition at line 183 of file session.h.

virtual bool ros::session::abstractSession::terminate ( ) [pure virtual]

terminate the session instance

Implemented in ros::session::Session< MReq, MRes >.


Member Data Documentation

Definition at line 274 of file session.h.

Definition at line 274 of file session.h.

Definition at line 193 of file session.h.

Definition at line 188 of file session.h.

Definition at line 189 of file session.h.

Definition at line 189 of file session.h.

Definition at line 191 of file session.h.

unique session id to session_name

Definition at line 190 of file session.h.

async worker thread

Definition at line 223 of file session.h.

Definition at line 273 of file session.h.

true if session is terminated

Definition at line 275 of file session.h.

calls that are running asynchronously waiting for responses

Definition at line 222 of file session.h.

Definition at line 273 of file session.h.


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


roscpp_sessions
Author(s): Rosen Diankov (rdiankov@cs.cmu.edu)
autogenerated on Sat Mar 23 2013 13:53:30