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 very thing layer on top of the Storyboard IO C API and can be used to verify that Storyboard IO is working properly on your platform.
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:
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, subtype, x, y) @ 100,150 to a client on channel 'sb'
./iogen sb some_target gre.press 4u1 0 4u1 0 2u1 0 2u1 100 2u1 150 2u1 0 2u1 0 2u1 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
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 a text variable on the control 'mycontrol' on the layer 'mylayer' with a string (Hello)
./iogen sb mylayer.mycontrol 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
.
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 rese. 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]