Frame¶
Trigger Source¶
Frame Classes¶
- class openlabctrl.frame.IoSyncFrame(device_type, trig=None)[source]¶
IO instruction container with independent time-base.
At instantiation, an IO instance is created for each entry in
device_type.IO_DICTand exposed as an attribute with the same name. The exact set of attributes therefore depends on the device type passed (e.g. see RP 125-14 BaseIO_DICT).- Parameters:
device_type – Device class (not instance)
trig (TriggerSource | None) – Trigger source to initiate frame execution. If
NoneorTriggerSource.NONE, frame is triggered immediately.
- set_time(t)[source]¶
Set new time for all IOs of this frame, see
set_time().- Parameters:
t (int) – time (in units of clk cycles).
- set_time_increment(t_incr)[source]¶
Set new time increment for all IOs of this frame, see
set_time_increment().- Parameters:
t_incr (int)
- class openlabctrl.frame.ParamIoSyncFrame(device_type, trig=None)[source]¶
Parameterized version of
IoSyncFrame, which builds upon a frame function and a frame parameter set. To reduce overall compilation time, parameterized IO sync frames are (re-)compiled only when changes in the frame function or the frame parameter set are detected.- Parameters:
trig (int | None)
- set_frame_parameter(*args, **kwargs)[source]¶
Set the parameters passed to the frame function..
- Parameters:
args – Positional arguments forwarded to the frame function.
kwargs – Keyword arguments forwarded to the frame function.
- set_frame_function(func)[source]¶
Set the function that builds the IO sequence.
The function must accept an
IoSyncFrameas its first argument followed by any positional and/or keyword arguments defined inset_frame_parameter().- Parameters:
func – Callable with signature
func(frame, *args, **kwargs).