/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : FuelCell.h                                                    */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
#ifndef _FUELCELL_H
#define _FUELCELL_H
#include <unistd.h>
#include <termios.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/uio.h>
#include <fcntl.h>
#include <errno.h>

#include "PeriodicTask.h"
#include "FuelCellOutput.h"
#include "SharedData.h"
#include "time.h"
#include "Syslog.h"

#include "DeviceIF.h"

#include "FuelCellLog.h"

#include "Attributes.h"
//#include "LayeredControlIF.h"

#ifdef _SIM
#include "SimulatedFuelCellIF.h"
#endif
/*
CLASS 
FuelCell

DESCRIPTION
FuelCell ethernet driver, based upon Fuel Cell Interface Document.
The "Driver" (this code), is responsible for periodically calling both 
get_FCC_status() and get_FCC_data, and Publishing events as necessary.

AUTHOR
John Rieffel
*/

class FuelCell : public PeriodicTask {

  friend class FuelCellLog;

 public:
  FuelCell(char *configFile);
  ~FuelCell();
 
 protected:
  
  Attributes attributes;
  void createFCAttributes( void );
  void loadFCConfigFile( char *configFile );
  void reportFCAttributes( void );

#ifdef _SIM
  SimulatedFuelCellIF *simulatedfuelcell;
#endif
  FuelCellOutput *_output;
  DeviceIF::Status init(); // unused for now?
  
  //Periodic Callback for get_FCC_status
  DeviceIF::Status get_status_callback();
  
  // Periodic Callback for get_FCC_data
  DeviceIF::Status get_data_callback();

  //  LayeredControlIF *layeredcontrol;

  // shared output and log objects
  FuelCellLog *_log;

  long GET_STATUS_PERIOD;
  long GET_DATA_PERIOD;
  
      
};


#endif
