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

#include "NDTSErrorConstants.h"
#include "NDTSRS2A.h"

typedef enum
{
	RS2A_OK													= (NDTS_ERROR_RS2A_SDK_INDEX << 16),
	// General errors that can occur in more than one function
	RS2A_PropertyOutOfRange,
	RS2A_PropertyNoLongerUsed,
	RS2A_PropertyValueOutOfRange,
	RS2A_PropertyMinUpdated,
	RS2A_PropertyMaxUpdated,
	RS2A_propertyFlagUpdated,
	RS2A_InvalidGateIndex, 
	RS2A_EnumStringNotFound,
	RS2A_PropertySetWhenScanning,
	RS2A_PropertyIsReadOnly, 
	RS2A_IOBitNumberIsOutOfRange, 
	RS2A_IOBitIsReadOnly, 
	RS2A_IOBitIsWriteOnly, 
	RS2A_NotInitialised,
	RS2A_NoHardwareFound,

	RS2A_TakeSnapshot_UnsupportedTriggerMode				= 0x00060100,
	RS2A_TakeSnapshot_TimeoutWaitingForSamples,

	// TCG
	RS2A_TCG_ValueOutOfRange								= 0x00060200,



	RS2A_LastError
} RS2A_ReturnCode ;


void RS2A_HandleRS2AError(RS2A_ReturnCode errorCode) ;
void RS2A_HandleRS2AErrorWithLogLevel(RS2A_ReturnCode errorCode,  NDTS_LogLevel logLevel);
RS2A_API const char * CALL_CONV RS2A_GetCodeString(int errorCode) ;
RS2A_API int  CALL_CONV RS2A_ReturnNumberOfErrorLogLines();
