Table of Contents
The Storyboard IO API provides a platform independent communication API that allows inter-task and inter-process queued message passing. This is primarily used to allow external communication with a Storyboard application.
Storyboard IO was previously known as GREIO
The Storyboard IO API layers on top of native message passing and communication APIs, dependent on the operating system:
SysV message queue
SysV message queue
QNX POSIX message queue (mqueue
server or
mq
server/library)
Using the SBIO_MQ_PATH environment variable you can determine
which message queue technology will be used. By default the
standard mqueue
server and corresponding C library
mq_*
functions will be used.
If the SBIO_MQ_PATH environment variable is set to point at the
libmq.so
library (ie
SBIO_MQ_PATH=/usr/lib/libmq.so
) then the default
binding for the message queue implementation can be changed to use
the mq
server and the corresponding mq library
functions.
If the SBIO_MQ_PATH environment variable is used, then it must be used consistently with all Storyboard IO clients and servers that want to communicate with one another.
WinCE MSMQ
MS-Mailslots
Storyboard IO integration with the Storyboard Engine is implemented as a plugin. It is possible to create alternate Storyboard IO implementations that take advantage of custom communication facilities available on a platform.
The Storyboard IO plugin provides a single communication channel which clients can used to inject events into the Storyboard application. These events will be queued and dispatched in the same manner as internally generated events.
Client applications can use Storyboard IO to create their own communication channels and then receive events from that channel from the Storyboard application or from any other Storyboard IO client.
In order to communicate with a running Storyboard application the application
must first attach to the application's Storyboard IO channel. By default this
channel is named after the deployment bundle file (ie [bundlename].gapp),
however the name of this channel can be customized by specifying
-ogreio,channel=newname
as an option to sbengine.
Alternatively, on some platforms, it is also possible to set a GREIONAME
environment variable to the channel name.
Once the channel name is determine, the connection to the channel can be
established with the gre_io_open()
function. This will connect to
the channel and return a handle that can be used for future
communication.
Once the application has determined that no further communication is necessary
the channel should be closed via the gre_io_close()
function.