The Script Branch API is a set of Python functions for controlling
script branches. This API is used when implementing CLI commands that
make use of script branches, and also when waiting for simulator
events via corresponding wait-for-
CLI commands. See
the Simics User's Guide for an introduction and examples
of using the API.
sb_create(func, desc = None)
The optional desc argument will be displayed by list-script-branches as a description of the script branch.
sb_get_wait_id()
sb_in_main_branch()
true
if the main branch is currently active, and not
one of the script branches.sb_interrupt_branch(branch_id)
As a side effect, the sb_wait function called in the
script branch will raise a CliQuietError
exception.
sb_run_in_main_branch(command, func)
CliError
exception will
be raised if an error occurs while running func, otherwise
its return value is returned.sb_signal_waiting(wait_id)
sb_wait(command, wait_id, reverse=False, always=False, wait_data=None, use_obj=None)
None
. The use_obj argument is deprecated and
should never be specified.