mxcubecore.model.protocols.epics

Models the epics section of YAML hardware configuration file.

Provides an API to read configured EPICS channels.

Classes

Channel(*[, suffix, polling_period])

EPICS channel configuration.

EpicsConfig([root])

The 'epics' section of the hardware object's YAML configuration file.

Prefix(*, channels)

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.

Parameters:
  • suffix (str | None)

  • polling_period (int | None)

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

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)

get_prefixes() → Iterable[Tuple[str, Prefix]][source]

Get all prefixes specified in this section.

Return type:

Iterable[Tuple[str, Prefix]]

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.

Parameters:

channels (Dict[str, Channel | None] | None)

get_channels() → Iterable[Tuple[str, Channel]][source]

Get all channels configured for prefix.

This method will fill in optional configuration properties for a channel.

Return type:

Iterable[Tuple[str, Channel]]

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].