Source code for ophyd_async.panda._common_blocks

from __future__ import annotations

from enum import Enum

from ophyd_async.core import Device, DeviceVector, SignalR, SignalRW
from ophyd_async.core.signal_backend import SubsetEnum
from ophyd_async.panda._table import DatasetTable, SeqTable


[docs] class DataBlock(Device): # In future we may decide to make hdf_* optional hdf_directory: SignalRW[str] hdf_file_name: SignalRW[str] num_capture: SignalRW[int] num_captured: SignalR[int] capture: SignalRW[bool] flush_period: SignalRW[float] datasets: SignalR[DatasetTable]
[docs] class PulseBlock(Device): delay: SignalRW[float] width: SignalRW[float]
[docs] class PcompDirectionOptions(str, Enum): positive = "Positive" negative = "Negative" either = "Either"
EnableDisableOptions = SubsetEnum["ZERO", "ONE"]
[docs] class PcompBlock(Device): active: SignalR[bool] dir: SignalRW[PcompDirectionOptions] enable: SignalRW[EnableDisableOptions] pulses: SignalRW[int] start: SignalRW[int] step: SignalRW[int] width: SignalRW[int]
[docs] class TimeUnits(str, Enum): min = "min" s = "s" ms = "ms" us = "us"
[docs] class SeqBlock(Device): table: SignalRW[SeqTable] active: SignalRW[bool] repeats: SignalRW[int] prescale: SignalRW[float] prescale_units: SignalRW[TimeUnits] enable: SignalRW[EnableDisableOptions]
[docs] class PcapBlock(Device): active: SignalR[bool] arm: SignalRW[bool]
[docs] class CommonPandaBlocks(Device): pulse: DeviceVector[PulseBlock] seq: DeviceVector[SeqBlock] pcomp: DeviceVector[PcompBlock] pcap: PcapBlock data: DataBlock