malcolm.modules.ADCore.parts¶
-
class
malcolm.modules.ADCore.parts.DetectorDriverPart(name: Anno(name='APartName', typ=<class 'str'>, description='The name of the Part within the Controller'), mri: Anno(name='AMri', typ=<class 'str'>, description='Malcolm resource id of child object'), soft_trigger_modes: Union[Anno(name='ASoftTriggerModes', typ=<class 'str'>, description='List of trigger modes that do not use hardware triggers'), Sequence[str]] = None, main_dataset_useful: Anno(name='AMainDatasetUseful', typ=<class 'bool'>, description='Is main detector dataset useful to publish in DatasetTable?') = True, runs_on_windows: Anno(name='APartRunsOnWindows', typ=<class 'bool'>, description='Is the IOC this part connects to running on Windows?') = False, required_version: Anno(name='AVersionRequirement', typ=<class 'str'>, description='Minimum required version for compatibility') = None)[source]¶ Parameters: - name (str) – The name of the Part within the Controller
- mri (str) – Malcolm resource id of child object
- soft_trigger_modes (str) – List of trigger modes that do not use hardware triggers
- main_dataset_useful (bool) – Is main detector dataset useful to publish in DatasetTable?
- runs_on_windows (bool) – Is the IOC this part connects to running on Windows?
- required_version (str) – Minimum required version for compatibility
-
setup(registrar: malcolm.core.part.PartRegistrar) → None[source]¶ Use the given
PartRegistrarto populate the hooks and fields. This function is called for all parts in a block when the block’sControlleris added to aProcess
-
on_reset(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks')) → None[source]¶ Parameters: context (Context) – Context that should be used to perform operations on child blocks
-
on_report_status() → Union[Anno(name='AInfos', typ=<class 'malcolm.core.info.Info'>, description='Infos about current Part status to be passed to other parts'), Sequence[malcolm.core.info.Info], malcolm.core.info.Info, None][source]¶ Returns: Infos about current Part status to be passed to other parts Return type: Info
-
on_configure(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks'), completed_steps: Anno(name='ACompletedSteps', typ=<class 'int'>, description='Number of steps already completed'), steps_to_do: Anno(name='AStepsToDo', typ=<class 'int'>, description='Number of steps we should configure for'), part_info: Anno(name='APartInfo', typ=(<class 'str'>, annotypes._array.Array[malcolm.core.info.Info]), description='The Infos returned from other Parts'), generator: Anno(name='AGenerator', typ=<MagicMock name='mock.CompoundGenerator' id='139916666047248'>, description='Generator instance providing specification for scan'), fileDir: Anno(name='AFileDir', typ=<class 'str'>, description='Directory to write data to'), **kwargs) → None[source]¶ Parameters: - context (Context) – Context that should be used to perform operations on child blocks
- completed_steps (int) – Number of steps already completed
- steps_to_do (int) – Number of steps we should configure for
- part_info – The Infos returned from other Parts
- generator – Generator instance providing specification for scan
- fileDir (str) – Directory to write data to
-
on_run(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks')) → None[source]¶ Parameters: context (Context) – Context that should be used to perform operations on child blocks
-
class
malcolm.modules.ADCore.parts.FilepathTranslatorPart(name: Anno(name='APartName', typ=<class 'str'>, description='The name of the Part within the Controller'), initial_windows_drive_letter: Anno(name='ADriveLetter', typ=<class 'str'>, description='Letter assigned to the windows drive mount'), initial_path_prefix: Anno(name='APathPrefix', typ=<class 'str'>, description='The first bit of the file path (i.e. /dls for /dls/i18/...)') = '/dls', initial_network_prefix: Anno(name='ANetworkPrefix', typ=<class 'str'>, description='The path prefix if it is a network mount (e.g. //dc)') = '')[source]¶ Parameters: - name (str) – The name of the Part within the Controller
- initial_windows_drive_letter (str) – Letter assigned to the windows drive mount
- initial_path_prefix (str) – The first bit of the file path (i.e. /dls for /dls/i18/…)
- initial_network_prefix (str) – The path prefix if it is a network mount (e.g. //dc)
-
setup(registrar: malcolm.core.part.PartRegistrar) → None[source]¶ Use the given
PartRegistrarto populate the hooks and fields. This function is called for all parts in a block when the block’sControlleris added to aProcess
-
on_report_status() → Union[Anno(name='AInfos', typ=<class 'malcolm.core.info.Info'>, description='Infos about current Part status to be passed to other parts'), Sequence[malcolm.core.info.Info], malcolm.core.info.Info, None][source]¶ Returns: Infos about current Part status to be passed to other parts Return type: Info
-
class
malcolm.modules.ADCore.parts.HDFWriterPart(name: Anno(name='APartName', typ=<class 'str'>, description='The name of the Part within the Controller'), mri: Anno(name='AMri', typ=<class 'str'>, description='Malcolm resource id of child object'), runs_on_windows: Anno(name='APartRunsOnWindows', typ=<class 'bool'>, description='Is the IOC this part connects to running on Windows?') = False, write_all_nd_attributes: Anno(name='AWriteAllNDAttributes', typ=<class 'bool'>, description='Toggle writing of all ND attributes to HDF file') = True)[source]¶ Part for controlling an
hdf_writer_blockin a DeviceParameters: -
on_reset(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks')) → None[source]¶ Parameters: context (Context) – Context that should be used to perform operations on child blocks
-
setup(registrar: malcolm.core.part.PartRegistrar) → None[source]¶ Use the given
PartRegistrarto populate the hooks and fields. This function is called for all parts in a block when the block’sControlleris added to aProcess
-
on_configure(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks'), completed_steps: Anno(name='ACompletedSteps', typ=<class 'int'>, description='Number of steps already completed'), steps_to_do: Anno(name='AStepsToDo', typ=<class 'int'>, description='Number of steps we should configure for'), part_info: Anno(name='APartInfo', typ=(<class 'str'>, annotypes._array.Array[malcolm.core.info.Info]), description='The Infos returned from other Parts'), generator: Anno(name='AGenerator', typ=<MagicMock name='mock.CompoundGenerator' id='139916666047248'>, description='Generator instance providing specification for scan'), fileDir: Anno(name='AFileDir', typ=<class 'str'>, description='Directory to write data to'), formatName: Anno(name='AFormatName', typ=<class 'str'>, description='Argument for fileTemplate, normally filename without extension') = 'det', fileTemplate: Anno(name='AFileTemplate', typ=<class 'str'>, description='Printf style template to generate filename relative to fileDir.\nArguments are:\n 1) %s: the value of formatName') = '%s.h5') → Union[Anno(name='AInfos', typ=<class 'malcolm.core.info.Info'>, description='Infos about current Part status to be passed to other parts'), Sequence[malcolm.core.info.Info], malcolm.core.info.Info, None][source]¶ Parameters: - context (Context) – Context that should be used to perform operations on child blocks
- completed_steps (int) – Number of steps already completed
- steps_to_do (int) – Number of steps we should configure for
- part_info – The Infos returned from other Parts
- generator – Generator instance providing specification for scan
- fileDir (str) – Directory to write data to
- formatName (str) – Argument for fileTemplate, normally filename without extension
- fileTemplate (str) – Printf style template to generate filename relative to fileDir. Arguments are: 1) %s: the value of formatName
Returns: Infos about current Part status to be passed to other parts
Return type:
-
on_seek(completed_steps: Anno(name='ACompletedSteps', typ=<class 'int'>, description='Number of steps already completed'), steps_to_do: Anno(name='AStepsToDo', typ=<class 'int'>, description='Number of steps we should configure for')) → None[source]¶ Parameters:
-
on_run(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks')) → None[source]¶ Parameters: context (Context) – Context that should be used to perform operations on child blocks
-
-
class
malcolm.modules.ADCore.parts.PositionLabellerPart(name: Anno(name='APartName', typ=<class 'str'>, description='The name of the Part within the Controller'), mri: Anno(name='AMri', typ=<class 'str'>, description='Malcolm resource id of child object'), initial_visibility: Optional[Anno(name='AInitialVisibility', typ=<class 'bool'>, description='Whether the part is initially visible with no config loaded, None means only if child Source/Sink Ports connect to another Block')] = None, stateful: Anno(name='AStateful', typ=<class 'bool'>, description='If the child is a StatefulController then this should be True') = True)[source]¶ Part for controlling a
position_labeller_blockin a scanParameters: - name (str) – The name of the Part within the Controller
- mri (str) – Malcolm resource id of child object
- initial_visibility (bool) – Whether the part is initially visible with no config loaded, None means only if child Source/Sink Ports connect to another Block
- stateful (bool) – If the child is a StatefulController then this should be True
-
setup(registrar: malcolm.core.part.PartRegistrar) → None[source]¶ Use the given
PartRegistrarto populate the hooks and fields. This function is called for all parts in a block when the block’sControlleris added to aProcess
-
on_reset(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks')) → None[source]¶ Parameters: context (Context) – Context that should be used to perform operations on child blocks
-
on_configure(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks'), completed_steps: Anno(name='ACompletedSteps', typ=<class 'int'>, description='Number of steps already completed'), generator: Anno(name='AGenerator', typ=<MagicMock name='mock.CompoundGenerator' id='139916666047248'>, description='Generator instance providing specification for scan')) → None[source]¶ Parameters:
-
class
malcolm.modules.ADCore.parts.StatsPluginPart(name: Anno(name='APartName', typ=<class 'str'>, description='The name of the Part within the Controller'), mri: Anno(name='AMri', typ=<class 'str'>, description='Malcolm resource id of child object'), statistic: Anno(name='AStatsName', typ=<enum 'StatisticsName'>, description='Which statistic to capture') = <StatisticsName.SUM: 'TOTAL'>, runs_on_windows: Anno(name='APartRunsOnWindows', typ=<class 'bool'>, description='Is the IOC this part connects to running on Windows?') = False)[source]¶ Part for controlling a
stats_plugin_blockin a DeviceParameters: - name (str) – The name of the Part within the Controller
- mri (str) – Malcolm resource id of child object
- statistic (StatisticsName) – Which statistic to capture
- runs_on_windows (bool) – Is the IOC this part connects to running on Windows?
-
setup(registrar: malcolm.core.part.PartRegistrar) → None[source]¶ Use the given
PartRegistrarto populate the hooks and fields. This function is called for all parts in a block when the block’sControlleris added to aProcess
-
on_report_status() → Union[Anno(name='AInfos', typ=<class 'malcolm.core.info.Info'>, description='Infos about current Part status to be passed to other parts'), Sequence[malcolm.core.info.Info], malcolm.core.info.Info, None][source]¶ Returns: Infos about current Part status to be passed to other parts Return type: Info
-
on_configure(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks'), part_info: Anno(name='APartInfo', typ=(<class 'str'>, annotypes._array.Array[malcolm.core.info.Info]), description='The Infos returned from other Parts'), fileDir: Anno(name='AFileDir', typ=<class 'str'>, description='Directory to write data to')) → None[source]¶ Parameters: