nrac_resource_consumers_get()

Abstract

Obtain a list of the consumers that are using a specific resource.

Syntax

nrac_resource_consumers_get (resource_handle, event_handle)
Argument Type Description
resource_handle Nrac_Resource_Handle handle for the resource of interest
event_handle Nrac_Event_Handle handle for an event that is used to restrict the applicable consumers. Use NRAC_ANY_EVENT to return all consumers.

Return Type

PrgT_List *

list of elements of type Nrac_Conditional_Consumer_Handle. Provides access to consumers and the events upon which they are contingent.

nrac.h

Details

This function builds a list of all the consumers on a given resource. The result can be based solely on the consumers with respect to a specific event or, if NRAC_ANY_EVENT is passed in, then all consumers are taken into account, irrespective of the events upon which they depend. The list consists of elements of type Nrac_Conditional_Consumer_Handle, which provide access to both a consumer and an event upon which it is dependent.

The list of handles obtained by calling this function is not maintained by the NRAC package. Once it is returned to the calling code, it is the programmer’s responsibility to deallocate that memory, once all of the desired information had been extracted. This is most easily done by calling prg_list_free() to free the elements in the list and prg_mem_free() to free the list container object itself. Alternatively, you may deallocate one element in the list at a time by using nrac_conditional_consumer_destroy().

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