/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : FuelCellIF.idl                                                */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/

/*
CLASS 
FuelCellIF

DESCRIPTION
TaskInterface to Simulated FuelCell

AUTHOR
John Rieffel

*/
#include "InstrumentIF.idl"

interface SimulatedFuelCellIF : InstrumentIF {

  ////////////////////////////////////////////////////////////
  // Events generated by FuelCell device driver
  // As specified on FCC Interface Document
  //  relevant FCC_STATUS Structure codes
  // These will be fleshed out later

  enum FCC_Cmd_Reply {
    FCC_ERR_OK = 1,
    FCC_ERR_INVALID_PARAM,
    FCC_ERR_NO_CLIENT,
    FCC_ERR_TOO_MANY_CLIENTS,
    FCC_ERR_COMM
  };

  enum Event {
    NewAlarm,
    Clearalarm
  };

  enum FCC_Command
  { 
    FCC_CMD_NONE = 0,
    FCC_CMD_START,
    FCC_CMD_STOP,
    FCC_CMD_OFFLINE,
    FCC_CMD_RESUME
  };

  enum FC_Control_State
  {
    FC_STATE_IDLE,
    FC_STATE_OFFLINE,
    FC_STATE_RAMPING,
    FC_STATE_ONLINE
  };

  struct FCC_status
  {
    FC_Control_State fc_control_state;
    long health;
    short FC_remaining_kwh;
    short RB_remaining_wh;
    char BIT_status;
    char BIT_result;
  };

  struct FCC_data
  {
    short elapsed_time;
    short anolyte_pump_a_current;
    short anolyte_pump_b_current;
    short catholyte_pump_current;
    short peroxide_pump_current;
    short anolyte_temp;
    short catholyte_temp;
    short fwd_peroxide_temp;
    short aft_peroxide_temp;
    short stack_voltage;
    short stack_current;
    short battery_voltage;
    short battery_current;
    short peroxide_used;
  };

  //////////////////////////////////////////////////////////////////
  // recieve a command and send back an enumerated reply code
  FCC_Cmd_Reply send_simFCC_command(in FCC_Command fcc_command);

  //////////////////////////////////////////////////////////////////
  // put status into status structure and return reply code
  FCC_Cmd_Reply get_simFCC_status(out FCC_status fcc_status);

  //////////////////////////////////////////////////////////////////
  // put status into status structure and return reply code
  FCC_Cmd_Reply get_simFCC_data(out FCC_data fcc_data);

  //////////////////////////////////////////////////////////////////
  // set the value of the data
  FCC_Cmd_Reply set_simFCC_data(in FCC_data fcc_data);

  //////////////////////////////////////////////////////////////////
  // set the value of the status
  FCC_Cmd_Reply set_simFCC_status(in FCC_status fcc_status);

  

};
