Interface IReflectedModel

All Known Subinterfaces:
IDetectorModel, IMalcolmDetectorModel, IMalcolmModel
All Known Implementing Classes:
AbstractDetectorModel, AreaDetectorRunnableDeviceExtendedModel, AreaDetectorRunnableDeviceModel, AreaDetectorWritingFilesRunnableDeviceModel, ConstantVelocityModel, DarkImageModel, DummyMalcolmDetectorModel, DummyMalcolmModel, DummyMalcolmTriggeredModel, ElectronAnalyserRunnableDeviceModel, GenericModel, MalcolmDetectorModel, MalcolmModel, MandelbrotModel, PosDetectorModel, RandomLineModel, SimpleDetectorModel, XmapRunnableDeviceModel, XmapWritingFilesRunnableDeviceModel, ZebraModel

public interface IReflectedModel
In order for models to be automatically added to the mscan command, they must have a way to get from java object to jython command. Any IDetectorModel will have a name and exposure time generated. A refected model can provide a method for doing this. This method is defaulted to reflecting the fields out of the model. Please override to provide more fine grained behaviour.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Set<String>
    TODO: this field should really be private, it is used as a constants by getCommandString(boolean) below.
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    getCommandString(boolean verbose)
    Implement to provide the command to configure a given detector.
  • Field Details

    • EXCLUDED_FIELD_NAMES

      static final Set<String> EXCLUDED_FIELD_NAMES
      TODO: this field should really be private, it is used as a constants by getCommandString(boolean) below. Unfortunately interfaces cannot have private member is Java 8. Java 9 may fix this.
  • Method Details

    • getCommandString

      default String getCommandString(boolean verbose) throws Exception
      Implement to provide the command to configure a given detector. For instance:

           detector('processing', -1, detectorName='mandelbrot', processingFile = '/tmp/something')
       
      Parameters:
      verbose -
      Returns:
      Throws:
      Exception