pyaml_cs_oa.dynamic_catalog#
On-demand catalog and parsers for EPICS and Tango specifications.
Classes
|
Default dynamic catalog. |
|
Resolve compact backend specifications into configuration models. |
- class pyaml_cs_oa.dynamic_catalog.ConfigModel(*, timeout_ms=3000, backend='')#
Bases:
BaseModelDefault dynamic catalog.
The key passed to
resolve()is the PV or Tango attribute specification string — noentrieslist required. Resolutions are cached after the first call.Supported key formats:
For EPCIS:
- ``READ_PV[unit]`` → scalar read-only - ``(WRITE_PV)[unit]`` → scalar write-only - ``READ_PV@index[unit]`` → array PV with element index, read-only - ``(READ_PV, WRITE_PV)[unit]`` → scalar read-write - ``(READ_PV, WRITE_PV)@index[unit]`` → array PV with element index read-write
For Tango:
- ``domain/family/member/attribute[unit]`` → scalar signal - ``domain/family/member/attribute@index[unit]`` → one element of a SPECTRUM signal
Example
backend: "Tango" or "Epics" timeout_ms: 3000
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pyaml_cs_oa.dynamic_catalog.DynamicCatalog(cfg)#
Bases:
CatalogResolve compact backend specifications into configuration models.
- resolve(key)#
Resolve a backend specification string.
- Parameters:
key (str) – EPICS PV or Tango attribute specification.
- Returns:
pydantic.BaseModel – Backend-specific configuration model.
- Return type:
BaseModel