/***************************************************************
 * PrAccelSensorJr3PCI.h
 *
 * Concrete derived class of PrAccelSensorJr3 for PCI board.
 *
 ****************************************************************/

/*
 * modification history
 *----------------------
 *
 * 02/25/03: Weyn Ong : Created.
 */

#ifndef _PrAccelSensorJr3PCI_h
#define _PrAccelSensorJr3PCI_h

#include "PrAccelSensorJr3.h"
#include "PrForceSensorJr3PCI.h"

class PrAccelSensorJr3PCI : public PrAccelSensorJr3 {
  public:
    // Most of the public functions are in the base class PrAccelSensorJr3.

    // The 2-channel PCI controller card has one channel for force sensing
    // and the other for acceleration.  To access the second channel, this
    // implementation merely uses PrForceSensorJr3PCI to do all the work.

    PrAccelSensorJr3PCI(); 
 
    // read accel sensor values
    virtual int values( Float *data );
    virtual int value( int channel, Float &data );

    // read accel sensor values using different filters, from 0 (unfiltered)
    // to 6 (0.49Hz).
    virtual AccelArray getAccel( int filterNum = 0);
    virtual AccelArray getDerivativeAccel( int filterNum = 0 );

    // if the rate divisor is x, rate is calculated every x samples.
    virtual unsigned int getRateDivisor();
    virtual void setRateDivisor( unsigned int divisor );  // default is 1

    virtual unsigned int getErrorCount();

    // These should be zero when the sensor is operating well.
    virtual unsigned int getSaturationWarning();
    virtual unsigned int getErrorMessages();

    // set current sensor value offsets to zero
    virtual int zero();

  private:
    PrForceSensorJr3PCI * fs;    
};

#endif // _PrForceSensorJr3PCI_h
