pycyphal.application.register.backend package
Submodules
Module contents
- class pycyphal.application.register.backend.Backend(*args, **kwds)[source]
Bases:
MutableMapping
[str
,pycyphal.application.register.backend.Entry
]Register backend interface implementing the
MutableMapping
interface. The registers are ordered lexicographically by name.- abstract property location: str[source]
The physical storage location for the data (e.g., file name).
- abstract index(index: int) Optional[str] [source]
- Returns
Name of the register at the specified index or None if the index is out of range. See ordering requirements in the class docs.
- abstract __setitem__(key: str, value: Union[pycyphal.application.register.backend.Entry, uavcan.register.Value_1_0.Value_1_0]) None [source]
If the register does not exist, it is either created or nothing is done, depending on the implementation. If exists, it will be overwritten unconditionally with the specified value. Observe that the method accepts either
Entry
orValue
.The value shall be of the same type as the register, the caller is responsible to ensure that (implementations may lift this restriction if the type can be changed).
The mutability flag is ignored (it is intended mostly for the Cyphal Register Interface, not for local use).
- class pycyphal.application.register.backend.Entry(value: 'Value', mutable: 'bool')[source]
Bases:
object
- value: uavcan.register.Value_1_0.Value_1_0
- exception pycyphal.application.register.backend.BackendError[source]
Bases:
RuntimeError
Unsuccessful storage transaction. This is a very low-level error representing a system configuration issue.