Package gda.device.monitor
Class AdcMonitor
- All Implemented Interfaces:
Device,Monitor,Scannable,Configurable,Findable,gda.observable.IObservable
Class to monitor an ADC
-
Field Summary
Fields 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_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.intintreturns the number of elements in this monitor.longReturns the latest value of the ADC's channel this class is monitoring Returns the current position of the Scannable.getUnit()gets the physical unit of the monitor.voidsetAdcName(String adcName) voidsetChannel(int channel) voidsetPollTime(long pollTime) Methods inherited from class gda.device.monitor.MonitorBase
asynchronousMoveTo, isBusyMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, checkPositionValid, externalToInternal, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawAsynchronousMoveTo, rawGetPosition, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, throwExceptionIfInvalidTarget, toFormattedString, toString, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getAttribute, 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
atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, atScanStart, checkPositionValid, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, toFormattedString, waitWhileBusy
-
Constructor Details
-
AdcMonitor
public AdcMonitor()Constructor.
-
-
Method Details
-
configure
Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
setAdcName
- Parameters:
adcName-
-
getAdcName
- Returns:
- name of the monitored adc
-
setChannel
public void setChannel(int channel) - Parameters:
channel-
-
getChannel
public int getChannel()- Returns:
- name of the monitored channel
-
setPollTime
public void setPollTime(long pollTime) - Parameters:
pollTime- the poll time in milliseconds
-
getPollTime
public long getPollTime()- Returns:
- The poll time.
-
getPosition
Returns the latest value of the ADC's channel this class is monitoring Returns the current position of the Scannable. Called by ConcurentScan at the end of the point. Reads an internal (hardware) position from rawGetPosition, converts this to an external (user) position and returns it.- Specified by:
getPositionin interfaceScannable- Overrides:
getPositionin classScannableBase- Returns:
- Current position with an element for each input and extra field. null if their are no fields.
- Throws:
DeviceException- See Also:
-
getElementCount
Description copied from interface:Monitorreturns the number of elements in this monitor.- Specified by:
getElementCountin interfaceMonitor- Overrides:
getElementCountin classMonitorBase- Returns:
- int the element count
- Throws:
DeviceException
-
getUnit
Description copied from interface:Monitorgets the physical unit of the monitor.- Specified by:
getUnitin interfaceMonitor- Overrides:
getUnitin classMonitorBase- Returns:
- String the physical unit
- Throws:
DeviceException
-