/* ---------------------------------------------------------------------- */ 
/* StorageMessages.h                                                      */ 
/*                                                                        */ 
/* Describes storage messages which can be sent between a topside and the */ 
/* Surface Interface Unit.                                                */ 
/*                                                                        */ 
/* ---------------------------------------------------------------------- */ 
/*                                                                        */ 
/* (c) Copyright 1998, 1999, 2000  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.              */ 
/*                                                                        */ 
/* ---------------------------------------------------------------------- */  

#ifndef __StorageMessages_H__
#define __StorageMessages_H__

/* ---------------------------------------------------------------------- */ 

#include "SonarMessages.h"
#include "PublicMessageOffsets.h"
#include "Timestamp.h"


/* ---------------------------------------------------------------------- */ 
/* sonarMessage field indicates the type of data to follow.               */ 
/* ---------------------------------------------------------------------- */ 

typedef enum
{

  /* -------------------------------------------------------------------- */ 
  /* Management of disk files                                             */ 
  /* Subsystem should be set to 0 and channel set to 0.                   */ 
  /* -------------------------------------------------------------------- */ 

  /* Enables recording to storage if 1, disables on 0.                    */ 
  /* (SonarMessageLongType)                                               */ 
  STORAGE_MESSAGE_MASTER_RECORD = MESSAGE_OFFSET_STORAGE_FILE,

  /* Enables playback of stored data if 1, disables on 0.                 */ 
  /* (SonarMessageLongType)                                               */ 
  /* Note: playback data is received by a topside as                      */ 
  /* SONAR_COMMAND_PLAYBACK type messages.                                */ 
  STORAGE_MESSAGE_PLAYBACK,

  /* Deletes either (1) All Data, (2) Already Transmitted Data, (3) Data  */ 
  /* Not Yet transmitted (FIFO flush).                                    */ 
  /* (SonarMessageLongType)                                               */ 
  STORAGE_MESSAGE_PURGE,

  /* Resets the playback point to the specified time.                     */ 
  /* (TimestampType).                                                     */ 
  STORAGE_MESSAGE_ROLLBACK,   

  /* Returns the amount of free space in mb on a SONAR_COMMAND_GET.  This */ 
  /* includes undeleted but transmitted data.                             */ 
  /* (SonarMessageLongType)                                               */ 
  STORAGE_MESSAGE_FREE_SIZE,

  /* Returns the amount of data to be transmitted in mb (FIFO depth)      */ 
  /* (SonarMessageLongType)                                               */ 
  STORAGE_MESSAGE_PLAYBACK_SIZE,

  /* This is a SONAR_COMMAND_PLAYBACK message that is only generated in   */ 
  /* playback of data for store and forward.  At the start of every new   */ 
  /* file, a timestamp message is inserted.  These timestamps are included*/ 
  /* in the playback data.  (TimestampType)                               */ 
  STORAGE_MESSAGE_TIMESTAMP,

  /* On a set, sets the base file name for future storage.  Recording     */ 
  /* must be disabled when this function is called.  Note that both       */ 
  /* recording and playback use the same base file name.  This message    */ 
  /* is primarily intended for use without the playback option.  That is  */ 
  /* data recorded is manually picked up after the run and manually       */ 
  /* deleted from the disk.  Takes a parameter of (SonarMessageStringType)*/ 
  /* Only alph numberic characters and the '.' are accepted in file names.*/ 
  STORAGE_MESSAGE_FILE_NAME,

  /* Each file is padded to a multiple of the sector size (512 normally)  */ 
  /* by inserting one of these messages at the end of the file.           */ 
  STORAGE_MESSAGE_END_OF_FILE_PADDING,

  /* -------------------------------------------------------------------- */ 
  /* Sonar Return Data                                                    */ 
  /* -------------------------------------------------------------------- */ 

  /* Disable(0), Enable (1) storage of data.  Applies to any subsystem    */ 
  /* and channel.                                                         */ 
  /* (SonarMessageLongType)                                               */ 
  STORAGE_MESSAGE_DATA_ENABLE = MESSAGE_OFFSET_STORAGE_RETURN,

  /* Window for sonar data storage (SonarMessageWindowType).  This only   */ 
  /* applies to sonar data type subsystems.                               */ 
  STORAGE_MESSAGE_DATA_FILE_WINDOW,   

  /* Returns the name of the file for which playback is starting          */ 
  /* (SonarMessageStringType).  This message is automatically generated   */ 
  /* at the start of every new file.                                      */ 
  STORAGE_MESSAGE_PLAYBACK_BEGIN,   

  /* Returns the name of the file for which playback is stoping           */ 
  /* (SonarMessageStringType).  This message is automatically generated   */ 
  /* at the ned of each file.                                             */ 
  STORAGE_MESSAGE_PLAYBACK_END,   

} StorageMessageType;

#endif  /* __StorageMessages_H__ */ 

/* ---------------------------------------------------------------------- */ 
/*                         end StorageMessages.h                          */ 
/* ---------------------------------------------------------------------- */ 

