The following pieces are required when putting the Engine on an embedded target:
Engine
Plugins
Deployment bundle
In order to deploy the engine to an embedded target we must first decide which plugins are needed. The Engine is a self contained executable which loads plugins for added functionality. The Engine can be run as follows:
sbengine [-v] [-o] [deployment bundle]
Options:
-v verbosity, more v’s means more verbose output
-o plugin or manager options
Each plugin or manager can have specific options. The option string is defined as follows:
-o plugin_name,option[,option]…]
Each plugin or manager defines its name and possible options.
Name: resource_mgr
Options:
image=[image memory pool size in kilobytes]
default=unlimited
font=[font memory pool size in kilobytes]
default=unlimited
Name: screen_mgr
Options:
swcursor
Enable the rendering of a software
sursor.
redraw_complet
Generate a complete event for
every screen update
dl=[layer index]
Disable the use of a particular hardware layer.
The Storyboard product ships with a standard set of plugins which add functionality to the system. Plugins are loaded based on the GRE_PLUGINS environment variable. This variable can be a directory where all plugins are loaded from or a “;” separated list of plugins.
Some plugins have options that can be passed via the command line to the the plugin. To pass on option to a plugin use the -o option to sbengine in this format -o[PLUGIN_NAME],[PLUGIN OPTION]
Provides animation support.
Plugin : libgre-plugin-animation.so
Plugin Name : animate
Plugin Options :
None
Redirect events to another GREIO channel
Plugin : libgre-plugin-event-redirect.so
Plugin Name : redirect
Plugin Options :
None
Capture mouse or touchscreen events and generate gesture events
Plugin : libgre-plugin-gesture.so
Plugin Name : gesture
Plugin Options :
None
What this plugin does is translates cursor movements from a mouse or a touchscreen in to a gesture. When a button is depressed, or your finger is dragged across the touchscreen, the gesture plugin tracks it. When the button is release or your take your finger off of the touchscreen, the plugin emits the gesture.
Gestures are made up of a series of numbers. The numbers represent the direction that the cursor was travelling. Here are what the numbers mean:
1 = Up
2 = Up and to the Right
3 = Right
4 = Down and to the Right
5 = Down
6 = Down and to the Left
7 = Left
8 = Up and to the Left
By default the gesture plugin registers the Up, Right, Down, and Left gestures as 1, 3, 5, 7. The numbers 2, 4, 6, 8 aren't enabled by default, but you can define them in a custom gesture definite file. This file is a a simple text file that defines an event, followed by the gesture number. For example, to define a 'z' gesture, you could put the following in the a gesture-definition.txt file:
gre.gesture.ze,363
That means when the gesture plugin detects a right motion, followed by a down and to the left motion, followed by another right motion, it will emit a gre.gesture.ze event.
You can point the gesture plugin at the custom gesture definition file by exporting the environment variable GESTURE_DEF_FILE which will be set to the path to the custom definition file.
Implement the Storyboard IO API and external application communication
Plugin :libgre-plugin-greio.so
Plugin Name : greio
Plugin Options :
channel - The name of the default greio channel
Example :
sbengine -ogreio,channel=my_greio_channel example.gapp
Log system messages for debugging.
Plugin : libgre-plugin-logger.so
Plugin Name : logger
Plugin Options :
io
data
If IO logging is enabled then events and their data payload will be displayed as they are received. The data payload is dumped to the standard output in both hexadecimal and character formats.
If data logging is enabled, then data changes in the data manager will be displayed as they occur. The data key that has been changed is displayed to standard output.
The logger is disabled by default and can be enabled by passing ‘-ologger[,io][,data]’ to the sbengine application.
Transition from one screen to another in a path based method: Right/left or Up/down
Plugin : libgre-plugin-screen-path.so
Plugin Name : screen-path
Plugin Options :
None
Transition from one screen to another by scaling the new screen to fill the display
Plugin : libgre-plugin-screen-scale.so
Plugin Name : screen-scale
Plugin Options :
None
Execute a system command.
Plugin : libgre-plugin-system.so
Plugin Name : system
Plugin Options :
None
Allow external timer events to be used by the application. Adds support for the gra.timer action.
Plugin : libgre-plugin-timer.so
Plugin Name : timer
Plugin Options :
None
Add support for touchscreens based on the Linux “tslib”.
Plugin : libgre-plugin-tslib.so
Plugin Name : tslib
Plugin Options :
None
This plugin uses the tslib environment to function. If you do not have the variables setup the plugin will not load or function properly.
TSLIB_CONSOLEDEVICE
TSLIB_TSDEVICE
TSLIB_CALIBFILE
TSLIB_CONFFILE
Add support for Linux input devices such as mouse and keyboards based on the Linux input system.
Plugin : libgre-plugin-dev-input.so
Plugin Name : dev-input
Plugin Options :
mouse=[mouse device]
kbd=[keyboard device]
This plugin uses the "/dev/input" devices to function. You must pass one of the plugin options in order for this plugin to function
Example :
sbengine -odev-input,mouse=/dev/input/event0
Provides support for the polygon render extension.
Plugin : libgre-plugin-polygon.so
Plugin Name : poly
Plugin Options :
None