/***************************************************************
 * PrSTGBoard.cpp
 *
 * This class contains code specific to the 
 * Trident Robotic Puma controller / ServoToGo board
 * Association
 *
 ****************************************************************/

/*
 * modification history
 *----------------------
 *
 * 02/24/99 N. Turro : created
 * 02/22/03 Weyn Ong : Used to be named StgPuma.  Renamed for consistency
 *                     with rest of driver. 
 */

#ifndef _PrSTGBoard_h
#define _PrSTGBoard_h

#include "driver/PrRobotDefn.h"
#include "driver/ServoToGo.h"

#define PR_STGBOARD_OK      1
#define PR_STGBOARD_ERROR   0 

class PrSTGBoard
{
  public:
    // sets IRQ and Base Address,
    // sets I/O ports directions
    // constructor sets flag
    // flag() should be called before using
    PrSTGBoard();
    ~PrSTGBoard();

    int flag() { return flag_; }

    void jointForce(const float *);

    void readPos(Float *); 

    void zero( void );
    
    int handOpen();
    int handClose();
  
    ServoToGo* GetBoard() { return stg_; } 

  private:
    int flag_;
    ServoToGo *stg_;
};

#endif // _PrSTGBoard_h
