#ifndef DNCOMMTHREAD_H #define DNCOMMTHREAD_H #include #include #include class DNCommThread : public QThread { Q_OBJECT public: explicit DNCommThread(QObject *parent = 0, quint8 id=0, bool enabled=false, QString path=""); void setparam(QString path, bool enabled); QByteArray comm_work(QByteArray cmd, bool needrtn); void set_speed(int speed); int set_Parity(int databits,int stopbits,int parity); int open_comm(); void chk_list(); void run(); signals: void dbg_log(QString txt); void log(QString txt); void recsql(QString sql); void stasql(QString sql); void confsql(QString sql); public slots: private: quint8 Id; bool Enabled; bool CommOpened; QString CommPath; bool reopen; int fd; quint8 liveCur,deathCur; QList liveList,deathList; }; #endif // DNCOMMTHREAD_H