Class AbstractKeithley6400Series

All Implemented Interfaces:
Detector, NexusDetector, Device, Scannable, Configurable, Findable, gda.observable.IObservable
Direct Known Subclasses:
DummyKeithley6487, Keithley6487

public abstract class AbstractKeithley6400Series extends ScannableBase implements NexusDetector
  • Field Details

  • Constructor Details

    • AbstractKeithley6400Series

      public AbstractKeithley6400Series()
  • Method Details

    • getCollectionTimeS

      public abstract double getCollectionTimeS() throws DeviceException
      Throws:
      DeviceException
    • getReadbackRate

      public abstract String getReadbackRate() throws DeviceException
      Throws:
      DeviceException
    • setReadbackRate

      public abstract void setReadbackRate(double demand) throws DeviceException
      Throws:
      DeviceException
    • getReading

      public abstract double getReading() throws DeviceException
      Throws:
      DeviceException
    • isDisabled

      protected abstract boolean isDisabled() throws DeviceException
      Throws:
      DeviceException
    • getBasePVName

      public String getBasePVName()
    • setBasePVName

      public void setBasePVName(String basePVName)
    • setCollectionTime

      public void setCollectionTime(double time) throws DeviceException
      Set readback rate here instead of exposure time in scan command "scan detector exposure"
      Specified by:
      setCollectionTime in interface Detector
      Parameters:
      time - the collection time in seconds
      Throws:
      DeviceException
    • getCollectionTime

      public double getCollectionTime() throws DeviceException
      Description copied from interface: Detector
      Returns the time, in seconds, the detector collects for during the next call to collectData()
      Specified by:
      getCollectionTime in interface Detector
      Returns:
      double
      Throws:
      DeviceException
    • rawGetPosition

      public Object rawGetPosition() throws DeviceException
      Return readback rate and current in a "pos" command
      Overrides:
      rawGetPosition in class ScannableBase
      Returns:
      the value represented by this Scannable
      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
    • failure

      protected void failure(Throwable t)
    • waitWhileBusy

      public void waitWhileBusy() throws DeviceException, InterruptedException
      Description copied from class: ScannableBase
      Returns when operation carried out by moveTo has completed If this is to be overriden, isBusy must also be valid. Although the pos and scan command currently use this method to determine if the Scannable is busy, this must not be relied upon.
      Specified by:
      waitWhileBusy in interface Detector
      Specified by:
      waitWhileBusy in interface Scannable
      Overrides:
      waitWhileBusy in class ScannableBase
      Throws:
      DeviceException
      InterruptedException
    • waitForSettling

      protected void waitForSettling()
    • setOutputDemandAndWaitToSettle

      protected void setOutputDemandAndWaitToSettle(double demand)
    • setupNamesAndFormat

      protected void setupNamesAndFormat()
    • getDataDimensions

      public int[] getDataDimensions() throws DeviceException
      Description copied from interface: Detector
      Returns the dimensions of the data object returned by the Detector.readout() method.
      Specified by:
      getDataDimensions in interface Detector
      Returns:
      the dimensions of the data object returned by the Detector.readout() method
      Throws:
      DeviceException
    • rawAsynchronousMoveTo

      public void rawAsynchronousMoveTo(Object position) throws DeviceException
      Description copied from class: ScannableBase
      [Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.
      Overrides:
      rawAsynchronousMoveTo in class ScannableBase
      Parameters:
      position - Position in its internal/hardware representation. e.g. with units and offsets removed
      Throws:
      DeviceException
      See Also:
    • isBusy

      public boolean isBusy() throws DeviceException
      Description copied from interface: Scannable
      Check if the Scannable is moving/operating.
      Specified by:
      isBusy in interface Scannable
      Returns:
      true - if operation carried out by moveTo has not completed yet
      Throws:
      DeviceException
    • atScanStart

      public void atScanStart() throws DeviceException
      Description copied from class: ScannableBase
      Called for every Scannable at the start of a group of nested scans (or a single scan if that is the case) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
      Specified by:
      atScanStart in interface Scannable
      Overrides:
      atScanStart in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • atScanEnd

      public void atScanEnd() throws DeviceException
      Description copied from class: ScannableBase
      Called for every Scannable at the end of a group of nested scans (or a single scan if that is the case).

      Note that this is only called if the Scan finishes normally, or has been requested to finish early. This will not be called if the scan finishes due to an exception of any kind. See Scannable.atCommandFailure() Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.

      Specified by:
      atScanEnd in interface Scannable
      Overrides:
      atScanEnd in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • atPointEnd

      public void atPointEnd() throws DeviceException
      Description copied from class: ScannableBase
      Called on every Scannable at the end of every data point, for scans which are broken down into individual points (i.e. non-continous scans) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
      Specified by:
      atPointEnd in interface Scannable
      Overrides:
      atPointEnd in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • stop

      public void stop() throws DeviceException
      Description copied from class: ScannableBase
      Stop the current move/operation. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.
      Specified by:
      stop in interface Scannable
      Overrides:
      stop in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • atCommandFailure

      public void atCommandFailure() throws DeviceException
      Description copied from class: ScannableBase
      Hook to be used by Scan and pos commands to inform the Scannable that an exception, such as a DeviceExcpetion, has occurred. However not called when the command is aborted using an InterruptionException. If a Scan is aborted then only Scannable.stop() will be called by the Scan or pos command.

      Useful for telling Scannables which hold state during a scan for example, to reset themselves. Used for example by CoordinatedMotionScannables. This hook should be used not in the same way as the stop hook. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.

      Specified by:
      atCommandFailure in interface Scannable
      Overrides:
      atCommandFailure in class ScannableBase
      Throws:
      DeviceException
      See Also:
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface Detector
      Returns:
      A description of the detector.
    • prepareForCollection

      public void prepareForCollection() throws DeviceException
      Description copied from interface: Detector
      Method called before a scan starts. May be used to setup detector for collection, for example MAR345 uses this to erase.

      Note: it is recommended to not implement this method, but to implement one or both of Scannable.atScanLineStart() or Scannable.atScanStart() instead. Implementing this method may cause issues when the detector class is used in multi-dimensional scans.

      Specified by:
      prepareForCollection in interface Detector
      Throws:
      DeviceException
    • endCollection

      public void endCollection() throws DeviceException
      Description copied from interface: Detector
      Method called at the end of collection to tell detector when a scan has finished. Typically integrating detectors used in powder diffraction do not output until the end of the scan and need to be told when this happens.
      Specified by:
      endCollection in interface Detector
      Throws:
      DeviceException
    • 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
    • setStatus

      public void setStatus(int status)
    • getSettleTimeMs

      public long getSettleTimeMs()
    • setSettleTimeMs

      public void setSettleTimeMs(long settleTimeMs)
    • 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
    • getWaitWhileBusySleepTime

      public int getWaitWhileBusySleepTime()
    • setWaitWhileBusySleepTime

      public void setWaitWhileBusySleepTime(int waitWhileBusySleepTime)
    • getDetectorID

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

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

      public String toFormattedString()
      Description copied from interface: Scannable
      Returns a string representation of the Scannable and its current position/value/status

      Typically should return:

      name : position

      or for detectors, name : status

      If the position/status cannot be determined, the function should return Scannable.VALUE_UNAVAILABLE in its place.

      Specified by:
      toFormattedString in interface Scannable
      Overrides:
      toFormattedString in class ScannableBase
      Returns:
      string as defined above
    • getFileStructure

      public NexusTreeProvider getFileStructure() throws DeviceException
      Description copied from interface: Detector
      Returns the structure of the file. This is only needed if using NexusScanDataWriter#PROPERTY_NAME_CREATE_FILE_AT_SCAN_START is true. If null (default), then the detector is not compatible with this property and will throw an error. This must describe the nexus structure fields that the detector will later write to. *
      Specified by:
      getFileStructure in interface Detector
      Returns:
      the nexus file structure
      Throws:
      DeviceException
    • setDetectorDataEntryMap

      protected void setDetectorDataEntryMap(HashMap<?,?>... data)
    • getDetectorData

      protected NexusTreeProvider getDetectorData()
    • getPlottableValueDetectorData

      protected Set<String> getPlottableValueDetectorData()