Main Content


Configure development computer communications with target processor


Configure communications between your development computer and the target processor by loading and initializing a shared library that implements the rtiostream functions.




rtw.connectivity.RtIOStreamHostCommunicator(componentArgs, launcher, rtiostreamLib) creates an object by using these arguments:

  • componentArgs –– rtw.connectivity.ComponentArgs object.

  • launcher –– rtw.connectivity.Launcher object.

  • rtiostreamLib –– rtiostream shared library that implements the development computer part of communications between the development computer and the target processor.

The object loads and initializes the shared library.

For your development computer, Embedded Coder® provides a shared library for these communication protocols:

  • TCP/IP

  • serial

You must provide drivers for the target processors.

For other communication protocols, for example, USB, you must provide a shared library for the development computer and drivers for the target processors.

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

  • Instantiate rtw.connectivity.RtIOStreamHostCommunicator directly, providing custom arguments for the rtiostream shared library.

  • Create a subclass of rtw.connectivity.RtIOStreamHostCommunicator. Consider this option when more complex configuration is required. For example, when:

    • The subclass rtw.connectivity.HostTCPIPCommunicator includes additional code to determine the number of the TCP/IP port that the executable application serves.

    • You use a subclass to specify a serial port number.

    • You specify verbose or silent operation.

Object Functions

setTimeoutRecvSecs hostCommunicator.setTimeoutRecvSecs(timeout) sets the timeout value for reading data. You can configure data reading to time out if no new data is received for a period greater than timeout seconds.
setInitCommsTimeouthostCommunicator.setInitCommsTimeout(timeout) sets the timeout value for initial setup of the communications channel. For some target processors, you might need to set a timeout value for initial setup of the communications channel. For example, the target processor can take a few seconds to open its side of the communications channel. If you set a nonzero timeout value, the communicator repeatedly tries to open the communications channel until the timeout value is reached.


Using rtw.connectivity.RtIOStreamHostCommunicator in PIL Connectivity

For an example that shows how to use this object in setting up PIL connectivity, see:

Version History

Introduced in R2008b