Oma_Ov_Reader_Iterator_Create()
Abstract
Creates an iterator for retrieving output vectors from an OV file.
Syntax
Oma_Ov_Reader_Iterator_Create (ov_reader_ptr, report_name, obj_path, group_and_stat_name)
| Argument | Type | Description |
|---|---|---|
ov_reader_ptr |
OmaT_Ov_Reader * |
OV file of interest. |
report_name |
const char * |
Report name to be used as a filter when selecting the vectors provided by the iterator. See report_name. |
obj_path |
const char * |
Full hierarchical object name to be used as a filter when selecting the vectors provided by the iterator. See obj_path. |
group_and_stat_name |
const char * |
Full name of the statistic to be provided by the iterator. See group_and_stat_name. |
Return Type
OmaT_Ov_Reader_Iterator *
An iterator that can be used to select particular vectors.
Header
oma_ov.h
Details
This function creates an iterator object you can use to find all vectors that match certain criteria and loop over them. The matching criteria work as follows.
report_name
This criterion ;ets you select statistics that match a particular report, as follows:
- If
report_nameis PRGC_NIL, all statistics are selected, regardless of the report in which they appear. - If
report_nameis OmaC_Ov_Default_Report_Name, all statistics that do not have a report specified are selected. - If any other string value is used for
report_name, only the statistics that are part of that report are selected.
obj_path
This criterion lets the you select statistics that apply to a particular object, as follows:
- If
object_pathis PRGC_NIL, all statistics are selected. - If
object_pathis OmaC_Ov_Global_Object_Path, only global statistics are selected. - If any other string value is used for
object_path, only statistics for that object are selected.
group_and_stat_name
This criterion lets you select particular statistics, as follows:
- If
group_and_stat_nameis PRGC_NIL, all statistics are selected. - If any other string value is used for
group_and_stat_name, only that statistic is selected. This argument value should be the full name of the statistic. For example, to select the “Load (bits/sec)” statistic in the “Ethernet” group,group_and_stat_nameshould be “Ethernet.Load (bits/sec)”.
The search criteria can be combined to filter the statistics as desired. For example, to get all statistics for the node “Logical Network.boston.router” in the “January” report, the function should be called as follows:
Oma_Ov_Reader_Iterator_Create (ov_reader_ptr, "January",
"Logical Network.boston.router", PRGC_NIL);
If all statistics are desired, the function call would be:
Oma_Ov_Reader_Iterator_Create (ov_reader_ptr, PRGC_NIL,
PRGC_NIL, PRGC_NIL);