2023-12-05 18:37:40 +08:00
|
|
|
#ifndef CMD_CMDLINE_H
|
|
|
|
#define CMD_CMDLINE_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "QObject"
|
2024-01-04 18:12:42 +08:00
|
|
|
#include "QTimer"
|
2023-12-05 18:37:40 +08:00
|
|
|
#include "base/base.h"
|
|
|
|
|
|
|
|
|
2024-01-04 18:12:42 +08:00
|
|
|
class cmd_line_slots:public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
cmd_line_slots(){
|
|
|
|
timer_=nullptr;
|
|
|
|
run_flag=0;
|
|
|
|
}
|
|
|
|
~cmd_line_slots(){
|
|
|
|
if(timer_!=nullptr){
|
|
|
|
delete timer_;
|
|
|
|
timer_=nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public slots:
|
2023-12-05 18:37:40 +08:00
|
|
|
// void rate_slot(int rate,mystring str);
|
|
|
|
// void end_slot(int addr,int ack,myarray data);
|
2024-01-04 18:12:42 +08:00
|
|
|
void auto_test();
|
|
|
|
void auto_start();
|
|
|
|
protected:
|
|
|
|
QTimer *timer_;
|
|
|
|
int run_flag;
|
|
|
|
};
|
2023-12-05 18:37:40 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif // CMD_CMDLINE_H
|