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);

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com