Plugins and Plugin Options

The Storyboard product ships with a standard set of plugins which add functionality to the system.  Plugins are loaded based on the SB_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 plugin. To pass on option to a plugin use the -o option to sbengine in this format -o[PLUGIN_NAME],[PLUGIN OPTION]

Table C.14. 3D model rendering: libgre-plugin-model3d.so

OPTIONDESCRIPTION
-omodel3d,novboDisable the use of vertex buffer objects, by default Vertex buffer objects are used for rendering.

Table C.15. Capture/Playback: libgre-plugin-capture-playback.so

OPTIONDESCRIPTION
-ocapture_playback,mode=[capture|playback]

Specifies the behavior of the plugin for either playback or capture. If capture is specified then input events (gre.press, gre.release, gre.motion, gre.keypress etc) will be logged and stored in an ouptut file.

If playback is specified then the contents of an input file are read and the input events are injected back into the application.

-ocapture_playback,file=filename

If "capture" is specified as the mode it indicates the contents of the file specified will be overwritten with the new event stream.

If "playback" is specified then the contents of the file specified will be used as an event stream source.

-ocapture_playback,capture_events=eventname

Capture option to define a custom list of events to capture. Multiple events can be specified by using the ":" character as a delimiter.

-ocapture_playback,no_defaults

Capture option to specify that there are no default events set to be captured. By default we capture the following events:

1

gre.press

2

gre.release

3

gre.keyup

4

gre.keydown

5

gre.keyup

6

gre.keyrepeat

7

gre.motion

8

gre.mtevent

-ocapture_playback,verbosityIndicates that the plugin should log events that it is either capturing or playing back to the standard output
-ocapture_playback,loop=countPlayback option that indicates how many times the playback should iterate through its content. The default is to playback the content once, otherwise if a count is specified the plugin will replay the full content count times.
-ocapture_playback,quit_playbackPlayback option that indicates if a gre.quit event should be automatically generated after playback is complete. The default is to not generate a quit event.

Table C.16. Gesture: libgre-plugin-gesture.so

OPTIONDESCRIPTION
-ogesture,file=filenamefilename is a text file containing custom gesture definitions. When the gesture plugin is in 'auto' mode, the gesture plugin will determine if the application uses any of the custom gesture events and enable single touch events.
-ogesture,mode=[disabled|single|multi]

By default, sbengine will search your application for use of any gesture events and gestures will be enbled as required. This behaviour can be overridden with any of the following mode options:

disabled will not generate any gesture events.
single allows for generation of single touch gesture events.
multi allows for generation of both single and multi-touch gesture events.
-ogesture,threshold=[level]Specifying a level allows the user to configure the sensitivity level which determines if we translate a motion into a gesture event. By default the threshold is set to 100.

Table C.17. Linux Input Support: libgre-plugin-dev-input.so

OPTIONDESCRIPTION
-odev-input,mouse=/dev/input/event0

The name of the mouse device, for example /dev/input/event0

-odev-input,kbd=/dev/input/event1The name of the keyboard device, for example /dev/input/event1
 One of either the mouse or kbd arguments must be passed to enable this plugin. There are no default bindings so the full path to the desired input device must be specified.

Table C.18. Lua Scripting: libgre-plugin-lua.so

OPTIONDESCRIPTION
-olua,hold=[0|1|2]

This option controls how Lua posts data manager change notifications. By default all changes are held until the end of script execution (1), except whenever a local event is sent through the gre.set_event call. In this case the data manager will be released to process the notifications, the send_event call will be issued, and then the data manager will again be held from making data change notifications. If 0 is specified, change notifications and events are triggered as soon as changes are made using gre.set_data calls. If 2 is specified then the data manager is held from emitting change notifications until the end of script execution even if a gre.send_event call is made.

-olua,gc=[0|1]

This option is used to minimize the runtime memory footprint of the Lua script engine by invoking the Lua garbage collector after every Lua action. By default this option is set to 0 indicating that garbage collection will occur at the natural points specified by Lua's collectgarbage option. If the value is set to 1, then garbage collection is run after every Storyboard Lua action invocation, reducing the active runtime memory footprint with a slight cost to execution performance.


