Public Member Functions | Protected Attributes | List of all members
CCplBase Class Referenceabstract

Abstract base class for protocol definiton. More...

#include <cplBase.h>

Inheritance diagram for CCplBase:
Inheritance graph
[legend]

Public Member Functions

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

Protected Attributes

CCdlBasedevice
 communication device More...
 
short mMasterRevision
 master firmware revision More...
 
short mMasterVersion
 master version of robot we are communicating with More...
 

Detailed Description

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.

Definition at line 47 of file cplBase.h.

Constructor & Destructor Documentation

virtual CCplBase::~CCplBase ( )
inlinevirtual

destructor

This class is only an interface

Definition at line 75 of file cplBase.h.

Member Function Documentation

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.

Member Data Documentation

CCdlBase* CCplBase::device
protected

communication device

Definition at line 50 of file cplBase.h.

short CCplBase::mMasterRevision
protected

master firmware revision

Definition at line 52 of file cplBase.h.

short CCplBase::mMasterVersion
protected

master version of robot we are communicating with

Definition at line 51 of file cplBase.h.


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


kni
Author(s): Martin Günther
autogenerated on Fri Jun 7 2019 22:06:46