malcolm.modules.ADOdin.parts¶
-
class
malcolm.modules.ADOdin.parts.OdinWriterPart(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: 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') = True, uid_name: Anno(name='AUidName', typ=<class 'str'>, description='name of uid dataset') = 'uid', sum_name: Anno(name='ASumName', typ=<class 'str'>, description='name of sum dataset') = 'sum', secondary_set: Anno(name='ASecondaryDataset', typ=<class 'str'>, description='name of secondary dataset (e.g. sum)') = 'sum')[source]¶ Part for controlling an
hdf_writer_blockin a DeviceParameters: - 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
- uid_name (str) – name of uid dataset
- sum_name (str) – name of sum dataset
- secondary_set (str) – name of secondary dataset (e.g. sum)
-
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_pause(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'), steps_to_do: Anno(name='AStepsToDo', typ=<class 'int'>, description='Number of steps we should configure for'), 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') = 'odin', 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
- 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(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')) → 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
-
on_post_run_armed(context: Anno(name='AContext', typ=<class 'malcolm.core.context.Context'>, description='Context that should be used to perform operations on child blocks'), steps_to_do: Anno(name='AStepsToDo', typ=<class 'int'>, description='Number of steps we should configure for')) → None[source]¶ Parameters: