1 / 9

Mind Your P’s and Queues

Mind Your P’s and Queues. James Hannah Test Architect, CLA. What is a Queue?. A mechanism to communicate data between sections of code without using wires. Unlike Notifier Operations, Queue Operations buffer data.

nancy
Télécharger la présentation

Mind Your P’s and Queues

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mind Your P’s and Queues James Hannah Test Architect, CLA

  2. What is a Queue? • A mechanism to communicate data between sections of code without using wires • Unlike Notifier Operations, Queue Operations buffer data • Queues are lossless because they buffer data. Default behavior is like a FIFO. • Can contain any LabVIEW data type

  3. Queue Operations • Adds an element to the back of a queue • Adds an element to the front of a queue • Obtain Queue returns a reference to a queue • Determines type of data in the queue • Removes an element in the front of a queue and returns the element. Has a timeout feature. • Returns information about a queue, such as the number of elements currently in the queue • Removes all elements from a queue and returns the elements as an array. • Releases a reference to a queue

  4. Design Patterns that employ Queues • Producer/Consumer (Data) • Producer/Consumer (Events)

  5. Combining Polymorphism and Queues • All Obtain Queue VIs made into a polymorphic VI that adapts to type of queue.

  6. Adding User Events • Dynamically registers events handled by structure • Sends event and event data to event structure • Returns a reference (refnum) to a user event • Determines type of data associated with the event • Unregisters all events associated with an event registration refnum. • Releases a user event refnum. Any event structures registered for this user event no longer receive the event.

  7. Putting it all Together Using Dedicated Loops

  8. For Further Information, contact us at… www.ssprog.com | solution-sources-programming-ssp- Twitter: @SolutionSources |

  9. SSP is Hiring • LabVIEW and TestStand • Software Developer • Certification Required • Working knowledge of test equipment • Proven debug and problem solving skills • Help quote new test station projects • Functional Test Hardware Group Leader • Select and integrate test hardware • Design test fixtures and custom PCBs • Debug, verify, and install test stations • Help quote new test station projects

More Related