The state manager/boot manager are described in The state manager and The Boot utility. Used together with the experiment configuration editor (Experiment Configuration utility), they provide the next generation of experiment definition and control.
The ReadoutStateHook package provides a standard mechanism for Tcl based Readout programs with the normal run control commands to become aware of state manager state changes and react appropriately. It also provides a mechanism to intiate a FAIL transition should CCUSBReadout suffer an unrecoverable error.
To integrate CCUSBReadout with the state manager requires that you:
Write a small script that incorporates the ReadoutStateHook into the CCUSBReadout's Tcl interpreter at start time.
Configure the experiment to use the --init-script
option to load that small script at start time (when the
experiment is booted).
The script below shows what you need to do to load the ReadoutStateHook package into the CCUSBReadout interpreter:
Example 68-31. Script to incorporate ReadoutStateHook
set pkgDirs [file join $env(DAQROOT) TclLibs] lappend auto_path $pkgDirs package require ReadoutStateHook
Note that in the script above, the DAQROOT environment variable is set by the boot manager when it starts a program. Further environment variables are set by the boot manager to allow the programs it manages to know how to connect to the state manager server.