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

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

39
interface/codec_ym.h Normal file
View File

@@ -0,0 +1,39 @@
#ifndef CODEC_YM_H
#define CODEC_YM_H
#include "interface/codec.h"
class CodecYm : public Codec
{
Q_OBJECT
public:
CodecYm() : Codec()
{
is_big_data = false;
num_to_read = 0;
}
~CodecYm() {}
// 重载接收字节函数
bool recvByte(int byte);
// 重载解码函数
myarray decode(int &srcAddr, int &dstAddr, int &cmd, myarray data);
bool packCheck(myarray data);
myarray encode(int srcAddr, int dstAddr, int cmd, myarray data);
private:
bool is_big_data;
int num_to_read;
int cmd_no;
int cmd;
int len;
};
#endif // CODEC_YM_H