添加tcp心跳
添加升级小板程序、方案、jwt文件的进度条命令
This commit is contained in:
64
prot_cmd/keep_live.h
Normal file
64
prot_cmd/keep_live.h
Normal file
@@ -0,0 +1,64 @@
|
||||
#ifndef KEEP_LIVE_H
|
||||
#define KEEP_LIVE_H
|
||||
|
||||
#include <QObject>
|
||||
#include "prot/prot_pc.h"
|
||||
#include "QTimer"
|
||||
|
||||
class keep_live_checker : public HandlePc
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
keep_live_checker():HandlePc(){
|
||||
|
||||
}
|
||||
int dolater(int cmd,myarray data);
|
||||
};
|
||||
|
||||
|
||||
|
||||
class keep_live:public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
keep_live():QObject(){
|
||||
timer_=nullptr;
|
||||
}
|
||||
void init();
|
||||
public slots:
|
||||
virtual void timeout_slot()=0;
|
||||
void connected_slot();
|
||||
void recv_slot();
|
||||
protected:
|
||||
QTimer *timer_;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class keep_checker:public keep_live
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
keep_checker():keep_live(){
|
||||
}
|
||||
void timeout_slot();
|
||||
};
|
||||
|
||||
|
||||
class keep_coder:public keep_live
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
keep_coder():keep_live(){
|
||||
}
|
||||
void timeout_slot();
|
||||
};
|
||||
|
||||
|
||||
keep_live *KeepLive();
|
||||
|
||||
|
||||
#endif // KEEP_LIVE_H
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user