OMNET QUEUE

In Omnet++ Queue is a container class that act as a queue.

Member functions in queues in Oment++

  • front() which returns pointer to the object at the front.
  • insert(obj), it inserts an objects into the queue head.
  • back(), returns pointer to the object at the back.
  • pop(), returns and removes object from the front.
  • insertAfter(obj-where, obj_what).
  • remove(obj), it removes that object from the queue.
  • insertBefore(obj_where, obj_what).
  • length(), returns the number of items in the queue.
  • empty(), tells whether there is anything in the queue.

Omnet++ Queue Length functions is mainly used due to number of items in the queue can be obtained.

Sample Omnet++ Queue Examples

This is the code for take and put operations in queue.