datastream_mqtt.h
Go to the documentation of this file.
1 #ifndef DATASTREAM_MQTT_H
2 #define DATASTREAM_MQTT_H
3 
4 #include <QDialog>
5 #include <QtPlugin>
6 #include <QTimer>
7 #include <thread>
10 
11 #include "MQTTAsync.h"
12 
13 using namespace PJ;
14 
16 {
17  Q_OBJECT
18  Q_PLUGIN_METADATA(IID "facontidavide.PlotJuggler3.DataStreamer")
19  Q_INTERFACES(PJ::DataStreamer)
20 
21 public:
23 
24  virtual bool start(QStringList*) override;
25 
26  virtual void shutdown() override;
27 
28  virtual bool isRunning() const override;
29 
30  virtual ~DataStreamMQTT() override;
31 
32  virtual const char* name() const override
33  {
34  return "MQTT Subscriber";
35  }
36 
37  virtual bool isDebugPlugin() override
38  {
39  return false;
40  }
41 
44  bool _finished;
46 
47  QString _error_msg;
48 
49  QString _protocol;
50  QString _topic_filter;
51  int _qos;
52  std::unordered_map<std::string, PJ::MessageParserPtr> _parsers;
53 
56 
57 private:
58  bool _running;
59 
60 private slots:
61 
62 };
63 
64 
65 #endif // DATASTREAM_MQTT_H
std::unordered_map< std::string, PJ::MessageParserPtr > _parsers
The DataStreamer base class to create your own plugin.
void * MQTTAsync
Definition: MQTTAsync.h:239
QTimer _protocol_issue_timer
virtual const char * name() const override
MQTTAsync _client
virtual bool isDebugPlugin() override
QString _topic_filter


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:47:34