DIOS.Dev.DAP.Mould.hpp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #pragma once
  2. #include <string>
  3. #include "DIOS.Dev.IODevice.hpp"
  4. #include "DIOS.Dev.IODevice.Detail.hpp"
  5. #include "DAP.BasicMoulds.hpp"
  6. #include "DriverConfigInfo.tlh"
  7. #include "DriverConfigInfo.tli"
  8. namespace nsDetail = DIOS::Dev::Detail;
  9. #ifndef DIOSDEVDAPDEVICEMOULD_EXPORTS
  10. #ifdef _WIN64
  11. #ifdef _DEBUG
  12. #pragma comment(lib, "DIOS.Dev.DAP.Mould64D.lib")
  13. #else
  14. #pragma comment(lib, "DIOS.Dev.DAP.Mould64.lib")
  15. #endif
  16. #else
  17. #ifdef _DEBUG
  18. #pragma comment(lib, "DIOS.Dev.DAP.MouldD.lib")
  19. #else
  20. #pragma comment(lib, "DIOS.Dev.DAP.MouldD.lib")
  21. #endif
  22. #endif
  23. #endif
  24. #ifdef DIOSDEVDAPDEVICEMOULD_EXPORTS
  25. #define _DIOSDEVDAPDEVICEMOULD_API __declspec(dllexport)
  26. #else
  27. #define _DIOSDEVDAPDEVICEMOULD_API __declspec(dllimport)
  28. #endif
  29. #pragma warning (disable:4251) // warning C4251: class “DIOS::Dev::Detail::Generator::DoseUnit”需要有 dll 接口由 class“DIOS::Dev::Detail::Generator::DAPMould”的客户端使用
  30. namespace DIOS::Dev::Detail::DAP
  31. {
  32. //-----------------------------------------------------------------------------
  33. // DAPUnit
  34. //-----------------------------------------------------------------------------
  35. class _DIOSDEVDAPDEVICEMOULD_API DAPUnit : public IOLogicUnit
  36. {
  37. public:
  38. DAPUnit() {};
  39. virtual ~DAPUnit() {};
  40. public:
  41. std::unique_ptr<DOSEMould> m_DAP;
  42. };
  43. //-----------------------------------------------------------------------------
  44. // DAPMould
  45. //-----------------------------------------------------------------------------
  46. namespace nDev = DIOS::Dev;
  47. class _DIOSDEVDAPDEVICEMOULD_API DAPMould
  48. {
  49. public:
  50. DAPMould ();
  51. ~DAPMould ();
  52. protected:
  53. virtual void Register(Dispatch* Dispatch);
  54. private:
  55. //caoxue
  56. nDev::RET_STATUS JSGetDAP (std::string& out);
  57. nDev::RET_STATUS JSResetDAP (std::string in, std::string& out);
  58. nDev::RET_STATUS JSObtainDAP(std::string in, std::string& out);
  59. protected:
  60. virtual float GetDAP();
  61. virtual nDev::RET_STATUS ClearDAP() = 0;
  62. virtual nDev::RET_STATUS QueryDAP(float& value) = 0;
  63. protected:
  64. DAPUnit m_DAPUnit;
  65. };
  66. }
  67. namespace DIOS::Dev::Detail::DAP
  68. {
  69. class _DIOSDEVDAPDEVICEMOULD_API DriverMould : public DIOS::Dev::IODriver
  70. {
  71. public:
  72. DriverMould ();
  73. ~DriverMould ();
  74. virtual std::string GetGUID () const;
  75. protected:
  76. std::list <ConfigInfo> m_ConfigInfo;
  77. };
  78. }