Table of Contents >Quanser Rapid Control Prototyping Toolkit >VI and Function Reference >VIs - By Category >VI Categories >Communication VIs and Functions >Advanced >
Owning Palette: | Communications/Advanced |
Requirements: | Quanser Rapid Control Prototyping Toolkit, LabVIEW 2020 or newer, Control Design and Simulation Module |
The CL Stream Flush VI writes the data in the stream buffer to the underlying communication channel. The operation of this VI is affected by the blocking mode of the stream connected to its input. Streams have two modes: blocking (the default) and non-blocking. The blocking mode of the stream is determined by the CL Stream Connect or CL Stream Accept VI which created the stream. The CL Stream Flush VI cannot be used with streams created using the CL Stream Listen VI.
stream in is a reference to the stream created by the CL Stream Connect or CL Stream Accept VI. If the stream is closed or
is otherwise invalid then the negative error code |
stream out is a reference to the stream. This output is merely a copy of the stream in input. |
|||||||
error out contains error information. If the error in cluster indicated an error, the error out cluster contains the same information. Otherwise, error out describes the error status of this VI.
|
The CL Stream Flush VI writes the data in the stream buffer to the underlying communication channel. The operation of this VI is affected by the blocking mode of the stream connected to its input. Streams have two modes: blocking (the default) and non-blocking. The blocking mode of the stream is determined by the CL Stream Connect or CL Stream Accept VI which created the stream. The CL Stream Flush VI cannot be used with streams created using the CL Stream Listen VI.
This VI attempts to send the contents of the stream buffer over the communication channel. If an error occurs, then it returns a negative error code at its error out output. If the connection is closed it is considered an error condition.
If the stream is blocking, then this VI waits until all the data in the buffer is sent before returning.
If the stream is non-blocking, then this VI does not wait. It attempts to send all the
data remaining in the stream buffer. However, if this operation would VI then it returns
-QERR_WOULD
at its error out output, even if it has already sent some of the
data. In this case, the
CL Stream Poll VI
may be used to determine when at least one more byte may be flushed.
This VI does not support two threads calling CL Stream Flush or CL Stream Send at the same time. However, CL Stream Flush or CL Stream Send may be called by another thread at the same time as CL Stream Receive.
For packet or message-based protocols in non-blocking mode, the number of bytes sent over the
communication channel in each packet may be larger than the number of bytes in the input signal.
If the data cannot be flushed to the underlying communication channel without blocking then it
remains in the stream buffer and will be written to the underlying communication channel along
with the new data the next time the CL Stream Flush VI is invoked. This situation is typically
recognized when a |
All input/output pairs of this function have direct feedthrough behaviour.
RCP CL Comm Advanced Stream Example |
CL Stream Close | ||
CL Stream Connect | The CL Stream Connect VI establishes a connection to a remote host. The connection is made each time the VI executes. | |
CL Stream Accept | ||
CL Stream Listen | ||
CL Stream Poll |
Target |
Supported |
Comments |
---|---|---|
Yes |
Fully supported. |
Copyright © Quanser Inc. This page was generated 2021-09-24. Submit feedback to Quanser about this page.
Link to this page.