18 #ifndef BASIC_EVENT_RECORDER_HPP 19 #define BASIC_EVENT_RECORDER_HPP 25 #include "../helpers/recorder_helpers.hpp" 51 inline std::string
topic()
const 71 virtual void write(
const T& msg)
73 if (!msg.header.stamp.isZero()) {
74 gr_->write(
topic_, msg, msg.header.stamp);
83 boost::mutex::scoped_lock lock_write_buffer(
mutex_ );
85 typename std::list<T>::iterator it;
88 if (!it->header.stamp.isZero()) {
89 gr_->write(
topic_, *it, it->header.stamp);
99 boost::mutex::scoped_lock lock_bufferize(
mutex_ );
100 typename std::list<T>::iterator it;
114 boost::mutex::scoped_lock lock_bufferize(
mutex_ );
void subscribe(bool state)
virtual void writeDump(const ros::Time &time)
bool isTooOld(const T &msg)
BasicEventRecorder(const std::string &topic)
boost::shared_ptr< naoqi::recorder::GlobalRecorder > gr_
virtual void write(const T &msg)
bool isInitialized() const
bool isOlderThan(const T &msg, const ros::Time &time)
virtual void reset(boost::shared_ptr< GlobalRecorder > gr, float conv_frequency)
std::string topic() const
bool isSubscribed() const
virtual void bufferize(const T &msg)
static const float bufferDefaultDuration
void removeOlderThan(const ros::Time &time)
virtual ~BasicEventRecorder()
virtual void setBufferDuration(float duration)