Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.4 KiB

  1. /*
  2. * pcy11Dec92: Rework
  3. * pcy08Apr94: Trim size, use static iterators, dead code removal
  4. * djs03Dec96: Changed generate methods to virtual
  5. */
  6. #ifndef __THSENSOR_H
  7. #define __THSENSOR_H
  8. #include "sensor.h"
  9. _CLASSDEF(ThresholdSensor)
  10. enum THSTATE { ABOVE_RANGE, IN_RANGE, BELOW_RANGE };
  11. #define ON TRUE
  12. #define OFF FALSE
  13. class ThresholdSensor : public Sensor {
  14. protected:
  15. FLOAT theMaxThresholdValue;
  16. FLOAT theMinThresholdValue;
  17. THSTATE theThresholdState;
  18. INT theMaxThresholdControl;
  19. INT theMinThresholdControl;
  20. //Functions
  21. INT GetMaxThresholdValue(PCHAR);
  22. INT GetMinThresholdValue(PCHAR);
  23. INT SetMaxThresholdValue(const PCHAR);
  24. INT SetMinThresholdValue(const PCHAR);
  25. INT GetMaxThresholdControl(PCHAR);
  26. INT GetMinThresholdControl(PCHAR);
  27. INT SetMaxThresholdControl(const PCHAR);
  28. INT SetMinThresholdControl(const PCHAR);
  29. virtual INT GenerateBelowMessage();
  30. virtual INT GenerateAboveMessage();
  31. INT GenerateInRangeMessage();
  32. virtual INT storeValue(const PCHAR aValue);
  33. VOID checkState();
  34. virtual VOID getConfigThresholds();
  35. public:
  36. ThresholdSensor(PDevice aParent,
  37. PCommController aCommController,
  38. INT aSensorCode = NO_SENSOR_CODE,
  39. ACCESSTYPE anACCESSTYPE = AREAD_ONLY);
  40. virtual INT Get(INT, PCHAR);
  41. virtual INT Set(INT, const PCHAR);
  42. };
  43. #endif