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

#ifndef __AhrsIF_SK_H
#define __AhrsIF_SK_H

#include "TaskServer.h"
#include "AhrsIF.h"
#include "InstrumentIF_SK.h"

class AhrsIF_SK : public InstrumentIF_SK {

  public:

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

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

  virtual ~AhrsIF_SK();
  
  protected:

  // These methods must be defined in subclass
  virtual DeviceIF::Status getAttitude(AhrsIF::Attitude *attitude, TimeIF::TimeSpec *sampleTime) = 0;
  virtual Boolean magneticCompass() = 0;
  
  // Declare callbacks corresponding to each method
  Boolean getAttitudeCallback(Request *request, int nReqBytes,
                 Reply **reply, int *nReplyBytes);

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

  
  // Message structure pointer for each method
  AhrsIF::GetAttitudeMsg *_getAttitudeMsg;
  AhrsIF::MagneticCompassMsg *_magneticCompassMsg;
  
  // 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

