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

#ifndef __Ips4IF_H
#define __Ips4IF_H

#include "TaskInterface.h"

#include "InstrumentIF.h"

#define Ips4IFServerName "Ips4IFServer"

class Ips4IF : public InstrumentIF {

  friend class Ips4IF_SK;

  public:

  
  
  typedef double Vector[100];
  
  Ips4IF(const char *name, int timeout = 10);

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

  ~Ips4IF();

  // Below are Commands that can be issued to the Ips4
  ///////////////////////////////////////////////////////////////////
  // Start (or resume) processing Ips4 data
  DeviceIF::Status start();

  ///////////////////////////////////////////////////////////////////
  // Stop processing Ips4 data
  DeviceIF::Status stop();

  ///////////////////////////////////////////////////////////////////
  // Start acquiring ctd profile for Ips ice draft calculation 
  DeviceIF::Status startProfile();

  ///////////////////////////////////////////////////////////////////
  // Stop acquiring ctd profile for Ips ice draft calculation 
  DeviceIF::Status stopProfile();

  ///////////////////////////////////////////////////////////////////
  //Below are function calls to get data and status from the driver
  ///////////////////////////////////////////////////////////////////
  // get_ice_draft returns the calculated ice draft
  //  Inputs: patm      Atmospheric pressure
  //          nelem     Number of elements in the vectors
  //          cond      Conductivity vector
  //          temp      Temperature vector
  //          pressure  Pressure vector
  //  Outputs:
  //          ice_draft Calculated ice draft
  //
  DeviceIF::Status get_ice_draft(double patm, short nelem, Ips4IF::Vector cond, Ips4IF::Vector temp, Ips4IF::Vector pressure, double *ice_draft);

  
  protected:

  // Message codes for each method
  enum Ips4IFMsgCode {
    StartMsgCode = 8,
    StopMsgCode,
    StartProfileMsgCode,
    StopProfileMsgCode,
    Get_ice_draftMsgCode
  };

  // Define message structure for each method
  struct StartMsg : Request, Reply {
    DeviceIF::Status returnVal;
  
  } _startMsg;

  struct StopMsg : Request, Reply {
    DeviceIF::Status returnVal;
  
  } _stopMsg;

  struct StartProfileMsg : Request, Reply {
    DeviceIF::Status returnVal;
  
  } _startProfileMsg;

  struct StopProfileMsg : Request, Reply {
    DeviceIF::Status returnVal;
  
  } _stopProfileMsg;

  struct Get_ice_draftMsg : Request, Reply {
    DeviceIF::Status returnVal;
    double patm;
    short nelem;
    Ips4IF::Vector cond;
    Ips4IF::Vector temp;
    Ips4IF::Vector pressure;
    double ice_draft;
  
  } _get_ice_draftMsg;

};

#endif

