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

#ifndef __EchoSounderIF_SK_H
#define __EchoSounderIF_SK_H

#include "TaskServer.h"
#include "EchoSounderIF.h"
#include "RangeFinderIF_SK.h"

class EchoSounderIF_SK : public RangeFinderIF_SK {

  public:

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

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

  virtual ~EchoSounderIF_SK();
  
  protected:

  // These methods must be defined in subclass
  virtual DeviceIF::Status get(EchoSounderIF::Data *data) = 0;
  virtual double getHeadAngle() = 0;
  virtual double getHeadAngle(short tindx) = 0;
  virtual DeviceIF::Status headAngleCmd(double trainCmd) = 0;
  virtual DeviceIF::Status scanSectorCmd(double sector) = 0;
  virtual Boolean isScanning() = 0;
  
  // Declare callbacks corresponding to each method
  Boolean getCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

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

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

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

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

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

  
  // Message structure pointer for each method
  EchoSounderIF::GetMsg *_getMsg;
  EchoSounderIF::GetHeadAngleMsg *_getHeadAngleMsg;
  EchoSounderIF::GetHeadAngle01Msg *_getHeadAngle01Msg;
  EchoSounderIF::HeadAngleCmdMsg *_headAngleCmdMsg;
  EchoSounderIF::ScanSectorCmdMsg *_scanSectorCmdMsg;
  EchoSounderIF::IsScanningMsg *_isScanningMsg;
  
  // 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

