CLamp_CST.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. //#pragma warning(disable:4251)
  3. #include "ILamp.h"
  4. #include "CommonToolDll.h"
  5. #include "ControllerDll.h"
  6. #include "sControllerDll.h"
  7. #include "ErrorCode.h"
  8. #pragma comment(lib,"CommonToolDll.lib")
  9. #pragma comment(lib,"ControllerDll.lib")
  10. #pragma comment(lib,"sControllerDll.lib")
  11. #ifdef LAMP_CST_EXPORTS
  12. #define LAMP_CST_DLL_API __declspec(dllexport)
  13. #else
  14. #define LAMP_CST_DLL_API //__declspec(dllimport)
  15. #endif
  16. class LAMP_CST_DLL_API CLamp_CST : public ILamp
  17. {
  18. private:
  19. ControllerHandle m_stControllerHandle;
  20. static std::mutex m_mutexReadWrite;
  21. public:
  22. long Init(const char* ipAddress) override; //³õʼ»¯
  23. void UnInit() override;//¹Ø±Õ
  24. string GetErrText(long errid) override;
  25. long SetLight(std::vector<LIGHT_STRUCT> vecLight, unsigned char iMaxSendNum = 3) override;
  26. long SetLight(int ChannelIndex, int LightValue, unsigned char iMaxSendNum = 3) override;
  27. long GetLight(int ChannelIndex, int& LightValue, unsigned char iMaxSendNum = 3) override;
  28. CLamp_CST(string strLightName);
  29. ~CLamp_CST();
  30. };