caproto.server.pvproperty¶

-
class
caproto.server.pvproperty(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]¶ A property-like descriptor for specifying a PV in a PVGroup.
- Parameters
- getasync callable, optional
Called when PV is read through channel access
- putasync callable, optional
Called when PV is written to through channel access
- startupasync callable, optional
Called at start of server; a hook for initialization and background processing
- shutdownasync callable, optional
Called at shutdown of server; a hook for cleanup
- scanasync callable, optional
Called periodically at a configured rate.
- namestr, optional
The PV name (defaults to the attribute name of the pvproperty)
- dtypeChannelType or builtin type, optional
The data type
- valueany, optional
The initial value
- max_lengthint, optional
The maximum possible length acceptable for the data By default, this is len(value) or 1
- alarm_groupstr, optional
The alarm group the PV should be attached to
- read_onlybool, optional
Read-only PV over channel access
- docstr, optional
Docstring associated with the property
- fieldslist of FieldSpecItem, optional
Specification for record fields
- **cls_kwargs
Keyword arguments for the ChannelData-based class
- Attributes
- pvspecPVSpec
The information from __init__ is aggregated into a single, immutable PVSpec instance.
record_typestrThe configured record type to report.
- field_specFieldSpec
The field specification information helper.
Methods
from_pvspec(pvspec, **kwargs)Create a pvproperty from a PVSpec instance.
getter(get)Usually used as a decorator, this sets the
getterin the PVSpec.putter(put)Usually used as a decorator, this sets the
putterin the PVSpec.scan(period, *[, subtract_elapsed, …])Periodically call a function to update a pvproperty.
shutdown(shutdown)Usually used as a decorator, this sets
shutdownin the PVSpec.startup(startup)Usually used as a decorator, this sets
startupin the PVSpec.Attributes
fieldsrecord_typeThe configured record type to report.