10 #ifndef __SOT_MAILBOX_HH
11 #define __SOT_MAILBOX_HH
14 #include <dynamic-graph/all-signals.h>
15 #include <dynamic-graph/entity.h>
18 #include <boost/thread/mutex.hpp>
19 #include <boost/thread/thread.hpp>
20 #include <boost/thread/xtime.hpp>
36 template <
class Object>
42 template <
class Object>
52 Mailbox(
const std::string &name);
55 void post(
const Object &obj);
58 Object &
getObject(Object &res,
const int &time);
59 struct timeval &
getTimestamp(
struct timeval &res,
const int &time);
70 dynamicgraph::SignalTimeDependent<sotTimestampedObject, int>
SOUT;
71 dynamicgraph::SignalTimeDependent<Object, int>
objSOUT;
72 dynamicgraph::SignalTimeDependent<struct timeval, int>
timeSOUT;
77 template <
class Object>
78 struct signal_io<sot::MailboxTimestampedObject<Object> >
79 : signal_io_unimplemented<sot::MailboxTimestampedObject<Object> > {};
82 struct signal_io<timeval> : signal_io_unimplemented<timeval> {};
Definition: mailbox.hh:43
struct timeval & getTimestamp(struct timeval &res, const int &time)
Definition: mailbox.hxx:96
sotTimestampedObject & get(sotTimestampedObject &res, const int &dummy)
Definition: mailbox.hxx:60
bool hasBeenUpdated(void)
Definition: mailbox.hxx:48
void post(const Object &obj)
Definition: mailbox.hxx:78
~Mailbox(void)
Definition: mailbox.hxx:40
Mailbox(const std::string &name)
Definition: mailbox.hxx:22
dynamicgraph::SignalTimeDependent< struct timeval, int > timeSOUT
Definition: mailbox.hh:72
Object & getObject(Object &res, const int &time)
Definition: mailbox.hxx:89
dynamicgraph::SignalTimeDependent< Object, int > objSOUT
Definition: mailbox.hh:71
Object mainObject
Definition: mailbox.hh:65
virtual const std::string & getClassName(void) const
Definition: mailbox.hh:46
MailboxTimestampedObject< Object > sotTimestampedObject
Definition: mailbox.hh:49
static const std::string CLASS_NAME
Definition: mailbox.hh:45
boost::timed_mutex mainObjectMutex
Definition: mailbox.hh:64
dynamicgraph::SignalTimeDependent< sotTimestampedObject, int > SOUT
Definition: mailbox.hh:70
struct timeval mainTimeStamp
Definition: mailbox.hh:66
bool update
Definition: mailbox.hh:67
Definition: trajectory.hh:84
Definition: abstract-sot-external-interface.hh:17
Definition: mailbox.hh:37
Object obj
Definition: mailbox.hh:38