mxcubecore.HardwareObjects.abstract.AbstractProcedure#
Classes
|
|
|
Defines the valid Procedure states |
- class mxcubecore.HardwareObjects.abstract.AbstractProcedure.AbstractProcedure(name)[source]#
Bases:
ConfiguredObject
- property argument_schema#
Schema for arguments passed to start :returns: tuple[JSONSchema], “kwargs”: key: [JSONSchema]} :rtype: dict{“args”
- property msg#
Last message produced by procedure :returns: str
- property result_schema#
Schema for result :returns: tuple[JSONSchema]
- property results#
Results from procedure execution validated by RESULT_SCHEMA if it is defined
- Returns:
DataClass or frozendict
- static set_args_class(args_class, kwargs_class)[source]#
Sets the types of the data models used as arguments, cane be used to set the argument classes runtime if the models are built dynamically, i.e based on configuration not known before
- Parameters:
args_class (tuple[BaseModel]) –
(dict[[str] (kwargs_class) – [BaseModel]]) dictionary containing BaseModels
- static set_result_class(_result_class)[source]#
Sets the types of the data models returned by the Procedure, can be used to set the result model runtime of the data model is built dynamically, i.e based on configuration not known before
- Returns:
(tuple[BaseModel]) tuple of classes for args
- start(data_model)[source]#
Starts procedure :param data_model: sub class of mxcubecore.model.procedure_model. :param Data is validated by the data_model object:
- Returns:
(Greenlet) The gevent task
- property state#
Execution state :returns: The current state of the procedure :rtype: ProcedureState