Stream Connect Stream Listen navigation bar

Table of Contents

Stream Flush

Stream Flush

Owning Palette:Not available in this version of RCP Toolkit. Please check for updates.

Requirements:Quanser Rapid Control Prototyping Toolkit, LabVIEW 2020 or newer


Description

The 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 Stream Connect or Stream Accept VI which created the stream. The Stream Flush VI cannot be used with streams created using the 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 an 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 block then it returns a QERR_WOULD_BLOCK at its error out output, even if it has already sent some of the data. In this case, the 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 Stream Flush or Stream Write at the same time. However, Stream Flush or Stream Write may be called by another thread at the same time as Stream Read.


Required Inputs All required inputs must be wired. They appear in bold text in the context help window for the VI.
stream in

stream in is a reference to the stream to be flushed.


Outputs

stream out

stream out is a reference to the stream. This output is merely a copy of the stream in input.

error out 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.
status icon status is TRUE if an error occurred. If status is TRUE, the VI does not perform any operations.
code icon code is the error code number identifying an error. A value of 0 means no error, a negative value means a fatal error, and a positive value is a warning. Refer to the Quanser Error Codes for a code description.
source icon source identifies where an error occurred. The source string is usually the name of the VI that produced the error.


Feedthrough Behaviour

All input/output pairs of this function have direct feedthrough behaviour.


Examples

There are currently no examples


See Also

  • Stream WriteThe Stream Write VI writes data to the stream buffer.
  • Stream Read The Stream Read VI receives data over a stream.

    Targets

    Target

    Supported

    Comments

    RCP Windows (64-bit) Target

    Yes

    Fully supported.

     

    navigation bar