Package gda.device.detector
Class IPPserver
- All Implemented Interfaces:
Detector,DetectorSnapper,Device,Scannable,Configurable,Findable,gda.observable.IObservable,Serializable
Interface to the ImageProPlus package for data collection from a Photonics Science CCD.
- See Also:
-
Field Summary
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 TypeMethodDescriptionString[]acquire()Trigger an acquisition and block until complete.voidCall ImagePro ipAcqSnap command to acquire an Image, eg using a CCD camera.voidasynchronousMoveTo(Object position) Default implementation is to set the collection time and to call the collectData methodvoidSince the plugin will always create a new directory for the current day we only call this at the start of a scan as the scans may pass into the next day.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.voidfinalize()doubleReturn the acquisition period resulting from the last configured collection time.doubleReturn the acquisition time resulting from the last configured collection time.getHost()Returns the host name of the Windows PC running ImagePro.intgetPort()Get the socket number for ethernet communications.intReturns the current collecting state of the device.voidprepareForAcquisition(double acquisitionTime) Sets the collection time for the next collection (implicitly a single image collection).readout()Returns the latest data collected.voidFinalises the object (closing the port and streams) and then configures the object again (reopening them all).sendCommandJython(String command) Can be called from inside Jython Terminal/Script to run specific ImagePro API.voidsetFileFormat(String fileFormat) voidsetFileNameRoot(String fileNameRoot) voidSet the host name of the Windows PC running ImagePro.voidsetOutputFolderRoot(String outputFolderRoot) voidsetPort(int port) Set the socket number for ethernet communications.voidsetSnapshotNumTrackerExtension(String snapshotNumTrackerExtension) voidunlock()Unlocks the controller after receivingMethods inherited from class gda.device.detector.DetectorBase
checkPositionValid, endCollection, getCollectionTime, getDataDimensions, getPosition, isBusy, prepareForCollection, setCollectionTime, toFormattedStringMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, externalToInternal, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, rawAsynchronousMoveTo, rawGetPosition, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, waitWhileBusy, 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, setConfiguredMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfiguredMethods inherited from interface gda.device.Detector
getFileStructure, waitWhileBusyMethods 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
atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atPointStart, atScanEnd, atScanLineEnd, atScanLineStart, getExtraNames, getInputNames, getLevel, getOutputFormat, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, isAt, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop
-
Constructor Details
-
IPPserver
public IPPserver()The Constructor.
-
-
Method Details
-
finalize
public void finalize() -
configure
public void 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
-
reconfigure
public void reconfigure()Finalises the object (closing the port and streams) and then configures the object again (reopening them all). Re-initialisation of values and states.Moved from Reconfigurable which has been deleted
- Specified by:
reconfigurein interfaceConfigurable- Overrides:
reconfigurein classConfigurableBase- See Also:
-
asynchronousMoveTo
Description copied from class:DetectorBaseDefault implementation is to set the collection time and to call the collectData method- Specified by:
asynchronousMoveToin interfaceScannable- Overrides:
asynchronousMoveToin classDetectorBase- Parameters:
position- Position to move to should have an element for each input field.- Throws:
DeviceException- See Also:
-
atScanStart
Since the plugin will always create a new directory for the current day we only call this at the start of a scan as the scans may pass into the next day.collectData()should only be used in a scan.- Specified by:
atScanStartin interfaceScannable- Overrides:
atScanStartin classScannableBase- Throws:
DeviceException- See Also:
-
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
-
acquire
Description copied from interface:DetectorSnapperTrigger an acquisition and block until complete.- Specified by:
acquirein interfaceDetectorSnapper- Returns:
- list of all resulting files.
- Throws:
DeviceException
-
prepareForAcquisition
Description copied from interface:DetectorSnapperSets the collection time for the next collection (implicitly a single image collection).- Specified by:
prepareForAcquisitionin interfaceDetectorSnapper- Parameters:
acquisitionTime-- Throws:
DeviceException
-
getAcquireTime
Description copied from interface:DetectorSnapperReturn the acquisition time resulting from the last configured collection time. This will depend on the collection strategy.- Specified by:
getAcquireTimein interfaceDetectorSnapper- Returns:
- acquisition time in seconds
- Throws:
DeviceException
-
getAcquirePeriod
Description copied from interface:DetectorSnapperReturn the acquisition period resulting from the last configured collection time. This will depend on the collection strategy.- Specified by:
getAcquirePeriodin interfaceDetectorSnapper- Returns:
- acquisition time in seconds
- Throws:
DeviceException
-
getSnapshotNumTrackerExtension
-
setSnapshotNumTrackerExtension
- Throws:
IOException
-
acquireImage
public void acquireImage() throws DeviceException, gda.device.detector.IPPserver.DeviceBusyExceptionCall ImagePro ipAcqSnap command to acquire an Image, eg using a CCD camera. If collectionTime has been set to non-zero value, the ipAcqControl command is used to set an exposure time, before the image is aquired. N.B. ipAcqSnap blocks until image acquisition is complete. If an error occurs, a DeviceException is generated and thrown.- Throws:
DeviceExceptiongda.device.detector.IPPserver.DeviceBusyException- If a request to send a command is made while a request is already being handled.
-
readout
Description copied from interface:DetectorReturns the latest data collected. The size of the Object returned must be consistent with the values returned by getDataDimensions and getExtraNames.If
LocalProperties.GDA_SCAN_CONCURRENTSCAN_READOUT_CONCURRENTLYis true then motors may be moved while the detector readouts. The value returned must not be effected by any concurrent motor or shutter movements. SeeDetector.waitWhileBusy()andConcurrentScan. Readout must block until the detector is ready to respond quickly toDetector.collectData()again.- Specified by:
readoutin interfaceDetector- Returns:
- the data collected
- Throws:
DeviceException
-
getOutputFolderRoot
- Returns:
- the output folder root pathname
-
setOutputFolderRoot
- Parameters:
outputFolderRoot- the output folder root pathname
-
getFileNameRoot
- Returns:
- Returns the base for the filename.
-
setFileNameRoot
- Parameters:
fileNameRoot- The base of the filename to set.
-
getFileFormat
- Returns:
- Returns the file format.
-
setFileFormat
- Parameters:
fileFormat- The file format to set.
-
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
-
setHost
Set the host name of the Windows PC running ImagePro. Used by castor for instantiation.- Parameters:
host- the IP host name of the controller
-
getHost
Returns the host name of the Windows PC running ImagePro.- Returns:
- the host name.
-
setPort
public void setPort(int port) Set the socket number for ethernet communications.- Parameters:
port- the socket number.
-
getPort
public int getPort()Get the socket number for ethernet communications.- Returns:
- the port number.
-
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
-
getDescription
- Specified by:
getDescriptionin interfaceDetector- Overrides:
getDescriptionin classDetectorBase- Returns:
- A description of the detector.
- Throws:
DeviceException
-
getDetectorID
- Specified by:
getDetectorIDin interfaceDetector- Overrides:
getDetectorIDin classDetectorBase- Returns:
- A identifier for this detector.
- Throws:
DeviceException
-
getDetectorType
- Specified by:
getDetectorTypein interfaceDetector- Overrides:
getDetectorTypein classDetectorBase- Returns:
- The type of detector.
- Throws:
DeviceException
-
sendCommandJython
Can be called from inside Jython Terminal/Script to run specific ImagePro API. N.B. Only API calls supported by GDA ImagePro plugin possible.- Parameters:
command-- Returns:
- command result
- Throws:
DeviceException
-
unlock
public void unlock()Unlocks the controller after receiving
-