#ifndef _SCANANDOBS_H #define _SCANANDOBS_H #ifdef __cplusplus extern "C" { #endif #ifdef SCANANDOBS_EXPORT #define SCANANDOBS_API __declspec(dllexport) #else #define SCANANDOBS_API __declspec(dllimport) #endif typedef struct ScanInformation{ int DriverOpen; //bDriverOpen int PmacAccessible; int status; // -1:not operate, 0:turn off, 1:turn on Scanner_status int number; float stepTime; //duration float stepSize; //size float scanSpeed; //speed float scanDist; //stroke double position; double scanpos; unsigned long dwDevice; HINSTANCE PmacLib; }ScanInfo; typedef struct ScannerStatus{ int inPosition; int motorRun; int pLimit; int nLimit; }ScanStat; SCANANDOBS_API int ScanOpen(ScanInfo* ScanI, char* str); SCANANDOBS_API char* CloseDevice(ScanInfo* ScanI); SCANANDOBS_API int ScanCommandWrite(ScanInfo* ScanI, int exptime); SCANANDOBS_API char* KillMotor(unsigned long dwDevice); SCANANDOBS_API void ReadScanPosition(ScanInfo* ScanI); SCANANDOBS_API void ampon(int* AmpOnSeq, int* zeroStep, unsigned long dwDevice, char* resStr); SCANANDOBS_API void GetScanResponse(char* string, unsigned long dwDevice, char* strRes); SCANANDOBS_API void Monitor(ScanStat* ScanS, unsigned long dwDevice); SCANANDOBS_API int UploadQuickGather(int bSaveFile, unsigned long dwDevice); SCANANDOBS_API void StructTestScanner(ScanInfo* ScanI, ScanStat* ScanS); SCANANDOBS_API int TakeFlat(CCDInfo* CCD1, CCDInfo* CCD2, ScanInfo* ScanI, ScanStat* ScanS, int step, int camMode, int* run); SCANANDOBS_API int SingleBandObservation(CCDInfo* CCD, ScanInfo* ScanI, ScanStat* ScanS, int nRun, int* obsThread, int* run); //Previously ExecuteProgram SCANANDOBS_API int DualBandObservation(CCDInfo* CCD1, CCDInfo* CCD2, ScanInfo* ScanI, ScanStat* ScanS, int nRun, int* obsThread, int* run); //Previously ExecuteProgram SCANANDOBS_API void SingleBandVideo(CCDInfo* CCD, int* obsThread); SCANANDOBS_API void DualBandVideo(CCDInfo* CCD1, CCDInfo* CCD2, int* obsThread); SCANANDOBS_API void testTaking(CCDInfo* CCD); SCANANDOBS_API void testTaking2(CCDInfo* CCD1, CCDInfo* CCD2, int* resDD); #define ERR_OpnDevice -1 #define ERR_OpenScript -2 #define ERR_dwDevice -3 #define ERR_TakeFlat -50 #define ERR_QuickGather -51 #define ERR_ScanNum -52 #ifdef __cplusplus } #endif #endif