IRayDetFinder.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /**
  2. * File: IRayDetFinder.h
  3. *
  4. * Purpose: IRay detector finder definition
  5. *
  6. *
  7. * @author Wei.You
  8. * @version 1.0 2021/3/2
  9. *
  10. * Copyright (C) 2009, 2021, iRay Technology (Shanghai) Ltd.
  11. *
  12. */
  13. #ifndef _IRAY_DETFINDER_H_
  14. #define _IRAY_DETFINDER_H_
  15. enum Enm_CommChannel
  16. {
  17. Enm_CommChannel_Ethernet = 1,
  18. Enm_CommChannel_USB = 2,
  19. };
  20. #pragma pack(push, 1)
  21. typedef struct _tagChannelScanInput_Ethernet
  22. {
  23. char szIP[64];
  24. }ChannelScanInput_Ethernet;
  25. typedef struct _tagChannelScanResult_Ethernet
  26. {
  27. int nProdNo;
  28. int nSubProdNo;
  29. char szSN[64];
  30. char szIP[64];
  31. char reserved[120];
  32. }ChannelScanResult_Ethernet;
  33. typedef struct _tagChannelScanResult_USB
  34. {
  35. int nProdNo;
  36. char szUSBDeviceID[32];
  37. char IsValidID; //1:valid,0:invalid
  38. char reserved[219];
  39. }ChannelScanResult_USB;
  40. #pragma pack(pop)
  41. /**
  42. * FnNotifyScanResultEx: Define a function type for register a scanning callback function
  43. *
  44. * @param eCommChannel [out] communication channel
  45. * @param pScanResult [out] scan result data struct, it could be ChannelScanResult_Ethernet or
  46. * ChannelScanResult_USB according to eCommChannel
  47. *
  48. * @return void
  49. */
  50. typedef void(*FnNotifyScanResultEx)(Enm_CommChannel eCommChannel, void* pScanResult);
  51. /**
  52. * FnRegisterScanNotifyEx: Define a function type for DLL export function "FnNotifyScanResultEx"
  53. *
  54. * RegisterScanNotifyEx: register the scanning result callback function,
  55. * it will return multiple times if there are multiple devices is available
  56. *
  57. * @param pCallback [in] callback function pointer, return the scan result from operation "ScanOnceEx" or
  58. * firmware pushed online notification.
  59. *
  60. * @return 0: succeed, Non-Zero: error code
  61. */
  62. typedef int(*FnRegisterScanNotifyEx)(FnNotifyScanResultEx pCallback);
  63. /**
  64. * FnScanOnceEx: Define a function type for start a scan to find reachable detectors,
  65. * the result will be returned through the registered callback function.
  66. *
  67. * @param eCommChannel [in] communication channel
  68. * @param pScanInput [in] scan result data struct, it could be ChannelScanInput_Ethernet or
  69. * null according to eCommChannel
  70. *
  71. * @return void
  72. */
  73. typedef int(*FnScanOnceEx)(Enm_CommChannel eCommChannel, void* pScanInput);
  74. #endif