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

#ifndef __CompassIF_SK_H
#define __CompassIF_SK_H

#include "TaskServer.h"
#include "CompassIF.h"

class CompassIF_SK : public TaskServer {

  public:

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

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

  virtual ~CompassIF_SK();
  
  protected:

  // These methods must be defined in subclass
  virtual long heading(double *value, long *time, short *quality) = 0;
  virtual long calibrate() = 0;
  
  // Declare callbacks corresponding to each method
  Boolean headingCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

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

  
  // Message structure pointer for each method
  CompassIF::HeadingMsg *_headingMsg;
  CompassIF::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

