LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Queue and ciruclar buffer

What is the functional difference between queue and circular buffer?

0 Kudos
Message 1 of 3
(4,575 Views)

Both circular buffer and queue are used to store the data and after a point is reached the old data can be replaced to maintain the size. But the main difference I see here is that when you read the data from the queue your data is removed from the buffer of the queue but in a circular buffer when youread the data it will still be available.

 

Edit: I guess adding this link gives you better understanding on the difference between both

-----

The best solution is the one you find it by yourself
Message 2 of 3
(4,567 Views)

Queue and Circular Buffer are the data structure used for data sharing.

1. Size

Circular buffer always have a maximum limit or size. After this point the data will get overflow (the old data will get removed).

Queue have a option to have maximum limit or not.

Option 1: Maximum Limit not configured

You can keep on add (enqueue) data to the queue

Option 2: Maximum Limit Configured

Then till maximum limit you can add (enqueue) the data. After that you can't add the data to queue.

Lozzy Enqueue Function (new function) in LabVIEW will behave as a 'Circular Buffer' only (no difference).

2. Category

Queue can be classified into FIFO, LIFO, FILO

In general Circular buffer is not classified like this. But you can have these feature into circular buffer also.

3. Built-In-Function

In LabVIEW you have direct functions for queue but not for circular buffer (ignore Lozzy queue function)

 

Regards,

Yogesh Redmptor

Regards,
Yogesh Redemptor
0 Kudos
Message 3 of 3
(4,556 Views)