metrics_metricset_iterator_getnext, metrics_metricset_iterator_rewind — Iterate over a metric set
Metrics
#include <metrics.h>
int metrics_metricset_iterator_getnext ( | set, | |
metric_id, | ||
unavailable) ; |
metrics_metricset_t * | set; |
metrics_metric_id_t * | metric_id; |
int * | unavailable; |
int metrics_metricset_iterator_rewind ( | set) ; |
metrics_metricset_t * | set; |
The first time metrics_metricset_iterator_getnext() is called, the function shall return in the variable pointed to by metric_id the first metric identifier of the set of metrics identified by the set argument. Successive calls to metrics_metricset_iterator_getnext() return in the variable pointed to by metric_id the next metric in that same set. Each time a metric identifier is successfully written into the variable pointed to by the metric_id argument, the variable pointed to by the unavailable argument shall be set to zero. When no more metric identifiers are available, and so none is returned, the variable pointed to by the unavailable argument shall be set to a value different from zero.
The metrics_metricset_iterator_rewind() function shall reset the next metric identifier to be read to the first metric identifier from the set identified by the set argument.
Upon successful completion, these functions shall return a value of zero. Otherwise, they shall return the corresponding error number.
These functions may fail if:
[EINVAL]:
The argument set was NULL.
The argument metric_id was NULL.
The argument unavailable was NULL.
Agustin Espinosa <aespinos@dsic.upv.es>, Andrés Terrasa <aterrasa@dsic.upv.es>, Ana García <agarcia@dsic.upv.es>.