Stream Listen Stream Set Swap Bytes navigation bar

Table of Contents

Stream Poll

Stream Poll

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 Poll VI polls for events associated with the stream. For example, it can be used to wait until data is ready to receive or until a client connection is pending. The Stream Poll VI waits for one of the selected events or the timeout to occur. If one or more events occur then it returns true at the corresponding output ports. If the timeout occurs then it returns false at all the event output ports and true at the timed out terminal. If an error occurs then it is reflected at the error out terminal. The operation of this VI is not affected by the blocking mode of the stream connected to its input.


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 created by the Stream Connect, Stream Accept or Stream Listen VI. If the stream is closed or is otherwise invalid then the negative error code -QERR_INVALID_STREAM is returned by the error out output.


Outputs

stream out

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

timed out

timed out returns true if none of the selected events occur within the timeout period.

data is available to receive

data is available to receive, a value indicating whether data is available to receive. This flag only guarantees that at least one byte is available in the stream buffer to receive. It does not guarantee that the Stream Receive will not block unless it is only receiving a single byte. However, if messages are being sent over the stream it generally means that the entire message can be received almost immediately once the first byte arrives. If is not enabled, the corresponding output will be -1.

space available to send

space available to send, a value indicating whether there is space in the stream buffer to store more data for transmission. This flag only guarantees that at least one byte is available in the stream buffer for sending. It does not guarantee that the Stream Send will not block unless it is only sending a single byte. However, if messages are being sent over the stream it generally means that the entire message can be sent almost immediately once space for one byte becomes available.If is not enabled, the corresponding output will be -1.

space available to flush

space available to flush, a value indicating whether the data in the stream buffer can be flushed to the underlying communication channel. This flag only guarantees that at least one byte of the stream buffer can be flushed. It does not guarantee that the Stream Flush will not block unless it is only flushing a single byte. If is not enabled, the corresponding output will be -1.

connection completed

connection completed, a value indicating whether a non-blocking Stream Connect has finished making the connection. Note that this condition may not be distinguishable from the snd or fls conditions for some streams. Refer to the help for a particular protocol for details.If is not enabled, the corresponding output will be -1.

connection accepted

connection accepted, a value indicating whether a client connection is pending on a listening stream. This condition is only valid for listening streams. It guarantees that a Stream Accept VI will return immediately with a new client connection. Note that this condition may not be distinguishable from the rcv condition for some streams. Refer to the help for a particular protocol for details.If is not enabled, the corresponding output will be -1.

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

  • RCP CL Comm Advanced Stream Example

    Targets

    Target

    Supported

    Comments

    RCP Windows (64-bit) Target

    Yes

    Fully supported.

     

    navigation bar