#ifndef NDTSENUMS_H
#define NDTSENUMS_H

#ifdef __cplusplus
extern "C" {
#endif

typedef enum
{
	NDTS_BFalse,
	NDTS_BTrue
} NDTS_Boolean ;

typedef enum
{
	NDTS_SIDRapiDAQ = 0x52443851,
	NDTS_SIDPRX = 0x504C5258,
	NDTS_SID2100 = 0x32313030
} NDTS_CardSecondaryIDs ;


// These values are the maximum for any card (RQ, NDTS2100, etc.)
#define NDTS_MAXIMUM_NUMBER_OF_ELEMENTS					128
#define NDTS_MAXIMUM_NUMBER_OF_STEPS					32  // This must be less than or equal to NDTS_MAXIMUM_NUMBER_OF_ELEMENTS
#define NDTS_MAXIMUM_NUMBER_OF_GATES_COMPILE_TIME		8  
#define NDTS_MAXIMUM_NUMBER_OF_CARDS					8
#define NDTS_MAXIMUM_NUMBER_OF_SAMPLES			65536 // was 16384 before DSP_v224

typedef enum 
{
	NDTS_SSMultipleAScanNoCScan,
	NDTS_SSOneAScanMultipleCScan,
	NDTS_SSMultipleAScanMultipleCScan,
	NDTS_SSOneBScanMultipleCScan, 
} NDTS_ScanStorage ;

typedef enum 
{
	NDTS_SS12Bit,
	NDTS_SS8Bit
} NDTS_SampleSize ;


typedef struct
{
	unsigned long numberOfAScansInBScan ;
	unsigned long numberOfBScans ;
	long **ppValues ;
	long unity ;
} NDTS_CScan ;


// 4 byte RQ gates on both RS2 and PRX
typedef struct
{
	int distanceMetric			: 15 ;
	int reserved1				: 1 ;
	int amplitudeMetric			: 12 ;
	int wasDistanceMeasured		: 1 ;
	int wasAmplitudeMeasured	: 1 ;
	int reserved2				: 2 ;
} NDTS_GateOutput ;

// 8 byte NDTS2100 gates with 24 bits of depth.
typedef struct
{
	int amplitudeMetric			: 12 ;
	int reserved1				: 16 ;
	int wasDistanceMeasured		: 1 ;
	int wasAmplitudeMeasured	: 1 ;
	int reserved2				: 2 ;
	int distanceMetric			: 24;
	int reserved3				: 8;
} NDTS_GateOutputLarge ;

typedef enum
{
	NDTS_PDSLatest,		// get the last ASCAN in the buffer
	NDTS_PDSMax,			// get the ASCAN with the largest amplitude in gate N
	NDTS_PDSMin,			// get the ASCAN with the smallest amplitude in gate N 
	NDTS_PDSFurthest,		// get the ASCAN with the largest depth in gate N
	NDTS_PDSNearest,		// get the ASCAN with the largest depth in gate N
	NDTS_PDSIndexed		// get the ASCAN from BSCAN N in the buffer
} NDTS_SnapshotDataSelection;


#ifdef __cplusplus
}
#endif

#endif
