重新构建的批检仪主板程序
This commit is contained in:
39
interface/codec_ym.h
Normal file
39
interface/codec_ym.h
Normal 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
|
Reference in New Issue
Block a user