/* ---------------------------------------------------------------------- */ 
/* StorageMessages.h                                                      */ 
/*                                                                        */ 
/* Describes storage messages which can be sent between a topside and the */ 
/* Surface Interface Unit.                                                */ 
/*                                                                        */ 
/* ---------------------------------------------------------------------- */ 
/*                                                                        */ 
/* (c) Copyright 1998 - 2000, 2007  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,

  /* This is an obsolete command.  Do not use.                            */ 
  STORAGE_MESSAGE_OBSOLETE0,

  /* This is an obsolete command.  Do not use.                            */ 
  STORAGE_MESSAGE_OBSOLETE1,

  /* This is an obsolete command.  Do not use.                            */ 
  STORAGE_MESSAGE_OBSOLETE2,

  /* Returns the amount of free space in mb on a SONAR_COMMAND_GET.       */ 
  /* (SonarMessageLongType)                                               */ 
  STORAGE_MESSAGE_FREE_SIZE,

  /* This is an obsolete command.  Do not use.                            */ 
  STORAGE_MESSAGE_OBSOLETE3,

  /* At the start of every new file, a timestamp message is inserted.     */ 
  /* (TimestampType)                                                      */ 
  STORAGE_MESSAGE_TIMESTAMP,

  /* On a set, sets the base file name for future storage.  Recording     */ 
  /* must be disabled when this function is called.                       */ 
  /* 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,

  /* This is an obsolete command.  Do not use.                            */ 
  STORAGE_MESSAGE_OBSOLETE4,

  /* -------------------------------------------------------------------- */ 
  /* 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.                                      */ 
  /* Playback is a diagnostic and test feature of the sonar application   */ 
  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.                                             */ 
  /* Playback is a diagnostic and test feature of the sonar application   */ 
  STORAGE_MESSAGE_PLAYBACK_END,   

  /* Data logging status (DataLoggingStatusType)                          */ 
  STORAGE_MESSAGE_LOGGING_STATUS,

} StorageMessageType;


/* ---------------------------------------------------------------------- */ 
/* Message structure types                                                */ 
/* ---------------------------------------------------------------------- */ 

/* ---------------------------------------------------------------------- */ 
/* DataLoggingStatusStructure - status of recording                       */ 
/* ---------------------------------------------------------------------- */ 

typedef struct DataLoggingStatusStructure
{
  /* recording state - current state of recording                         */ 
  /*               0 - Not recording                                      */ 
  /*               1 - Recording                                          */ 
  /*              -1 - Error on Recording                                 */ 
  long int                recordingState;

  /* size of recording file in KBytes                                     */ 
  long int                fileSize;

  /* disk free space in MegaBytes                                         */ 
  long int                freeSpace;

  /* name of recording file.                                              */ 
  SonarMessageStringType  fileName;

  /* reserved for future use                                              */ 
  long int                reserved[16];

}  DataLoggingStatusType;

/* ---------------------------------------------------------------------- */ 

#endif  /* __StorageMessages_H__ */ 

/* ---------------------------------------------------------------------- */ 
/*                         end StorageMessages.h                          */ 
/* ---------------------------------------------------------------------- */ 

