实现赋码仪命令
升级小板程序失败时停止
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "QThread"
|
||||
#include <QNetworkInterface>
|
||||
#include <QUdpSocket>
|
||||
#include "QTimer"
|
||||
|
||||
// using namespace std;
|
||||
// using namespace std::placeholders;
|
||||
@@ -41,6 +42,8 @@ public:
|
||||
command()
|
||||
{
|
||||
socket_ = nullptr;
|
||||
timer_=nullptr;
|
||||
networt_state=0;
|
||||
}
|
||||
virtual ~command()
|
||||
{
|
||||
@@ -49,6 +52,7 @@ public:
|
||||
}
|
||||
void send(QByteArray data);
|
||||
void init_cb();
|
||||
void timer_cb();
|
||||
void ready_read_cb();
|
||||
|
||||
private:
|
||||
@@ -56,6 +60,8 @@ private:
|
||||
QByteArray recv_data;
|
||||
QHostAddress host_addr;
|
||||
quint16 port;
|
||||
QTimer *timer_;
|
||||
int networt_state;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user