XNET Flush
- Updated2023-02-17
- 2 minute(s) read
XNET Flush
Flushes (empties) all XNET session queues.

Inputs/Outputs

session in
The session to flush. This session is selected from the LabVIEW project or returned from XNET Create Session.vi.

error in
Error conditions that occur before this node runs.
The node responds to this input according to standard error behavior.
Default value: No error

session out
An output that is the same as session in, provided for use with subsequent nodes.

error out
Error information.
The node produces this output according to standard error behavior.
Description
With the exception of single-point modes, all sessions use queues to store frames. For input modes, the queues store frame values (or corresponding signal values) that have been received, but not obtained by calling XNET Read. For output sessions, the queues store frame values provided to XNET Write, but not transmitted successfully.
XNET Start and XNET Stop have no effect on these queues. Use XNET Flush to discard all values in the session's queues.
For example, if you call XNET Write to write three frames, then immediately call XNET Stop, then call XNET Start a few seconds later, the three frames transmit. If you call XNET Flush between XNET Stop and XNET Start, no frames transmit.
As another example, if you receive three frames, then call XNET Stop, the three frames remains in the queue. If you call XNET Start a few seconds later, then call XNET Read, you obtain the three frames received earlier, potentially followed by other frames received after calling XNET Start. If you call XNET Flush between XNET Stop and XNET Start, XNET Read returns only frames received after the calling XNET Start.