mxcubecore.model.protocols.tango¶
Models the tango section of YAML hardware configuration file.
Provides an API to read configured tango channels and commands.
Classes
|
Tango channel configuration. |
|
Tango command configuration. |
|
Configuration of a tango device. |
|
The 'tango' section of the hardware object's YAML configuration file. |
- class mxcubecore.model.protocols.tango.Channel(*, attribute: str | None = None, polling_period: int | None = None, timeout: int | None = None)[source]¶
Bases:
BaseModelTango channel configuration.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.model.protocols.tango.Command(*, name: str | None = None)[source]¶
Bases:
BaseModelTango command configuration.
- Parameters:
name (str | None)
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.model.protocols.tango.Device(*, commands: Dict[str, Command | None] | None = None, channels: Dict[str, Channel | None] | None = None)[source]¶
Bases:
BaseModelConfiguration of a tango device.
- get_channels() Iterable[Tuple[str, Channel]][source]¶
Get all channels configured for this device.
This method will fill in optional configuration properties for a channel.
- get_commands() Iterable[Tuple[str, Command]][source]¶
Get all commands configured for this device.
This method will fill in optional configuration properties for commands.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class mxcubecore.model.protocols.tango.TangoConfig(root: RootModelRootType = PydanticUndefined)[source]¶
Bases:
RootModel[Dict[str, Device]]The ‘tango’ section of the hardware object’s YAML configuration file.
- Parameters:
root (RootModelRootType)
- get_tango_devices() Iterable[Tuple[str, Device]][source]¶
Get all tango devices specified in this section.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].