Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Enqueue Element At Opposite End Function

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Owning Palette: Queue Operations Functions

Requires: Base Development System

Adds an element to the front of a queue.

Details  Example

queue is a reference to a queue. Use the Obtain Queue function to obtain a queue reference.
element is the element you want to add to the front of the queue. This data type changes to match the subtype of queue.
timeout in ms specifies the time, in milliseconds, that the function waits for available space in the queue if the queue is full. The default is –1, indicating never to time out.

If the function waits timeout in ms and the queue remains full, timed out? is TRUE.
error in describes error conditions that occur before this node runs. With the following exception, this input provides standard error in functionality.

This node runs normally even if an error occurred before this node runs.
queue out returns the reference to the queue unchanged.
timed out? is TRUE if space in the queue did not become available before the function times out or if an error occurred.
error out contains error information. This output provides standard error out functionality.

Enqueue Element At Opposite End Details

This function is similar to the Enqueue Element function. If the queue is full, the function waits timeout in ms before continuing. If queue becomes invalid (for example, the queue reference is released), the function stops waiting and returns error code 1122.

Queues typically use a first-in-first-out flow of data. In rare situations, you might want to interrupt this normal flow of data by adding an element to the front of the queue. After you add an element to the front of a queue, the next Dequeue Element function you call removes the element you added to the front. For example, you could use this function if you want to use the queue as a stack structure or add high-priority elements to the front of the queue.

Example

Refer to the Queue Stack Maze Solver VI in the labview\examples\Synchronization\Queue directory for an example of using the Enqueue Element At Opposite End function.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit