Storyboard IO TCP/IP Redirector

We are frequently asked about methods by which clients can use the Storyboard IO functionality with a TCP/IP network so that one or more client applications, potentially running on different embedded systems, can share data with an HMI application.

One approach to this is to create a relatively simple client/server TCP/IP implementation that simply packages up Storyboard IO data from one system across to another. Conceptually we are just putting a client/server re-director in the middle of a traditional Storyboard IO communication. Pictorially we can change:

[Client]---->> sbio_channel ---->>[SB Application]

to

[Client]---> sbio_channel --->[TCP server (client)]
~~~network~~~
[TCP server (server)] ---> sbio_channel --->[SB Application]


This allows us to use native Storyboard IO messaging on either end of the re-director and TCP as a generic transport to bridge across the network.

I have created a simple application that builds a single application that can act as either the TCP client or server and is used by some Storyboard customers to bridge data from an embedded system into their UI during development as well as being able to communicate data from remote clients into a central HMI.

If you run the sample without any arguments, you will get the sample usage:

sbio_tcprelay thomas$ ./sbio_tcprelay

Usage:
./sbio_tcprelay server <port> <output_sbio_channel>
or
./sbio_tcprelay client <ip> <port> <input_sbio_channel>

The server is started to communicate to the end storyboard channel while the client is started with not only the storyboard channel that it should receive on, but also the information for the remote tcp server.

Using this functionality you can build sophisticated networks that allow data to be moved across the network into the application.

Thomas

0

Comments

7 comments
  • Do you still happen to have this application available?

    0
  • Hi Robert, what version of Storyboard are you using?

    1
  • Oh wow - i missed this - Im using 7.1 - Thank you

    0
  • In that case, you may want to take a look at this section from our documentation,
    https://support.cranksoftware.com/hc/en-us/articles/360056943692-Sending-and-Receiving-Data-with-Storyboard-IO

    In short, you no longer need a relay since we support TCP directly as a transport for SBIO communication now.

    The trick is in how we specify our SBIO channel names:

    Receiving:

    tcp://<port or channel>

    Sending:

    tcp://<IP address>:<port or channel>

    Hopefully this was helpful!

    0
  • Thank you -
    I did attempt this at one point.  With my C application using SBIO/GREIO (from the thermostatIO example).  I can't get it to use the tcp connection or open up the port.

    My Setup:

    MacOS with Crank Frontend ---> RaspberryPI C application (talking to hardware on pi) for backend.
    I would be using this in front of the C application if possible.

    code: 

    #include <gre/greio.h>

    #define EXAMPLE_SEND_CHANNEL "frontend"
    #define EXAMPLE_RECEIVE_CHANNEL "backend"

    handle = gre_io_open(EXAMPLE_RECEIVE_CHANNEL, GRE_IO_TYPE_RDONLY);
    send_handle = gre_io_open(EXAMPLE_SEND_CHANNEL, GRE_IO_TYPE_WRONLY)

    It doesn't seem like greio for C likes the tcp:// etc.   I'm new to this so it's likely I am missing the configuration.

    0
  • You will also be need to include libgreio-tcp.so in your environment variable (Linux/QNX: LD_LIBARY_PATH, Mac: DYLD_LIBARY_PATH, Windows: PATH on MacOS) since the TCP functionality is loaded dynamically by the libgreio.so library.

    0
  • Thank you - i'll test this out.

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post