ophyd_async.epics.testing
#
Package Contents#
Classes#
Device for use in a channel access test IOC. |
|
For testing strict enum values in test IOCs. |
|
For testing subset enum values in test IOCs. |
|
Device for use in a pv access test IOC. |
|
An abstraction of a Table where each field is a column. |
|
Test IOC with ca and pva devices. |
|
For initialising an IOC in tests. |
Functions#
For generating random PV names in test devices. |
Data#
API#
- ophyd_async.epics.testing.CA_PVA_RECORDS#
None
- ophyd_async.epics.testing.PVA_RECORDS#
None
- class ophyd_async.epics.testing.EpicsTestCaDevice(prefix: str, with_pvi: bool = False, name: str = '')[source]#
Bases:
ophyd_async.epics.core.EpicsDevice
Device for use in a channel access test IOC.
- enum: Annotated[SignalRW[EpicsTestEnum], PvSuffix('enum')]#
None
- enum2: Annotated[SignalRW[EpicsTestEnum], PvSuffix('enum2')]#
None
- subset_enum: Annotated[SignalRW[EpicsTestSubsetEnum], PvSuffix('subset_enum')]#
None
- class ophyd_async.epics.testing.EpicsTestEnum[source]#
Bases:
ophyd_async.core.StrictEnum
For testing strict enum values in test IOCs.
- A#
‘Aaa’
- B#
‘Bbb’
- C#
‘Ccc’
- class ophyd_async.epics.testing.EpicsTestSubsetEnum[source]#
Bases:
ophyd_async.core._utils.SubsetEnum
For testing subset enum values in test IOCs.
- A#
‘Aaa’
- B#
‘Bbb’
- class ophyd_async.epics.testing.EpicsTestPvaDevice(prefix: str, with_pvi: bool = False, name: str = '')[source]#
Bases:
ophyd_async.epics.testing._example_ioc.EpicsTestCaDevice
Device for use in a pv access test IOC.
- table: Annotated[SignalRW[EpicsTestTable], PvSuffix('table')]#
None
- class ophyd_async.epics.testing.EpicsTestTable(**kwargs)[source]#
Bases:
ophyd_async.core.Table
An abstraction of a Table where each field is a column.
For example:
>>> from ophyd_async.core import Table, Array1D >>> import numpy as np >>> from collections.abc import Sequence >>> class MyTable(Table): ... a: Array1D[np.int8] ... b: Sequence[str] ... >>> t = MyTable(a=[1, 2], b=["x", "y"]) >>> len(t) # the length is the number of rows 2 >>> t2 = t + t # adding tables together concatenates them >>> t2.a array([1, 2, 1, 2], dtype=int8) >>> t2.b ['x', 'y', 'x', 'y'] >>> t2[1] # slice a row array([(2, b'y')], dtype=[('a', 'i1'), ('b', 'S40')])
- a_enum: Sequence[EpicsTestEnum]#
None
- class ophyd_async.epics.testing.EpicsTestIocAndDevices[source]#
Test IOC with ca and pva devices.
- get_device(protocol: str) EpicsTestCaDevice | EpicsTestPvaDevice [source]#