#ifndef GENERATORCORE_H #define GENERATORCORE_H #include #include #include #include #include "logthread.h" #include "httpthread.h" #include "databasethread.h" #include "devinfotcpserver.h" class GeneratorCore : public QObject { Q_OBJECT public: explicit GeneratorCore(QObject *parent = nullptr); ~GeneratorCore(); void start(); bool shm_load(); void shm_init(); signals: public slots: void onConnected(); void dataLog(QString log); void mqtt_data(QString mqtt_msg); void mqtt_alarm(QString mqtt_alarm); void appendSql(QString sql); private: LogThread *logthread; HttpThread *httpthread; DatabaseThread *dbthread; DevInfoTcpServer *devinfoserver; QMQTT::Client *m_client; QSqlDatabase db; quint16 mqttIdx,mqttAlarmIdx; QString ip,port,username,password; }; #endif // GENERATORCORE_H