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

#ifndef __DepthSensorIF_SK_H
#define __DepthSensorIF_SK_H

#include "TaskServer.h"
#include "DepthSensorIF.h"
#include "InstrumentIF_SK.h"

class DepthSensorIF_SK : public InstrumentIF_SK {

  public:

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

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

  virtual ~DepthSensorIF_SK();
  
  protected:

  // These methods must be defined in subclass
  virtual DeviceIF::Status depth(double *value, TimeIF::TimeSpec *sampleTime) = 0;
  virtual DeviceIF::Status temp(double *value, TimeIF::TimeSpec *sampleTime) = 0;
  virtual DeviceIF::Status pressure(double *value, TimeIF::TimeSpec *sampleTime) = 0;
  virtual DeviceIF::Status calibrate() = 0;
  
  // Declare callbacks corresponding to each method
  Boolean depthCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

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

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

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

  
  // Message structure pointer for each method
  DepthSensorIF::DepthMsg *_depthMsg;
  DepthSensorIF::TempMsg *_tempMsg;
  DepthSensorIF::PressureMsg *_pressureMsg;
  DepthSensorIF::CalibrateMsg *_calibrateMsg;
  
  // 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

