CL Stream Listen End of trail navigation bar

Table of Contents >Quanser Rapid Control Prototyping Toolkit >VI and Function Reference >VIs - By Category >VI Categories >Communication VIs and Functions >Advanced >

CL Stream Poll

CL Stream Poll

Owning Palette:Communications/Advanced

Requirements:Quanser Rapid Control Prototyping Toolkit, LabVIEW 2020 or newer, Control Design and Simulation Module


Description

The CL 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 CL 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 always appear as terminals on the VI palette. They also 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 CL Stream Connect, CL Stream Accept or CL 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 Wait for data available to receive 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 Wait for space available to send 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 Wait for space available to flushis 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 Wait for connection to complete 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 Wait for a client connection to be ready to accept inputs 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


    See Also

  • CL Stream CloseThe CL Stream Close VI closes the stream connected using CL Stream Connect.
  • 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 Flush The CL Stream Flush VI writes the data in the stream buffer to the underlying communication channel.
  • CL Stream Listen The CL Stream Listen VI creates a stream that listens for connections from remote hosts.
  • CL Stream Accept The CL Stream Accept VI accepts a connection from a remote host.

    Targets

    Target

    Supported

    Comments

    RCP Windows (64-bit) Target

    Yes

    Fully supported.

     

    navigation bar