/* ---------------------------------------------------------------------- */ 
/* SASMessages.h                                                          */ 
/*                                                                        */ 
/* Copyright (c) 2003  Edgetech Inc.                                      */ 
/*                                                                        */ 
/* 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.              */ 
/*                                                                        */ 
/* This file contains the SAS message formats.                            */ 
/* ---------------------------------------------------------------------- */ 

#ifndef __SAS_MESSAGES_H__
#define __SAS_MESSAGES_H__


/* ---------------------------------------------------------------------- */ 
/* includes                                                               */ 
/* ---------------------------------------------------------------------- */ 

#include "MessageOffsets.h"


/* ---------------------------------------------------------------------- */ 
/* Message Types                                                          */ 
/* ---------------------------------------------------------------------- */ 
/* sonarMessage field indicates the type of data to follow.               */ 
/* ---------------------------------------------------------------------- */ 

typedef enum
{
  /* -------------------------------------------------------------------- */ 
  /* System level commands.                                               */ 
  /* For the following messages, the channel is ignored                   */ 
  /* -------------------------------------------------------------------- */ 

  /* No message defined yet (No Data)                                     */ 
  SAS_NONE = MESSAGE_OFFSET_SAS,           

  /* Get version information (SonarMessageStringType)                     */ 
  SAS_SYSTEM_VERSION, 

  /* Run time parameters (SASMessageParameterType)                        */ 
  SAS_RUNTIME_PARAMETERS, 

  /* Shutdown System                                                      */ 
  /* Accepts a (SonarMessageLongType), which can have any of the          */ 
  /* following values:  1: Shutdown, 2: Reboot                            */ 
  SAS_SYSTEM_SHUTDOWN,
  
  /* SAS uses the following protocal to authenticate topside connections. */ 
  /* (1) SAS ignores all topside messages                                 */ 
  /* (2) Topside sends VERIFY_TOPSIDE with a value of 0 (COMMAND_GET)     */ 
  /* (3) SAS sends VERIFY_TOPSIDE with a value of SEED (random)           */ 
  /* (4) Topside sends VERIFY_TOPSIDE with a value of (COMMAND_SET)       */ 
  /*     SASOptionsCodeToValue(SEED, 1, 2)                                */ 
  /* (5) SAS now accepts messages                                         */ 
  /* Accepts a parameter (SonarMessageLongType) as above.                 */ 
  SAS_VERIFY_TOPSIDE,

  /* SAS Status message                                                   */ 
  /* (Need to define a status message structure)                          */ 
  SAS_PROCESSING_STATUS,

  /* Delimit new file data in processing stream                           */ 
  /* not yet implemented                                                  */ 
  SAS_FILE_DELIMITER,

} SASMessageType;


/* ---------------------------------------------------------------------- */ 
/* Message Data Structures                                                */ 
/* ---------------------------------------------------------------------- */ 
/* The data component of the messages varies with the SASMessage as       */      
/* defined by the structures below.                                       */ 
/* ---------------------------------------------------------------------- */ 

/* ---------------------------------------------------------------------- */ 
/* Structure for SAS_RUNTIME_PARAMETERS                                   */ 
/* ---------------------------------------------------------------------- */ 

typedef struct
{
  /* SAS Processing, 0 = off, 1 = on                     (default is on)  */ 
  int                SASProcessing;

  /* AutoFocus, 0 = off, 1 = on                          (default is on)  */ 
  int                AutoFocus;

  /* RPC, motion estimation, 0 = off, 1 = on,            (default is on)  */ 
  int                RPC;

  /* Remove Jump, 1/2 wavelenth  shift removal 0 = off, 1 = on            */ 
  /*                                                     (default is on)  */ 
  int                removeJump;

  /* azimuth overlap percentage, 0.0 - 1.0               (default is 0.00)*/ 
  float              azimuthOverlap;

  /* sigmas for clipping, -1.0 = off                     (default is off) */ 
  float              sigmas;

  /* window type, 0 = off, 1 - Hamming spectral window   (default is 1)   */ 
  int                windowType;

  /* debug level  0 - 5                                  (default is 0)   */ 
  int                debugLevel;

  /* reserved for future use                                              */ 
  int                reserved[3];

}  SASMessageParameterType;


/* ---------------------------------------------------------------------- */ 

#endif  /* Not __SAS_MESSAGES_H__ */ 


/* ---------------------------------------------------------------------- */ 
/*                         end SASMessages.h                              */ 
/* ---------------------------------------------------------------------- */ 

