statepublisher_zmq.h
Go to the documentation of this file.
1 #ifndef STATE_PUBLISHER_ZMQ_H
2 #define STATE_PUBLISHER_ZMQ_H
3 
4 #include <QObject>
5 #include <QtPlugin>
6 #include <zmq.hpp>
7 #include <thread>
8 #include <mutex>
9 #include "../statepublisher_base.h"
10 
11 
12 class StatePublisherZMQ: public QObject, StatePublisher
13 {
14  Q_OBJECT
15  Q_PLUGIN_METADATA(IID "com.icarustechnology.PlotJuggler.StatePublisher" "../statepublisher.json")
16  Q_INTERFACES(StatePublisher)
17 
18 public:
20 
21  virtual void updateState(PlotDataMap* datamap, double current_time);
22 
23  virtual ~StatePublisherZMQ();
24 
25 private:
26  PlotDataMap* _prev_dataplot;
27 
28  void run_thread();
29 
30  std::thread _thread;
31  std::mutex _mutex;
32 
33  std::map<QString, double> _current_data;
34  double _prev_time;
35 
36 
37 };
38 
39 #endif // STATE_PUBLISHER_ZMQ_H
virtual void updateState(PlotDataMap *datamap, double current_time)
std::map< QString, double > _current_data
PlotDataMap * _prev_dataplot


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:18