Files
checker_host/interface/codec_ym.h

34 lines
598 B
C
Raw Normal View History

2023-11-26 23:05:35 +08:00
#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;
2023-11-29 15:36:45 +08:00
offset=0;
2023-11-26 23:05:35 +08:00
}
~CodecYm() {}
// 重载接收字节函数
bool recvByte(int byte);
// 重载解码函数
myarray decode(int &srcAddr, int &dstAddr, int &cmd, myarray data);
2023-11-29 15:36:45 +08:00
int packCheck(myarray data);
2023-11-26 23:05:35 +08:00
myarray encode(int srcAddr, int dstAddr, int cmd, myarray data);
2023-11-27 14:31:00 +08:00
2023-11-26 23:05:35 +08:00
private:
bool is_big_data;
int num_to_read;
int cmd_no;
int cmd;
int len;
2023-11-29 15:36:45 +08:00
int offset;
2023-11-26 23:05:35 +08:00
};
#endif // CODEC_YM_H