#ifndef CORE_H #define CORE_H #include #include #include #include #include #include #include "logthread.h" #include "jzmqttpub.h" #include "jzmqttsub.h" #include "httpthread.h" #include "ytmqttpub.h" #include "ytmqttsub.h" class Core : public QObject { Q_OBJECT public: explicit Core(QObject *parent = nullptr); ~Core(); void start(); void shm_init(); bool shm_load(); signals: public slots: void onConnected(); void dataLog(QString log); void receiveDevData(QString topic,QByteArray data); void receiveYtDevData(QString topic,QByteArray data); void mqtt_data(QString mqtt_msg); void mqtt_data1(QString mqtt_msg); void mqtt_data2(QString mqtt_msg); void time_out(); private: LogThread *logthread; JZMqttPub *jzmqttpub; JZMqttSub *jzmqttsub; HttpThread *httpthread; YTMqttPub *ytmqttpub; YTMqttSub *ytmqttsub; QMQTT::Client *m_client; QSqlDatabase db; quint16 mqttIdx,mqttIdx1,mqttIdx2; QString ip,port,username,password; QTimer *timer; }; #endif // CORE_H