/******************************************************************************
 *
 *	NDT Solutions RapiDAQ Software Development Kit v1.0beta
 *
 ******************************************************************************
 *
 *  File:        HLPRXInternal.h.
 *
 *  Description: Local functions used internally.
 *
 *
 ******************************************************************************/



#ifndef HLPRXINTERNAL_H
#define HLPRXINTERNAL_H


/*
 *	 __cplusplus, __declspec(...), and __stdcall are Microsoft specific.
 */

#ifdef __cplusplus
extern "C" {
#endif
#include <windows.h>
#include "HLPRX.h"
#include "PRXStructs.h"

typedef struct
{
	unsigned long numberOfSteps;
	unsigned long range[SEQUENCE_TABLE_BLOCKS];
	unsigned long delay[SEQUENCE_TABLE_BLOCKS];
	unsigned long stepLengthTotal[SEQUENCE_TABLE_BLOCKS];
	unsigned long repetitionPeriod;
	unsigned long numberOfPRXCards;
	unsigned long rqIndex;
	unsigned long prxIndices[4];
	unsigned long isSFDInterfaceBoardInitialised;
	unsigned long shadowPrxDigital;
	short	      gain[SEQUENCE_TABLE_BLOCKS];
	HLPRX_BandpassFilter filter[SEQUENCE_TABLE_BLOCKS];
	long sonatestSerialMuxValue;
} HLPRX_CardSet;

HLPRX_CardSet cardSet;
NDTS_Boolean HLPRX_InitialiseSFDInterfaceBoard() ;
void HLPRX_LimitPulseWidthCallback(unsigned long prxCard, unsigned long step, unsigned long tenNanoSecTicks);
NDTS_Boolean HLPRX_SetOverSamplingInternal(unsigned long block, unsigned long numberOfOversamples);
NDTS_Boolean HLPRX_SetPrxRepetitionTimeFromCardSet(int stepIndex);
HLPRX_API NDTS_Boolean CALL_CONV HLPRX_DLLInitialise();
HLPRX_API NDTS_Boolean CALL_CONV HLPRX_DLLUninitialise();
NDTS_Boolean CALL_CONV HLPRX_InitialiseInternal(unsigned long rqIndex, unsigned long prxCount, unsigned long *pPRXIndices);
NDTS_Boolean  HLPRX_SetBandpassFilterInternal(unsigned long card, unsigned long block, HLPRX_BandpassFilter value);

#ifdef __cplusplus
}
#endif

#endif
