Class EpicsBekhoffAdc
- All Implemented Interfaces:
Detector,NexusDetector,Device,Scannable,Configurable,Findable,gda.observable.IObservable,Serializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final gov.aps.jca.event.MonitorListenerprotected Stringprotected HashMap<String, DetectorDataEntry<?>> Fields inherited from class gda.device.detector.DetectorBase
collectionTimeFields 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 TypeMethodDescriptionvoidcheck bean properties have been set.voidHook to be used by Scan and pos commands to inform the Scannable that an exception, such as a DeviceExcpetion, has occurred.voidCalled on every Scannable at the end of every data point, for scans which are broken down into individual points (i.e.voidCalled on every Scannable at every data point, for scans which are broken down into individual points (i.e.voidCalled for every Scannable at the end of a group of nested scans (or a single scan if that is the case).voidCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case)voidTells the detector to begin to collect a set of data, then returns immediately.voidDefault 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.booleanReturns a value which indicates whether the detector creates its own files.intintbooleanbooleanintReturns the structure of the file.Returns the current position of the Scannable.intReturns the current collecting state of the device.booleanbooleanbooleanbooleanreadout()Returns the latest data collected as well as general detector informationvoidsetAdcAverage(int num) voidsetAdcChannel(int adcChannel) voidsetAdcEnable(boolean enabled) voidsetAdcMode(EpicsBekhoffAdc.AdcMode adcMode) voidsetAdcMode(String adcMode) Set the ADC mode, takes a string for Jython to usevoidsetAdcRetrigger(boolean enabled) voidsetAdcSamples(int num) voidsetAmplifier(AmplifierAutoGain amplifier) voidsetAutoGain(boolean autoGain) voidsetBasePVName(String basePVName) voidsetCollectionTime(double collectionTime) Sets the collection time, in seconds, to be used during the next call of collectData.protected voidsetDetectorDataEntryMap(HashMap<?, ?>... data) voidsetHasIAVinPV(boolean hasAverage) voidsetIntegrated(boolean integrated) voidsetWriteAbsValues(boolean writeAbsValues) voidstop()Stop the current move/operation.Returns a string representation of the Scannable and its current position/value/statusvoidReturns when operation carried out by moveTo has completedMethods inherited from class gda.device.detector.DetectorBase
asynchronousMoveTo, checkPositionValid, endCollection, getCollectionTime, getDataDimensions, getDescription, getDetectorID, getDetectorType, isBusy, prepareForCollectionMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atLevelEnd, atLevelMoveStart, atLevelStart, atScanLineEnd, atScanLineStart, externalToInternal, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawAsynchronousMoveTo, rawGetPosition, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, 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.Detector
endCollection, getCollectionTime, getDataDimensions, getDescription, getDetectorID, getDetectorType, prepareForCollectionMethods 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, atLevelEnd, atLevelMoveStart, atLevelStart, atScanLineEnd, atScanLineStart, checkPositionValid, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, isBusy, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes
-
Field Details
-
basePVName
-
detectorDataEntryMap
-
dataMapToWrite
-
adcStateMonitor
protected final transient gov.aps.jca.event.MonitorListener adcStateMonitor
-
-
Constructor Details
-
EpicsBekhoffAdc
protected EpicsBekhoffAdc()
-
-
Method Details
-
afterPropertiesSet
public void afterPropertiesSet()check bean properties have been set. This must be used to specify a custom init-method in an XML bean definition. -
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
-
setCollectionTime
Description copied from interface:DetectorSets the collection time, in seconds, to be used during the next call of collectData.- Specified by:
setCollectionTimein interfaceDetector- Overrides:
setCollectionTimein classDetectorBase- Parameters:
collectionTime- the collection time in seconds- Throws:
DeviceException
-
collectData
Description copied from interface:DetectorTells the detector to begin to collect a set of data, then returns immediately. Should cause the hardware to start collecting immediately: if there is any delay then detectors used in the same scan would collect over different times when beam conditions may differ.- Specified by:
collectDatain interfaceDetector- Throws:
DeviceException
-
waitWhileBusy
Description copied from class:ScannableBaseReturns when operation carried out by moveTo has completed If this is to be overriden, isBusy must also be valid. Although the pos and scan command currently use this method to determine if the Scannable is busy, this must not be relied upon.- Specified by:
waitWhileBusyin interfaceDetector- Specified by:
waitWhileBusyin interfaceScannable- Overrides:
waitWhileBusyin classScannableBase- Throws:
DeviceExceptionInterruptedException
-
getStatus
Description copied from interface:DetectorReturns the current collecting state of the device.- Specified by:
getStatusin interfaceDetector- Returns:
- BUSY if the detector has not finished the requested operation(s), IDLE if in an completely idle state and STANDBY if temporarily suspended.
- Throws:
DeviceException
-
getAdcStatus
- Throws:
DeviceException
-
createsOwnFiles
Description copied from interface:DetectorReturns a value which indicates whether the detector creates its own files. If it does (return true) the readout() method returns the name of the latest file created as a string. If it does not (return false) the readout() method will return the data directly.- Specified by:
createsOwnFilesin interfaceDetector- Returns:
- true if readout() returns filenames
- Throws:
DeviceException
-
atScanStart
Description copied from class:ScannableBaseCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanStartin interfaceScannable- Overrides:
atScanStartin classScannableBase- Throws:
DeviceException- See Also:
-
atScanEnd
Description copied from class:ScannableBaseCalled for every Scannable at the end of a group of nested scans (or a single scan if that is the case).Note that this is only called if the Scan finishes normally, or has been requested to finish early. This will not be called if the scan finishes due to an exception of any kind. See
Scannable.atCommandFailure()Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanEndin interfaceScannable- Overrides:
atScanEndin classScannableBase- Throws:
DeviceException- See Also:
-
atPointStart
Description copied from class:ScannableBaseCalled on every Scannable at every data point, for scans which are broken down into individual points (i.e. non-continuous scans) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atPointStartin interfaceScannable- Overrides:
atPointStartin classScannableBase- Throws:
DeviceException- See Also:
-
atPointEnd
Description copied from class:ScannableBaseCalled on every Scannable at the end of every data point, for scans which are broken down into individual points (i.e. non-continous scans) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atPointEndin interfaceScannable- Overrides:
atPointEndin classScannableBase- Throws:
DeviceException- See Also:
-
atCommandFailure
Description copied from class:ScannableBaseHook to be used by Scan and pos commands to inform the Scannable that an exception, such as a DeviceExcpetion, has occurred. However not called when the command is aborted using an InterruptionException. If a Scan is aborted then onlyScannable.stop()will be called by the Scan or pos command.Useful for telling Scannables which hold state during a scan for example, to reset themselves. Used for example by CoordinatedMotionScannables. This hook should be used not in the same way as the stop hook. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
- Specified by:
atCommandFailurein interfaceScannable- Overrides:
atCommandFailurein classScannableBase- Throws:
DeviceException- See Also:
-
stop
Description copied from class:ScannableBaseStop the current move/operation. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
stopin interfaceScannable- Overrides:
stopin classScannableBase- Throws:
DeviceException- See Also:
-
readout
Description copied from interface:NexusDetectorReturns the latest data collected as well as general detector information- Specified by:
readoutin interfaceDetector- Specified by:
readoutin interfaceNexusDetector- Returns:
- the data collected
- Throws:
DeviceException
-
getFileStructure
Description copied from interface:DetectorReturns the structure of the file. This is only needed if usingNexusScanDataWriter#PROPERTY_NAME_CREATE_FILE_AT_SCAN_STARTis true. If null (default), then the detector is not compatible with this property and will throw an error. This must describe the nexus structure fields that the detector will later write to. *- Specified by:
getFileStructurein interfaceDetector- Returns:
- the nexus file structure
- Throws:
DeviceException
-
setDetectorDataEntryMap
- Throws:
DeviceException
-
getPosition
Description copied from class:DetectorBaseReturns 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. Also, if createsOwnFiles attempts to register the file with all FileRegistrars (primarily for data archiving). Note that this method will be called if the detector is triggered from a 'pos' command but not if the detector is triggered by the scan command (which ignores the detector's scannable interface).- Specified by:
getPositionin interfaceScannable- Overrides:
getPositionin classDetectorBase- Returns:
- Current position with an element for each input and extra field. null if their are no fields.
- Throws:
DeviceException- See Also:
-
setAdcMode
Set the ADC mode, takes a string for Jython to use- Parameters:
adcMode- The requested ADC mode- Throws:
DeviceException
-
setAdcMode
- Throws:
DeviceException
-
getAdcMode
- Throws:
DeviceException
-
getAdcSamples
- Throws:
DeviceException
-
setAdcSamples
- Throws:
DeviceException
-
getAdcAverage
- Throws:
DeviceException
-
setAdcAverage
- Throws:
DeviceException
-
setAdcEnable
- Throws:
DeviceException
-
getAdcEnable
- Throws:
DeviceException
-
setAdcRetrigger
- Throws:
DeviceException
-
getAdcRetrigger
- Throws:
DeviceException
-
toFormattedString
Description copied from interface:ScannableReturns a string representation of the Scannable and its current position/value/statusTypically should return:
name : position
or for detectors, name : status
If the position/status cannot be determined, the function should return
Scannable.VALUE_UNAVAILABLEin its place.- Specified by:
toFormattedStringin interfaceScannable- Overrides:
toFormattedStringin classDetectorBase- Returns:
- string as defined above
-
getBasePVName
-
setBasePVName
-
getAdcChannel
public int getAdcChannel() -
setAdcChannel
public void setAdcChannel(int adcChannel) -
isAutoGain
public boolean isAutoGain() -
setAutoGain
public void setAutoGain(boolean autoGain) -
isHasIAVinPV
public boolean isHasIAVinPV() -
setHasIAVinPV
public void setHasIAVinPV(boolean hasAverage) -
isIntegrated
public boolean isIntegrated() -
setIntegrated
public void setIntegrated(boolean integrated) -
getAmplifier
-
setAmplifier
-
isWriteAbsValues
public boolean isWriteAbsValues() -
setWriteAbsValues
public void setWriteAbsValues(boolean writeAbsValues)
-