caproto.server.server.NestedPvproperty¶
- class caproto.server.server.NestedPvproperty(get: Getter | None = None, put: Putter | None = None, startup: Startup | None = None, shutdown: Shutdown | None = None, *, scan=None, name: str | None = None, dtype: Type[T_Data] | None = None, value: Any | None = None, max_length: int | None = None, alarm_group: str | None = None, doc: str | None = None, read_only: bool | None = None, field_spec: FieldSpec | None = None, fields: Tuple[Tuple[Tuple[str, str], Getter | Putter | Startup | Shutdown | Scan], ...] | None = None, record: str | Type[T_RecordFields] | None = None, **cls_kwargs)[source]¶
Nested pvproperty which allows decorator usage in parent class
Without using this for the SubGroups, using @subgroup.prop.getter causes the parent class to see multiple pvproperties - one defined on the subgroup, and one returned from pvproperty.getter. This class fixes that by returning the expected class - the parent (i.e., the subgroup)
- Bonus points if you understood all of that.
… scratch that, bonus points to me, I think.
Methods
from_pvspec
(pvspec, parent)Create a pvproperty from a PVSpec instance.
getter
(get)Usually used as a decorator, this sets the
getter
in the PVSpec.putter
(put)Usually used as a decorator, this sets the
putter
in the PVSpec.scan
(*args, **kwargs)Periodically call a function to update a pvproperty.
shutdown
(shutdown)Usually used as a decorator, this sets
shutdown
in the PVSpec.startup
(startup)Usually used as a decorator, this sets
startup
in the PVSpec.Attributes
fields
record_type
The configured record type to report.