rtIOStreamOpen - Initialize communications channel - MATLAB (original) (raw)

Main Content

Initialize communications channel

Syntax

Description

[streamID](#d126e42002) = rtIOStreamOpen([argCount](#d126e41961), [argValues](#d126e41981)) initializes a communication stream to allow the exchange of data between the development computer and target processor.

example

Examples

Initialize Communications Channel

This code from [rtiostreamtest.c](https://mdsite.deno.dev/matlab:edit%28fullfile%28matlabroot,'/toolbox/coder/rtiostream/src/rtiostreamtest/rtiostreamtest.c'%29%29) initializes a communication stream and checks for errors.

static int openServer(int rtArgc, void * rtArgv []) { streamID = rtIOStreamOpen(rtArgc, rtArgv); if (streamID == RTIOSTREAM_ERROR) { return streamID; } return RTIOSTREAM_NO_ERROR; }

Input Arguments

collapse all

Number of elements in argValues array.

Parameters for the communications driver.

Output Arguments

collapse all

If the function initializes a communication stream, it returns a positive integer that represents the stream handle. Otherwise, it returns -1, which indicates an error.

The rtiostream.h file defines this macro:

#define RTIOSTREAM_ERROR (-1)

Version History

Introduced in R2009a