/*
//  Copyright (c) 2001, Reson, Inc. All Rights Reserved.
//
//  Filename:   EdgeTechHeaders.h
//
//  Project:    6046
//
//  Author(s):  W. Arcus
//
//  Purpose:    Standard include file to import all of the EdgeTech supplied header files
//              and constants relevant to the EdgeTech system.
//
//  Notes:      
//
*/
/**
 * 20121022 EJM Modified for linux compile.
 */

#ifndef EDGETECHHEADERS_H_
#define EDGETECHHEADERS_H_


#ifdef _QNX
typedef int bool;
#define true 1
#define	false 0
#endif

#ifdef __cplusplus
extern "C"
{
#endif

//#pragma pack( push, EDGETECHEADERS_H_PACK, 1 )      /* Set single byte alignment */
#pragma pack( push, 1 )      /* Set single byte alignment */

#include "EdgeTech/PublicMessageOffsets.h"
#include "EdgeTech/SonarMessages.h"
#include "EdgeTech/StorageMessages.h"
#include "EdgeTech/Timestamp.h"
#include "EdgeTech/SegyDefs.h"
#include "EdgeTech/PulseTypes.h"
#include "EdgeTech/Subsystem.h"
#include "EdgeTech/SidescanDefs.h"
#include "EdgeTech/DeviceMessages.h"
#include "EdgeTech/SystemMessages.h"

/*
    EdgeTech limits the maximum packet size to 512kBytes in samples impling that
    it excludes the packet header. (see struct SonarMessageWindowType of SonarMessages.h).

    Therefore, max dynamic data size is 512 kBytes / sample size in bytes.

*/

const unsigned long ulMaxEdgeTechDynamicDataSize_c  = 512UL * 1024UL / sizeof( short );
const unsigned long ulMaxEdgeTechTotalPacketSize_c  = ulMaxEdgeTechDynamicDataSize_c + sizeof( SonarMessageHeaderType );

const unsigned long ulMaxFishTypes_c                = 100UL;
const unsigned long ulMaxPulseFiles_c               = 30UL;
const unsigned long ulMaxVersionStringLength_c      = ( SONAR_MESSAGE_STRING_LENGTH + 1 );
const unsigned long ulMaxPulseFileNameLength_c      = ( SONAR_MESSAGE_STRING_LENGTH + 1 );

const unsigned long ulMaxChannels_c                 = 2UL;
const unsigned long ulMaxSamplesPerChannel_c        = 512UL * 1024UL;                  /* As defined by EdgeTech. */
const unsigned long ulMaxBytesPerSample_c           = sizeof( short int );
const unsigned long ulMaxBytesPerChannel_c          = ulMaxBytesPerSample_c * ulMaxSamplesPerChannel_c;

#pragma pack( pop )          /* Restore pervious byte alignment. */

#ifdef __cplusplus
}
#endif

#endif
