Class IPPserver

All Implemented Interfaces:
Detector, DetectorSnapper, Device, Scannable, Configurable, Findable, gda.observable.IObservable, Serializable

public class IPPserver extends DetectorBase implements DetectorSnapper
Interface to the ImageProPlus package for data collection from a Photonics Science CCD.
See Also:
  • Constructor Details

    • IPPserver

      public IPPserver()
      The Constructor.
  • Method Details

    • finalize

      public void finalize()
      Overrides:
      finalize in class Object
    • configure

      public void configure()
      Description copied from class: ConfigurableBase
      Default 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:
      configure in interface Configurable
      Overrides:
      configure in class ConfigurableBase
    • 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:
      reconfigure in interface Configurable
      Overrides:
      reconfigure in class ConfigurableBase
      See Also:
    • asynchronousMoveTo

      public void asynchronousMoveTo(Object position) throws DeviceException
      Description copied from class: DetectorBase
      Default implementation is to set the collection time and to call the collectData method
      Specified by:
      asynchronousMoveTo in interface Scannable
      Overrides:
      asynchronousMoveTo in class DetectorBase
      Parameters:
      position - Position to move to should have an element for each input field.
      Throws:
      DeviceException
      See Also:
    • atScanStart

      public void atScanStart() throws DeviceException
      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:
      atScanStart in interface Scannable
      Overrides:
      atScanStart in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • collectData

      public void collectData() throws DeviceException
      Description copied from interface: Detector
      Tells 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:
      collectData in interface Detector
      Throws:
      DeviceException
    • acquire

      public String[] acquire() throws DeviceException
      Description copied from interface: DetectorSnapper
      Trigger an acquisition and block until complete.
      Specified by:
      acquire in interface DetectorSnapper
      Returns:
      list of all resulting files.
      Throws:
      DeviceException
    • prepareForAcquisition

      public void prepareForAcquisition(double acquisitionTime) throws DeviceException
      Description copied from interface: DetectorSnapper
      Sets the collection time for the next collection (implicitly a single image collection).
      Specified by:
      prepareForAcquisition in interface DetectorSnapper
      Parameters:
      acquisitionTime -
      Throws:
      DeviceException
    • getAcquireTime

      public double getAcquireTime() throws DeviceException
      Description copied from interface: DetectorSnapper
      Return the acquisition time resulting from the last configured collection time. This will depend on the collection strategy.
      Specified by:
      getAcquireTime in interface DetectorSnapper
      Returns:
      acquisition time in seconds
      Throws:
      DeviceException
    • getAcquirePeriod

      public double getAcquirePeriod() throws DeviceException
      Description copied from interface: DetectorSnapper
      Return the acquisition period resulting from the last configured collection time. This will depend on the collection strategy.
      Specified by:
      getAcquirePeriod in interface DetectorSnapper
      Returns:
      acquisition time in seconds
      Throws:
      DeviceException
    • getSnapshotNumTrackerExtension

      public String getSnapshotNumTrackerExtension()
    • setSnapshotNumTrackerExtension

      public void setSnapshotNumTrackerExtension(String snapshotNumTrackerExtension) throws IOException
      Throws:
      IOException
    • acquireImage

      public void acquireImage() throws DeviceException, gda.device.detector.IPPserver.DeviceBusyException
      Call 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:
      DeviceException
      gda.device.detector.IPPserver.DeviceBusyException - If a request to send a command is made while a request is already being handled.
    • readout

      public Object readout() throws DeviceException
      Description copied from interface: Detector
      Returns 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_CONCURRENTLY is true then motors may be moved while the detector readouts. The value returned must not be effected by any concurrent motor or shutter movements. See Detector.waitWhileBusy() and ConcurrentScan. Readout must block until the detector is ready to respond quickly to Detector.collectData() again.

      Specified by:
      readout in interface Detector
      Returns:
      the data collected
      Throws:
      DeviceException
    • getOutputFolderRoot

      public String getOutputFolderRoot()
      Returns:
      the output folder root pathname
    • setOutputFolderRoot

      public void setOutputFolderRoot(String outputFolderRoot)
      Parameters:
      outputFolderRoot - the output folder root pathname
    • getFileNameRoot

      public String getFileNameRoot()
      Returns:
      Returns the base for the filename.
    • setFileNameRoot

      public void setFileNameRoot(String fileNameRoot)
      Parameters:
      fileNameRoot - The base of the filename to set.
    • getFileFormat

      public String getFileFormat()
      Returns:
      Returns the file format.
    • setFileFormat

      public void setFileFormat(String fileFormat)
      Parameters:
      fileFormat - The file format to set.
    • getStatus

      public int getStatus() throws DeviceException
      Description copied from interface: Detector
      Returns the current collecting state of the device.
      Specified by:
      getStatus in interface Detector
      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

      public void setHost(String host)
      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

      public String 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

      public boolean createsOwnFiles() throws DeviceException
      Description copied from interface: Detector
      Returns 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:
      createsOwnFiles in interface Detector
      Returns:
      true if readout() returns filenames
      Throws:
      DeviceException
    • getDescription

      public String getDescription() throws DeviceException
      Specified by:
      getDescription in interface Detector
      Overrides:
      getDescription in class DetectorBase
      Returns:
      A description of the detector.
      Throws:
      DeviceException
    • getDetectorID

      public String getDetectorID() throws DeviceException
      Specified by:
      getDetectorID in interface Detector
      Overrides:
      getDetectorID in class DetectorBase
      Returns:
      A identifier for this detector.
      Throws:
      DeviceException
    • getDetectorType

      public String getDetectorType() throws DeviceException
      Specified by:
      getDetectorType in interface Detector
      Overrides:
      getDetectorType in class DetectorBase
      Returns:
      The type of detector.
      Throws:
      DeviceException
    • sendCommandJython

      public String sendCommandJython(String command) throws DeviceException
      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