#ifndef CLIENTTHREAD_H
#define CLIENTTHREAD_H

#include <QThread>
#include <QTcpSocket>
#include <QDateTime>
#include <QHostAddress>

class ClientThread : public QThread
{
    Q_OBJECT
public:
    explicit ClientThread(QObject *parent = nullptr);
    void run();
    void stop();
    void deviceStatus();
    void readData(QTcpSocket *so,QString devCode);
    void controlData(QString deviceId,int switchStatus);

signals:
    void mqttData(QString msg);
    void dataListLog(QString log);
    void responseMsg(QString msg);

public slots:

private:
    QTcpSocket *so;
    bool keep;
    QList<QByteArray> CmdList;
    QString devCode;
    int switch_status;

};

#endif // CLIENTTHREAD_H
