Class EpicsDlsMcsSis3820Controller
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.detector.multichannelscaler.EpicsDlsMcsSis3820Controller
- All Implemented Interfaces:
Device,InitializationListener,Configurable,Findable,gda.observable.IObservable
mapping class for EPICS dlsMcsSIS3820 template. Note the current implementation treats MCA records in this template
as PV only because we only use it to collect spectrum data from detectors, all the controls for MCAs are wrapped by
this template. This may change in the future.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumclassMonitor value array - ????could this be removed as no observer is add to handle this event after sending to EpicsDlsMcsSis3820????? -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intMaximum number of bins in spectrumstatic final intMaximum number of MCA record supported by EPICS DlsMcsSis3820 templateFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDataMonitor(int channel, EpicsDlsMcsSis3820Controller.DataMonitor ml) 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.voidvoidvoiderase()Erases the data array of the MCAvoidActivates the MCA using the Erase invalid input: '&' Start acquire.intGets acquire status from MCA (poll from hardware)Gets the internal or external bin advance signalint[][]getData()Gets all spectrum data from all channelsint[]getData(int channel) Gets the spectrum data for the specified channelgov.aps.jca.ChannelgetDataChannel(int index) Gets the data Channel ID.doubleGets the integration time in seconds for incrementing bin number.doubleGets the external bin advance pre-scaler, i.e.longGets the number of bins to use in spectrum.intGets number of MCA records in this templatevoidgetReadRate(String value) Gets the current read update rate from DlsMcsSIS3820.String[]Gets all available read update rates from EPICS IOCdoubleGets the real time since the start of acquisitionGet Epics Record nameGet current dlsMcsSIS3820 statusdoubleGets the total count/acquisition timevoidCalled when all critical channels are connected.booleanvoidSets the internal or external bin advance signalvoidsetDwellTime(double time) Sets the integration time in seconds for incrementing bin number, i.e.voidsetExternalPreScaler(String value) Sets the external bin advance per-scaler, i.e.voidsetNumberOfBins(long nbins) Sets the number of bins (array elements) to use in spectrum.voidsetNumberOfMca(int numberOfMca) Sets number of MCA record in this template.voidsetPollElapsedRealTime(boolean pollElapsedRealTime) voidsetReadRate(String value) Sets a new read update rate for DlsMcsSIS3820.voidsetRecordName(String recordName) Sets EPICS record namevoidsetTotalTime(double value) Sets the total count/acquisition timevoidstart()Starts data acquisitionvoidstop()Stops data acquisitionMethods 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
-
Field Details
-
MAXIMUM_NUMBER_OF_MCA
public static final int MAXIMUM_NUMBER_OF_MCAMaximum number of MCA record supported by EPICS DlsMcsSis3820 template- See Also:
-
MAXIMUM_NUMBER_BINS
public static final int MAXIMUM_NUMBER_BINSMaximum number of bins in spectrum- See Also:
-
-
Constructor Details
-
EpicsDlsMcsSis3820Controller
public EpicsDlsMcsSis3820Controller()
-
-
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
-
getDataChannel
public gov.aps.jca.Channel getDataChannel(int index) Gets the data Channel ID.- Parameters:
index-- Returns:
- data channel ID
-
eraseStart
Activates the MCA using the Erase invalid input: '&' Start acquire.- Throws:
DeviceException
-
erase
Erases the data array of the MCA- Throws:
DeviceException
-
start
Starts data acquisition- Throws:
DeviceException
-
stop
Stops data acquisition- Throws:
DeviceException
-
getNumberOfBins
Gets the number of bins to use in spectrum.- Returns:
- the number of channels to use
- Throws:
DeviceException
-
setNumberOfBins
Sets the number of bins (array elements) to use in spectrum.- Parameters:
nbins-- Throws:
DeviceException
-
setReadRate
Sets a new read update rate for DlsMcsSIS3820.- Parameters:
value-- Throws:
DeviceException
-
getReadRate
Gets the current read update rate from DlsMcsSIS3820.- Parameters:
value-- Throws:
DeviceException
-
getRealTime
Gets the real time since the start of acquisition- Returns:
- elapsed real time
- Throws:
DeviceException
-
getAcquiringStatus
Gets acquire status from MCA (poll from hardware)- Returns:
- 0 done, 1 Acquire
- Throws:
DeviceException
-
getTotalTime
Gets the total count/acquisition time- Returns:
- elapsed real time
- Throws:
DeviceException
-
setTotalTime
Sets the total count/acquisition time- Parameters:
value-- Throws:
DeviceException
-
getDwellTime
Gets the integration time in seconds for incrementing bin number. i.e. the Dwell Time (DWEL) per bin.- Returns:
- Dwell Time
- Throws:
DeviceException
-
setDwellTime
Sets the integration time in seconds for incrementing bin number, i.e.- Parameters:
time-- Throws:
DeviceException
-
getBinAdv
Gets the internal or external bin advance signal- Returns:
- internal or external
- Throws:
DeviceException
-
setBinAdv
Sets the internal or external bin advance signal- Parameters:
value-- Throws:
DeviceException
-
getExternalPreScaler
Gets the external bin advance pre-scaler, i.e. advance step.- Returns:
- bin advance pre-scaler
- Throws:
DeviceException
-
setExternalPreScaler
Sets the external bin advance per-scaler, i.e. advance step size, default is 1.- Parameters:
value-- Throws:
DeviceException
-
getData
Gets all spectrum data from all channels- Returns:
- spectrum data
- Throws:
DeviceException
-
getData
Gets the spectrum data for the specified channel- Parameters:
channel-- Returns:
- spectrum data
- Throws:
DeviceException
-
addDataMonitor
public void addDataMonitor(int channel, EpicsDlsMcsSis3820Controller.DataMonitor ml) throws DeviceException - Parameters:
channel-ml-- Throws:
DeviceException
-
getStatus
Get current dlsMcsSIS3820 status- Returns:
- MCA status
-
initializationCompleted
public void initializationCompleted()Description copied from interface:InitializationListenerCalled when all critical channels are connected.- Specified by:
initializationCompletedin interfaceInitializationListener
-
disablePollRealTime
public void disablePollRealTime() -
enablePollRealTime
public void enablePollRealTime() -
getReadRates
Gets all available read update rates from EPICS IOC- Returns:
- available read update rates
- Throws:
DeviceException
-
getRecordName
Get Epics Record name- Returns:
- record name
-
setRecordName
Sets EPICS record name- Parameters:
recordName-
-
getNumberOfMca
public int getNumberOfMca()Gets number of MCA records in this template- Returns:
- number of MCA record supported
-
setNumberOfMca
public void setNumberOfMca(int numberOfMca) Sets number of MCA record in this template.- Parameters:
numberOfMca-
-
isPollElapsedRealTime
public boolean isPollElapsedRealTime() -
setPollElapsedRealTime
public void setPollElapsedRealTime(boolean pollElapsedRealTime)
-