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

#ifndef __FastCatIF_SK_H
#define __FastCatIF_SK_H

#include "TaskServer.h"
#include "FastCatIF.h"
#include "InstrumentIF_SK.h"

class FastCatIF_SK : public InstrumentIF_SK {

  public:

  // Constructor for server with default name
  FastCatIF_SK();

  // Constructor for server with specific name
  FastCatIF_SK(const char *serverName);

  virtual ~FastCatIF_SK();
  
  protected:

  // These methods must be defined in subclass
  virtual Boolean ready() = 0;
  virtual 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) = 0;
  virtual DeviceIF::Status conductivity(float *cond, float *cfreq, TimeIF::TimeSpec *sampleTime) = 0;
  virtual DeviceIF::Status temperature(float *temp, long *tcounts, TimeIF::TimeSpec *sampleTime) = 0;
  virtual DeviceIF::Status salinity(float *sal, TimeIF::TimeSpec *sampleTime) = 0;
  virtual DeviceIF::Status soundVelocity(float *velocity, TimeIF::TimeSpec *sampleTime) = 0;
  
  // Declare callbacks corresponding to each method
  Boolean readyCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

  Boolean get_CTD_dataCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

  Boolean conductivityCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

  Boolean temperatureCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

  Boolean salinityCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

  Boolean soundVelocityCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

  
  // Message structure pointer for each method
  FastCatIF::ReadyMsg *_readyMsg;
  FastCatIF::Get_CTD_dataMsg *_get_CTD_dataMsg;
  FastCatIF::ConductivityMsg *_conductivityMsg;
  FastCatIF::TemperatureMsg *_temperatureMsg;
  FastCatIF::SalinityMsg *_salinityMsg;
  FastCatIF::SoundVelocityMsg *_soundVelocityMsg;
  
  // Determine max bytes required for message buffer
  virtual size_t maxRequestBytes();

  // Allocate buffer for messages, set pointers, etc
  virtual void allocateBuffers();

  private:

  // Initializer method called by constructors
  int init();

};

#endif

