writecore.h 788 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef WRITECORE_H
  2. #define WRITECORE_H
  3. #include <QObject>
  4. #include "databasethread.h"
  5. #include "logthread.h"
  6. #include "mqttdatathread.h"
  7. #include "dealmqttthread.h"
  8. class WriteCore : public QObject
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit WriteCore(QObject *parent = nullptr);
  13. ~WriteCore();
  14. void start();
  15. signals:
  16. public slots:
  17. void mqtt_data(QString ip,QString port,QString username,QString password);
  18. void dbdata_log(QString log);
  19. void mq_log(QString log);
  20. void sendMqttData(QString topic,QByteArray data);
  21. void dmq_log(QString log);
  22. void appendSql(QString sql);
  23. void appendAlarm(QString sql);
  24. private:
  25. DatabaseThread *dbthread;
  26. LogThread *logthread;
  27. MqttDataThread *mqthread;
  28. DealMqttThread *dealmqthread;
  29. };
  30. #endif // WRITECORE_H