RepeatedEventFilter

Inheritance diagram of RepeatedEventFilter
class RepeatedEventFilter[source]

The instances of this class will be callables that can be used as filters of repeated-value events. If the event type is Change or Periodic, it will only pass when its evt_value.value is different from that of the last event received from the same source and type. If evt_value.value is not available in the current event, the whole evt_value is used for comparison and as a future reference.

This is useful to avoid processing repetitive events.

Note that you cannot use this class as a filter: you need to use an instance of it.

Note 2: Use a different instance each time you insert this filter into a different widget unless you really know what you are doing.

Example of usage:

filters = [RepeatedEventFilter(), IGNORE_CONFIG]
filterEvent(s, t, v, filters)

Import from taurus.core.util.eventfilters as:

from taurus.core.util.eventfilters import RepeatedEventFilter