oms_buffer_access()

Abstract

Returns the object that is in position index in the specified buffer, if such an element exists. In this case, the time at which the element was inserted is also returned to the invoker.

Syntax

oms_buffer_access (buffer_handle, index, insertion_time_ptr)

Argument Type Description
buffer_handle OmsT_Buffer_Handle buffer object
index int 0-based index of element to access in the buffer
insertion_time_ptr double * insertion time of accessed element, filled in by function

Return Type

void *

Object that is in position index, or OPC_NIL if invalid index.

Details

This function returns the element stored in the buffer at the index position. The head of the buffer is index 0. The next element is index 1, and so on.

If the index is greater than or equal to the number of elements, or if the index is a negative value, a null pointer is returned and the insertion_time_ptr argument is not filled in.

The number of elements in the buffer is obtained using the oms_buffer_num_elements_get() function.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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