/* ---------------------------------------------------------------------- */ 
/* EnhancedMessages.h                                                     */ 
/*                                                                        */ 
/* Describes the enhanced set of sonar messages which can be sent between */ 
/* a topside and the Surface Interface Unit.                              */ 
/*                                                                        */ 
/* ---------------------------------------------------------------------- */ 
/*                                                                        */ 
/* (c) Copyright 1998  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.              */ 
/*                                                                        */ 
/* ---------------------------------------------------------------------- */ 

#ifndef __EnhancedMessages_H__
#define __EnhancedMessages_H__

/* ---------------------------------------------------------------------- */ 

#include "MessageOffsets.h"
#include "SonarMessages.h"


/* ---------------------------------------------------------------------- */ 
/* sonarMessage field indicates the type of data to follow.               */ 
/* ---------------------------------------------------------------------- */ 

typedef enum{

  /* -------------------------------------------------------------------- */ 
  /* Overall commands.                                                    */ 
  /* For the following messages, the channel is ignored                   */ 
  /* -------------------------------------------------------------------- */ 

  /* Get the software version (SonarMessageTimeType)                      */ 
  SONAR_MESSAGE_SYSTEM_VERSION_DATE = MESSAGE_OFFSET_ENHANCED_STANDARD,

  /* Send an annotation string which is echoed back in the data stream.   */ 
  /* (SonarMessageStringType)                                             */ 
  /* Note:  This is useful for inserting foreign information into the     */ 
  /*        data stream going to disk.                                    */ 
  SONAR_MESSAGE_SYSTEM_ANNOTATION,


  /* -------------------------------------------------------------------- */ 
  /* Sonar Return Data                                                    */ 
  /* -------------------------------------------------------------------- */ 

  /* Disable (0), Enable (1) transmission of data via network             */ 
  SONAR_MESSAGE_DATA_NETWORK = MESSAGE_OFFSET_ENHANCED_DATA, 


  /* -------------------------------------------------------------------- */ 
  /* Processing of data                                                   */ 
  /* -------------------------------------------------------------------- */ 

  /* Calibration scale constant * 1000                                    */ 
  /* This is a pulse independent scale factor used to scale all processed */ 
  /* data.  This is not pulse dependent and is just used to shift the data*/ 
  /* up or down as a global "tweak".  The real calibration constant is    */ 
  /* below.  This value is kept for backward compatibility with some      */ 
  /* topsides but should be considered obsolete.                          */ 
  /* (multiplies block scale factor in segydata) (SonarMessageLongType)   */ 
  SONAR_MESSAGE_PROCESSING_CALCONST = MESSAGE_OFFSET_ENHANCED_PROCESS,

  /* Extra delay in samples used for spherical correction or -1 to        */ 
  /* disable (SonarMessageLongType).  Spherical correction scales each    */ 
  /* value (i) by (PAKDELAY + i) to compensate for beam spreading with    */ 
  /* distance propagated.                                                 */ 
  SONAR_MESSAGE_PROCESSING_PAKDELAY,
  
  /* Calibration constant value in DB * 10.  This value will be stored in */ 
  /* the PulseCal.pcf file on a set, so this change is permanent and      */ 
  /* remains when the sonar is restarted.  This value is reported back    */ 
  /* in segy records as the calConst field. (SonarMessageLongType)        */ 
  SONAR_MESSAGE_PROCESSING_CALCONSTVALUE,


  /* -------------------------------------------------------------------- */ 
  /* Management of pulses                                                 */ 
  /* -------------------------------------------------------------------- */ 

  /* Number of 2048 ADC sample blocks between pings                       */ 
  /* (SonarMessageLongType)                                               */ 
  /* Ping Rate = (DAC_RATE/ADC_RATE) / (2048 * BLOCKS)                    */ 
  SONAR_MESSAGE_PING_BLOCKS = MESSAGE_OFFSET_ENHANCED_PULSES,  

  
  /* -------------------------------------------------------------------- */ 
  /* General purpose interface                                            */ 
  /* -------------------------------------------------------------------- */ 

  /* Digital outputs (SonarMessageLongType)                               */ 
  SONAR_MESSAGE_DIGITAL_OUT = MESSAGE_OFFSET_ENHANCED_GPI,

  /* Digital inputs (SonarMessageLongType)                                */ 
  SONAR_MESSAGE_DIGITAL_IN,   

} ExtendedMessageType;

#endif  /* __EnhancedMessages_H__ */ 

