ConditionEvent.h 771 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include "DiosLock.h"
  3. #include "ResDataObject.h"
  4. class ConditionEvent :
  5. public DiosLock
  6. {
  7. string m_strName; //事件名称
  8. string m_strType; //事件类型,Conditions/Timeout/External,AND条件全满足则触发,OR条件满足一个即触发,External设置即触发,Timeout到时间出发
  9. ResDataObject m_resCoditions;
  10. ResDataObject m_resConditionsValue;
  11. string m_strValue;
  12. int m_nContionNum;
  13. bool m_bTriggered;
  14. public:
  15. ConditionEvent(ResDataObject *event);
  16. virtual ~ConditionEvent();
  17. bool IsTriggered() { return m_bTriggered; }
  18. bool Check(const char* pszTypeName, ResDataObject *resContext, const char* pszDevice);
  19. bool CaculateCondition();
  20. const char* GetName() { return m_strName.c_str(); }
  21. int GetTimeout();
  22. };