#ifndef __CARERAY_API_DLL_530_H__ #define __CARERAY_API_DLL_530_H__ #include "ICallback.h" #include using namespace std; #ifdef __cplusplus extern "C" { #endif #ifndef CARERAY_LINUX_VERSION #ifdef _CARERAY_API_ #define CARERAY_API_PORT __declspec(dllexport) #else #define CARERAY_API_PORT __declspec(dllimport) #endif #else #define CARERAY_API_PORT #endif // ************************ Common API ************************ // CARERAY_API_PORT int CR_InitializeLibrary(); CARERAY_API_PORT int CR_DeinitializeLibrary(); CARERAY_API_PORT void CR_GetLastIntlMsg(char* szMsgBuf, int nBufLen, int nErrorCode = -1); CARERAY_API_PORT int CR_RegisterEventCallback(int nDetrIndex, ICallback* pCallback); CARERAY_API_PORT int CR_GetConfigItemValue(const char *pItemName, char *pItemValue); CARERAY_API_PORT int CR_SetConfigItemValue(const char *pItemName, const char *pItemValue); CARERAY_API_PORT int CR_GetDetectorIndexAndIPAddress(CR_DetrIdxAndIPAddr* pDetrIdxAndIPAddr, int* pDetrNum); CARERAY_API_PORT int CR_Connect(int nDetrIdx); CARERAY_API_PORT int CR_Disconnect(int nDetrIdx); CARERAY_API_PORT int CR_ResetDetector(int nDetrIdx, bool isNeedReboot); CARERAY_API_PORT int CR_GetSystemInformation(int nDetrIdx, CR_SystemInfo* pSystemInformation); CARERAY_API_PORT int CR_GetApplicationMode(int nDetrIdx, CR_ModeInfo* pModeInfo, int* pModeNum); CARERAY_API_PORT int CR_RegisterApplicationMode(int nDetrIdx, int nAppModeKey, int nModeID, float *pFrameRate, float *pExposureTime, int nTriggType, int nGainType, int nRowIdx = 0, int nColumnIdx = 0); CARERAY_API_PORT int CR_SetFrameFilter(int nDetrIdx, int nAppModeKey, const char *pFrameFilter); CARERAY_API_PORT int CR_GetModeInfoByAppModeKey(int nDetrIdx, int nAppModeKey, CR_ModeInfo *pModeInfo); CARERAY_API_PORT int CR_LoadReference(int nDetrIdx, int nAppModeKey); CARERAY_API_PORT int CR_UnloadReference(int nDetrIdx, int nAppModeKey); CARERAY_API_PORT int CR_StartAcquisition(int nDetrIdx, int nAppModeKey, void* pBuffer, int nBuffSize, int nNumFrmReqFromDetr = -1); // nNumFrmReqFromDetr == -1 means that detector sends out frames continuously until StopAcquisition() is received. CARERAY_API_PORT int CR_StartAcquisitionWithCorrOpt(int nDetrIdx, int nAppModeKey, void* pBuffer, int nBuffSize, unsigned int uCorrOpt); // Only for rad CARERAY_API_PORT int CR_StartDarkAcquisition(int nDetrIdx, int nAppModeKey, int nNumFrmReqFromDetr = -1); // Only for rad CARERAY_API_PORT int CR_StartDarkAcquisitionWithCorrOpt(int nDetrIdx, int nAppModeKey, unsigned int uCorrOpt); CARERAY_API_PORT int CR_StopAcquisition(int nDetrIdx); CARERAY_API_PORT int CR_GetAcquisitionStatInfo(int nDetrIdx, struct CR_AcquisitionStatInfo* pStatInfo); CARERAY_API_PORT int CR_QueryAcquisitionStatus(int nDetrIdx, CR_ExpProgress* pExpProg); CARERAY_API_PORT int CR_QueryAedExposureProgress(int nDetrIdx, CR_AedExpProgress* pExpProg); CARERAY_API_PORT int CR_RequestExposure(int nDetrIdx); CARERAY_API_PORT int CR_PermitExposure(int nDetrIdx); CARERAY_API_PORT int CR_GetImage(int nDetrIdx, void* pImage, size_t nBuffLen, int nWaitMs = 9000); CARERAY_API_PORT int CR_GetNoHeaderImage(int nDetrIdx, void* pImage, size_t nBuffLen, int nWaitMs = 9000); // only for rad CARERAY_API_PORT int CR_GetPreviewImage(int nDetrIdx, void* pImage, size_t nBuffLen, int nWaitMs = 9000); CARERAY_API_PORT int CR_StartDarkCalibration(int nDetrIdx, int nAppModeKey, bool isTradCalib = true, bool isUpdateDefectMap = false); CARERAY_API_PORT int CR_StartGainCalibration(int nDetrIdx, int nAppModeKey); CARERAY_API_PORT int CR_StopCalibration(int nDetrIdx); CARERAY_API_PORT int CR_QueryCalibrationStatus(int nDetrIdx, CR_CalibrationInfo* pCalProgInfo); CARERAY_API_PORT int CR_QueryReferenceStatus(int nDetrIdx, int nAppModeKey, CR_RefStatusInfo* pRefStatusInfo); CARERAY_API_PORT int CR_GetDefectInfo(const int nDetrIdx, const int nAppModeKey, CR_DefectInfo *pDefectInfo); CARERAY_API_PORT int CR_GetDetrStatus(int nDetrIdx, CR_DetrStatus* pDetrStatus); CARERAY_API_PORT int CR_GetConnectionStatus(int nDetrIdx, CR_ConnectionStatus *pStatus); CARERAY_API_PORT int CR_GetDaecActiveAreas(int nDetrIdx, CR_ActiveAreaInfo *pActiveAreasArray, int *pActiveAreasNum, int *pThreshold, int nAppModeKey); CARERAY_API_PORT int CR_SetDaecActiveAreas(int nDetrIdx, CR_ActiveAreaInfo *pActiveAreasArray, int nActiveAreasNum, int nThreshold, int nAppModeKey); // ********************* YosemiteView API ********************* // CARERAY_API_PORT int CR_Nudge(int nDetrIdx); CARERAY_API_PORT int CR_SetWorklist(int nDetrIdx, CR_Examination* pExaminations, int nTotalNum); CARERAY_API_PORT int CR_GetWorklist(int nDetrIdx, int* pExamNum, CR_Examination* pExaminations); CARERAY_API_PORT int CR_ClearWorklist(int nDetrIdx); CARERAY_API_PORT int CR_GetInnerStoredImage(int nDetrIdx, void* pImage, size_t nBuffLen, const char* pFileName, int nWaitMs = 9000); CARERAY_API_PORT int CR_SetPowerMode(int nDetrIdx, CR_PowerModeID nModeID); CARERAY_API_PORT int CR_GetBatteryInfos(int nDetrIdx, CR_BatteryInfo* pBatteryArray, int* pValidBatteryNum); CARERAY_API_PORT int CR_GetWirelessStatus(int nDetrIdx, CR_WirelessStatus* pWirelessStatus); // ************************* JSON API ************************* // // New interface: simplify acquisition and calibration // Get all support application modes in JSON format CARERAY_API_PORT void CR_GetApplicationModeInJson(int nDetrIdx, char *pResultBuffer); // Register custom modes from configuration file CARERAY_API_PORT void CR_RegisterCustomModeFromConfigFile(int nDetrIdx, char *pResultBuffer); // Generate sample configuration file for custom modes CARERAY_API_PORT void CR_GenerateSampleCustomModeConfigFile(int nDetrIdx); // Get acquisition progress in JSON format - rad mode only CARERAY_API_PORT void CR_GetAcquisitionProgressInJson(int nDetrIdx, char *pResultBuffer); // Get calibration progress in JSON format CARERAY_API_PORT void CR_GetCalibrationProgressInJson(int nDetrIdx, char *pResultBuffer); CARERAY_API_PORT void CR_GetModeInfoByAppModeKeyInJson(int nDetrIdx, int nAppModeKey, char *pResultBuffer); #ifdef __cplusplus } #endif #endif