rtiostream_wrapper
Test rtiostream shared library functions in MATLAB
Syntax
Description
[receives
workspace variable data from the open communication channel or stream.errFlag,receivedData,receivedDataSize] = rtiostream_wrapper(sharedLib,'recv',streamID,dataSize)
specifies additional options using one or more name-value pair arguments. These
arguments are implementation-dependent, that is, they are specific to the shared
library that you use.streamID = rtiostream_wrapper(___,Name,Value)
Examples
Open Communication Channels
These examples use the supplied TCP/IP and serial communication drivers to open communication channels.
Open rtiostream
stationA as a TCP/IP
server:
stationA = rtiostream_wrapper('libmwrtiostreamtcpip.dll','open',...
'-client', '0',...
'-blocking', '0',...
'-port', port_number);
Opens rtiostream
StationB as a TCP/IP
client:
stationB = rtiostream_wrapper('libmwrtiostreamtcpip.dll','open',...
'-client','1',...
'-blocking', '0',...
'-port', port_number,...
'-hostname','localhost');
If you use the supplied development computer driver for serial communications (as
an alternative to the drivers for TCP/IP), specify the bit rate when you open a
channel with a specific port. For example, open channel stationA
with port COM1 and bit rate of 9600:
stationA = rtiostream_wrapper('libmwrtiostreamserial.dll','open',... '-port','COM1',... '-baud','9600');
Input Arguments
Name-Value Arguments
Output Arguments
Version History
Introduced in R2008b
See Also
rtIOStreamOpen | rtIOStreamSend | rtIOStreamRecv | rtIOStreamClose