/******************************************************************************
 *
 *	NDT Solutions Pulser/Receiver Software Development Kit v1.0beta
 *
 ******************************************************************************
 *
 *  File:        PRXEnums.h.
 *
 *  Description: Secondary header file for PRX SDK containing enumerated 
 *               types. This file does not need to be explicitly included.
 *
 *	Revision:    14/06/05 - Jonathan Welch (jonathan@ndtsolutions.com).
 *
 ******************************************************************************/

#ifndef PRXENUMS_H
#define PRXENUMS_H

#include "NDTSEnums.h"


// In the XXX_ReturnCode types we use the following convention:
// low 8 bits = specific error value from this function
// next 8 bits = function returning error
// next 8 bits = SDK number
// top 8 bits reserved, currently always zero
// SDK values are:
// 00 = RQ
// 01 = PRX

typedef enum
{
	PRX_OK												= 0x00010000,
	PRX_InvalidCardNumber								= 0x00010001,
	PRX_InvalidBlockNumber								= 0x00010002,

	PRX_Initialise_AlreadyInitialised					= 0x00010100,
	PRX_Initialise_FindPCIDeviceFail					= 0x00010101,
	PRX_Initialise_PCIDeviceOpenFail					= 0x00010102,
	PRX_Initialise_PCIBarMapFail						= 0x00010103,
	PRX_Initialise_PCICommonBufferPropertiesFail		= 0x00010104,
	PRX_Initialise_PCICommonBufferMapFail				= 0x00010105,
	
	PRX_Uninitialise_IsInitialisedFail					= 0x00010300,
	PRX_Uninitialise_IsPciInitialisedFail				= 0x00010301,
	PRX_Uninitialise_PCIBarUnmapFail					= 0x00010302,
	PRX_Uninitialise_PCIDeviceCloseFail					= 0x00010303,
	
	PRX_OpenDMAChannel_IspciInitialisedFail				= 0x00010400,
	PRX_OpenDMAChannel_DMAChannelAlreadyOpen			= 0x00010401,
	PRX_OpenDMAChannel_pciDmaBlockChannelOpenFail		= 0x00010402,
	
	PRX_CloseDMAChannel_IspciInitialisedFail			= 0x00010500,
	PRX_CloseDMAChannel_IsDMAChannelOpenFail			= 0x00010501,
	PRX_CloseDMAChannel_pciDmaBlockChannelCloseFail		= 0x00010502,
	
	PRX_PerformDMATransfer_IspciInitialisedFail			= 0x00010600,
	PRX_PerformDMATransfer_IsDMAChannelOpenFail			= 0x00010601,
	PRX_PerformDMATransfer_pciDmaBlockTransferFail		= 0x00010602,
	
	PRX_SetRegister_IspciInitialisedFail				= 0x00010a00,
	PRX_SetRegister_OffsetOutOfRange					= 0x00010a01,

	PRX_GetRegister_IspciInitialisedFail				= 0x00010b00,
	PRX_GetRegister_OffsetOutOfRange					= 0x00010b01,

	PRX_SetSystemRegister_OutOfRange					= 0x00010c00,
	PRX_GetSystemRegister_OutOfRange					= 0x00010d00,
	PRX_SetSamplingRegister_OutOfRange					= 0x00010e00,
	PRX_GetSamplingRegister_OutOfRange					= 0x00010f00,
	PRX_SetPeripheralRegister_OutOfRange				= 0x00011000,
	PRX_GetPeripheralRegister_OutOfRange				= 0x00011100,
	PRX_GetSRAMLong_OffsetOutOfRange					= 0x00011200,

	PRX_SetValue_InvalidPropertyName					= 0x00015100,

	PRX_SetSequence_TooManyBlocks						= 0x00015800,
	PRX_GetSequence_TooManyBlocks						= 0x00015900,
	PRX_SetTransmitPulseEnable_InvalidFlags				= 0x00015a00,
	PRX_SetReceiveChannel_InvalidChannel				= 0x00015b00,
	PRX_SetFineGain_InvalidGain							= 0x00015c00,
	PRX_SetBackendLowpassFilter_InvalidLevel			= 0x00015d00,
	PRX_SetBackendHighpassFilter_InvalidLevel			= 0x00015e00,
	PRX_SetFrontendLowpassFilter_InvalidLevel			= 0x00015f00,
	PRX_SetFrontendHighpassFilter_InvalidLevel			= 0x00016000,
	PRX_SetInputImpedance_InvalidLevel					= 0x00016100,
	PRX_SetCoarseGain_InvalidLevel						= 0x00016200,
	PRX_SetOversamplingDelay_InvalidLength				= 0x00016300,
	PRX_SetPulseWidth_InvalidWidth						= 0x00016400,
	PRX_SetPretriggerDelay_InvalidDelay					= 0x00016500,
	PRX_SetRepetitionTime_InvalidLength					= 0x00016600,


	PRX_SetStepSkipCount_InvalidCount					= 0x00016700,
	PRX_SetPulseTrainLength_InvalidLength				= 0x00016800,
	PRX_SetPulseEchoEnable_InvalidFlags                 = 0x00016900,
	PRX_SetHVLevel_InvalidLevel			                = 0x00016a00,
	PRX_SetNumberOfOversamples_InvalidNumberOfOversamples= 0x00016b00,
	PRX_GetIsSafe_FETLoadTooLarge						= 0x00016c00,

	PRX_CheckState_InvalidCardIndex						= 0x00016d00,

	PRX_LastError
} PRX_ReturnCode ;

typedef enum 
{
	PRX_IIHighImpedance	= 0,
	PRX_II470R			= 1,
	PRX_II270R			= 2,
	PRX_II100R			= 4,
	PRX_II47R			= 8,
} PRX_InputImpedance ;

typedef enum 
{
	PRX_Gain0dB			= 0,
	PRX_Gain20dB		= 1,
	PRX_GainMinus40dB	= 2,
	PRX_GainMinus20dB	= 3
} PRX_InputGain ;

// From spreadsheet in technical\development\system flaw detector\filters

typedef enum 
{
	PRX_FEHPPoint25Mhz = 0,
	PRX_FEHPPoint5Mhz,
	PRX_FEHP1Point25Mhz,
	PRX_FEHP2Point5Mhz,
	PRX_FEHP5Mhz,
	PRX_FEHP7Point5Mhz,
	PRX_FEHPNone,
} PRX_FrontEndHighPassFilter ;

typedef enum 
{
	PRX_FELPPoint75Mhz = 0,
	PRX_FELP1Point5Mhz,
	PRX_FELP3Point75Mhz,
	PRX_FELP7Point5Mhz,
	PRX_FELP15Mhz,
	PRX_FELP22Point5Mhz,
	PRX_FELPNone,
} PRX_FrontEndLowPassFilter ;

typedef enum 
{
	PRX_BEHP70Khz = 0,
	PRX_BEHP160Khz,
	PRX_BEHP340Khz,
	PRX_BEHPPoint7Mhz,
	PRX_BEHP1Point6Mhz,
	PRX_BEHP3Mhz,
	PRX_BEHP7Mhz,
	PRX_BEHP16Mhz,
} PRX_BackEndHighPassFilter ;

typedef enum 
{
	PRX_BELP160Khz = 0,
	PRX_BELP340Khz,
	PRX_BELPPoint7Mhz,
	PRX_BELP1Point6Mhz,
	PRX_BELP3Mhz,
	PRX_BELP7Mhz,
	PRX_BELP16Mhz,
	PRX_BELP32Mhz,
} PRX_BackEndLowPassFilter ;


#endif