Storyboard IO Utilities

Included with Storyboard Suite are some command line utilities that can be useful tools when working with and configuring Storyboard IO. These utilities provide a thin layer on top of the Storyboard IO C API and can be used to verify that Storyboard IO is working properly on your platform.

iogen

The iogen utility is used to generate Storyboard IO events from the command line. The utility's command line arguments closely mirror the arguments that would be provided to the gre_io_open and gre_io_send Storyboard IO API functions. Running iogen without any parameters will show a usage message:

Note

Data must be sent in order of descending alignment requirements. Example: 4u1 4u1 2u1 1s0 is good, 2u1 4u1 4u1 1s0 is not

Usage:

./iogen channel_name [event_target event_name size data [size data]...]

For example:

Send a 'gre.quit' event to a client on channel 'sb'

./iogen sb no_target gre.quit

Send a 'gre.press' event (int button, timestamp, subtype, x, y, z, id, state) @ 100,150 to a client on channel 'sb'

./iogen sb some_target gre.press 4u1:button 0 4u1:timestamp 0 2u1:subtype 0 2s1:x 100 2s1:y 150 2s1:z 0 2s1:id 0 2s1:state 0

Send a 'progress' event with an integer field 'percent' containing the value 50 on a channel 'sb'

./iogen sb no_target progress 4s1:percent 50

Send a 'greio.vebosity' event with an integer field 'verbosity' containing the desired level of engine debugging verbosity

./iogen sb no_target greio.verbosity 4s1:verbosity 4

Send a 'cluster_update' event with array data named 'tire_pressures' of 30,45,17,25 on channel 'sb' Note the leading ',' in the data, this is needed to differentiate small number from characters in a string. This can be omitted when sending numbers in anything other than the 1sN format.

./iogen sb no_target cluster_update 1s4:tire_pressures ,30,45,17,25

Note

In this case the raw data representation of these numbers will be delivered as a string in the event payload. Use the string.byte function in lua to decode the data into numerical format.

The iogen utility can also be used to set variables in a Storyboard application. To set a variable, the event_target parameter should contain the fully qualified path for the Storyboard variable and the event_name parameter should contain the SBIO event greio.iodata_set. For example:

Set an integer application variable 'progress' with a number (50)

./iogen sb progress greio.iodata_set 4s1 50

Set the text variable 'myvariable' on the control 'mycontrol' on the layer 'mylayer' with a string (Hello)

./iogen sb mylayer.mycontrol.myvariable greio.iodata_set 1s0 "Hello"

The definition and format of standard Storyboard events such as gre.press and gre.release can be found in the Storyboard header file iodefs.h.

iorcv

The iorvc utility is used to receive Storyboard IO events. This utility takes an input channel name as a command line parameter and prints the events it receives. Running iogen without any parameters provides a usage message:

Usage:

./iorcv [-s] channel_name

By default, iorcv will loop around receiving messages until the program is terminated. By specifying -s you can cause iorcv to exit once it has received a single message.

When a message is received, a summary of the event contents is printed to the output:

./iorcv my_channel

Waiting on channel [my_channel]

Event Received [my_event_name] on channel [my_channel]:

Event Target: [no_target]

Event Format: []

Event Data (0 bytes):

This would be the response to an event generated by iogen with the following arguments:

./iogen my_channel no_target my_event_name

Connecting to Storyboard IO channel [my_channel]