#include <session.h>
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< AsyncCallBasePtr > | listAsyncCalls |
calls that are running asynchronously waiting for responses |
typedef boost::shared_ptr<AsyncCallBase> ros::session::abstractSession::AsyncCallBasePtr [private] |
ros::session::abstractSession::abstractSession | ( | const std::string | session_name, |
int | sessionid | ||
) | [inline] |
virtual ros::session::abstractSession::~abstractSession | ( | ) | [inline, virtual] |
void ros::session::abstractSession::_AsyncWorkerThread | ( | ) | [inline, private] |
virtual void ros::session::abstractSession::_flush_async | ( | ) | [inline, protected, virtual] |
bool ros::session::abstractSession::call | ( | const std::string & | service_name, |
MReq & | req, | ||
MRes & | res, | ||
bool | bAsync = false |
||
) | [inline] |
virtual bool ros::session::abstractSession::close_connections | ( | ) | [inline, virtual] |
int ros::session::abstractSession::GetSessionId | ( | ) | const [inline] |
const std::string& ros::session::abstractSession::GetSessionName | ( | ) | const [inline] |
virtual bool ros::session::abstractSession::isterminated | ( | ) | const [inline, virtual] |
virtual bool ros::session::abstractSession::terminate | ( | ) | [pure virtual] |
terminate the session instance
Implemented in ros::session::Session< MReq, MRes >.
boost::condition ros::session::abstractSession::_condAsyncCallsFlushed [protected] |
boost::condition ros::session::abstractSession::_condHasAsyncCalls [protected] |
std::map<std::string, ServiceClient> ros::session::abstractSession::_mapservices [private] |
std::string ros::session::abstractSession::_session_dir [private] |
std::string ros::session::abstractSession::_session_name [private] |
int ros::session::abstractSession::_sessionid [private] |
boost::thread ros::session::abstractSession::_threadasync [private] |
boost::mutex ros::session::abstractSession::async_mutex [protected] |
bool ros::session::abstractSession::bterminated [protected] |
boost::mutex ros::session::abstractSession::serv_mutex [protected] |