📄 base_threshold.h
字号:
__int64 GetOffset () const { return m_nOffset; } void SetThreshold( __int64 threshold ) { m_nThreshold = threshold; } void SetOffset ( __int64 offset ) { m_nOffset = offset; }protected: virtual ::EventBase::EventType TestThresholdReached(); };//==============================================================================// ServerUInt64CounterThresholdclass ServerUInt64CounterThreshold : public ServerCounterThreshold{protected: unsigned __int64 m_uThreshold; unsigned __int64 m_uPriorValue; unsigned __int64 m_uOffset;public: ServerUInt64CounterThreshold( unsigned __int64 threshold, CLog& theLog, ThresholdManager& thresholdManager, long nGranularityPeriod = 10000 ); virtual ~ServerUInt64CounterThreshold(); unsigned __int64 GetThreshold() const { return m_uThreshold; } unsigned __int64 GetOffset () const { return m_uOffset; } void SetThreshold( unsigned __int64 threshold ) { m_uThreshold = threshold; } void SetOffset ( unsigned __int64 offset ) { m_uOffset = offset; }protected: virtual ::EventBase::EventType TestThresholdReached(); };//==============================================================================// ServerDateCounterThresholdclass ServerDateCounterThreshold : public ServerCounterThreshold{protected: DATE m_dtThreshold; DATE m_dtPriorValue; DATE m_dtOffset;public: ServerDateCounterThreshold( DATE threshold, CLog& theLog, ThresholdManager& thresholdManager, long nGranularityPeriod = 10000 ); virtual ~ServerDateCounterThreshold(); DATE GetThreshold() const { return m_dtThreshold; } DATE GetOffset () const { return m_dtOffset; } void SetThreshold( DATE threshold ) { m_dtThreshold = threshold; } void SetOffset ( DATE nOffset ) { m_dtOffset = nOffset; }protected: virtual ::EventBase::EventType TestThresholdReached(); };//==============================================================================//==============================================================================// Base class ServerGaugeThreshold class ServerGaugeThreshold : public ServerThreshold{protected: bool m_bNotifyHigh; bool m_bNotifyLow;public: ServerGaugeThreshold( CLog& theLog, ThresholdManager& thresholdManager, long nGranularityPeriod = 10000 ); // Default 10sec.); virtual ~ServerGaugeThreshold();public: bool GetNotifyHigh() const { return m_bNotifyHigh; } bool GetNotifyLow () const { return m_bNotifyLow; } void SetNotifyHigh( bool bNotify ) { m_bNotifyHigh = bNotify; } void SetNotifyLow ( bool bNotify ) { m_bNotifyLow = bNotify; }};//==============================================================================// ServerByteGaugeThresholdclass ServerByteGaugeThreshold : public ServerGaugeThreshold{protected: BYTE m_uHighThreshold; BYTE m_uLowThreshold; BYTE m_uOffset; BYTE m_uPriorValue; public: ServerByteGaugeThreshold( BYTE highThreshold, BYTE lowThreshold, CLog& theLog, ThresholdManager& thresholdManager, long nGranularityPeriod = 10000 ); virtual ~ServerByteGaugeThreshold(); BYTE GetHighThreshold() const { return m_uHighThreshold; } BYTE GetLowThreshold () const { return m_uLowThreshold; } BYTE GetOffset () const { return m_uOffset; } void SetHighThreshold( BYTE threshold ) { m_uHighThreshold = threshold; } void SetLowThreshold ( BYTE threshold ) { m_uLowThreshold = threshold; } void SetOffset ( BYTE offset ) { m_uOffset = offset; }protected: virtual ::EventBase::EventType TestThresholdReached(); };//==============================================================================// ServerIntGaugeThresholdclass ServerIntGaugeThreshold : public ServerGaugeThreshold{protected: long m_nHighThreshold; long m_nLowThreshold; long m_nOffset; long m_nPriorValue;public: ServerIntGaugeThreshold( long highThreshold, long lowThreshold, CLog& theLog, ThresholdManager& thresholdManager, long nGranularityPeriod = 10000 ); virtual ~ServerIntGaugeThreshold(); long GetHighThreshold() const { return m_nHighThreshold; } long GetLowThreshold () const { return m_nLowThreshold; } long GetOffset () const { return m_nOffset; } void SetHighThreshold( long threshold ) { m_nHighThreshold = threshold; } void SetLowThreshold ( long threshold ) { m_nLowThreshold = threshold; } void SetOffset ( long offset ) { m_nOffset = offset; }protected: virtual ::EventBase::EventType TestThresholdReached(); };//==============================================================================// ServerUIntGaugeThresholdclass ServerUIntGaugeThreshold : public ServerGaugeThreshold{protected: unsigned long m_uHighThreshold; unsigned long m_uLowThreshold; unsigned long m_uOffset; unsigned long m_uPriorValue;public: ServerUIntGaugeThreshold( unsigned long highThreshold, unsigned long lowThreshold, CLog& theLog, ThresholdManager& thresholdManager, long nGranularityPeriod = 10000 ); virtual ~ServerUIntGaugeThreshold(); unsigned long GetHighThreshold() const { return m_uHighThreshold; } unsigned long GetLowThreshold () const { return m_uLowThreshold; } unsigned long GetOffset () const { return m_uOffset; } void SetHighThreshold( unsigned long threshold ) { m_uHighThreshold = threshold; } void SetLowThreshold ( unsigned long threshold ) { m_uLowThreshold = threshold; } void SetOffset ( unsigned long offset ) { m_uOffset = offset; }protected: virtual ::EventBase::EventType TestThresholdReached(); };//==============================================================================// ServerInt64GaugeThresholdclass ServerInt64GaugeThreshold : public ServerGaugeThreshold{protected: __int64 m_nHighThreshold; __int64 m_nLowThreshold; __int64 m_nOffset; __int64 m_nPriorValue;public: ServerInt64GaugeThreshold( __int64 highThreshold, __int64 lowThreshold, CLog& theLog, ThresholdManager& thresholdManager, long nGranularityPeriod = 10000 ); virtual ~ServerInt64GaugeThreshold(); __int64 GetHighThreshold() const { return m_nHighThreshold; } __int64 GetLowThreshold () const { return m_nLowThreshold; } __int64 GetOffset () const { return m_nOffset; } void SetHighThreshold( __int64 threshold ) { m_nHighThreshold = threshold; } void SetLowThreshold ( __int64 threshold ) { m_nLowThreshold = threshold; } void SetOffset ( __int64 offset ) { m_nOffset = offset; }protected: virtual ::EventBase::EventType TestThresholdReached(); };//==============================================================================// ServerUInt64GaugeThresholdclass ServerUInt64GaugeThreshold : public ServerGaugeThreshold{protected: unsigned __int64 m_uHighThreshold; unsigned __int64 m_uLowThreshold; unsigned __int64 m_uOffset; unsigned __int64 m_uPriorValue;public: ServerUInt64GaugeThreshold( unsigned __int64 highThreshold, unsigned __int64 lowThreshold, CLog& theLog, ThresholdManager& thresholdManager, long nGranularityPeriod = 10000 ); virtual ~ServerUInt64GaugeThreshold(); unsigned __int64 GetHighThreshold() const { return m_uHighThreshold; } unsigned __int64 GetLowThreshold () const { return m_uLowThreshold; } unsigned __int64 GetOffset () const { return m_uOffset; } void SetHighThreshold( unsigned __int64 threshold ) { m_uHighThreshold = threshold; } void SetLowThreshold ( unsigned __int64 threshold ) { m_uLowThreshold = threshold; } void SetOffset ( unsigned __int64 offset ) { m_uOffset = offset; }protected: virtual ::EventBase::EventType TestThresholdReached(); };//==============================================================================// ServerDateGaugeThresholdclass ServerDateGaugeThreshold : public ServerGaugeThreshold{protected: DATE m_dtHighThreshold; DATE m_dtLowThreshold; DATE m_dtOffset; DATE m_dtPriorValue;public: ServerDateGaugeThreshold( DATE highThreshold, DATE lowThreshold, CLog& theLog, ThresholdManager& thresholdManager, long nGranularityPeriod = 10000 ); virtual ~ServerDateGaugeThreshold(); DATE GetHighThreshold() const { return m_dtHighThreshold; } DATE GetLowThreshold () const { return m_dtLowThreshold; } DATE GetOffset () const { return m_dtOffset; } void SetHighThreshold( DATE threshold ) { m_dtHighThreshold = threshold; } void SetLowThreshold ( DATE threshold ) { m_dtLowThreshold = threshold; } void SetOffset ( DATE offset ) { m_dtOffset = offset; }protected: virtual ::EventBase::EventType TestThresholdReached(); };//==============================================================================// ServerFloatGaugeThresholdclass ServerFloatGaugeThreshold : public ServerGaugeThreshold{protected: float m_fHighThreshold; float m_fLowThreshold; float m_fOffset; float m_fPriorValue;public: ServerFloatGaugeThreshold( float highThreshold, float lowThreshold, CLog& theLog, ThresholdManager& thresholdManager, long nGranularityPeriod = 10000 ); virtual ~ServerFloatGaugeThreshold(); float GetHighThreshold() const { return m_fHighThreshold; } float GetLowThreshold () const { return m_fLowThreshold; } float GetOffset () const { return m_fOffset; } void SetHighThreshold( float threshold ) { m_fHighThreshold = threshold; } void SetLowThreshold ( float threshold ) { m_fLowThreshold = threshold; } void SetOffset ( float offset ) { m_fOffset = offset; }protected: virtual ::EventBase::EventType TestThresholdReached(); };//==============================================================================#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -