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

#ifndef __CompassIF_H
#define __CompassIF_H

#include "TaskInterface.h"


#define CompassIFServerName "CompassIFServer"

/****************************************************************************/
/* Copyright (c) 2000 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : CompassIF.idl                                                 */
/* Author   :                                                               */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 02/07/2000                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
/*
CLASS 
CompassIF

DESCRIPTION
TaskInterface to Compass device driver 

AUTHOR
Tom O'Reilly

*/
class CompassIF : public TaskInterface {

  friend class CompassIF_SK;

  public:

  
  enum Event {
    Online,
    Offline,
    CommsFailure
  };

  
  
  CompassIF(const char *name, int timeout = 10);

  CompassIF(const char *name, const char *serverName, int timeout = 10);

  ~CompassIF();

  /////////////////////////////////////////////////////////
  // Get heading value and rate
  // [output] value: Heading in degrees
  // [output] time: Sampling time
  // [output] quality: Data quality
  long heading(double *value, long *time, short *quality);

  ///////////////////////////////////////////////////////////////////
  // Initiate calibration routine
  long calibrate();

  
  protected:

  // Message codes for each method
  enum CompassIFMsgCode {
    HeadingMsgCode,
    CalibrateMsgCode
  };

  // Define message structure for each method
  struct HeadingMsg : Request, Reply {
    long returnVal;
    double value;
    long time;
    short quality;
  
  } _headingMsg;

  struct CalibrateMsg : Request, Reply {
    long returnVal;
  
  } _calibrateMsg;

};

#endif

