Class MalcolmDetectorInfo

java.lang.Object
org.eclipse.scanning.api.malcolm.MalcolmDetectorInfo
All Implemented Interfaces:
INameable

public class MalcolmDetectorInfo extends Object implements INameable
An object of this class describes the current state of a detector controlled by a malcolm device. Note: this object should not be used to configure the malcolm device, to do that modify the corresponding IMalcolmDetectorModel in the IMalcolmModel and call
invalid reference
IMalcolmDevice#configure(IMalcolmModel)
with that model. Client code should not modify this object, the setter methods are required for JSON deserialisation.

TODO: It is possible to create a Epics connection directly to this detector using its mri. In the future we may wish to do this an create something similar to IMalcolmDevice to represent a malcolm controlled detector that takes advantage of this. For now, this class is a simple dumb-bean describing the current state of the detector that is retrieved from the parent malcolm device.

  • Constructor Details

    • MalcolmDetectorInfo

      public MalcolmDetectorInfo()
    • MalcolmDetectorInfo

      public MalcolmDetectorInfo(String id, String name, int framesPerStep, double exposureTime, boolean enabled)
  • Method Details

    • getId

      public String getId()
      The id of this detector. This is the Malcolm Resource Identifier (MRI) for this detector.
      Returns:
      id
    • setId

      public void setId(String id)
    • getName

      public String getName()
      Returns the name of this detector
      Specified by:
      getName in interface INameable
      Returns:
    • setName

      public void setName(String name)
      Description copied from interface: INameable
      Set the name of the device.
      Specified by:
      setName in interface INameable
      Parameters:
      name -
    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public void setEnabled(boolean enabled)
      Whether this detector is enabled
      Parameters:
      enabled - true if the detector is enabled, false otherwise
    • getExposureTime

      public double getExposureTime()
      Get the exposure time to be used for the detector, in seconds.
      Returns:
      the exposure time in seconds. Can be zero but not negative.
    • setExposureTime

      public void setExposureTime(double exposureTime)
    • getFramesPerStep

      public int getFramesPerStep()
    • setFramesPerStep

      public void setFramesPerStep(int framesPerStep)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object