accml_lib.core.model.utils package
Submodules
accml_lib.core.model.utils.command module
- class accml_lib.core.model.utils.command.BehaviourOnError(value)[source]
Bases:
IntEnum- ignore = 2
- roll_back = 3
- stop = 1
- class accml_lib.core.model.utils.command.Command(id, property, value, behaviour_on_error)[source]
Bases:
object- Parameters:
id (str)
property (str)
behaviour_on_error (BehaviourOnError)
- behaviour_on_error: BehaviourOnError
- class accml_lib.core.model.utils.command.CommandSequence(commands)[source]
Bases:
objectThese commands are expected to be executed on by one
- Parameters:
commands (Sequence[TransactionCommand])
- commands: Sequence[TransactionCommand]
- class accml_lib.core.model.utils.command.ReadCommand(id, property)[source]
Bases:
objectUse for retrieving data
accml_lib.core.model.utils.identifiers module
- class accml_lib.core.model.utils.identifiers.ConversionID(lattice_property_id, device_property_id)[source]
Bases:
object- Parameters:
lattice_property_id (LatticeElementPropertyID)
device_property_id (DevicePropertyID)
- device_property_id: DevicePropertyID
- lattice_property_id: LatticeElementPropertyID
accml_lib.core.model.utils.tango_resource_locator module
Support of Tango Resource Locator
Tango resource locators seem to need a bit extra treatment e.g. Bluesky expects them to be compatible with json names
accml needs a bit further investigation to fully support TRL with all available tools without treating TRL specially
- class accml_lib.core.model.utils.tango_resource_locator.TangoResourceLocator(domain, family, member)[source]
Bases:
objectLightweight Tango Resource Locator (TRL) for device names only.
This class intentionally represents only the core Tango device name consisting of exactly three components:
domain / family / member
Todo
review whole stack to find where trl can not be used as string
or to say differently that TRL can be used as strings. These are only made json compatible where imposed by (external) modules
Limitations and design choices
Only the device name part of a TRL is supported. Full TRL features such as protocol (tango://), host:port, attributes, properties (->), database selectors (#dbase), or wildcards are deliberately NOT handled here.
The class is designed to be a small, explicit value object and not a full TRL parser.
Input tokens are assumed to be already valid Tango name tokens. No automatic escaping, sanitization, or normalization is performed except where explicitly documented.
Users are responsible for providing JSON-compatible tokens when serialization is required. The helper method json_compatible() exists for this purpose but is not lossless.
Tango device names are case-insensitive. Equality comparisons are therefore performed in a case-insensitive manner.
Rationale
This restricted scope avoids implicit behavior, keeps the object predictable, and makes failures explicit. Any logic related to full TRL parsing or environment-specific resolution should live at a higher level in the application stack.