mxcubecore.model.protocols.epics#
Models the epics section of YAML hardware configuration file.
Provides an API to read configured EPICS channels.
Classes
|
EPICS channel configuration. |
|
The 'epics' section of the hardware object's YAML configuration file. |
|
Configuration of an EPICS prefix section. |
- class mxcubecore.model.protocols.epics.Channel(*, suffix: str | None = None, polling_period: int | None = None)[source]#
Bases:
BaseModel
EPICS channel configuration.
- 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]] = {'polling_period': FieldInfo(annotation=Union[int, NoneType], required=False, default=None), 'suffix': FieldInfo(annotation=Union[str, 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.epics.EpicsConfig(root: RootModelRootType = PydanticUndefined)[source]#
Bases:
RootModel[Dict[str, Prefix]]
The ‘epics’ 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].
- class mxcubecore.model.protocols.epics.Prefix(*, channels: Dict[str, Channel | None] | None)[source]#
Bases:
BaseModel
Configuration of an EPICS prefix section.
- get_channels() Iterable[Tuple[str, Channel]] [source]#
Get all channels configured for prefix.
This method will fill in optional configuration properties for a channel.
- 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]] = {'channels': FieldInfo(annotation=Union[Dict[str, Union[Channel, NoneType]], NoneType], required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.