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_block in a Device

Parameters
  • 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

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=<class 'scanpointgenerator.core.compoundgenerator.CompoundGenerator'>, 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') Optional[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]][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 (CompoundGenerator) – 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

Info

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
  • 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

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
  • context (Context) – Context that should be used to perform operations on child blocks

  • steps_to_do (int) – Number of steps we should configure for

on_post_run_ready(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_abort(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