caproto.server.server.NestedPvproperty

Inheritance diagram of NestedPvproperty
class caproto.server.server.NestedPvproperty(get: Optional[caproto.server.typing.Getter] = None, put: Optional[caproto.server.typing.Putter] = None, startup: Optional[caproto.server.typing.Startup] = None, shutdown: Optional[caproto.server.typing.Shutdown] = None, *, scan=None, name: Optional[str] = None, dtype: Optional[Type[T_Data]] = None, value: Optional[Any] = None, max_length: Optional[int] = None, alarm_group: Optional[str] = None, doc: Optional[str] = None, read_only: Optional[bool] = None, field_spec: Optional[caproto.server.server.FieldSpec] = None, fields: Optional[Tuple[Tuple[Tuple[str, str], Union[caproto.server.typing.Getter, caproto.server.typing.Putter, caproto.server.typing.Startup, caproto.server.typing.Shutdown, caproto.server.typing.Scan]], ]] = None, record: Optional[Union[str, Type[T_RecordFields]]] = 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.