mirror of
https://github.com/ivan-usov-org/bec.git
synced 2025-04-21 10:10:02 +02:00
5.1 KiB
5.1 KiB
(developer.scans.scan_stubs)=
Scan stubs - the building blocks of a scan
In order to simplify the creation of new scans, BEC provides a set of scan stubs that can be used as building blocks for new scans. The scan stubs are located in bec_server/bec_server/scan_server/scan_stubs.py
. The following scan stubs are available:
Device operations
set_and_wait
Set a device to a value and wait for it to finish.read_and_wait
Read a device and wait for it to finish.stage
Stage a device.unstage
Unstage a device.kickoff
Kickoff a device. Usually only needed for fly scans.complete
Wait for a device to finish.get_req_status
Check if a device request status matches the given RID and DIID.get_device_progress
Get the progress of a device.pre_scan
Trigger the pre_scan method of a device.baseline_reading
Trigger the baseline readings.wait
Wait for an event to finish. Could be a trigger, a readout or a movement.read
Read from a device.trigger
Trigger a device.set
Set a device to a value.rpc
Send an RPC command to a device.send_rpc_and_wait
Send an RPC command to a device and wait for it to finish.set_with_response
Set a device to a specific value and return the request ID. Use this method as an alternative tokickoff
if the device does not supportkickoff
.request_is_completed
Check if a request that was initiated withset_with_response
is completed.
Scan operations
open_scan
Open a scan.close_scan
Close a scan.publish_data_as_read
Publish data as read.open_scan_def
Open a scan definition.close_scan_def
Close a scan definition.scan_report_instruction
Update the scan report instruction.
More information on the scan stubs can be found in the API reference.