Monitoring the Buffer Size of a Data Connection

After you read buffered data, you can monitor the buffer size and request diagnostic information about the buffers you specified.

Complete the following steps to monitor the buffer size.

  1. Add a While Loop to the block diagram.

     Add  Find
  2. Add a DataSocket Open function to the left of the While Loop to open a data connection programmatically.

     Add  Find
  3. Specify the buffer size for the client connection.
  4. Add a DataSocket Read function inside the While Loop.

     Add  Find
  5. Wire the connection id output of the DataSocket Open function to the connection in input of the DataSocket Read function.
  6. Add a Property Node inside the While Loop to the right of the DataSocket Read function.

     Add  Find
  7. Wire the connection out output of the DataSocket Read function to the reference input of the Property Node.
  8. Resize the Property Node and add a terminal.
  9. Click the first white area of the Property Node and select the Buffer Utilization (Bytes) property.
  10. Click the second white area of the Property Node and select the Buffer Utilization (Packets) property.
  11. Create indicators for each property to monitor the use of the buffer constraints you specified.

LabVIEW stops filling the client-side buffer when the first buffer size limit is reached for either the Buffer Maximum Bytes property or the Buffer Maximum Packets property.