libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
socketplot.h
1 #ifndef SOCKETPLOT_H
2 #define SOCKETPLOT_H
3 
4 //#include <QThread>
5 #include <Eigen/Eigen>
6 #include <deque>
7 #include <vector>
8 
9 #include "Logging/Logger.h"
10 
12 {
13  MOVE3D_STATIC_LOGGER;
14 public:
15  SocketPlot(std::string name);
16  ~SocketPlot();
17 
18  void addPoint(double x,double y);
19  void addPoint(std::vector<double> p);
20  void addIndexedValue(double val);
21  void send();
22  void sendEmpty();
23  unsigned int bufferMaxSize() const;
24  void setBufferMaxSize(unsigned int bufferMaxSize);
25 
26  std::string vectorToString(std::vector<double> v);
27 protected:
28  //void run();
29 private:
30  static std::string __name_prefix;
31  std::deque<std::vector<double> > _buffer;
32  logm3d::LoggerPtr _logger;
33  unsigned int _index;
34  unsigned int _bufferMaxSize;
35 };
36 
37 #endif // SOCKETPLOT_H
Definition: socketplot.h:11
This file implements macros to help with the logging, in a way similar to ROS, using log4cxx...