Infos¶
This page lists all the Infos that are defined internal to Malcolm. Note that Malcolm enabled support modules may add their own Info derived classes.
Each module may define Infos for use in the parts it defines or in other module’s parts hosted in the controllers it defines.
builtin module Infos¶
-
class
malcolm.modules.builtin.infos.LabelInfo(label: str)[source] Used to tell the Controller the label of the Block should change
Parameters: label – The new title of the Block
-
class
malcolm.modules.builtin.infos.HealthInfo(alarm: malcolm.core.alarm.Alarm, ts: malcolm.core.timestamp.TimeStamp = None)[source] Used to tell the Controller a part has an alarm or not
Parameters: alarm – The alarm that should be used for the health of the block
-
class
malcolm.modules.builtin.infos.PortInfo(name: str, port: malcolm.core.tags.Port)[source] Info about a port to be used by other child parts for connection
Parameters: - name – The name of the attribute
- port – The type of the port
-
class
malcolm.modules.builtin.infos.SinkPortInfo(name: str, port: malcolm.core.tags.Port, disconnected_value: str, value: Any)[source] Info about a Sink Port from the attribute tag
Parameters: - name – The name of the attribute
- port – The type of the port
- disconnected_value – The value that will be set when the Sink port is disconnected, E.g. ‘’ or ‘ZERO’
- value – Initial value of the attribute
-
class
malcolm.modules.builtin.infos.SourcePortInfo(name: str, port: malcolm.core.tags.Port, connected_value: str)[source] Info about a Source Port from the attribute tag
Parameters: - name – The name of the attribute
- port – The type of the port
- connected_value – The value that a Sink Port will be set to when connected to this Source Port, E.g. ‘PCOMP1.OUT’ or ‘DET.STATS’
-
class
malcolm.modules.builtin.infos.LayoutInfo(mri: str, x: float, y: float, visible: bool)[source] Info about the position and visibility of a child block in a layout
Parameters: - mri – Malcolm full name of child block
- x – X Coordinate of child block
- y – Y Coordinate of child block
- visible – Whether child block is visible
-
class
malcolm.modules.builtin.infos.PartExportableInfo(names: Sequence[str], port_infos: List[malcolm.modules.builtin.infos.PortInfo])[source] Info about the exportable fields and port infos for a Part
Parameters: - names – The list of fields that the Part thinks are exportable
- port_infos – The list of PortInfo objects that the Part exposes
-
class
malcolm.modules.builtin.infos.PartModifiedInfo(modified: Dict[str, str])[source] Info about whether the part was modified or not
Parameters: modified – {attr_name: message} for all attributes that have been modified from the saved value
-
class
malcolm.modules.builtin.infos.RequestInfo(request: malcolm.core.request.Request, mri: str)[source] Info saying that the part has received a request that needs servicing. Reporting this will send to the correct controller, but not wait for completion
Parameters: - request – The request that needs servicing, with callback filled in
- mri – The mri of the controller that should handle it
scanning module Infos¶
These are used by parts hosted in a RunnableController
-
class
malcolm.modules.scanning.infos.DatasetType[source] NeXus type of a produced dataset
-
PRIMARY= 'primary' Detector data, like the 2D data from an imaging detector
-
SECONDARY= 'secondary' Calculated from detector data, like the sum of each frame
-
MONITOR= 'monitor' Data that only makes sense when considered with detector data, like a measure of beam current with an ion chamber
-
POSITION_SET= 'position_set' The demand positions of an axis as specified by the generator
-
POSITION_VALUE= 'position_value' The readback positions of an axis that moves during the scan
-
POSITION_MIN= 'position_min' The minimum value of the readback position of an axis in each frame
-
POSITION_MAX= 'position_max' The maximum value of the readback position of an axis in each frame
-
-
class
malcolm.modules.scanning.infos.ParameterTweakInfo(parameter: str, value: Any)[source] Info about a configure() parameter that needs to be tweaked
Parameters: - parameter – Parameter name, e.g. “generator”
- value – The value it should be changed to
-
class
malcolm.modules.scanning.infos.ConfigureParamsInfo(metas: Dict[str, malcolm.core.models.VMeta], required: List[str], defaults: Dict[str, Any])[source] Info about the parameters that should be passed to the Part in configure. The Controller will validate these when Block.configure() is called, and pass them to all Parts that have registered interest in them.
Parameters: - metas – Metas for the extra parameters
- required – List of required parameters
- defaults – Default values for parameters
-
class
malcolm.modules.scanning.infos.RunProgressInfo(steps: int)[source] Info about how far the current run has progressed
Parameters: steps – The number of completed steps
-
class
malcolm.modules.scanning.infos.MinTurnaroundInfo(gap: float, interval: float)[source] Info about the minimum time gap that should be left between points that are not joined together
Parameters: - gap – The minimum time gap in seconds
- interval – the minimum interval between two turnaround points
-
class
malcolm.modules.scanning.infos.DatasetProducedInfo(name: str, filename: str, type: malcolm.modules.scanning.infos.DatasetType, rank: int, path: str, uniqueid: str)[source] Declare that we will write the following dataset to file
Parameters: - name – Dataset name
- filename – Filename relative to the fileDir we were given
- type – What NeXuS dataset type it produces
- rank – The rank of the dataset including generator dims
- path – The path of the dataset within the file
- uniqueid – The path of the UniqueID dataset within the file
-
class
malcolm.modules.scanning.infos.MotionTrigger[source] Request from a trigger source to the motion controller of what triggers it needs
-
NONE= 0 No Triggers required
-
ROW_GATE= 1 Trigger that spans each continuous joined section
-
EVERY_POINT= 2 One trigger for each point
-
-
class
malcolm.modules.scanning.infos.MotionTriggerInfo(trigger: malcolm.modules.scanning.infos.MotionTrigger)[source] Declare that we need triggers of a certain sort from the motor controller
Parameters: trigger – What type is required
-
class
malcolm.modules.scanning.infos.DetectorMutiframeInfo(mri: str)[source] Declare that we are able to produce mutiple frames per point for this detector
Parameters: mri – The mri of the detector in the DetectorTable
-
class
malcolm.modules.scanning.infos.ExposureDeadtimeInfo(readout_time: float, frequency_accuracy: float, min_exposure: float)[source] Detector exposure time should be generator.duration - deadtime
Parameters: - readout_time – The per frame readout time of the detector
- frequency_accuracy – The crystal accuracy in ppm
- min_exposure – The minimum exposure time this detector supports
-
calculate_exposure(duration: float, exposure: float = 0.0) → float[source] Calculate the exposure to set the detector to given the duration of the frame and the readout_time and frequency_accuracy
web module Infos¶
These are used by parts hosted in a HTTPServerComms.
-
class
malcolm.modules.web.infos.HandlerInfo(regexp: str, request_class: Type[<MagicMock name='mock.RequestHandler' id='139916663443664'>], **kwargs)[source] Tornado RequestHandlers that should make up the webserver application
Parameters: - regex – Path for this handler to get requests from. E.g. r”/ws”
- request_class – Request handler to instantiate for this
- **kwargs – Keyword args to be passed to request_class constructor