#ifndef RQRAWSCAN_H
#define RQRAWSCAN_H

#include "RQConstants.h"
#include "RQStructs.h"

#ifdef __cplusplus
extern "C" {
#endif

	typedef struct
	{
		unsigned long cardIndex ;

		// For non sequenced - this is the same number for each A Scan in a B Scan.
		unsigned long aScanSamplesThisStep[RQ_MAXIMUM_NUMBER_OF_ELEMENTS];
		// Number of active elements if array probe. Number of sequence steps if PRX.
		unsigned long numberOfAScansInBScan ;  
		// Number of b-scans in the raw scan.
		unsigned long numberOfBScans ;
		// True = PRX compatible sequence. False = DI unit array.
		NDTS_Boolean isSequence ;
		RQ_ScanStorage scanStorage ;
		// Number of bits per sample.
		RQ_SampleSize sampleSize ;
		// Indexed [sequence step][active gate number] - only sequence step zero is used if isSequence is false.
		RQ_Gate ppGates[RQ_MAXIMUM_NUMBER_OF_ELEMENTS][RQ_MAXIMUM_NUMBER_OF_GATES_COMPILE_TIME]  ;  
		unsigned long numberOfGates[RQ_MAXIMUM_NUMBER_OF_ELEMENTS] ;  // Indexed by [sequence step]
		void *pInternal ;
	} RQ_RawScan ;

	RQ_API NDTS_Boolean CALL_CONV RQ_InitialiseRawScan(RQ_RawScan *pRawScan) ;
	RQ_API NDTS_Boolean CALL_CONV RQ_UninitialiseRawScan(RQ_RawScan *pRawScan) ;
	RQ_API NDTS_Boolean CALL_CONV RQ_ClearRawScan(RQ_RawScan *pRawScan) ;
	RQ_API NDTS_Boolean CALL_CONV RQ_CopyRawScan(RQ_RawScan *pDestination, RQ_RawScan *pSource) ;

#ifdef __cplusplus
}
#endif


#endif