Class SampleEnvironmentVariable
java.lang.Object
gda.factory.FindableBase
uk.ac.diamond.daq.experiment.plan.SampleEnvironmentVariable
- All Implemented Interfaces:
Findable,ISampleEnvironmentVariable
Instances of this class will poll a
Scannable at a specified frequency, and
when the signal changes significantly (i.e. change >= tolerance), will notify its SEVListeners.
It will stop sampling if there are no listeners registered.-
Constructor Summary
ConstructorsConstructorDescriptionSampleEnvironmentVariable(Scannable scannable) SampleEnvironmentVariable(Scannable scannable, double tolerance) SampleEnvironmentVariable(DoubleSupplier externalSource) SampleEnvironmentVariable(DoubleSupplier externalSource, double tolerance) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(SEVListener listener) booleandoubleread()voidremoveListener(SEVListener listener) toString()Methods inherited from class gda.factory.FindableBase
equals, getName, hashCode, setNameMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface uk.ac.diamond.daq.experiment.api.plan.ISampleEnvironmentVariable
getName
-
Constructor Details
-
SampleEnvironmentVariable
-
SampleEnvironmentVariable
-
SampleEnvironmentVariable
-
SampleEnvironmentVariable
-
-
Method Details
-
addListener
Description copied from interface:ISampleEnvironmentVariableRegister either anITriggeror anISegmentto this SEV. If it is the first SEVListener, the SEV will begin.- Specified by:
addListenerin interfaceISampleEnvironmentVariable- Parameters:
listener-
-
removeListener
Description copied from interface:ISampleEnvironmentVariable- Specified by:
removeListenerin interfaceISampleEnvironmentVariable- Parameters:
listener-
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceISampleEnvironmentVariable
-
read
public double read()- Specified by:
readin interfaceISampleEnvironmentVariable
-
getListeners
- Specified by:
getListenersin interfaceISampleEnvironmentVariable
-
toString
-