kafka_dae_control.data

Data class containing the state of the program.

Members

Data

Create a new model by parsing and validating input data from keyword arguments.

class kafka_dae_control.data.Data(*, running: bool = False, paused: bool = False, frame_sync_select_rbv: ~kafka_dae_control.defaults.FrameSyncSelect = FrameSyncSelect.UNKNOWN, frame_sync_select_sp: ~kafka_dae_control.defaults.FrameSyncSelect = FrameSyncSelect.UNKNOWN, job_id: str = '', run_number: int = 0, blocks: list[str] = <factory>, veto_names_array: list[str] = ['veto_0', 'veto_1', 'veto_2', 'veto_3', 'veto_4', 'veto_5', 'veto_6', 'veto_7', 'veto_8', 'veto_9', 'veto_10', 'veto_11', 'veto_12', 'veto_13', 'veto_14', 'veto_15', 'veto_16', 'veto_17', 'veto_18', 'veto_19', 'veto_20', 'veto_21', 'veto_22', 'veto_23', 'veto_24', 'veto_25', 'veto_26', 'veto_27', 'veto_28', 'veto_29', 'veto_30', 'veto_31'], vetoes: list[int] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], hard_vetoes_rbv: int = 65535, num_periods_sp: int = 1, num_periods_rbv: int = 1, current_period_sp: int = 1, current_period_rbv: int = 1, period_mode_sp: ~kafka_dae_control.defaults.PeriodMode = PeriodMode.UNKNOWN, period_mode_rbv: ~kafka_dae_control.defaults.PeriodMode = PeriodMode.UNKNOWN)[source]

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

blocks: list[str]

List of blocks to be inserted in the run start nexus structure. These are prefixed with the instrument and block server prefixes

current_period_rbv: int

Current period number readback. This is 1-indexed for backwards compatibility reasons.

current_period_sp: int

Current period number setpoint. This is 1-indexed for backwards compatibility reasons.

frame_sync_select_rbv: FrameSyncSelect

The frame sync select value on the hardware

frame_sync_select_sp: FrameSyncSelect

The frame sync select value setpoint

hard_vetoes_rbv: int

Hard vetoes readback bit mask

job_id: str

Run’s job_id, used to tie starts and stops together

model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

num_periods_rbv: int

Number of periods (readback).

num_periods_sp: int

Number of periods (setpoint).

paused: bool

Whether the hardware is paused or not

period_mode_rbv: PeriodMode

The period mode readback.

period_mode_sp: PeriodMode

The period mode setpoint.

run_number: int

Run number

running: bool

Whether the hardware is running or not

veto_names_array: list[str]

Veto names, as a numpy array of strings. This is indexed so that 0 is veto 0.

vetoes: list[int]

Vetoes array containing 0 for disabled, 1 for soft, 2 for hard. This is indexed so that item 0 is veto 0.