ophyd_async.epics.core
#
Package Contents#
Classes#
Connect to PVI structure served over PVA. |
|
Used for connecting signals to static EPICS pvs. |
|
Define the PV suffix to be appended to the device prefix. |
|
Baseclass to allow child signals to be created declaratively. |
Functions#
Create a |
|
Create a |
|
Create a |
|
Create a |
|
Create a |
API#
- class ophyd_async.epics.core.PviDeviceConnector(prefix: str = '', error_hint: str = '')[source]#
Bases:
ophyd_async.core.DeviceConnector
Connect to PVI structure served over PVA.
At init, fill in all the type hinted signals. At connection check their types and fill in any extra signals.
- Parameters:
prefix – The PV prefix of the device, “PVI” will be appended to it to get the PVI PV.
error_hint – If given, this will be appended to the error message if any of they type hinted Signals are not present.
- create_children_from_annotations(device: Device)[source]#
Use when children can be created from introspecting the hardware.
Some control systems allow introspection of a device to determine what children it has. To allow this to work nicely with typing we add these hints to the Device like so::
my_signal: SignalRW[int] my_device: MyDevice
This method will be run during
Device.__init__
, and is responsible for turning all of those type hints into real Signal and Device instances.Subsequent runs of this function should do nothing, to allow it to be called early in Devices that need to pass references to their children during
__init__
.
- async connect_mock(device: Device, mock: LazyMock)[source]#
Use during
Device.connect
withmock=True
.This is called when there is no cached connect done in
mock=True
mode. It connects the Device and all its children in mock mode.
- class ophyd_async.epics.core.EpicsDeviceConnector(prefix: str)[source]#
Bases:
ophyd_async.core.DeviceConnector
Used for connecting signals to static EPICS pvs.
- create_children_from_annotations(device: Device)[source]#
Use when children can be created from introspecting the hardware.
Some control systems allow introspection of a device to determine what children it has. To allow this to work nicely with typing we add these hints to the Device like so::
my_signal: SignalRW[int] my_device: MyDevice
This method will be run during
Device.__init__
, and is responsible for turning all of those type hints into real Signal and Device instances.Subsequent runs of this function should do nothing, to allow it to be called early in Devices that need to pass references to their children during
__init__
.
- class ophyd_async.epics.core.PvSuffix[source]#
Define the PV suffix to be appended to the device prefix.
- class ophyd_async.epics.core.EpicsDevice(prefix: str, with_pvi: bool = False, name: str = '')[source]#
Bases:
ophyd_async.core.Device
Baseclass to allow child signals to be created declaratively.
- ophyd_async.epics.core.epics_signal_r(datatype: type[SignalDatatypeT], read_pv: str, name: str = '') SignalR[SignalDatatypeT] [source]#
Create a
SignalR
backed by 1 EPICS PV.- Parameters:
datatype – Check that the PV is of this type
read_pv – The PV to read from
- ophyd_async.epics.core.epics_signal_rw(datatype: type[SignalDatatypeT], read_pv: str, write_pv: str | None = None, name: str = '') SignalRW[SignalDatatypeT] [source]#
Create a
SignalRW
backed by 1 or 2 EPICS PVs.- Parameters:
datatype – Check that the PV is of this type
read_pv – The PV to read and monitor
write_pv – If given, use this PV to write to, otherwise use read_pv
- ophyd_async.epics.core.epics_signal_rw_rbv(datatype: type[SignalDatatypeT], write_pv: str, read_suffix: str = '_RBV', name: str = '') SignalRW[SignalDatatypeT] [source]#
Create a
SignalRW
backed by 1 or 2 EPICS PVs, with a suffix on the readback pv.- Parameters:
datatype – Check that the PV is of this type
write_pv – The PV to write to
read_suffix – Append this suffix to the write pv to create the readback pv
- ophyd_async.epics.core.epics_signal_w(datatype: type[SignalDatatypeT], write_pv: str, name: str = '') SignalW[SignalDatatypeT] [source]#
Create a
SignalW
backed by 1 EPICS PVs.- Parameters:
datatype – Check that the PV is of this type
write_pv – The PV to write to