Abstract Subqueue and Packet Indices

When using a Kernel Procedure from the Subqueue Package to operate on a subqueue, an index is used to specify the desired subqueue. Alternatively, special constants may be used for the index parameter to select a subqueue according to some property other than its index number. For instance, a constant may be used to select the smallest subqueue, or the one with the highest mean packet waiting time. These constants are listed in the following table.

Table 93: Subqueue Selection Index Symbolic Constants

Constant Description
OPC_QSEL_MAX_PKSIZE
OPC_QSEL_MIN_PKSIZE
subqueue with the maximum/minimum current number of packets
OPC_QSEL_MAX_IN_PKSIZE
OPC_QSEL_MIN_IN_PKSIZE
subqueue with the maximum/minimum number of packets, as seen by incoming packets (that is, before the last packet was inserted)
OPC_QSEL_MAX_DELAY
OPC_QSEL_MIN_DELAY
subqueue with the maximum/minimum queueing delay of most recent packet
OPC_QSEL_MAX_BITSIZE
OPC_QSEL_MIN_BITSIZE
subqueue with the maximum/minimum current number of bits
OPC_QSEL_MAX_IN_BITSIZE
OPC_QSEL_MIN_IN_BITSIZE
subqueue with the maximum/minimum number of bits, as seen by incoming packets (that is, before the last packet was inserted)
OPC_QSEL_MAX_OVERFLOWS
OPC_QSEL_MIN_OVERFLOWS
subqueue with the maximum/minimum number of space overflows
OPC_QSEL_MAX_FREE_PKSIZE
OPC_QSEL_MIN_FREE_PKSIZE
subqueue with the maximum/minimum current number of free packet slots
OPC_QSEL_MAX_FREE_BITSIZE
OPC_QSEL_MIN_FREE_BITSIZE
subqueue with the maximum/minimum current number of free bits

Similarly, a packet position for extraction or insertion may be specified to a Simulation Kernel procedure either with a physical index (that is, 0 for the first packet in the queue, 1 for the second, etc.), or with a special constant that selects the packet at the head or tail of the subqueue, or the packet with the highest priority as indicated by its “priority” attribute. These constants are listed in the following table.

Table 94: Packet Position Index Symbolic Constants

Constant Description
OPC_QPOS_HEAD head position of subqueue
OPC_QPOS_TAIL tail position of subqueue
OPC_QPOS_PRIO priority-derived position of subqueue