Class LogicBlock.LogicInput
java.lang.Object
neqsim.process.controllerdevice.LogicBlock.LogicInput
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
LogicBlock.ChainedLogicInput, LogicBlock.FixedLogicInput
- Enclosing class:
LogicBlock
Input definition based on a measurement device and threshold comparison.
- Version:
- 1.0
- Author:
- ESOL
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final LogicBlock.ComparatorThe comparator.protected final MeasurementDeviceInterfaceThe measurement device.private static final longprotected final doubleThe threshold value. -
Constructor Summary
ConstructorsConstructorDescriptionLogicInput(MeasurementDeviceInterface device, double threshold, LogicBlock.Comparator comparator) Create a logic input. -
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluate(double equalityTolerance) Evaluate this input to a boolean.Get the comparator.Get the measurement device.doubleGet the threshold.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
device
The measurement device. -
threshold
protected final double thresholdThe threshold value. -
comparator
The comparator.
-
-
Constructor Details
-
LogicInput
public LogicInput(MeasurementDeviceInterface device, double threshold, LogicBlock.Comparator comparator) Create a logic input.- Parameters:
device- the measurement devicethreshold- the threshold valuecomparator- how to compare
-
-
Method Details
-
evaluate
public boolean evaluate(double equalityTolerance) Evaluate this input to a boolean.- Parameters:
equalityTolerance- tolerance for EQUAL comparison- Returns:
- true if the condition is met
-
getDevice
-
getThreshold
public double getThreshold()Get the threshold.- Returns:
- the threshold
-
getComparator
-