Table C.19. Linux Multi-Touch Protocol: libgre-plugin-mtdev.so

OPTIONDESCRIPTION

-omtdev,device=[path to touch device]

Plugin for Linux Multi-Touch Protocol to be used with kernels supporting multi-touch events. This plugin is only available for the imx6 runtime currently.

-omtdev,rotation=[0|90|180|270]

Clockwise rotation of the touch input coordinates. This option is not often required. By default, mtdev plugin input will be rotated depending on the render manager configuration. The input transformation will be calculated by combining the specified rotation value and the render manager rotation.

-omtdev,calibrate

Puts mtdev into raw mode to be used in conjunction with the mtcalib application (See Crank Public SVN) to acquire the bounds parameters for screen calibration.

Use the -omtdev,bounds option to pass the parameters to sbengine.

-omtdev,bounds=[X1:Y1:X2:Y2]

Where X1,Y1 is the top-left corner and X2,Y2 is the bottom-right corner of the touch screen device. On some screens, X1 may be less than X2 and Y1 may be less than Y2.

-omtdev,threshold=[integer]

This is the number of pixels a touch point has to move in order to generate a motion event, the default value is 1

-omtdev,points=[integer]

This is the number of multitouch fingers that is supported. Events will only be generated for this number of fingers in contact with the screen, the default is 5

Table C.20. Linux Touchscreen Support: libgre-plugin-tslib.so

OPTIONDESCRIPTION
-otslib,pressure=1Set the pressure value with corresponds to a press, the default is any value greater than 0 is a press.
-otslib,motion=5The number of consecutive motion events to compress, can be useful on a device which delivers a high rate of motion events, default is to not compress.
-otslib,calibratePut tslib into raw mode which is used for calibration.
 

If you do not have the following tslib variables setup the plugin will not load or function properly.

TSLIB_CONSOLEDEVICE
TSLIB_TSDEVICE
TSLIB_CALIBFILE
TSLIB_CONFFILE

Table C.21. Logger: libgre-plugin-logger.so

OPTIONDESCRIPTION
-ologger,output=[filename]

This option specifies a path in the file system to direct the Storyboard standard output to. The directory path to the file must already exist.

+ At the beginning of the file name will append to the log file, otherwise the file will be overridden on each invocation of sbengine.
%D in the filename will be replaced by a date stamp with YYYY-MM-DD format.
%T in the filename will be replaced by a 24h time stamp with HHMMSS format.
Both %D and %T may be used on the same filename.

A valid command would be: -ologger,output=/logs/log-%D-%T.txt, provided the /logs/ directory existed prior to runtime.

-ologger,buffer=[bytes]

This option will buffer all logging output to an allocated in-memory buffer and only flush the output when the buffer content is full. The number of bytes allocated for the buffer are provided by the option to the argument. If the buffer size is 0 or invalid, then 4K will be allocated for the buffer.

-ologger,event=[event_name]

This option will enable the generation of a custom Storyboard event any time that an ERROR message is detected by the Storyboard Engine logging system. When the error is detected, an event "event_name" will be sent to the application and it will contain a payload of "1s0 msg" where the "msg" is the diagnostic string that would have been logged.

-ologger,slogger=[opcode]

(QNX ONLY)

This option specifies that sbengine should use the QNX system logging infrastructure. if no opcode is given, sbengine will provide an appropriate opcode.

The opcode is a combination of a major and minor code. Create the opcode using the _SLOG_SETCODE(major, minor) macro that's defined in sys/slog.h.

This option is only available for systems running QNX.

