Package gda.hrpd.pmac
Class EpicsCVScanController
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.hrpd.pmac.EpicsCVScanController
- All Implemented Interfaces:
Device,InitializationListener,Configurable,Findable,gda.observable.IObservable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic enumclassclassThe 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.longdouble[]getMAC1X()intdouble[]getMAC1Y()intdouble[]getMAC2X()intdouble[]getMAC2Y()intdouble[]getMAC3X()intdouble[]getMAC3Y()intdouble[]getMAC4X()intdouble[]getMAC4Y()intdouble[]getMAC5X()intdouble[]getMAC5Y()intreturn the latest status message that updated from EPICSdoubleintreturns the latest number of pulses completed that updated from EPICSintpulls the number of pulse done from EPICS and update cachednumberofpulsedonevaluegets 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 EPICSpulls the status message from EPICS and update cachedmessagevaluedoublegetTime()gets the total time of the constant velocity scan.intreturns the latest total number of pulses in this CVScan that updated from EPICSintpulls the total number of pulse from EPICS and update cachedtotalnumberofpulsevaluevoidCalled when all critical channels are connected.booleanisBusy()booleanbooleanbooleanisLive()voidpause()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) voidsetLive(boolean live) voidsetPlotPanelName(String plotPanelName) 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
-
EpicsCVScanController
public EpicsCVScanController()
-
-
Method Details
-
isGDAScanning
public boolean isGDAScanning() -
setGDAScanning
public void setGDAScanning(boolean gDAScanning) -
getFileNumber
public long getFileNumber() -
setFileNumber
public void setFileNumber(long fileNumber) -
isLive
public boolean isLive() -
setLive
public void setLive(boolean live) -
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
-
getMonitorAvaerage
public double getMonitorAvaerage() 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, or Paused. 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 EpicsCVScanController.CurrentState 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
-
getStatusMessage
public String getStatusMessage() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedExceptionpulls the status message from EPICS and update cachedmessagevalue- Returns:
- the status message as String
- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getNumberOfPulsesDone
public int getNumberOfPulsesDone() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedExceptionpulls the number of pulse done from EPICS and update cachednumberofpulsedonevalue- Returns:
- the status message as String
- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getTotalNumberPulses
public int getTotalNumberPulses() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedExceptionpulls the total number of pulse from EPICS and update cachedtotalnumberofpulsevalue- Returns:
- the status message as String
- 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() -
getMAC1X
public double[] getMAC1X() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getMAC1XSize
public int getMAC1XSize() -
getMAC2X
public double[] getMAC2X() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getMAC2XSize
public int getMAC2XSize() -
getMAC3X
public double[] getMAC3X() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getMAC3XSize
public int getMAC3XSize() -
getMAC4X
public double[] getMAC4X() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getMAC4XSize
public int getMAC4XSize() -
getMAC5X
public double[] getMAC5X() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getMAC5XSize
public int getMAC5XSize() -
getMAC1Y
public double[] getMAC1Y() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getMAC1YSize
public int getMAC1YSize() -
getMAC2Y
public double[] getMAC2Y() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getMAC2YSize
public int getMAC2YSize() -
getMAC3Y
public double[] getMAC3Y() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getMAC3YSize
public int getMAC3YSize() -
getMAC4Y
public double[] getMAC4Y() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getMAC4YSize
public int getMAC4YSize() -
getMAC5Y
public double[] getMAC5Y() throws gov.aps.jca.TimeoutException, gov.aps.jca.CAException, InterruptedException- Throws:
gov.aps.jca.TimeoutExceptiongov.aps.jca.CAExceptionInterruptedException
-
getMAC5YSize
public int getMAC5YSize() -
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
-
getPlotPanelName
-
setPlotPanelName
-
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)
-