18 #ifndef DIAGNOSTICS_RECORDER_HPP
19 #define DIAGNOSTICS_RECORDER_HPP
24 #include <boost/circular_buffer.hpp>
30 #include "../helpers/recorder_helpers.hpp"
35 #include <diagnostic_msgs/DiagnosticArray.h>
48 void write(diagnostic_msgs::DiagnosticArray& msg );
50 void reset( boost::shared_ptr<naoqi::recorder::GlobalRecorder> gr,
float conv_frequency );
52 void bufferize(diagnostic_msgs::DiagnosticArray& msg );
58 inline std::string
topic()
const
81 boost::circular_buffer<diagnostic_msgs::DiagnosticArray>
buffer_;
90 boost::shared_ptr<naoqi::recorder::GlobalRecorder>
gr_;
void subscribe(bool state)
Definition: diagnostics.hpp:68
bool isSubscribed() const
Definition: diagnostics.hpp:73
void writeDump(const ros::Time &time)
Definition: diagnostics.cpp:47
void reset(boost::shared_ptr< naoqi::recorder::GlobalRecorder > gr, float conv_frequency)
Definition: diagnostics.cpp:62
void bufferize(diagnostic_msgs::DiagnosticArray &msg)
Definition: diagnostics.cpp:80
void setBufferDuration(float duration)
Definition: diagnostics.cpp:94
boost::shared_ptr< naoqi::recorder::GlobalRecorder > gr_
Definition: diagnostics.hpp:90
int max_counter_
Definition: diagnostics.hpp:95
int counter_
Definition: diagnostics.hpp:94
void write(diagnostic_msgs::DiagnosticArray &msg)
Definition: diagnostics.cpp:37
float conv_frequency_
Definition: diagnostics.hpp:93
float buffer_frequency_
Definition: diagnostics.hpp:92
boost::mutex mutex_
Definition: diagnostics.hpp:85
boost::circular_buffer< diagnostic_msgs::DiagnosticArray > buffer_
Definition: diagnostics.hpp:81
size_t buffer_size_
Definition: diagnostics.hpp:82
Definition: diagnostics.hpp:42
std::string topic() const
Definition: diagnostics.hpp:58
bool isInitialized() const
Definition: diagnostics.hpp:63
bool is_subscribed_
Definition: diagnostics.hpp:88
float buffer_duration_
Definition: diagnostics.hpp:83
bool is_initialized_
Definition: diagnostics.hpp:87
std::string topic_
Definition: diagnostics.hpp:79
DiagnosticsRecorder(const std::string &topic, float buffer_frequency=0)
Definition: diagnostics.cpp:28