KatanaNativeInterface $VERSION$
Public Member Functions | Protected Member Functions | List of all members
CCplSerialCRC Class Reference

Implement the Serial-Zero protocol. More...

#include <cplSerial.h>

Inheritance diagram for CCplSerialCRC:
Inheritance graph
Collaboration diagram for CCplSerialCRC:
Collaboration graph

Public Member Functions

virtual bool init (CCdlBase *_device, byte _kataddr=24)
 Initializing function.
 
virtual void comm (const byte *pack, byte *buf, byte *size)
 Communication function.
 
virtual void getMasterFirmware (short *fw, short *rev)
 Get the master firmware of the robot we are communicating with.
 
- Public Member Functions inherited from CCplBase
virtual bool init (CCdlBase *_device, byte _kataddr=24)=0
 Basic initializing function.
 
virtual void comm (const byte *pack, byte *buf, byte *size)=0
 Base communication function.
 
virtual ~CCplBase ()
 destructor
 
virtual void getMasterFirmware (short *fw, short *rev)=0
 Get the master firmware of the robot we are communicating with.
 

Protected Member Functions

virtual bool load_tbl ()
 Loads the command table from the robot's firmware.
 
virtual void defineProtocol (byte _kataddr)
 Defines the protocol's attributes.
 
virtual void send (byte *send_buf, byte write_sz, short retries=3)
 
virtual void recv (byte *read_buf, byte read_sz, byte *size)
 
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.
 

Additional Inherited Members

- Protected Attributes inherited from CCplSerial
THeader hdr
 header
 
TPacket cmd [256]
 command table
 
byte send_buf [256]
 sending buffer
 
byte read_buf [256]
 receive buffer
 
- Protected Attributes inherited from CCplBase
CCdlBasedevice
 communication device
 
short mMasterVersion
 master version of robot we are communicating with
 
short mMasterRevision
 master firmware revision
 

Detailed Description

Implement the Serial-Zero protocol.

Initializing function

Init the protocols basic attributes. ‍/ virtual bool init(CCdlBase* _device, byte _kataddr = 24);

/*! Communication function

            Sends a communications packet and receives one from the robot.
      &zwj;/

virtual TRetCOMM comm(const byte* _pack, byte* _buf, byte* _size); };

-------------------------------------------------------------------------------------------------------------—//

/*! Implement the Serial-CRC protocol

Definition at line 137 of file cplSerial.h.

Member Function Documentation

◆ comm()

virtual void CCplSerialCRC::comm ( const byte pack,
byte buf,
byte size 
)
virtual

Communication function.

Sends a communications packet and receives one from the robot.

Implements CCplBase.

◆ defineProtocol()

virtual void CCplSerialCRC::defineProtocol ( byte  _kataddr)
protectedvirtual

Defines the protocol's attributes.

Implements CCplSerial.

◆ getMasterFirmware()

virtual void CCplSerialCRC::getMasterFirmware ( short *  fw,
short *  rev 
)
virtual

Get the master firmware of the robot we are communicating with.

Get master firmware read at initialization time.

Implements CCplBase.

◆ init()

virtual bool CCplSerialCRC::init ( CCdlBase _device,
byte  _kataddr = 24 
)
virtual

Initializing function.

Init the protocols basic attributes.

Implements CCplBase.

◆ load_tbl()

virtual bool CCplSerialCRC::load_tbl ( )
protectedvirtual

Loads the command table from the robot's firmware.

Implements CCplSerial.

◆ recv()

virtual void CCplSerialCRC::recv ( byte read_buf,
byte  read_sz,
byte size 
)
protectedvirtual

◆ send()

virtual void CCplSerialCRC::send ( byte send_buf,
byte  write_sz,
short  retries = 3 
)
protectedvirtual

The documentation for this class was generated from the following file: