00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00013
00014 #pragma once
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #endif
00018
00019
00020 #ifdef _WIN32
00021
00022
00023
00024
00025 #if defined(_SR_API_DLL)//using file libMesaSR.h, libMesaSR.cpp to generate libMesaSR.dll
00026 #define SR_API(RETURN) __declspec(dllexport) RETURN __cdecl
00027 #elif defined(MATLAB_PREPROC)//Preprocessing for matlab interface
00028 #define SR_API(RETURN) RETURN
00029 #else //using file libMesaSR.h with libMesaSR.dll
00030 #define SR_API(RETURN) __declspec(dllimport) RETURN __cdecl
00031 #endif
00032 #else //LINUX
00033 #define SR_API(RETURN) __attribute__ ((visibility("default"))) RETURN
00034 #endif
00035
00036 #ifndef _countof
00037 #define _countof(array) (sizeof(array)/sizeof(array[0]))
00038 #endif
00039 #include "definesSR.h"
00040
00041 #ifdef _SR_USE_INTERNAL
00042 #include "libMesaSRinternal.h"
00043 #endif
00044
00045 #ifdef _SR_USE_DEPRECATED
00046
00047 #endif
00048
00051
00052 #ifdef _WIN32
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066 SR_API(int) SR_CheckForNewDllVersion(int mode);
00067
00074 SR_API(int) SR_OpenFile(SRCAM* srCam, const char* filename);
00075
00082 SR_API(int) SR_StreamToFile(SRCAM srCam, const char* filename, int mode);
00083
00085 SR_API(int) SR_FileStreamCmd(SRCAM srCam, FSCmd cmd, DWORD data);
00086
00087 #endif
00088
00089 #ifdef __BFIN__
00090
00091 SR_API(int) SR_Open(SRCAM* srCam);
00092 SR_API(int) SR_IsFrameAvailable(SRCAM srCam);
00093 #else
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113 SR_API(int) SR_OpenDlg(SRCAM* srCam, int mode, HWND parent);
00114
00119 SR_API(int) SR_OpenAll(SRCAM* srCam, unsigned int numSrCam, DWORD inAddr, DWORD inMask);
00120
00127 SR_API(int) SR_OpenUSB(SRCAM* srCam, unsigned int serialNumber);
00128
00132 SR_API(int) SR_OpenETH(SRCAM* srCam, const char* addr);
00133
00134
00135
00136
00140 SR_API(int) SR_OpenSettingsDlg(SRCAM srCam, HWND parent);
00141 #endif //__BFIN__
00142
00153 SR_API(int) SR_Close(SRCAM srCam);
00154
00158 SR_API(int) SR_SetMode(SRCAM srCam, int mode);
00159
00162 SR_API(int) SR_GetMode(SRCAM srCam);
00163
00172 SR_API(int) SR_Acquire(SRCAM srCam);
00173
00179 SR_API(int) SR_CoordTrfUint16(SRCAM srCam, short *x, short *y, unsigned short *z, int pitchX,int pitchY,int pitchZ);
00180
00186 SR_API(int) SR_CoordTrfFlt(SRCAM srCam, float *x,float *y,float *z, int pitchX,int pitchY,int pitchZ);
00187
00194 SR_API(int) SR_CoordTrfDbl(SRCAM srCam, double *x,double *y,double *z, int pitchX,int pitchY,int pitchZ);
00195
00201 SR_API(int) SR_CoordTrfPntUint16(SRCAM srCam, const unsigned char* iX, const unsigned char* iY, const unsigned short* iDst, short *oX, short *oY, unsigned short *oZ, int num);
00202 SR_API(int) SR_CoordTrfPntDbl(SRCAM srCam, const unsigned char* iX, const unsigned char* iY, const unsigned short* iDst, double *oX, double *oY, double *oZ, int num);
00203 SR_API(int) SR_CoordTrfPntFlt(SRCAM srCam, const unsigned char* iX, const unsigned char* iY, const unsigned short* iDst, float *oX, float *oY, float *oZ, int num);
00204
00206 SR_API(int) SR_GetVersion(unsigned short version[4]);
00207
00220 SR_API (SR_FuncCB*) SR_SetCallback(SR_FuncCB* cb);
00221
00225 SR_API (SR_FuncCB*) SR_GetDefaultCallback();
00226
00233 SR_API(int) SR_GetDeviceString(SRCAM srCam, char* buf, int buflen);
00234
00237 SR_API(void) SR_SetTimeout(SRCAM srCam, int ms);
00238
00240 SR_API(unsigned int) SR_GetRows(SRCAM srCam);
00241
00243 SR_API(unsigned int) SR_GetCols(SRCAM srCam);
00244
00249 SR_API(void*) SR_GetImage(SRCAM srCam, unsigned char idx);
00250
00254 SR_API(int) SR_GetImageList(SRCAM srCam, ImgEntry** imgEntryArray);
00255
00267 SR_API(int) SR_SetIntegrationTime(SRCAM srCam, unsigned char intTime);
00268
00273 SR_API(unsigned char) SR_GetIntegrationTime(SRCAM srCam);
00274
00279 SR_API(int) SR_SetAmplitudeThreshold(SRCAM srCam, unsigned short val);
00280
00283 SR_API(unsigned short) SR_GetAmplitudeThreshold(SRCAM srCam);
00284
00294
00295
00297 SR_API(int) SR_SetModulationFrequency(SRCAM srCam, enum ModulationFrq modFrq);
00298
00301 SR_API(enum ModulationFrq) SR_GetModulationFrequency(SRCAM srCam);
00302
00306 SR_API(int) SR_SetDistanceOffset(SRCAM srCam, unsigned short distOfs);
00307
00311 SR_API(unsigned short) SR_GetDistanceOffset(SRCAM srCam);
00312
00325 SR_API(int) SR_SetAutoExposure(SRCAM srCam, unsigned char minIntTime, unsigned char maxIntTime,
00326 unsigned char percentOverPos, unsigned char desiredPos);
00327
00339 SR_API(int) SR_SetReg(SRCAM srCam, unsigned char reg, unsigned char val);
00340
00343 SR_API(unsigned char) SR_GetReg(SRCAM srCam, unsigned char reg);
00344
00346 SR_API(unsigned int) SR_ReadSerial(SRCAM srCam);
00347
00351 SR_API(int) SR_SetImgProcBlk(SRCAM srCam, IPBArg, ...);
00352
00356 SR_API(int) SR_SetImgProcBlkVA(SRCAM srCam, IPBArg, void*);
00357
00359
00360 #ifdef __cplusplus
00361 }
00362 #endif
00363
00364