CareRayLib.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #ifndef __CARERAY_API_DLL_H__
  2. #define __CARERAY_API_DLL_H__
  3. #include "include\ICallback.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #ifdef _CARERAY_API_
  8. #define CARERAY_API_PORT typedef _declspec(dllexport)
  9. #else
  10. #define CARERAY_API_PORT typedef _declspec(dllimport)
  11. #endif
  12. // ************************ Common API ************************ //
  13. CARERAY_API_PORT int (*CB_CR_InitializeLibrary)();
  14. CARERAY_API_PORT int (*CB_CR_DeinitializeLibrary)();
  15. CARERAY_API_PORT void (*CB_CR_GetLastIntlMsg)(char* szMsgBuf, int nBufLen, int nErrorCode/*= -1*/);
  16. CARERAY_API_PORT int (*CB_CR_RegisterEventCallback)(int nDetrIndex, ICallback* pCallback);
  17. CARERAY_API_PORT int (*CB_CR_GetConfigItemValue)(const char* pItemName, char* pItemValue);
  18. CARERAY_API_PORT int (*CB_CR_SetConfigItemValue)(const char* pItemName, const char* pItemValue);
  19. CARERAY_API_PORT int (*CB_CR_GetDetectorIndexAndIPAddress)(CR_DetrIdxAndIPAddr* pDetrIdxAndIPAddr, int* pDetrNum);
  20. CARERAY_API_PORT int (*CB_CR_Connect)(int nDetrIdx);
  21. CARERAY_API_PORT int (*CB_CR_Disconnect)(int nDetrIdx);
  22. CARERAY_API_PORT int (*CB_CR_ResetDetector)(int nDetrIdx, bool isNeedReboot);
  23. CARERAY_API_PORT int (*CB_CR_GetSystemInformation)(int nDetrIdx, CR_SystemInfo* pSystemInformation);
  24. CARERAY_API_PORT int (*CB_CR_GetApplicationMode)(int nDetrIdx, CR_ModeInfo* pModeInfo, int* pModeNum);
  25. CARERAY_API_PORT int (*CB_CR_RegisterApplicationMode)(int nDetrIdx, int nAppModeKey, int nModeID, float* pFrameRate, float* pExposureTime, int nTriggType, int nGainType, int nRowIdx/*= 0*/, int nColumnIdx/*= 0*/);
  26. CARERAY_API_PORT int (*CB_CR_SetFrameFilter)(int nDetrIdx, int nAppModeKey, const char* pFrameFilter);
  27. CARERAY_API_PORT int (*CB_CR_GetModeInfoByAppModeKey)(int nDetrIdx, int nAppModeKey, CR_ModeInfo* pModeInfo);
  28. CARERAY_API_PORT int (*CB_CR_LoadReference)(int nDetrIdx, int nAppModeKey);
  29. CARERAY_API_PORT int (*CB_CR_UnloadReference)(int nDetrIdx, int nAppModeKey);
  30. CARERAY_API_PORT int (*CB_CR_StartAcquisition)(int nDetrIdx, int nAppModeKey, void* pBuffer, int nBuffSize, int nNumFrmReqFromDetr/*= -1*/);
  31. // nNumFrmReqFromDetr == -1 means that detector sends out frames continuously until StopAcquisition() is received.
  32. CARERAY_API_PORT int (*CB_CR_StartAcquisitionWithCorrOpt)(int nDetrIdx, int nAppModeKey, void* pBuffer, int nBuffSize, unsigned int uCorrOpt);
  33. // Only for rad
  34. CARERAY_API_PORT int (*CB_CR_StartDarkAcquisition)(int nDetrIdx, int nAppModeKey, int nNumFrmReqFromDetr/*= -1*/);
  35. // Only for rad
  36. CARERAY_API_PORT int (*CB_CR_StartDarkAcquisitionWithCorrOpt)(int nDetrIdx, int nAppModeKey, unsigned int uCorrOpt);
  37. CARERAY_API_PORT int (*CB_CR_StopAcquisition)(int nDetrIdx);
  38. CARERAY_API_PORT int (*CB_CR_GetAcquisitionStatInfo)(int nDetrIdx, struct CR_AcquisitionStatInfo* pStatInfo);
  39. CARERAY_API_PORT int (*CB_CR_QueryAcquisitionStatus)(int nDetrIdx, CR_ExpProgress* pExpProg);
  40. CARERAY_API_PORT int (*CB_CR_QueryAedExposureProgress)(int nDetrIdx, CR_AedExpProgress* pExpProg);
  41. CARERAY_API_PORT int (*CB_CR_RequestExposure)(int nDetrIdx);
  42. CARERAY_API_PORT int (*CB_CR_PermitExposure)(int nDetrIdx);
  43. CARERAY_API_PORT int (*CB_CR_GetImage)(int nDetrIdx, void* pImage, size_t nBuffLen, int nWaitMs/*= 9000*/);
  44. CARERAY_API_PORT int (*CB_CR_GetNoHeaderImage)(int nDetrIdx, void* pImage, size_t nBuffLen, int nWaitMs/*= 9000*/);
  45. // only for rad
  46. CARERAY_API_PORT int (*CB_CR_GetPreviewImage)(int nDetrIdx, void* pImage, size_t nBuffLen, int nWaitMs/*= 9000*/);
  47. CARERAY_API_PORT int (*CB_CR_StartDarkCalibration)(int nDetrIdx, int nAppModeKey, bool isTradCalib, bool isUpdateDefectMap);
  48. CARERAY_API_PORT int (*CB_CR_StartGainCalibration)(int nDetrIdx, int nAppModeKey);
  49. CARERAY_API_PORT int (*CB_CR_StopCalibration)(int nDetrIdx);
  50. CARERAY_API_PORT int (*CB_CR_QueryCalibrationStatus)(int nDetrIdx, CR_CalibrationInfo* pCalProgInfo);
  51. CARERAY_API_PORT int (*CB_CR_QueryReferenceStatus)(int nDetrIdx, int nAppModeKey, CR_RefStatusInfo* pRefStatusInfo);
  52. CARERAY_API_PORT int (*CB_CR_GetDefectInfo)(const int nDetrIdx, const int nAppModeKey, CR_DefectInfo* pDefectInfo);
  53. CARERAY_API_PORT int (*CB_CR_GetDetrStatus)(int nDetrIdx, CR_DetrStatus* pDetrStatus);
  54. CARERAY_API_PORT int (*CB_CR_GetConnectionStatus)(int nDetrIdx, CR_ConnectionStatus* pStatus);
  55. CARERAY_API_PORT int (*CB_CR_GetDaecActiveAreas)(int nDetrIdx, CR_ActiveAreaInfo* pActiveAreasArray, int* pActiveAreasNum, int* pThreshold, int nAppModeKey);
  56. CARERAY_API_PORT int (*CB_CR_SetDaecActiveAreas)(int nDetrIdx, CR_ActiveAreaInfo* pActiveAreasArray, int nActiveAreasNum, int nThreshold, int nAppModeKey);
  57. // ********************* YosemiteView API ********************* //
  58. CARERAY_API_PORT int (*CB_CR_Nudge)(int nDetrIdx);
  59. CARERAY_API_PORT int (*CB_CR_SetWorklist)(int nDetrIdx, CR_Examination* pExaminations, int nTotalNum);
  60. CARERAY_API_PORT int (*CB_CR_GetWorklist)(int nDetrIdx, int* pExamNum, CR_Examination* pExaminations);
  61. CARERAY_API_PORT int (*CB_CR_ClearWorklist)(int nDetrIdx);
  62. CARERAY_API_PORT int (*CB_CR_GetInnerStoredImage)(int nDetrIdx, void* pImage, size_t nBuffLen, const char* pFileName, int nWaitMs/*= 9000*/);
  63. CARERAY_API_PORT int (*CB_CR_SetPowerMode)(int nDetrIdx, CR_PowerModeID nModeID);
  64. CARERAY_API_PORT int (*CB_CR_GetBatteryInfos)(int nDetrIdx, CR_BatteryInfo* pBatteryArray, int* pValidBatteryNum);
  65. CARERAY_API_PORT int (*CB_CR_GetWirelessStatus)(int nDetrIdx, CR_WirelessStatus* pWirelessStatus);
  66. // ************************* JSON API ************************* //
  67. // New interface: simplify acquisition and calibration
  68. // Get all support application modes in JSON format
  69. CARERAY_API_PORT void (*CB_CR_GetApplicationModeInJson)(int nDetrIdx, char* pResultBuffer);
  70. // Register custom modes from configuration file
  71. CARERAY_API_PORT void (*CB_CR_RegisterCustomModeFromConfigFile)(int nDetrIdx, char* pResultBuffer);
  72. // Generate sample configuration file for custom modes
  73. CARERAY_API_PORT void (*CB_CR_GenerateSampleCustomModeConfigFile)(int nDetrIdx);
  74. // Get acquisition progress in JSON format - rad mode only
  75. CARERAY_API_PORT void (*CB_CR_GetAcquisitionProgressInJson)(int nDetrIdx, char* pResultBuffer);
  76. // Get calibration progress in JSON format
  77. CARERAY_API_PORT void (*CB_CR_GetCalibrationProgressInJson)(int nDetrIdx, char* pResultBuffer);
  78. CARERAY_API_PORT void (*CB_CR_GetModeInfoByAppModeKeyInJson)(int nDetrIdx, int nAppModeKey, char* pResultBuffer);
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82. #endif