Queue functions

Discuss anything related to ExtendSim or simulation projects. If you have a question about a specific block, please use the appropriate library forum.
Post Reply
Joined:Sat Dec 09, 2017 3:31 am
Queue functions

Post by prenna » Tue Feb 02, 2021 9:17 am

I should use the GetFront(real array[]) function to remove an item from a queue, but I don't understand how pass the queue pointer using the array.

Joined:Thu Apr 27, 2000 12:00 am
First Name:Dave
Last Name:Krahl

Re: Queue functions

Post by davek » Thu Feb 04, 2021 5:24 am

To be clear, the GetFront function removes the first entry in a queue data structure, not the Queue block. The queue data structure was used in earlier versions of ExtendSim, but has been replaced by the linked list functionality.

If you want to remove an item from a Queue block there are a few ways of doing this. I would recommend that you state what behavior you are trying to model and then I or someone else here can help determine the best method for doing this. You may want to look into the Queue Equation block. If you do want to work with the queue data structure, I can help you with that, but this does require programming a custom block.

Dave Krahl
Tetra Tech, Inc - Consulting
QMT Group - Simulation Education

Post Reply