Skip to Main Content Skip to Search
Product Documentation

rtw.connectivity.RtIOStreamHostCommunicator - Configure host-side communications

Syntax

rtw.connectivity.RtIOStreamHostCommunicator(componentArgs, launcher, rtiostreamLib)

Description

ConstructorDescription
RtIOStreamHostCommunicatorConfigure host-side communications with the target by loading and initializing a shared library that implements the rtiostream functions.

Constructor Arguments
componentArgs A rtw.connectivity.ComponentArgs object.
launcher A rtw.connectivity.Launcher object.
rtiostreamLib An rtiostream shared library that implements the host side of host-target communications.

Constructor syntax:

rtw.connectivity.RtIOStreamHostCommunicator(componentArgs, launcher, rtiostreamLib)

This class configures host-side communications with the target by loading and initializing a shared library that implements the rtiostream functions.

Embedded Coder provides an implementation of this shared library to support TCP/IP communications between host and target (all platforms), as well as a Windows only version for serial communications. With TCP/IP or serial, you need only supply the target-side drivers.

For other communications protocols (e.g. USB), you must supply a shared library for the host-side of the communications link as well as the target-side drivers.

To create your instance of rtw.connectivity.RtIOStreamHostCommunicator, you have two options:

Methods
setTimeoutRecvSecs Sets the timeout value for reading data.
hostCommunicator.setTimeoutRecvSecs(timeout) configures data reading to time out if no new data is received for a period of greater than timeout seconds.
setInitCommsTimeout Sets the timeout value for initial setup of the communications channel.
hostCommunicator.setInitCommsTimeout(timeout) For some targets you may need to set a timeout value for initial setup of the communications channel. For example, the target processor may take a few seconds before it is ready to open its side of the communications channel. If you set a nonzero timeout value then the communicator repeatedly tries to open the communications channel until the timeout value is reached.

See Also

rtiostream_wrapper | rtw.connectivity.ComponentArgs | rtw.connectivity.Launcher

How To

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS