Package uk.ac.gda.devices.odin.control
Class OdinDetectorControllerEpics
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
uk.ac.gda.devices.odin.control.OdinDetectorControllerEpics
- All Implemented Interfaces:
Device,Configurable,Findable,gda.observable.IObservable,OdinDetectorController
-
Field Summary
Fields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTY -
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.voidStop the data writerdoubledoubleGet the full path to the most recent file writtenintintintintintintGet status, this will returnDetector.BUSYif either the datawriter or the detector acquisition is busyvoidprepareCamera(int frames, double requestedLiveTime, double requestedDeadTime, String imageMode, String triggerMode) Get camera ready for acquisition e.g set the exposure time and wait time (in ms).voidprepareDataWriter(int frames) Prepare the Odin Data writer this may include setting the number of expected frames or ensuring that the compression settings are as requiredvoidsetAcquirePeriod(double acquirePeriod) voidsetAcquireTime(double acquireTime) voidvoidsetCompressionMode(String mode) Set the compression mode.voidsetDataOutput(String directory, String filePrefix) Set the directory and the file prefix for the Odin datawritervoidsetNumDataWriters(int numDataWriters) voidsetNumImages(int numImages) voidsetOdinOffset(int offset) voidsetOdinUid(int uid) voidsetOffsetAndUid(int offset, int uid) Set the offet and uid for the filewriter.voidStart the camera acquiringvoidStart the data writervoidStop the camera acquiringvoidwaitForWrittenFrames(int noFrames) voidWait until the detector acquisition (exposure) is 'Done'voidWait until the datawriter is 'Done'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
-
OdinDetectorControllerEpics
public OdinDetectorControllerEpics()
-
-
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
-
setDataOutput
Description copied from interface:OdinDetectorControllerSet the directory and the file prefix for the Odin datawriter- Specified by:
setDataOutputin interfaceOdinDetectorController- Throws:
DeviceException
-
startRecording
Description copied from interface:OdinDetectorControllerStart the data writer- Specified by:
startRecordingin interfaceOdinDetectorController- Throws:
DeviceException
-
startCollection
Description copied from interface:OdinDetectorControllerStart the camera acquiring- Specified by:
startCollectionin interfaceOdinDetectorController- Throws:
DeviceException
-
stopCollection
Description copied from interface:OdinDetectorControllerStop the camera acquiring- Specified by:
stopCollectionin interfaceOdinDetectorController- Throws:
DeviceException
-
endRecording
public void endRecording()Description copied from interface:OdinDetectorControllerStop the data writer- Specified by:
endRecordingin interfaceOdinDetectorController
-
prepareCamera
public void prepareCamera(int frames, double requestedLiveTime, double requestedDeadTime, String imageMode, String triggerMode) throws DeviceException Description copied from interface:OdinDetectorControllerGet camera ready for acquisition e.g set the exposure time and wait time (in ms). Things that only need to be set at the beginning of the scan- Specified by:
prepareCamerain interfaceOdinDetectorController- Throws:
DeviceException
-
getLatestFilename
Description copied from interface:OdinDetectorControllerGet the full path to the most recent file written- Specified by:
getLatestFilenamein interfaceOdinDetectorController
-
getNumDataWriters
public int getNumDataWriters() -
setNumDataWriters
public void setNumDataWriters(int numDataWriters) -
setBasePv
-
getBasePv
-
getStatus
public int getStatus()Description copied from interface:OdinDetectorControllerGet status, this will returnDetector.BUSYif either the datawriter or the detector acquisition is busy- Specified by:
getStatusin interfaceOdinDetectorController- Returns:
- integer as defined on the
Detectorinterface
-
waitWhileAcquiring
public void waitWhileAcquiring()Description copied from interface:OdinDetectorControllerWait until the detector acquisition (exposure) is 'Done'- Specified by:
waitWhileAcquiringin interfaceOdinDetectorController
-
waitWhileWriting
public void waitWhileWriting()Description copied from interface:OdinDetectorControllerWait until the datawriter is 'Done'- Specified by:
waitWhileWritingin interfaceOdinDetectorController
-
getFileWriterDataType
-
prepareDataWriter
Description copied from interface:OdinDetectorControllerPrepare the Odin Data writer this may include setting the number of expected frames or ensuring that the compression settings are as required- Specified by:
prepareDataWriterin interfaceOdinDetectorController- Parameters:
frames- number of frames Odin Data will be expecting- Throws:
DeviceException
-
getAcquireTime
- Specified by:
getAcquireTimein interfaceOdinDetectorController- Throws:
DeviceException
-
setAcquireTime
- Specified by:
setAcquireTimein interfaceOdinDetectorController- Throws:
DeviceException
-
getAcquirePeriod
- Specified by:
getAcquirePeriodin interfaceOdinDetectorController- Throws:
DeviceException
-
setAcquirePeriod
- Specified by:
setAcquirePeriodin interfaceOdinDetectorController- Throws:
DeviceException
-
getOdinOffset
- Throws:
IOException
-
setOdinOffset
- Throws:
IOException
-
getOdinUid
- Throws:
IOException
-
setOdinUid
- Throws:
IOException
-
setOffsetAndUid
Description copied from interface:OdinDetectorControllerSet the offet and uid for the filewriter. This may be required between frames depending on collection strategy.- Specified by:
setOffsetAndUidin interfaceOdinDetectorController- Parameters:
offset-uid-- Throws:
DeviceException
-
getNumFramesCaptured
public int getNumFramesCaptured()- Specified by:
getNumFramesCapturedin interfaceOdinDetectorController
-
setNumImages
- Specified by:
setNumImagesin interfaceOdinDetectorController- Throws:
DeviceException
-
getNumImages
- Specified by:
getNumImagesin interfaceOdinDetectorController- Throws:
DeviceException
-
waitForWrittenFrames
public void waitForWrittenFrames(int noFrames) - Specified by:
waitForWrittenFramesin interfaceOdinDetectorController
-
setCompressionMode
Set the compression mode. Note that this PV has a special value which corresponds to disconnecting the filewriting- Specified by:
setCompressionModein interfaceOdinDetectorController- Parameters:
mode- can be "off", "on" or "no_hdf"- Throws:
DeviceException
-