#ifndef _BENTHICBIOSAMPLER_H
#define _BENTHICBIOSAMPLER_H
#include "BenthicBioApp.h"
#include "IbcMicroSampler.h"

#define BITS_TO_DEGS(bits) ((bits / 193) - 10) 
// Need a DM Period for Benthic Bio Sled.
#define MWSLED_IBC_DM_PERIOD    500000 //Mwsled Dcon Data Period 2 hz.
#define HUMIDITY_DM_PERIOD     2000000 //HUMIDITY Period .5 hz
#define ATOD_PERIOD             100000 //A to D channel Period 10 hz.
/*
CLASS 
BenthicBioSampler

DESCRIPTION
Periodic sample and process application specific data from micro

AUTHOR
Douglas Au
*/

class BenthicBioSampler : public IbcMicroSampler
{
  public:

  ///////////////////////////////////////////////////////////////////
  // Constructor
  // [input] name: application name
  // [input] MICRO: Parent MicroApp
  BenthicBioSampler(const char *name, BenthicBioApp *micro);
  ~BenthicBioSampler();

  protected:

  ///////////////////////////////////////////////////////////////////
  // Saves the last state of Suction Sampler Index 
  MBool lastSSIndexSense;
  MBool lastSwingArmSense;
  MBool lastCompLevelSense;
  MBool lastSpareDigitalInput;
  
  ///////////////////////////////////////////////////////////////////
  // Updates Digital input Values from Isolated I/O Board
  void updateDigitalInputs();
  
  ///////////////////////////////////////////////////////////////////
  // Initializes Index Sense Value on startup
  void initDigitalInputs();

  ///////////////////////////////////////////////////////////////////
  // Pointer to the main app
  BenthicBioApp *_benthicBioApp;
 
};


#endif













