18 #ifndef BASIC_RECORDER_HPP 19 #define BASIC_RECORDER_HPP 25 #include "../helpers/recorder_helpers.hpp" 31 #include <boost/circular_buffer.hpp> 54 inline std::string
topic()
const 74 virtual void write(
const T& msg)
76 if (!msg.header.stamp.isZero()) {
77 gr_->write(
topic_, msg, msg.header.stamp);
86 boost::mutex::scoped_lock lock_write_buffer(
mutex_ );
87 typename boost::circular_buffer<T>::iterator it;
90 if (!it->header.stamp.isZero()) {
91 gr_->write(
topic_, *it, it->header.stamp);
101 boost::mutex::scoped_lock lock_bufferize(
mutex_ );
133 boost::mutex::scoped_lock lock_bufferize(
mutex_ );
boost::circular_buffer< T > buffer_
virtual void bufferize(const T &msg)
virtual void writeDump(const ros::Time &time)
virtual void write(const T &msg)
virtual void setBufferDuration(float duration)
bool isSubscribed() const
std::string topic() const
bool isInitialized() const
BasicRecorder(const std::string &topic, float buffer_frequency=0)
static const float bufferDefaultDuration
boost::shared_ptr< naoqi::recorder::GlobalRecorder > gr_
void subscribe(bool state)
virtual void reset(boost::shared_ptr< GlobalRecorder > gr, float conv_frequency)