Storyboard Engine Public API

If you are writing your own plugin or working with a Storyboard RTExec or Storyboard Lite platform, you need to understand how Storyboard engine is initialized. If you are running on a system such as Linux or QNX you can disregard this information.

The engine in initialized in two steps:

  1. The first step is to create the engine's application handle via the gr_application_create_args function. This function initializes the core framework and plugins and loads the UI model and verifies its integrity.

  2. When the UI model is loaded the main UI event loop can be started using the gr_application_run function along with the application handle returned from gr_application_create_args. The gr_application_run function will not return until the application terminates.

The Integration API is thread safe so it is possible to terminate the application, by calling gr_application_quit, in another thread. In general, the gr_application_create and gr_application_run functions should be called from the same thread context since the initialization of some of the engine’s subsystems may create thread local data required for execution.

When the application terminates and returns from gr_application_run, the application handle should be released by calling gr_application_free. Once an application handle has been released it is no longer valid for use.

The engine provides execution tracing functionality through the gr_application_debug interface. This function takes an optional application handle and an integer command value. Additional arguments may be required based on the type of command and are documented within the <gre/gre.h.> header. This function is most often used to provide additional diagnostics. For example invoking:

gr_application_debug(NULL, GR_DEBUG_CMD_VERBOSITY, GR_LOG_TRACE2);

will enable logging of all significant operations within the engine.

Was this article helpful?
0 out of 0 found this helpful