/***************************************************************
 * PrForceSensorZebra.h
 *
 * This is an Zebra force sensor class.
 *
 ****************************************************************/

/*
 * modification history
 *----------------------
 *
 * 04/20/98: K.C. Chang: created.
 */

#ifndef _PrForceSensorZebra_h
#define _PrForceSensorZebra_h

#include "PrForceSensorIntf.h"

class PrUtility;

class PrForceSensorZebra : public PrForceSensorIntf
{
public:
  // constructor sets flag
  // flag() should be called before using
  PrForceSensorZebra(int sensorNum = PR_ZEBRA_FS_ID);
  ~PrForceSensorZebra();

  virtual Float forceMax();
  virtual Float torqueMax();

  // read force sensor values
  virtual int values(Float *data);

  virtual int value(int channel,Float &volt);

  void display();

private:
  int sensorNum_;
  PrUtility *utility_;

  unsigned int inPORT_lo_[3];
  unsigned int inPORT_hi_[3];
  unsigned int outPORT_[3];
  unsigned int conv_BIT_[3];
  unsigned int ch_OFFSET_[3];
  unsigned int lo_MASK_[3];
  unsigned int hi_MASK_[3];
  unsigned int hi_SCALE_[3];
  unsigned int lo_SCALE_[3];

  void Initialize();
  void InitPorts();

  // copy is not allowed
  PrForceSensorZebra(const PrForceSensorZebra &) {}
};

#endif // _PrForceSensorZebra_h
