/*
********************************************************
Copyright 2000 MBARI.
MBARI Proprietary Information. All rights reserved.
NOTE: This file is automatically generated.
DO NOT MODIFY.
********************************************************
*/

#ifndef __BatteryIF_H
#define __BatteryIF_H

#include "TaskInterface.h"


#define BatteryIFServerName "BatteryIFServer"

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

DESCRIPTION
TaskInterface to Battery device driver

AUTHOR
Tom O'Reilly

*/
class BatteryIF : public TaskInterface {

  friend class BatteryIF_SK;

  public:

  
  ////////////////////////////////////////////////////////////
  // Events generated by Battery device driver
  enum Events {
    LowPower,
    OverVoltage,
    UnderVoltage
  };

  
  
  BatteryIF(const char *name, int timeout = 10);

  BatteryIF(const char *name, const char *serverName, int timeout = 10);

  ~BatteryIF();

  ///////////////////////////////////////////////////////////////////
  // Return life in amp-hours
  long life();

  ///////////////////////////////////////////////////////////////////
  // Get cutoff voltage
  float cutoffVoltage();

  ///////////////////////////////////////////////////////////////////
  // Set cutoff voltage
  // [input] voltage: cutoff voltage
  long setCutoffVoltage(float voltage);

  
  protected:

  // Message codes for each method
  enum BatteryIFMsgCode {
    LifeMsgCode,
    CutoffVoltageMsgCode,
    SetCutoffVoltageMsgCode
  };

  // Define message structure for each method
  struct LifeMsg : Request, Reply {
    long returnVal;
  
  } _lifeMsg;

  struct CutoffVoltageMsg : Request, Reply {
    float returnVal;
  
  } _cutoffVoltageMsg;

  struct SetCutoffVoltageMsg : Request, Reply {
    long returnVal;
    float voltage;
  
  } _setCutoffVoltageMsg;

};

#endif

