/* ---------------------------------------------------------------------- */ 
/* DiscoverMessages.h                                                     */ 
/* ---------------------------------------------------------------------- */ 
/*                                                                        */ 
/* (c) Copyright 2004, 2005, 2007 - 2009, 2010  EdgeTech                  */ 
/*                                                                        */ 
/* This file contains proprietary information, and trade secrets of       */ 
/* EdgeTech, and may not be disclosed or reproduced without the prior     */ 
/* written consent of EdgeTech.                                           */ 
/*                                                                        */ 
/* EdgeTech is not responsible for the consequences of the use or misuse  */ 
/* of this software, even if they result from defects in it.              */ 
/*                                                                        */ 
/* Describes the standard sonar messages which can be sent between a      */ 
/* topside and the Discover Topside.                                      */ 
/*                                                                        */ 
/* ---------------------------------------------------------------------- */ 
 
#pragma once


/* ---------------------------------------------------------------------- */ 
/* Includes                                                               */ 
/* ---------------------------------------------------------------------- */ 

#include "sonarMessages.h"

/* ---------------------------------------------------------------------- */ 


/* ---------------------------------------------------------------------- */ 
/* Message Types                                                          */ 
/* ---------------------------------------------------------------------- */ 
/* sonarMessage field indicates the type of data to follow.               */ 
/* ---------------------------------------------------------------------- */ 

typedef enum
{
  /* 272TD frequency select (SonarMessageLongType). 0 - low, 1 - high     */ 
  DISCOVER_MESSAGE_272_FREQUENCY = MESSAGE_OFFSET_DISCOVER_272,

  /* 272TD analog gain select (SonarMessageLongType). in dB               */ 
  /* Only 1.5 dB intervals are supported from -12 to 12                   */ 
  DISCOVER_MESSAGE_272_ANALOG_GAIN,
  

  /* 4125 frequency select  (SonarMessageLongType). 0 - low, 1 - high     */ 
  DISCOVER_MESSAGE_4125_FREQUENCY = MESSAGE_OFFSET_DISCOVER_4125,

  /* 4125 digital TVG gain  (SonarMessageLongType).                       */ 
  /*- 0 = -10dB, 1 = 0dB, 2 = 10dB                                        */ 
  DISCOVER_MESSAGE_4125_DIGITAL_TVG_GAIN,

  /* 4125 analog gain  (SonarMessageLongType). by channel                 */ 
  /* 0 = 0dB, 1 = 10dB                                                    */ 
  DISCOVER_MESSAGE_4125_ANALOG_GAIN,


  /* Data Logging Commands                                                */ 
  /* Discover data logging control (DiscoverLoggingControlType)           */ 
  DISCOVER_MESSAGE_LOGGING = MESSAGE_OFFSET_DISCOVER_LOGGING,

  /* Discover data logging status (DataLoggingStatusType)                 */ 
  DISCOVER_MESSAGE_LOGGING_STATUS,

  /* Remote sonar data logging control (DiscoverLoggingControlType)       */ 
  DISCOVER_MESSAGE_REMOTE_LOGGING,

  /* Remote sonar data logging status (DataLoggingStatusType)             */ 
  DISCOVER_MESSAGE_REMOTE_LOGGING_STATUS,


  /* cable counter data (CableCounterDataType) stored in Discover data    */ 
  /* stream.   - superseded by DEV_CABLE_COUNTER_DATA                     */ 
  DISCOVER_MESSAGE_CABLE_COUNTER_DATA = MESSAGE_OFFSET_DISCOVER_DATA,

}  DiscoverMessageType;



/* ---------------------------------------------------------------------- */ 
/* Message structure types                                                */ 
/* ---------------------------------------------------------------------- */ 

/* ---------------------------------------------------------------------- */ 
/* CableCounterDataType - cable counter data structure type               */ 
/* ---------------------------------------------------------------------- */ 

typedef struct CableCounterDataStructure
{
  float     cableLength;               /* cable length in meters          */ 
  float     cableSpeed;                /* cable speed in meters / second  */ 
  short int validCableLength;          /* flag for valid cable lenth value*/ 
  short int validCableSpeed;           /* flag for valid cable speed value*/ 
  short int cableError;                /* flag for counter reported error */ 

}  CableCounterDataType;


/* ---------------------------------------------------------------------- */ 
/* DiscoverLoggingControl - logging command structure                     */ 
/* ---------------------------------------------------------------------- */ 

typedef struct DiscoverLoggingControlStructure
{
  /* action - logging action to perform                                   */ 
  /*      0 - stop logging                                                */ 
  /*      1 - start logging                                               */ 
  long int                action;

  /* name of file.  This is the base filename to use for the operation.   */ 
  /* If absent the current default file name is used.                     */  
  SonarMessageStringType  fileName;

}  DiscoverLoggingControlType;

/* ---------------------------------------------------------------------- */ 
/*                     end DiscoverMessages.h                             */ 
/* ---------------------------------------------------------------------- */ 
