| Contents | Index |
A handle to the stream that was returned by a previous call to rtIOStreamOpen.
A pointer to the start of the buffer containing an array of data to transmit
Size of data to transmit. For byte-addressable architectures, size is measured in bytes. Some DSP architectures are not byte-addressable. In these cases, size is measured in number of WORDs, where sizeof(WORD) == 1.
Size of data actually transmitted (always less than or equal to size), or zero if no data was transmitted
int rtIOStreamSend(
int streamID,
const void * src,
size_t size,
size_t * sizeSent
)
This function sends data over a communication stream with a remote processor.
A return value of zero indicates success.RTIOSTREAM_ERROR indicates an error.
RTIOSTREAM_ERROR is defined in rtiostream.h as:
#define RTIOSTREAM_ERROR (-1)
Implementation and Performance Considerations
The API for rtIOStream functions is designed to be independent of the physical layer across which the data is sent. Possible physical layers include RS232, Ethernet, or Controller Area Network (CAN). The choice of physical layer affects the achievable data rates for the host-target communication.
For a processor-in-the-loop (PIL) application there is no minimum data rate requirement. However, the higher the data rate, the faster the simulation will run.
In general, a communications device driver will require additional hardware-specific or channel-specific configuration parameters. For example:
A CAN channel may require specification of which available CAN Node should be used.
A TCP/IP channel may require a port or static IP address to be configured.
A CAN channel may require the CAN message ID and priority to be specified.
It is the responsibility of the user who implements the rtIOStream driver functions to provide this configuration data, for example by hard-coding it, or by supplying arguments to rtIOStreamOpen.
rtiostream_wrapper | rtIOStreamClose | rtIOStreamOpen | rtIOStreamRecv

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 |