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

#ifndef __FastCatIF_H
#define __FastCatIF_H

#include "TaskInterface.h"

#include "InstrumentIF.h"
#include "TimeIF.h"

#define FastCatIFServerName "FastCatIFServer"

class FastCatIF : public InstrumentIF {

  friend class FastCatIF_SK;

  public:

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

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

  ~FastCatIF();

  /////////////////////////////////////////////////////////
  // Return true if device is ready to go, otherwise false
  Boolean ready();

  /////////////////////////////////////////////////////////
  // Get all Data from CTD Simultaneously
  DeviceIF::Status get_CTD_data(float *conductivity, float *temperature, float *depth, TimeIF::TimeSpec *conductivityTime, TimeIF::TimeSpec *temperatureTime, float *salinity, float *soundVelocity, long *tcounts, float *cfreq, long *pcounts, float *presCompVoltage);

  ////////////////////////////////////////////////////////
  // Get Conductivity Data
  DeviceIF::Status conductivity(float *cond, float *cfreq, TimeIF::TimeSpec *sampleTime);

  ///////////////////////////////////////////////////////////////////
  // Get Temperature
  DeviceIF::Status temperature(float *temp, long *tcounts, TimeIF::TimeSpec *sampleTime);

  ///////////////////////////////////////////////////////////////////
  // Get calculated salinity value and the conductivity sample time
  DeviceIF::Status salinity(float *sal, TimeIF::TimeSpec *sampleTime);

  ///////////////////////////////////////////////////////////////////
  // Get calculated sound velocity value and conductivity sample time
  DeviceIF::Status soundVelocity(float *velocity, TimeIF::TimeSpec *sampleTime);

  
  protected:

  // Message codes for each method
  enum FastCatIFMsgCode {
    ReadyMsgCode = 8,
    Get_CTD_dataMsgCode,
    ConductivityMsgCode,
    TemperatureMsgCode,
    SalinityMsgCode,
    SoundVelocityMsgCode
  };

  // Define message structure for each method
  struct ReadyMsg : Request, Reply {
    Boolean returnVal;
  
  } _readyMsg;

  struct Get_CTD_dataMsg : Request, Reply {
    DeviceIF::Status returnVal;
    float conductivity;
    float temperature;
    float depth;
    TimeIF::TimeSpec conductivityTime;
    TimeIF::TimeSpec temperatureTime;
    float salinity;
    float soundVelocity;
    long tcounts;
    float cfreq;
    long pcounts;
    float presCompVoltage;
  
  } _get_CTD_dataMsg;

  struct ConductivityMsg : Request, Reply {
    DeviceIF::Status returnVal;
    float cond;
    float cfreq;
    TimeIF::TimeSpec sampleTime;
  
  } _conductivityMsg;

  struct TemperatureMsg : Request, Reply {
    DeviceIF::Status returnVal;
    float temp;
    long tcounts;
    TimeIF::TimeSpec sampleTime;
  
  } _temperatureMsg;

  struct SalinityMsg : Request, Reply {
    DeviceIF::Status returnVal;
    float sal;
    TimeIF::TimeSpec sampleTime;
  
  } _salinityMsg;

  struct SoundVelocityMsg : Request, Reply {
    DeviceIF::Status returnVal;
    float velocity;
    TimeIF::TimeSpec sampleTime;
  
  } _soundVelocityMsg;

};

#endif

