Files
checker_host/interface/codec_slave.h
2023-11-29 15:36:45 +08:00

22 lines
478 B
C++

#ifndef CODEC_SLAVE_H
#define CODEC_SLAVE_H
#include "interface/codec.h"
class codec_slave : public Codec
{
public:
codec_slave() : Codec()
{
}
virtual int packCheck(myarray data) { return data.size(); }
virtual bool recvByte(int byte) { return false; }
virtual myarray encode(int srcAddr, int dstAddr, int cmd, myarray data);
virtual myarray decode(int &srcAddr, int &dstAddr, int &cmd, myarray data);
protected:
uint16_t cmd_no;
};
#endif // CODEC_SLAVE_H