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

#ifndef __DropWeightIF_H
#define __DropWeightIF_H

#include "TaskInterface.h"


#define DropWeightIFServerName "DropWeightIFServer"

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

DESCRIPTION
TaskInterface to DropWeight device driver 

AUTHOR
Tom O'Reilly

*/
//interface DropWeightIF : InstrumentIF {
class DropWeightIF : public TaskInterface {

  friend class DropWeightIF_SK;

  public:

  
  enum Event {
    Online,
    Offline,
    Installed,
    Released
  };

  enum WeightEnum {
    Descend,
    Ascend
  };

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

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

  ~DropWeightIF();

  //
  // When the day comes that we have two dropweights, we should put back the
  // WeightEnum arguments to the functions below, as shown here.  This would
  // allow one server to service two drivers; one driver for each weight.  In
  // the mean time, I'm going to make all the arguments void, since if they're
  // not, you have to keep scoping DropWeightIF::WeightEnum, etc., all over
  // the place, and this is very annoying.
  //
  // void release(in WeightEnum weight);
  //
  /////////////////////////////////////////////////////////
  // Release drop-weight
  //long release(in Weight weight);
  void release();

  /////////////////////////////////////////////////////////
  // Weight released?
  Boolean released();

  ///////////////////////////////////////////////////////////////////
  // Get watchdog timeout
  short watchdogTimeout();

  ///////////////////////////////////////////////////////////////////
  // Get burnwire timeout
  short burnwireTimeout();

  ///////////////////////////////////////////////////////////////////
  // True if an acoustic release occurred.
  Boolean ACommsDN();

  ///////////////////////////////////////////////////////////////////
  // Get DW_out
  short DW_out();

  ///////////////////////////////////////////////////////////////////
  // Reset watchdog timer
  void resetWatchdog();

  ///////////////////////////////////////////////////////////////////
  // Reset the relay and both timers.
  void resetRelayAndCounters();

  ///////////////////////////////////////////////////////////////////
  // Reset the relay and the PIC.
  void resetRelayAndPIC();

  ///////////////////////////////////////////////////////////////////
  // fire the gulper
  void fireGulper();

  
  protected:

  // Message codes for each method
  enum DropWeightIFMsgCode {
    ReleaseMsgCode,
    ReleasedMsgCode,
    WatchdogTimeoutMsgCode,
    BurnwireTimeoutMsgCode,
    ACommsDNMsgCode,
    DW_outMsgCode,
    ResetWatchdogMsgCode,
    ResetRelayAndCountersMsgCode,
    ResetRelayAndPICMsgCode,
    FireGulperMsgCode
  };

  // Define message structure for each method
  struct ReleaseMsg : Request, Reply {
  
  } _releaseMsg;

  struct ReleasedMsg : Request, Reply {
    Boolean returnVal;
  
  } _releasedMsg;

  struct WatchdogTimeoutMsg : Request, Reply {
    short returnVal;
  
  } _watchdogTimeoutMsg;

  struct BurnwireTimeoutMsg : Request, Reply {
    short returnVal;
  
  } _burnwireTimeoutMsg;

  struct ACommsDNMsg : Request, Reply {
    Boolean returnVal;
  
  } _ACommsDNMsg;

  struct DW_outMsg : Request, Reply {
    short returnVal;
  
  } _DW_outMsg;

  struct ResetWatchdogMsg : Request, Reply {
  
  } _resetWatchdogMsg;

  struct ResetRelayAndCountersMsg : Request, Reply {
  
  } _resetRelayAndCountersMsg;

  struct ResetRelayAndPICMsg : Request, Reply {
  
  } _resetRelayAndPICMsg;

  struct FireGulperMsg : Request, Reply {
  
  } _fireGulperMsg;

};

#endif

