metrics_metric_open — Gets a metric identifier from a metric name
Metrics
#include <metrics.h>
int metrics_metric_open( | metric_name, | |
metric_id) ; |
const char * | metric_name; |
metrics_metric_id_t * | metric_id; |
The metrics_metric_open() function shall associate a predefinited metric name with a metric identifier. The metric name is the string pointed to by the argument metric_name. It shall have a maximum of {METRICS_NAME_MAX} characters (which has the minimum value {_METRICS_NAME_MAX}). The metric identifier is returned in the variable pointed to by the metric_id argument.
Upon successful completion, the metrics_metric_open() function shall return a value of zero. Otherwise, it shall return the corresponding error number.
The metrics_metric_open() function shall fail if:
[EINVAL]:
The string pointed from the metric_name is not a valid metric name.
The argument metric_id is NULL.
Agustin Espinosa <aespinos@dsic.upv.es>, Andrés Terrasa <aterrasa@dsic.upv.es>, Ana García <agarcia@dsic.upv.es>.