Package ch.psi.wica.services.channel
Class WicaChannelValueChangeDetectingFilter
java.lang.Object
ch.psi.wica.services.channel.WicaChannelValueChangeDetectingFilter
- All Implemented Interfaces:
WicaChannelValueFilter
@ThreadSafe
class WicaChannelValueChangeDetectingFilter
extends Object
implements WicaChannelValueFilter
A filter that writes a new value to the output list every time the input
signal makes a change whose absolute value exceeds the configured deadband.
The filter only operates on values for types WicaChannelType.REAL and WicaChannelType.INTEGER. All other value types in the input list will be passed through unaffected.
Where the values in the input list indicate that the data source is offline then this will result in the transfer of the offline values to the output list. When the data source eventually comes back online then the first online value is also transferred.
In the unlikely situation where successive values from the input list are of different types the first value of the changed type is always transferred to the output list.
-
Constructor Summary
ConstructorsConstructorDescriptionWicaChannelValueChangeDetectingFilter
(double deadband) Constructs a new instance based on the specified deadband. -
Method Summary
Modifier and TypeMethodDescriptionapply
(List<WicaChannelValue> inputList) Transforms the values in the input apply to the output apply using some configurable filtering algorithm.toString()
-
Constructor Details
-
WicaChannelValueChangeDetectingFilter
WicaChannelValueChangeDetectingFilter(double deadband) Constructs a new instance based on the specified deadband.- Parameters:
deadband
- defines the absolute change in the input value which must occur in order for the new value to be transferred from the input list to the output list.
-
-
Method Details
-
apply
Description copied from interface:WicaChannelValueFilter
Transforms the values in the input apply to the output apply using some configurable filtering algorithm.- Specified by:
apply
in interfaceWicaChannelValueFilter
- Parameters:
inputList
- the list of values to process.- Returns:
- the list of values that were produced from the processing step.
-
toString
-