Files
checker_host/interface/codec_slave.h

22 lines
478 B
C
Raw Normal View History

2023-11-26 23:05:35 +08:00
#ifndef CODEC_SLAVE_H
#define CODEC_SLAVE_H
#include "interface/codec.h"
2023-11-27 14:31:00 +08:00
class codec_slave : public Codec
2023-11-26 23:05:35 +08:00
{
public:
2023-11-27 14:31:00 +08:00
codec_slave() : Codec()
{
}
2023-11-29 15:36:45 +08:00
virtual int packCheck(myarray data) { return data.size(); }
2023-11-27 14:31:00 +08:00
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);
2023-11-26 23:05:35 +08:00
protected:
2023-11-27 14:31:00 +08:00
uint16_t cmd_no;
2023-11-26 23:05:35 +08:00
};
#endif // CODEC_SLAVE_H