添加tcp心跳
添加升级小板程序、方案、jwt文件的进度条命令
This commit is contained in:
@@ -116,14 +116,19 @@ class selfdev_slaveupdate : public HandlePc
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
selfdev_slaveupdate() : HandlePc() {}
|
||||
selfdev_slaveupdate() : HandlePc() {
|
||||
handle_start_time=0;
|
||||
}
|
||||
~selfdev_slaveupdate() {}
|
||||
int dolater(int cmd, myarray data);
|
||||
void timeout();
|
||||
public slots:
|
||||
void slave_end_slot(int addr,int ack, slave_data data);
|
||||
void rate_slot(int rate, mystring str);
|
||||
signals:
|
||||
void send_to_m4_signal(myarray data);
|
||||
protected:
|
||||
qint64 handle_start_time;
|
||||
};
|
||||
|
||||
|
||||
@@ -142,8 +147,11 @@ public:
|
||||
void timeout();
|
||||
public slots:
|
||||
void slave_end_slot(int addr,int ack, slave_data data);
|
||||
void rate_slot(int rate, mystring str);
|
||||
signals:
|
||||
void send_to_m4_signal(myarray data);
|
||||
protected:
|
||||
qint64 handle_start_time;
|
||||
};
|
||||
|
||||
|
||||
@@ -277,7 +285,7 @@ public:
|
||||
// pc指令生成从机列表
|
||||
virtual QList<int> cmd_pc_to_addrs(myarray data)=0;
|
||||
// 从机发起命令
|
||||
virtual int cmd_slave()=0;
|
||||
virtual int cmd_slave(){return 0x20;}
|
||||
// pc收到回复,返回0不回复
|
||||
virtual int cmd_pc_recv()=0;
|
||||
// 生成接收回复到pc
|
||||
@@ -299,7 +307,30 @@ signals:
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
|
||||
selfdev_runtask 重载示例
|
||||
class selfdef_custom:public selfdev_runtask
|
||||
{
|
||||
// 重载此函数把pc的指令格式转化为从机能识别的格式
|
||||
myarray cmd_pc_to_slave(myarray data);
|
||||
// 重载此函数根据pc指令生成要执行命令的从机列表
|
||||
QList<int> cmd_pc_to_addrs(myarray data);
|
||||
// (可选)重载此函数设置从机要执行的命令,不重载则使用命令0x20
|
||||
int cmd_slave();
|
||||
// 重载此函数指定收到数据回复的命令字
|
||||
int cmd_pc_recv();
|
||||
// 重载此函数生成接收到数据回复的数据
|
||||
myarray cmd_pc_recv_to_pc();
|
||||
// 重载此函数指定操作结束回复的命令字
|
||||
int cmd_pc_ret();
|
||||
// 重载此函数把从机的数据格式转化为pc能识别的格式
|
||||
myarray ret_slave_to_pc(QList<myarray> data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
// 赋码仪配置参数
|
||||
|
Reference in New Issue
Block a user