oms_buffer_flush()
Abstract
Iterates through the elements in the buffer and removes every element for which the flush procedure returns true.
Syntax
oms_buffer_flush (buffer_handle, flush_proc, user_data_ptr)
| Argument | Type | Description |
|---|---|---|
buffer_handle |
OmsT_Buffer_Handle |
buffer object to flush |
flush_proc |
OmsT_Buffer_Element_Flush_Proc |
function used to determine whether an element should be destroyed |
user_data_ptr |
void * |
user data passed to flush_proc |
Return Type
None.
Details
This function iterates through the elements in the buffer, invoking flush_proc for each element. flush_proc should return a Boolean indicating whether the specified element is to be destroyed. If flush_proc returns OPC_TRUE, oms_buffer_flush() removes the element from the buffer and destroys it using the destroy procedure specified when the buffer was created by oms_buffer_pool_create() or oms_buffer_pk_pool_create().
flush_proc has the following prototype:
Boolean *OmsT_Buffer_Element_Flush_Proc (
void *element,
double insertion_time,
void *user_data_ptr);