mxcubecore.model.protocols.sardana

Classes

Command(*[, name])

Sardana command configuration.

Door(*[, commands])

Configuration of a Sardana door.

SardanaConfig([root])

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_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.

Parameters:

commands (Dict[str, Command | None] | None)

get_commands() → Iterable[Tuple[str, Command]][source]

Get all commands configured for this door.

This method will fill in optional configuration properties for commands.

Return type:

Iterable[Tuple[str, Command]]

model_config: ClassVar[ConfigDict] = {}

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

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)

get_doors() → Iterable[Tuple[str, Door]][source]

Get all Sardana doors specified in this section.

Return type:

Iterable[Tuple[str, Door]]

model_config: ClassVar[ConfigDict] = {}

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