An EventModerationPolicy controls the frequency of events sent when an evented sensor or state variable changes. Any class or class template that fulfills the following criteria can be used as EventModerationPolicy:
- The class must provide a public member function named valueChanged that takes as only argument the new value of the state variable (passed by const reference).
- valueChanged() must check whether the criteria for firing an event are fulfilled, and in if this is the case, fire the event.
- Typically, the Poco::BasicEvent instance will be passed to the policy object through the constructor.
Member Functions: valueChanged
virtual void valueChanged(
const T & newValue
) = 0;