-ologger,io=[level]This option enables the logging of IO events in variable levels of verbosity. If no option is specified then the level will default to 1 and the event name and its size in bytes will be displayed. If 2 is specified then the format is displayed. If 3 is specified then the data payload will be dumped to the standard output in both hexadecimal and character formats.
-ologger,dataThis option enables the logging of data change events as they occur. The data key that has been changed is displayed to standard output.
-ologger,perfThis option enables the logging of performance data to the standard output (or file if perf_file is used). If a value of 0 is specified to the perf option then performance logging is enabled, but the capture of data is not immediately started and can be toggled using the gra.perf_state action. If the value is set to 1 or is not specified, then performance data will be immediately captured. For example sbengine -ologger,perf=1 will enable performance logging with the immediate capture of performance metrics.
-ologger,perf_file=[filename]This option specifies a path in the file system to direct the performance data output to. The directory path to the file must already exist and the contents of the file will be overwritten on each invocation of sbengine.
-ologger,perf_buffer=[bytes]This option will buffer all performance logging output to an allocated in-memory buffer and only flush the output when the buffer content is full. The number of bytes allocated for the buffer are provided by the option to the argument. If the buffer size is 0 or invalid, then 4K will be allocated for the buffer.
-ologger,perf_event_prefix=[prefix]This option specifies the prefix to use in the perf event name. This defaults to perf.
-ologger,perf_filter=[keyword]This option enables filtering of perf types based on the keyword provided. The sb_Event type cannot be filtered out. This is because Storyboard engine is event based, and everything that happens is tied back to the event that kicked things off. Multiple keywords can be specified. Filtered types are delimited by a ':'. sbengine -ologger,perf,perf_filter=sb_RenderExtension Each keyword can also be negated by the '^' symbol. Therefor we could ignore all render extension types by passing in the following command: sbengine -ologger,perf,perf_filter=^sb_RenderExtension Filtering applies to the perf option.
-ologger,poll_metrics_interval=msThis option sets up a timer to fire at the interval specified by ms. When the timer fires the system metrics for memory, CPU and FPS will be updated. See metrics output to control where the metrics output will go.
-ologger,metrics_output=[0 | 1 | 2 | 3]This option tells the metrics portion of the logger plugin where to out the metrics data. 0 just updates the data, and this is the defualt, 1 is used to output the data to the log, 2 outputs the data to the performance log, if the perf option is also specified, and 3 will output the data to both the log and the performance log if the perf option is specified.
-ologger,metrics_event_prefix=[prefix]This option specifies the prefix to use in the metrics event names. This defaults to metrics.
-ologger,filter=[keyword]This option enables filtering of events based on the keyword provided. Multiple keywords can be specified. Filtered events are delimited by a ':'. sbengine -ologger,io,filter=gre.press:gre.release Each keyword can also be negated by the '^' symbol. Therefore we could ignore all motion events by passing in the following command: sbengine -ologger,io,filter=^gre.motion Filtering applies to the 'io' and 'data' options. If neither 'io' or 'data' options are specified, then this option does nothing.
-ologger,retailmsgThis option is only available on Windows Compact Embedded platforms. The logger will output using RETAILMSG instead of sending output to stdio.
 If performance logging is enabled then the output is a set of comma separated values (CSV) with the following fields: PERF, application time, type, operation, name, duration
application timeThis is the time that the performance event was finished relative to the start time of the application in milliseconds.
typeThis is the type of performance operation that was recorded as a broad classifier
operationThis is a sub-classification of the type used for additional tracing granularity
nameThis is an identifier that can be used, along with the type and operation fields, to identify the context of the performance operation being performed
durationThis is the duration of the operation in milliseconds

Table C.22. QNX input support: libgre-plugin-gfi-input.so

OPTIONDESCRIPTION
-ogfi-input,mouse=/dev/devi/mouse0The name of the mouse device, for example /dev/devi/mouse0
-ogfi-input,rotated=[90|270]If specified, this indicates that the input co-ordinates should be rotated by 90 or 270 degrees
 By default the input system used the gfi interface based on the devi drivers. The devi driver must be run with the -P option. If you pass the mouse option then the mouse/touchscreen is used in raw mode.

Table C.23. Storyboard IO: libgre-plugin-greio.so

OPTIONDESCRIPTION
-ogreio,channel=nameThe value specifies the name that the applications Storyboard IO channel will use. This name can then be used by gre_io_open or iogen clients to send events to the application.
-ogreio,queueThis flag indicates if the events on the Storyboard IO channel should be asynchronously queued into the application's message queue or if a new event should be added only after the last event has been processed. The default is to only have one event being processed by the application at a time.