mxcubecore.model.protocols.sardana#
Classes
|
Sardana command configuration. |
|
Configuration of a Sardana door. |
|
The 'sardana' section of the hardware object's YAML configuration file. |
- class mxcubecore.model.protocols.sardana.Command(*, name: str | None = None)[source]#
Bases:
BaseModel
Sardana command configuration.
- Parameters:
name (str | None) –
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.model.protocols.sardana.Door(*, commands: Dict[str, Command | None] | None = None)[source]#
Bases:
BaseModel
Configuration of a Sardana door.
- get_commands() Iterable[Tuple[str, Command]] [source]#
Get all commands configured for this door.
This method will fill in optional configuration properties for commands.
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'commands': FieldInfo(annotation=Union[Dict[str, Union[Command, NoneType]], NoneType], required=False, default=None)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubecore.model.protocols.sardana.SardanaConfig(root: RootModelRootType = PydanticUndefined)[source]#
Bases:
RootModel[Dict[str, Door]]
The ‘sardana’ section of the hardware object’s YAML configuration file.
- Parameters:
root (RootModelRootType) –
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].