Skip to main content
Version: 9.0.2

gre_io_open

gre_io_t* gre_io_open(
const char *   io_name,  
int   flag  
)  

Open a Storyboard IO communication channel using a named connection.

Parameters

ParameterTypeDescription
io_nameconst char *The name of the io-channel to use.
flagintThe mode to open the channel in. See below for possible flags.

Flags

Flags define how the connection is opened.  Possible flags are:

FlagDescription
GRE_IO_TYPE_RDONLYopen read only, creating the channel if it doesn't exist.
GRE_IO_TYPE_XRDONLYopen for exclusive read, unlinking an existing channel and creating a new one.
GRE_IO_TYPE_WRONLYopen write only.
GRE_IO_FLAG_NONBLOCKopen non-blocking.

Returns

TypeDescription
gre_io_t*Returns a valid Storyboard IO handle or NULL if no channel can be created.

Example

To pass multiple flags in the same aregument, just separate by a bitwise-or. i.e:

gre_io_open(THERMOSTAT_RECEIVE_CHANNEL, GRE_IO_TYPE_RDONLY | GRE_IO_FLAG_NONBLOCK);