18 #ifndef LOG_RECORDER_HPP
19 #define LOG_RECORDER_HPP
24 #include <boost/circular_buffer.hpp>
30 #include "../helpers/recorder_helpers.hpp"
36 #include <rosgraph_msgs/Log.h>
49 void write( std::list<rosgraph_msgs::Log>& log_msgs );
51 void reset(boost::shared_ptr<naoqi::recorder::GlobalRecorder> gr,
float conv_frequency );
53 void bufferize( std::list<rosgraph_msgs::Log>& log_msgs );
59 inline std::string
topic()
const
82 boost::circular_buffer< std::list<rosgraph_msgs::Log> >
buffer_;
91 boost::shared_ptr<naoqi::recorder::GlobalRecorder>
gr_;
float buffer_duration_
Definition: log.hpp:84
float conv_frequency_
Definition: log.hpp:94
std::string topic() const
Definition: log.hpp:59
boost::shared_ptr< naoqi::recorder::GlobalRecorder > gr_
Definition: log.hpp:91
boost::mutex mutex_
Definition: log.hpp:86
bool is_initialized_
Definition: log.hpp:88
int counter_
Definition: log.hpp:95
void reset(boost::shared_ptr< naoqi::recorder::GlobalRecorder > gr, float conv_frequency)
Definition: log.cpp:58
float buffer_frequency_
Definition: log.hpp:93
void subscribe(bool state)
Definition: log.hpp:69
void bufferize(std::list< rosgraph_msgs::Log > &log_msgs)
Definition: log.cpp:76
bool isSubscribed() const
Definition: log.hpp:74
void writeDump(const ros::Time &time)
Definition: log.cpp:48
void setBufferDuration(float duration)
Definition: log.cpp:90
int max_counter_
Definition: log.hpp:96
LogRecorder(const std::string &topic, float buffer_frequency=0)
Definition: log.cpp:25
void write(std::list< rosgraph_msgs::Log > &log_msgs)
Definition: log.cpp:32
size_t buffer_size_
Definition: log.hpp:83
bool isInitialized() const
Definition: log.hpp:64
std::string topic_
Definition: log.hpp:80
bool is_subscribed_
Definition: log.hpp:89
boost::circular_buffer< std::list< rosgraph_msgs::Log > > buffer_
Definition: log.hpp:82