oms_buffer_dequeue()
Abstract
Removes and returns the handle of the object at a specified index in a buffer.
Syntax
oms_buffer_dequeue (buffer_handle, index, pkt_dequeue_time)
| Argument | Type | Description |
|---|---|---|
buffer_handle |
OmsT_Buffer_Handle |
buffer object from which an element is to be removed |
index |
int |
0-based index of element to be removed from the buffer |
pkt_dequeue_time |
double |
simulation time at which the buffer element is removed |
Return Type
void *
Object that is in position index, or OPC_NIL if index does not correspond to an element.
Details
This function removes the element at position index stored in the buffer and returns the corresponding element. If index is less than 0, or greater than or equal to the number of elements in the buffer, OPC_NIL is returned and the buffer content is not affected.
If an element is removed from the buffer, the internal sizes of the buffer and its parent pools are updated accordingly, as well as any associated statistics.