Implement the Serial-Zero protocol. More...
#include <cplSerial.h>
Public Member Functions | |
virtual void | comm (const byte *pack, byte *buf, byte *size) |
Communication function. More... | |
virtual void | getMasterFirmware (short *fw, short *rev) |
Get the master firmware of the robot we are communicating with. More... | |
virtual bool | init (CCdlBase *_device, byte _kataddr=24) |
Initializing function. More... | |
Public Member Functions inherited from CCplBase | |
virtual | ~CCplBase () |
destructor More... | |
Protected Member Functions | |
virtual void | defineProtocol (byte _kataddr) |
Defines the protocol's attributes. More... | |
virtual bool | load_tbl () |
Loads the command table from the robot's firmware. More... | |
virtual void | recv (byte *read_buf, byte read_sz, byte *size) |
virtual void | send (byte *send_buf, byte write_sz, short retries=3) |
Additional Inherited Members | |
Protected Attributes inherited from CCplSerial | |
TPacket | cmd [256] |
command table More... | |
THeader | hdr |
header More... | |
byte | read_buf [256] |
receive buffer More... | |
byte | send_buf [256] |
sending buffer More... | |
Protected Attributes inherited from CCplBase | |
CCdlBase * | device |
communication device More... | |
short | mMasterRevision |
master firmware revision More... | |
short | mMasterVersion |
master version of robot we are communicating with More... | |
Implement the Serial-Zero protocol.
Initializing function
Init the protocols basic attributes.
Communication function
Sends a communications packet and receives one from the robot.
Implement the Serial-CRC protocol
Definition at line 137 of file cplSerial.h.
Communication function.
Sends a communications packet and receives one from the robot.
Implements CCplBase.
Definition at line 92 of file cplSerial.cpp.
|
protectedvirtual |
Defines the protocol's attributes.
Implements CCplSerial.
Definition at line 79 of file cplSerial.cpp.
|
virtual |
Get the master firmware of the robot we are communicating with.
Get master firmware read at initialization time.
Implements CCplBase.
Definition at line 168 of file cplSerial.cpp.
Initializing function.
Init the protocols basic attributes.
Implements CCplBase.
Definition at line 85 of file cplSerial.cpp.
|
protectedvirtual |
Loads the command table from the robot's firmware.
Implements CCplSerial.
Definition at line 33 of file cplSerial.cpp.
Definition at line 192 of file cplSerial.cpp.
Definition at line 173 of file cplSerial.cpp.