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

#ifndef __TerrainAidIF_H
#define __TerrainAidIF_H

#include "TaskInterface.h"


#define TerrainAidIFServerName "TerrainAidIFServer"

/****************************************************************************/
/* Copyright (c) 2006 MBARI                                                 */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
/* Summary  :                                                               */
/* Filename : TerrainAidIF.idl                                         */
/* Author   : rsm                                                           */
/* Project  :                                                               */
/* Version  : 1.0                                                           */
/* Created  : 21/03/2007                                                    */
/* Modified :                                                               */
/* Archived :                                                               */
/****************************************************************************/
/* Modification History:                                                    */
/****************************************************************************/
/*
CLASS 
TerrainAidIF

DESCRIPTION
TaskInterface to Gulper device server

AUTHOR
Rob McEwen

*/
class TerrainAidIF : public TaskInterface {

  friend class TerrainAidIF_SK;

  public:

  // Forward declarations of public structures
  struct Data;
  
  
  typedef double Double6[6];
  typedef double Double2[2];
  
  struct Data {
    double x;
    double y;
    double z;
    double deltaNorthing;
    double deltaEasting;
    double time;
    TerrainAidIF::Double2 covariance;
    short cntr;
    Boolean valid;
    /* Used as an i/o to the TRN engine */
    Boolean reinitFilter;
    Boolean trnConnected;
  };
  TerrainAidIF(const char *name, int timeout = 10);

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

  ~TerrainAidIF();

  void get(TerrainAidIF::Data *data);

  void reinitFilter();

  // Returns true if TerrainAid is connected
  //
  Boolean trnConnected();

  //
  // Returns "true" if TerrainNav has converged.
  Boolean converged();

  void offset(double dn, double de);

  short counter();

  
  protected:

  // Message codes for each method
  enum TerrainAidIFMsgCode {
    GetMsgCode,
    ReinitFilterMsgCode,
    TrnConnectedMsgCode,
    ConvergedMsgCode,
    OffsetMsgCode,
    CounterMsgCode
  };

  // Define message structure for each method
  struct GetMsg : Request, Reply {
    TerrainAidIF::Data data;
  
  } _getMsg;

  struct ReinitFilterMsg : Request, Reply {
  
  } _reinitFilterMsg;

  struct TrnConnectedMsg : Request, Reply {
    Boolean returnVal;
  
  } _trnConnectedMsg;

  struct ConvergedMsg : Request, Reply {
    Boolean returnVal;
  
  } _convergedMsg;

  struct OffsetMsg : Request, Reply {
    double dn;
    double de;
  
  } _offsetMsg;

  struct CounterMsg : Request, Reply {
    short returnVal;
  
  } _counterMsg;

};

#endif

