madgui.online.api module

This module defines the API of any online control plugin. Note that the API is subject to change (as is most parts of madgui…).

The user must add their derived Backend to the madgui config as:

online_control:
  backend: 'hit_acs.plugin:HitACS'

Classes

Backend(session, settings)

Interface for a online control plugin.

ParamInfo(name, ui_name, ui_hint, ui_prec, …)

class madgui.online.api.Backend(session, settings)[source]

Bases: object

Interface for a online control plugin.

Methods

connect()

Connect the online plugin to the control system.

disconnect()

Unload the online plugin, free resources.

execute()

Commit transaction.

get_beam()

Return a dict {name: value} for all beam properties, in MAD-X units.

param_info(knob)

Get parameter info for backend key.

read_monitor(name)

Read out one monitor, return values as dict with keys:

read_param(param)

Read parameter.

read_params([param_names])

Read all specified params (by default all).

write_param(param, value)

Update parameter into control system.

abstract connect()[source]

Connect the online plugin to the control system.

abstract disconnect()[source]

Unload the online plugin, free resources.

abstract execute()[source]

Commit transaction.

abstract get_beam()[source]

Return a dict {name: value} for all beam properties, in MAD-X units. At least: particle, mass, charge, energy

abstract param_info(knob)[source]

Get parameter info for backend key.

abstract read_monitor(name)[source]

Read out one monitor, return values as dict with keys:

widthx: Beam x width widthy: Beam y width posx: Beam x position posy: Beam y position

abstract read_param(param)[source]

Read parameter. Return numeric value.

abstract read_params(param_names=None)[source]

Read all specified params (by default all). Return dict.

abstract write_param(param, value)[source]

Update parameter into control system.

class madgui.online.api.ParamInfo(name, ui_name, ui_hint, ui_prec, unit, ui_unit, ui_conv)

Bases: tuple

Attributes

name

Alias for field number 0

ui_conv

Alias for field number 6

ui_hint

Alias for field number 2

ui_name

Alias for field number 1

ui_prec

Alias for field number 3

ui_unit

Alias for field number 5

unit

Alias for field number 4

property name

Alias for field number 0

property ui_conv

Alias for field number 6

property ui_hint

Alias for field number 2

property ui_name

Alias for field number 1

property ui_prec

Alias for field number 3

property ui_unit

Alias for field number 5

property unit

Alias for field number 4