重新构建的批检仪主板程序

This commit is contained in:
andy
2023-11-26 23:05:35 +08:00
parent b1b69d307f
commit 4a70f64693
29 changed files with 2565 additions and 64 deletions

53
prot/prot_m4.h Normal file
View File

@@ -0,0 +1,53 @@
#ifndef PROT_M4_H
#define PROT_M4_H
#include "QObject"
#include "base/base.h"
#include "QList"
#include "interface/codec.h"
#include "interface/interface.h"
#include "base/mycfg.h"
#include "QThread"
using namespace std;
using namespace std::placeholders;
typedef std::function<void(myarray data)> prot_m4_cb;
typedef struct{
prot_m4_cb fun;
myarray cmd;
}HandleM4_def;
class prot_m4:public QObject
{
public:
prot_m4(){if_=nullptr;}
~prot_m4(){}
void init();
bool set_irq_fun(prot_m4_cb fun,myarray data);
bool del_irq_fun(prot_m4_cb fun,myarray data);
public slots:
void send_data_slot(myarray data);
protected:
bool exe_cb_fun(myarray data);
protected:
InterFace *if_;
QList<HandleM4_def> funs;
Codec *codec_;
QThread thread;
myarray recv_data;
};
prot_m4 *protM4();
#endif // PROT_M4_H