Queue Object
The queue object has the same capabilities as the processor object with regard to general processing and communication resources. Like the processor, the queue executes a Proto-C process model developed in the Process Editor. This process model can incorporate general C language code and make use of the kernel procedure library to model general processing functions.
Graphical Representation
In the Node Editor, a default queues consists of a square with vertical hash marks to symbolize lists of packets. The name of the queue appears below the square, as shown in the following figure.
Figure 11: Queue

In general, the queue module's capabilities are a superset of those of a processor, and therefore those capabilities that the two modules hold in common are not described here. The feature distinguishing the two objects is that the queue is provided with additional internal resources to facilitate the buffering and organization of packets. The Simulation Kernel provides a family of procedures that allow a process model to flexibly manage these queuing resources, providing the user the ability to implement arbitrary queuing disciplines. Several common queuing disciplines are provided as process models.
For descriptions, see Chapter 1 "Process Model/Queuing" on page 1.
Subqueues
The queue module consists of a bank of subqueues, each of which can hold a list of packets. Most queue operations are performed by operating on subqueue objects, which are described in Subqueue Object.
Queue Object Attributes
The following table lists the built-in attributes of a queue object.
Table 23: Queue Object Built-In Attributes
| Name | Data Type |
|---|---|
| begsim intrpt | toggle |
| endsim intrpt | toggle |
| failure intrpts | enumerated |
| icon name | icon |
| intrpt interval | toggle-double |
| name | string |
| priority | integer |
| process model | typed file |
| recovery intrpts | enumerated |
| subqueue | compound |
| super priority | toggle |
Queue Object Statistics
The following table lists the statistics available for a queue object.
Table 24: Queue Object Statistics
| Name | Units |
|---|---|
| queue size (bits) | bits |
| queuing delay | seconds |
| free size (bits) | bits |
| free size (packets) | packets |
| queue size (incoming bits) | bits |
| queue size (incoming packets) | packets |
| overflows | N/A |
| queue size (packets) | packets |
The following table lists the events that update the indicated statistics of a queue.
Table 25: Queue Object Statistic Events
| Event | Statistics Updated |
|---|---|
| packet insertion | queue size (bits), free size (bits), free size (packets), queue size (incoming bits), queue size (incoming packets), overflows, queue size (packets) |
| packet removal (or queue flushing) | queue size (bits), queuing delay, free size (bits), free size (packets), queue size (packets) |
Each queue object statistic is described below. An initial value of "undef" means that a statistic is initially undefined. An initial value of "cap" means that a statistic's initial value is equal to the capacity of the queue, in bits or packets as appropriate.
queue size (bits)
This statistic represents the current number of bits stored in the queue. A new sample of queue size (bits) is generated at each packet insertion or removal, when the queue is flushed, or when a change in the queue's capacity causes packets to be removed from it. Insertions and removals occur when the Kernel Procedures op_subq_pk_insert(), and op_subq_pk_remove() are called, respectively.
| Units | bits |
| Initial Value | 0.0 |
queuing delay
This statistic represents the queueing delay for a packet. It is computed by subtracting the arrival time of a packet from the simulation time at its removal from the queue. New samples of delay are generated each time a packet is removed from the queue.
| Units | seconds |
| Initial Value | undef |
free size (bits)
This statistic represents the available space in the queue measured in bits. This is the maximum number of bits which could be added to the queue without causing an overflow. It is computed by subtracting queue size (bits) from the queue's bit capacity.
| Units | bits |
| Initial Value | cap size |
free size (packets)
This statistic represents the available space in the queue measured in packets. This is the number of packets which could be added to the queue without causing an overflow. It is computed by subtracting queue size (packets) from the queue's packet capacity.
| Units | packets |
| Initial Value | cap |
queue size (incoming bits)
This statistic represents the current queue size (measured in bits) when the packet arrives at the queue. Insertions occur when the Kernel Procedure op_subq_pk_insert() is called.
| Units | bits |
| Initial Value | undef |
queue size (incoming packets)
This statistic represents the current queue size (measured in packets) when the packet arrives at the queue. Insertions occur when the Kernel Procedure op_subq_pk_insert() is called.
| Units | packets |
| Initial Value | undef |
overflows
This statistic represents a running count of the number of times the queue has had to reject packet insertions due to lack of capacity. overflows is monotonically increasing and is updated whenever a packet insertion fails. The queue's process model can detect a failed insertion by testing the value returned by the Kernel Procedure op_subq_pk_insert() against the symbolic constant OPC_QINS_FAIL.
| Units | not applicable |
| Initial Value | 0.0 |
queue size (packets)
This statistic represents the current number of packets stored in the queue. A new sample of queue size (packets) is generated at each packet insertion or removal, when the queue is flushed, or when a change in the queue's capacity causes packets to be removed from it. Insertions and removals occur when the Kernel Procedures op_subq_pk_insert() and op_subq_pk_remove() are called, respectively.
| Units | packets |
| Initial Value | 0.0 |