Package uk.ac.gda.hrpd.cvscan
Class EpicsCVScan
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
uk.ac.gda.hrpd.cvscan.EpicsCVScan
- All Implemented Interfaces:
Device,InitializationListener,Configurable,Findable,gda.observable.IObservable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassclassThe start call back handler -
Field Summary
Fields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()aborts current constant velocity scan.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.doublegets the scan range of 2nd motor that participating the constant velocity scan of two-theta.doublegets the scan start position of 2nd motor that participating the constant velocity scan of two-theta.longpulls the current state of the CVScan from EPICS and update cachedcurrentstate.longreturn the latest status message that updated from EPICSdoubleintreturns the latest number of pulses completed that updated from EPICSgets the motor components that participate the subsequent constant velocity scan.String[]double[]gets the raw two-theta position where scalers/detectors are triggered.intdouble[]intdouble[]intdouble[]intgetState()returns the latest current state that updated from EPICSdoublegetTime()gets the total time of the constant velocity scan.intreturns the latest total number of pulses in this CVScan that updated from EPICSvoidCalled when all critical channels are connected.booleanisBusy()booleanbooleanvoidpause()pauses current constant velocity scan.voidset2ndMotorScanRange(double position) sets the scan range of 2nd motor that participating the constant velocity scan of two-theta.voidset2ndMotorStartPosition(double position) sets the scan start position of 2nd motor that participating the constant velocity scan of two-theta.voidsetBusy(boolean b) voidsetCollectionNumber(long collectionNumber) voidsetFileNumber(long fileNumber) voidsetGDAScanning(boolean gDAScanning) voidsetKeepSeparate(boolean b) voidsetProfile(String profile) sets the motor components that participate the subsequent constant velocity scan.voidsetPv_root(String pvRoot) voidsetTime(double time) sets the total time for the constant velocity scan.voidstart()starts, restarts, or resume the constant velocity scan.Methods 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, toString, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigured, reconfigure
-
Constructor Details
-
EpicsCVScan
public EpicsCVScan()
-
-
Method Details
-
isGDAScanning
public boolean isGDAScanning() -
setGDAScanning
public void setGDAScanning(boolean gDAScanning) -
getFileNumber
public long getFileNumber() -
setFileNumber
public void setFileNumber(long fileNumber) -
getCollectionNumber
public long getCollectionNumber() -
setCollectionNumber
public void setCollectionNumber(long collectionNumber) -
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
-
getMonitorAverage
public double getMonitorAverage() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getTime
public double getTime() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedExceptiongets the total time of the constant velocity scan.- Returns:
- total time in seconds
- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
setTime
sets the total time for the constant velocity scan.- Parameters:
time- in seconds- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
getProfile
gets the motor components that participate the subsequent constant velocity scan.- Returns:
- String motor names
- Throws:
DeviceException
-
setProfile
sets the motor components that participate the subsequent constant velocity scan.- Parameters:
profile-- Throws:
DeviceExceptionInterruptedException
-
isKeepSeparate
public boolean isKeepSeparate() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
setKeepSeparate
- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
get2ndMotorStartPosition
public double get2ndMotorStartPosition() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedExceptiongets the scan start position of 2nd motor that participating the constant velocity scan of two-theta.- Returns:
- the 2nd motor scan range.
- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
set2ndMotorStartPosition
public void set2ndMotorStartPosition(double position) throws gov.aps.jca.CAException, InterruptedException sets the scan start position of 2nd motor that participating the constant velocity scan of two-theta.- Parameters:
position-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
get2ndMotorScanRange
public double get2ndMotorScanRange() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedExceptiongets the scan range of 2nd motor that participating the constant velocity scan of two-theta.- Returns:
- the 2nd motor scan range.
- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
set2ndMotorScanRange
public void set2ndMotorScanRange(double position) throws gov.aps.jca.CAException, InterruptedException sets the scan range of 2nd motor that participating the constant velocity scan of two-theta.- Parameters:
position-- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
start
starts, restarts, or resume the constant velocity scan. The scan only starts when its current state is in one of the following modes: Done, Aborted, Paused or Fault. This is done to ensure the EPICS "Start" is never being called more than once during a constant velocity scan.- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
pause
pauses current constant velocity scan.- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
abort
aborts current constant velocity scan.- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
getCurrentState
public EpicsCVScanState getCurrentState() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedExceptionpulls the current state of the CVScan from EPICS and update cachedcurrentstate.- Returns:
- the current state
- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getRaw2ThetaPositions
public double[] getRaw2ThetaPositions() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedExceptiongets the raw two-theta position where scalers/detectors are triggered.- Returns:
- two-theta positions
- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getRaw2ThetaSize
public int getRaw2ThetaSize() -
getRebinned2ThetaPositions
public double[] getRebinned2ThetaPositions() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getRebinned2ThetaSize
public int getRebinned2ThetaSize() -
getRebinnedCounts
public double[] getRebinnedCounts() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getRebinnedCountsSize
public int getRebinnedCountsSize() -
getRebinnedCountErrors
public double[] getRebinnedCountErrors() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getRebinnedCountErrorsSize
public int getRebinnedCountErrorsSize() -
getMessage
return the latest status message that updated from EPICS- Returns:
- the cached
message
-
getState
returns the latest current state that updated from EPICS- Returns:
- the cached
currentstate
-
getNumberOfPulseDone
public int getNumberOfPulseDone()returns the latest number of pulses completed that updated from EPICS- Returns:
- the cached
numberofpulsedone
-
getTotalNumberOfPulses
public int getTotalNumberOfPulses()returns the latest total number of pulses in this CVScan that updated from EPICS- Returns:
- the cached
totalnumberofpulse
-
getPv_root
-
setPv_root
-
getProfiles
- Throws:
InterruptedException
-
initializationCompleted
Description copied from interface:InitializationListenerCalled when all critical channels are connected.- Specified by:
initializationCompletedin interfaceInitializationListener- Throws:
InterruptedException
-
isBusy
public boolean isBusy() -
setBusy
public void setBusy(boolean b)
-