// *******************************************************************
// CPuma.h
//
// This class provides an interface to a Puma robot.  Also see
// CSimPuma.h and CPumaModel.h.
//
// This class is designed so that you can create multiple CPuma
// objects, but they all control the same puma.  (This makes it easy
// to switch robot models, without having to worry about whether the
// new driver is the same as the old one.)  The interface to the puma
// is initialized when the first CPuma object is constructed, and
// destroyed when the last CPuma object is destructed.
//
// modification history
// --------------------
//
// 08/04/04: Dan Merget: created
// *******************************************************************
#ifndef C_PUMA_H
#define C_PUMA_H

#include "IRobotDriver.h"
class PrIPBoardIntf;
class GripperControl;
class PrTimer;

class CPuma: public IRobotDriver
{
public:
   CPuma( int clockRate );
   virtual ~CPuma();
   virtual void getPos( PrVector& dest );
   virtual void getVel( PrVector& dest );
   virtual void setTorque( const PrVector& rhs );
   virtual int  waitNextTick( Float );
   virtual void readForceSensor( PrVector& dest );
   virtual void setGripperCommand( int cmd );
   virtual void resetEncoder();

private:
   static int m_numInstances;              // Number of CPuma objects
   static PrIPBoardIntf*  m_hwInterface;   // Interface to puma board
   static GripperControl* m_gripper;       // Interface to gripper
   PrTimer* m_timer;                       // Timer used for waitNextTick()
};

#endif // C_PUMA_H
