Abstract base class for protocol definiton. More...
#include <cplBase.h>

Public Member Functions | |
| virtual void | comm (const byte *pack, byte *buf, byte *size)=0 |
| Base communication function. | |
| virtual void | getMasterFirmware (short *fw, short *rev)=0 |
| Get the master firmware of the robot we are communicating with. | |
| virtual bool | init (CCdlBase *_device, byte _kataddr=24)=0 |
| Basic initializing function. | |
| virtual | ~CCplBase () |
| destructor | |
Protected Attributes | |
| CCdlBase * | device |
| communication device | |
| short | mMasterRevision |
| master firmware revision | |
| short | mMasterVersion |
| master version of robot we are communicating with | |
Abstract base class for protocol definiton.
The robot can be controled by using different kind of protocols; this class has been introduced as an abstract base class to manage them gether; every protocol the robot should use in futur shoud be derived from this class.
| virtual CCplBase::~CCplBase | ( | ) | [inline, virtual] |
| virtual void CCplBase::comm | ( | const byte * | pack, |
| byte * | buf, | ||
| byte * | size | ||
| ) | [pure virtual] |
Base communication function.
The children of this class should write their main double way communication in this function.
Implemented in CCplSerialCRC.
| virtual void CCplBase::getMasterFirmware | ( | short * | fw, |
| short * | rev | ||
| ) | [pure virtual] |
Get the master firmware of the robot we are communicating with.
Get master firmware read at initialization time.
Implemented in CCplSerialCRC.
| virtual bool CCplBase::init | ( | CCdlBase * | _device, |
| byte | _kataddr = 24 |
||
| ) | [pure virtual] |
Basic initializing function.
The children of this class should write their initializing part in that function.
Implemented in CCplSerialCRC.
CCdlBase* CCplBase::device [protected] |
short CCplBase::mMasterRevision [protected] |
short CCplBase::mMasterVersion [protected] |