/*----------------------------------------------------------------------------------*/
/*																					*/
/* FILE:    jeti_spectro_ex.h														*/
/* VERSION:	2.3.3																	*/
/*																					*/
/* PURPOSE: This is the header file for jeti_spectro_ex.dll. It is used by the		*/
/*          calling project to gain access to the library functions					*/
/*																					*/
/*			It is not allowed to change or add code here!							*/
/*																					*/
/*			Copyright(c)2012 by JETI Technische Instrumente GmbH					*/
/*----------------------------------------------------------------------------------*/

#if !defined _USRDLL
#if defined __cplusplus
extern "C" {
#endif
#endif

DWORD __stdcall JETI_GetNumSpectroEx (DWORD *dwNumDevices);
DWORD __stdcall JETI_GetSerialSpectroEx (DWORD dwDeviceNum, DWORD *dwSerial1, DWORD *dwSerial2);
DWORD __stdcall JETI_OpenSpectroEx (DWORD dwDeviceNum, DWORD *dwDevice);
DWORD __stdcall JETI_CloseSpectroEx (DWORD dwDevice);
DWORD __stdcall JETI_StartDarkEx (DWORD dwDevice, DWORD dwTint, WORD wAver);
DWORD __stdcall JETI_DarkPixEx (DWORD dwDevice, DWORD *dwDark);
DWORD __stdcall JETI_DarkWaveEx (DWORD dwDevice, DWORD dwBeg, DWORD dwEnd, FLOAT fStep, FLOAT *fDark);
DWORD __stdcall JETI_StartLightEx (DWORD dwDevice, DWORD dwTint, WORD wAver);
DWORD __stdcall JETI_PrepareLightEx (DWORD dwDevice, DWORD dwTint, WORD wAver);
DWORD __stdcall JETI_LightPixEx (DWORD dwDevice, DWORD *dwLight);
DWORD __stdcall JETI_LightWaveEx (DWORD dwDevice, DWORD dwBeg, DWORD dwEnd, FLOAT fStep, FLOAT *fLight);
DWORD __stdcall JETI_StartReferEx (DWORD dwDevice, DWORD dwTint, WORD wAver);
DWORD __stdcall JETI_PrepareReferEx (DWORD dwDevice, DWORD dwTint, WORD wAver);
DWORD __stdcall JETI_ReferPixEx (DWORD dwDevice, DWORD *dwRefer);
DWORD __stdcall JETI_ReferWaveEx (DWORD dwDevice, DWORD dwBeg, DWORD dwEnd, FLOAT fStep, FLOAT *fRefer);
DWORD __stdcall JETI_StartTransReflEx (DWORD dwDevice, DWORD dwTint, WORD wAver);
DWORD __stdcall JETI_PrepareTransReflEx (DWORD dwDevice, DWORD dwTint, WORD wAver);
DWORD __stdcall JETI_TransReflPixEx (DWORD dwDevice, DWORD *dwTransRefl);
DWORD __stdcall JETI_TransReflWaveEx (DWORD dwDevice, DWORD dwBeg, DWORD dwEnd, FLOAT fStep, FLOAT *fTransRefl);
DWORD __stdcall JETI_SpectroStatusEx (DWORD dwDevice, BOOL *boIsBusy);
DWORD __stdcall JETI_SpectroBreakEx (DWORD dwDevice);
DWORD __stdcall JETI_PixelCountEx (DWORD dwDevice, DWORD *dwPixel);
DWORD __stdcall JETI_SpectroTintEx (DWORD dwDevice, DWORD *dwTint);
DWORD __stdcall JETI_GetSpectroExDLLVersion (WORD *wMajorVersion, WORD *wMinorVersion, WORD *wBuildNumber);

#if !defined _USRDLL
#if defined __cplusplus
}
#endif
#endif


/*  DLL error codes  */

#define	JETI_SUCCESS				0x00000000		// no error occured
#define JETI_ERROR_OPEN_PORT		0x00000002		// could not open COM-port
#define JETI_ERROR_PORT_SETTING		0x00000003		// could not set COM-port settings
#define JETI_ERROR_BUFFER_SIZE		0x00000004		// could not set buffer size of COM-port
#define JETI_ERROR_PURGE			0x00000005		// could not purge buffers of COM-port
#define JETI_ERROR_TIMEOUT_SETTING	0x00000006		// could not set COM-port timeout
#define JETI_ERROR_SEND				0x00000007		// could not send to device
#define JETI_TIMEOUT				0x00000008		// timeout error
#define JETI_ERROR_RECEIVE			0x0000000A		// could not receive from device
#define JETI_ERROR_NAK				0x0000000B		// command not supported or invalid argument
#define JETI_ERROR_CONVERT			0x0000000C		// could not convert received data
#define JETI_ERROR_PARAMETER		0x0000000D		// invalid argument
#define JETI_BUSY					0x0000000E		// device busy
#define JETI_CHECKSUM_ERROR			0x00000011		// invalid checksum of received data
#define JETI_INVALID_STEPWIDTH		0x00000012		// invalid stepwidth
#define JETI_INVALID_NUMBER			0x00000013		// invalid device number
#define JETI_NOT_CONNECTED			0x00000014		// device not connected
#define JETI_INVALID_HANDLE			0x00000015		// invalid device handle
#define JETI_INVALID_CALIB			0x00000016		// invalid calibration file number
#define JETI_CALIB_NOT_READ			0x00000017		// calibration data not read
#define JETI_MEASURE_FAIL			0x00000020		// measurement failed
#define JETI_FATAL_ERROR			0x000000FF		// fatal communication error
