RepeatedEventFilter

digraph inheritancef991827a61 { bgcolor=transparent; rankdir=UD; ratio=compress; size="8.0, 12.0"; "RepeatedEventFilter" [URL="#taurus.core.util.eventfilters.RepeatedEventFilter",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="The instances of this class will be callables that can be used as filters"]; }
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