Storyboard IO

Hello Everyone,

We have had many customers and people evaluating Storyboard asking about communicating with external programs. Storyboard does this using what we call Storyboard IO. The Storyboard IO API provides a platform independent communication API that allows inter-task and inter-process queued message passing. To read more on Storyboard IO please see here.

Since this issue has come up many times recently I thought I would put together a step by step so anyone interested could run an external application and see Storyboard IO in action. This step by step assumes you are using Storyboard 1.3 and Microsoft Visual Studio 2008.

Lets get started!

1) Start Microsoft Visual Studio 2008 and create a console project

File -> New Project -> Win32 Console Application

Name: storyboardio
Path: c:\crank\<some dir name>

Agree to the defaults presented in the auto config wizard

2) Add in the include path for Storyboard IO

** Right click project (storyboardio) select Properties

** Expand C/C++ > General

** Add the Win32 Storyboard Engine include path:

C:\Program Files (x86)\Crank Software\Storyboard Engine\1.3.0.201109261539\win32-x86-win32-obj\include

3) Add in the header definition for Storyboard IO to the source

** Add in to the main source file (storyboardio.cpp)

#include <gre/greio.h>

4) Add in the MS missing standard C files (stdint.h/inttypes.h)

** Download http://code.google.com/p/msinttypes/downloads/list

** Add them to the project (wherever you want in the filesystem) and to the include path

** Suggest adding $(ProjectDir) to path

5) Add in the Storyboard IO library

** Right click project (storyboardio) select Properties

** Expand Linker -> Input

** Add libgreio.lib to  the additional dependencies

** Expand Linker -> General

** Add the path to the grieo library

C:\Program Files (x86)\Crank Software\Storyboard Engine\1.3.0.201109261539\win32-x86-win32-obj\lib

6) Build the project

** Build -> Build Solution

7) Below is a sample MS VS 2008 sample application.

** Run any Storyboard application with the command line option of:

-ogreio,channel=testgreio

C:\Program Files (x86)\Crank Software\Storyboard Engine\1.3.0.201109261539\win32-x86-win32-obj\bin\sbengine.exe -vvv -ogreio,channel=testgreio C:\Program Files (x86)\Crank Software\Samples\media_player\media_player.gapp

** Then run the MS VS 2008 sample application, it will cause the Storyboard application to quit.

----- Sample App -----
 // storyboardio.cpp : Defines the entry point for the console application.
 //
#include "stdafx.h"
#include <gre/greio.h>
int _tmain(int argc, _TCHAR* argv[])
{
    gre_io_t *handle;
    gre_io_serialized_data_t *buffer;
handle = gre_io_open("testgreio", GRE_IO_TYPE_WRONLY);
if(handle == NULL) {
    printf("I can't open the IO channel\n");
    return 1;
}
buffer = gre_io_serialize(NULL, NULL, "gre.quit", NULL, NULL, 0);
if(buffer == NULL) {
    printf("I can't serialize an event \n");
    return 1;
}
gre_io_send(handle, buffer);
gre_io_close(handle);
return 0;
}

Thanks,
-Jamie