malcolm.modules.xspress3.parts

class malcolm.modules.xspress3.parts.XspressWriterPart(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, 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', num_pairs: Anno(name='ANumberPairs', typ=<class 'int'>, description='number of FR/FP pairs') = 1, num_datasets: Anno(name='ANumberDataset', typ=<class 'int'>, description='number of mca datasets to be written in total') = 1)[source]

Part for controlling an xspress3_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

  • sum_name (str) – name of sum dataset

  • secondary_set (str) – name of secondary dataset (e.g. sum)

  • num_pairs (int) – number of FR/FP pairs

  • num_datasets (int) – number of mca datasets to be written in total

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') = 'xspress3', 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