Package org.eclipse.scanning.api.malcolm
Class MalcolmDetectorInfo
java.lang.Object
org.eclipse.scanning.api.malcolm.MalcolmDetectorInfo
- All Implemented Interfaces:
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
with that model. Client code should not
modify this object, the setter methods are required for JSON deserialisation.
IMalcolmDetectorModel in the IMalcolmModel and call
invalid reference
IMalcolmDevice#configure(IMalcolmModel)
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 Summary
ConstructorsConstructorDescriptionMalcolmDetectorInfo(String id, String name, int framesPerStep, double exposureTime, boolean enabled) -
Method Summary
Modifier and TypeMethodDescriptionbooleandoubleGet the exposure time to be used for the detector, in seconds.intgetId()The id of this detector.getName()Returns the name of this detectorinthashCode()booleanvoidsetEnabled(boolean enabled) Whether this detector is enabledvoidsetExposureTime(double exposureTime) voidsetFramesPerStep(int framesPerStep) voidvoidSet the name of the device.toString()
-
Constructor Details
-
MalcolmDetectorInfo
public MalcolmDetectorInfo() -
MalcolmDetectorInfo
-
-
Method Details
-
getId
The id of this detector. This is the Malcolm Resource Identifier (MRI) for this detector.- Returns:
- id
-
setId
-
getName
Returns the name of this detector -
setName
Description copied from interface:INameableSet the name of the device. -
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean enabled) Whether this detector is enabled- Parameters:
enabled-trueif the detector is enabled,falseotherwise
-
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() -
equals
-
toString
-