Package gda.device.temperature
Class DummyTemperature
- All Implemented Interfaces:
INeXusInfoWriteable,Device,Scannable,ScannableMotion,Temperature,Configurable,Findable,gda.observable.IObservable,AlarmListener
Dummy temperature class designed to simulate the temperature interface and TemperatureBase, without threads, for unit
testing.
-
Field Summary
Fields inherited from class gda.device.temperature.TemperatureBase
bufferedData, busy, count, currentRamp, currentTemp, dataFileWriter, dataWriter, fileSuffix, LONG_POLL_TIME, longPollTime, lowerTemp, POLL_TIME, pollTime, probeNameList, rampList, setPoint, SHORT_POLL_TIME, targetTemp, timeSinceStart, upperTempFields inherited from class gda.device.scannable.ScannableMotionBase
numberTries, toleranceFields inherited from class gda.device.scannable.ScannableBase
__doc__, DEFAULT_INPUT_NAME, DEFAULT_OUTPUT_FORMAT, extraNames, inputNames, level, outputFormatFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTYFields inherited from interface gda.device.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLEFields inherited from interface gda.device.ScannableMotion
FIRSTINPUTLIMITS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoStart()protected voiddoStop()doubleGet the current temperaturedoubledoublevoidhold()Stops running ramps or moving to temperature but holds the current temperaturebooleanCheck the current temperature against the target temperaturevoidrunRamp()Run the ramp sequence.protected voidsendRamp(int ramp) voidsetHWLowerTemp(double lowLimit) voidsetHWUpperTemp(double upperLimit) voidsetTargetTemperature(double target) Template method for starting a move towards a targetTemperature.protected voidprotected voidShould send hardware commands to start heating or cooling towards a single targetTempvoidMethods inherited from class gda.device.temperature.TemperatureBase
addRamp, alarm, begin, cancelAlarm, clearRamps, configure, end, getAccuracy, getCurrentPositionArray, getDataDimensions, getFileSuffix, getLowerTemp, getPolltime, getProbeNames, getRampRate, getTargetTemperature, getUpperTemp, isBusy, isRunning, rawAsynchronousMoveTo, rawGetPosition, readout, setAccuracy, setFileSuffix, setLowerTemp, setPollerUpdatePeriod, setPolltime, setProbe, setProbeNames, setRampRate, setRamps, setUpperTemp, start, startHoldTimer, startPoller, stop, stopPoller, waitForTempMethods inherited from class gda.device.scannable.ScannableMotionBase
a, addPositionValidator, ar, asynchronousMoveTo, checkPositionValid, checkPositionWithinGdaLimits, checkPositionWithinGdaLimits, completeInstantiation, externalToInternal, generateScannableLimitsReport, getAdditionalPositionValidators, getAttribute, getFirstInputLimits, getInputLimits, getInputLimits, getLimitsComponent, getLowerGdaLimits, getNumberTries, getOffset, getScalingFactor, getTolerances, getUpperGdaLimits, internalToExternal, isAt, moveTo, r, rawIsBusy, removePositionValidator, setAdditionalPositionValidators, setLimitsComponent, setLowerGdaLimits, setLowerGdaLimits, setNumberTries, setOffset, setOffsetAndScalingComponent, setScalingFactor, setTolerance, setTolerances, setUpperGdaLimits, setUpperGdaLimits, toFormattedString, writeNeXusInformation, writeNeXusInformationLimitsMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
asynchronousMoveTo, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, checkPositionValid, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, toFormattedString, waitWhileBusy
-
Constructor Details
-
DummyTemperature
public DummyTemperature()
-
-
Method Details
-
getCurrentTemperature
Description copied from interface:TemperatureGet the current temperature- Returns:
- the current temperature
- Throws:
DeviceException
-
setTargetTemperature
Description copied from class:TemperatureBaseTemplate method for starting a move towards a targetTemperature. Subclasses must provide method startTowardsTarget which will send the necessary commands.- Specified by:
setTargetTemperaturein interfaceTemperature- Overrides:
setTargetTemperaturein classTemperatureBase- Parameters:
target- the target temperature- Throws:
DeviceException
-
isAtTargetTemperature
Description copied from interface:TemperatureCheck the current temperature against the target temperature- Specified by:
isAtTargetTemperaturein interfaceTemperature- Overrides:
isAtTargetTemperaturein classTemperatureBase- Returns:
- true if current temperature equals target temperature
- Throws:
DeviceException
-
setHWLowerTemp
- Specified by:
setHWLowerTempin classTemperatureBase- Parameters:
lowLimit-- Throws:
DeviceException
-
setHWUpperTemp
- Specified by:
setHWUpperTempin classTemperatureBase- Parameters:
upperLimit-- Throws:
DeviceException
-
getHWUpperTemp
public double getHWUpperTemp()- Returns:
- upper temperature
-
getHWLowerTemp
public double getHWLowerTemp()- Returns:
- lower temperature
-
hold
Description copied from interface:TemperatureStops running ramps or moving to temperature but holds the current temperature- Throws:
DeviceException
-
doStart
- Specified by:
doStartin classTemperatureBase- Throws:
DeviceException
-
doStop
- Specified by:
doStopin classTemperatureBase- Throws:
DeviceException
-
sendRamp
- Specified by:
sendRampin classTemperatureBase- Throws:
DeviceException
-
startNextRamp
- Specified by:
startNextRampin classTemperatureBase- Throws:
DeviceException
-
startTowardsTarget
Description copied from class:TemperatureBaseShould send hardware commands to start heating or cooling towards a single targetTemp- Specified by:
startTowardsTargetin classTemperatureBase- Throws:
DeviceException
-
temperatureUpdate
public void temperatureUpdate()- Specified by:
temperatureUpdatein classTemperatureBase
-
runRamp
Description copied from class:TemperatureBaseRun the ramp sequence.- Specified by:
runRampin classTemperatureBase- Throws:
DeviceException
-