OxfordImplConst.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #pragma once
  2. #include "stdafx.h"
  3. #include "../OTSControl/SEMCommonConst.h"
  4. namespace OTSController
  5. {
  6. #pragma pack(push, 1)
  7. struct OxfordChord
  8. {
  9. long m_nX;
  10. long m_nY;
  11. long m_nLength;
  12. OxfordChord()
  13. : m_nX(0)
  14. , m_nY(0)
  15. , m_nLength(0)
  16. {
  17. }
  18. /* ~OxfordChord()
  19. {
  20. }*/
  21. void operator=(const OxfordChord& other)
  22. {
  23. m_nX = other.m_nX;
  24. m_nY = other.m_nY;
  25. m_nLength = other.m_nLength;
  26. }
  27. };
  28. struct OxfordXrayData
  29. {
  30. long m_nPosX;
  31. long m_nPosY;
  32. long m_pXrayData[(unsigned int)EDSConst::XANA_CHANNELS];
  33. unsigned char m_strElementResult[1024];
  34. OxfordChord m_ChordList[1024];
  35. long m_nChordNum;
  36. long m_nPixelNum;
  37. OxfordXrayData()
  38. : m_nPosX(0)
  39. , m_nPosY(0)
  40. , m_nChordNum(0)
  41. {
  42. }
  43. /* ~OxfordXrayData()
  44. {
  45. }*/
  46. void operator=(const OxfordXrayData& other)
  47. {
  48. m_nPosX = other.m_nPosX;
  49. m_nPosY = other.m_nPosY;
  50. m_nChordNum = other.m_nChordNum;
  51. memcpy(m_strElementResult, other.m_strElementResult,1024);
  52. memcpy(m_pXrayData, other.m_pXrayData, sizeof(long) * (unsigned int)EDSConst::XANA_CHANNELS);
  53. memcpy(m_ChordList, other.m_ChordList, sizeof(OxfordChord) * 1024);
  54. }
  55. };
  56. const int OTS_XRAY_CHANNEL = 2000;
  57. enum class OxfordWrapperErrorCode
  58. {
  59. SUCCEED = 1,
  60. COMMAND_FAILED = -1,
  61. CREATE_CONTROLLER_FAILED = -2,
  62. CONTROLLER_INIT_FAILED = -3,
  63. CONTROLLER_NOT_CONNECTED = -4,
  64. NO_VALID_CONTROLLER = -5,
  65. };
  66. #pragma pack(pop)
  67. } // namespace Controller