31#define NUMBER_OF_RETRIES_SEND 3
32#define NUMBER_OF_RETRIES_RECV 3
142 virtual void send(
byte* send_buf,
byte write_sz,
short retries = 3);
143 virtual void recv(
byte* read_buf,
byte read_sz,
byte* size);
156 virtual void comm(
const byte* pack,
byte* buf,
byte* size);
Abstract base class for devices.
Abstract base class for protocol definiton.
Implement the Serial-Zero protocol.
virtual void send(byte *send_buf, byte write_sz, short retries=3)
virtual void defineProtocol(byte _kataddr)
Defines the protocol's attributes.
virtual bool init(CCdlBase *_device, byte _kataddr=24)
Initializing function.
virtual void recv(byte *read_buf, byte read_sz, byte *size)
virtual void getMasterFirmware(short *fw, short *rev)
Get the master firmware of the robot we are communicating with.
virtual void comm(const byte *pack, byte *buf, byte *size)
Communication function.
virtual bool load_tbl()
Loads the command table from the robot's firmware.
Base class of two different serial protocols.
virtual bool load_tbl()=0
Loads the command table from the robot's firmware.
virtual void defineProtocol(byte _kataddr)=0
Defines the protocol's attributes.
const int error_number() const
Exception reported by the firmware.
const char command_char() const
const int axis_number() const
char _command_char
the command that caused the error
FirmwareException(const std::string &error, const int error_number, const int axis, const char command)
int _axis_number
axis number, if any
CRC check for the answer package failed.
const int KATANA_ERROR_FLAG
defines the error flag number
byte read_sz
read size of the packet
byte send_sz
send size of the packet