/******************************************************************************
 *
 *	NDT Solutions Rapid Scan 2 Automated (NDTS2100) Software Development Kit v1.0
 *
 ******************************************************************************
 *
 *  Description: Error codes for use with GetLastError()
 *
 ******************************************************************************/
#pragma once

#include "NDTSErrorConstants.h"
#include "NDTS2100Types.h"

typedef enum
{
	NDTS2100_OK													= (NDTS_ERROR_NDTS2100_SDK_INDEX << 16),
	// General errors that can occur in more than one function
	NDTS2100_PropertyOutOfRange,
	NDTS2100_PropertyNoLongerUsed,
	NDTS2100_PropertyValueOutOfRange,
	NDTS2100_PropertyMinUpdated,
	NDTS2100_PropertyMaxUpdated,
	NDTS2100_propertyFlagUpdated,
	NDTS2100_InvalidGateIndex, 
	NDTS2100_EnumStringNotFound,
	NDTS2100_PropertySetWhenScanning,
	NDTS2100_PropertyIsReadOnly, 
	NDTS2100_IOBitNumberIsOutOfRange, 
	NDTS2100_IOBitIsReadOnly, 
	NDTS2100_IOBitIsWriteOnly, 
	NDTS2100_NotInitialised,
	NDTS2100_NoHardwareFound,

	NDTS2100_TakeSnapshot_UnsupportedTriggerMode,
	NDTS2100_TakeSnapshot_TimeoutWaitingForSamples,

	// TCG
	NDTS2100_TCG_ValueOutOfRange,



	NDTS2100_LastError
} NDTS2100_ReturnCode ;


void NDTS2100_HandleNDTS2100Error(NDTS2100_ReturnCode errorCode) ;
void NDTS2100_HandleNDTS2100ErrorWithLogLevel(NDTS2100_ReturnCode errorCode,  NDTS_LogLevel logLevel);
NDTS2100_API const char * CALL_CONV NDTS2100_GetCodeString(int errorCode) ;
NDTS2100_API int  CALL_CONV NDTS2100_ReturnNumberOfErrorLogLines();
