videocore.h 936 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef VIDEOCORE_H
  2. #define VIDEOCORE_H
  3. #include <QObject>
  4. #include <qmqtt.h>
  5. #include <QSqlDatabase>
  6. #include <QSqlQuery>
  7. #include "logthread.h"
  8. #include "httpthread.h"
  9. #include "tcpserver.h"
  10. #include "tcpserver1.h"
  11. #include "devinfotcpserver.h"
  12. #include "databasethread.h"
  13. class VideoCore : public QObject
  14. {
  15. Q_OBJECT
  16. public:
  17. explicit VideoCore(QObject *parent = nullptr);
  18. ~VideoCore();
  19. void start();
  20. void shm_init();
  21. bool shm_load();
  22. signals:
  23. public slots:
  24. void onConnected();
  25. void dataLog(QString log);
  26. void mqtt_data(QString mqtt_msg);
  27. void appendSql(QString sql);
  28. private:
  29. LogThread *logthread;
  30. HttpThread *httpthread;
  31. TcpServer *tcpserver;
  32. TcpServer1 *tcpserver1;
  33. DevInfoTcpServer *devinfoserver;
  34. DatabaseThread *dbthread;
  35. QMQTT::Client *m_client;
  36. QSqlDatabase db;
  37. quint16 mqttIdx;
  38. QString ip,port,username,password;
  39. };
  40. #endif // VIDEOCORE_H