datastream_sample.h
Go to the documentation of this file.
1 #ifndef DATASTREAM_SAMPLE_CSV_H
2 #define DATASTREAM_SAMPLE_CSV_H
3 
4 #include <QtPlugin>
5 #include <thread>
7 
8 
10 {
11  Q_OBJECT
12  Q_PLUGIN_METADATA(IID "com.icarustechnology.PlotJuggler.DataStreamer" "../datastreamer.json")
13  Q_INTERFACES(DataStreamer)
14 
15 public:
16 
18 
19  virtual bool start(QStringList*) override;
20 
21  virtual void shutdown() override;
22 
23  virtual bool isRunning() const override;
24 
25  virtual ~DataStreamSample();
26 
27  virtual const char* name() const override { return "Dummy Streamer"; }
28 
29  virtual bool isDebugPlugin() override { return true; }
30 
31  virtual bool xmlSaveState(QDomDocument &doc, QDomElement &parent_element) const override;
32 
33  virtual bool xmlLoadState(const QDomElement &parent_element ) override;
34 
35 private:
36 
37  struct Parameters{
38  double A,B,C,D;
39  };
40 
41  void loop();
42 
43  std::thread _thread;
44 
45  bool _running;
46 
47  std::map<std::string,Parameters> _parameters;
48 
49  void pushSingleCycle();
50 };
51 
52 #endif // DATALOAD_CSV_H
std::map< std::string, Parameters > _parameters
virtual bool xmlSaveState(QDomDocument &doc, QDomElement &parent_element) const override
virtual bool start(QStringList *) override
virtual bool isDebugPlugin() override
virtual const char * name() const override
virtual void shutdown() override
virtual bool isRunning() const override
virtual bool xmlLoadState(const QDomElement &parent_element) override
The DataStreamer base class to create your own plugin.


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