Name

metrics_metric_open — Gets a metric identifier from a metric name

Metrics

Synopsis

#include <metrics.h>
int metrics_metric_open(metric_name,  
 metric_id); 
const char * metric_name;
metrics_metric_id_t * metric_id;

DESCRIPTION

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.

RETURN VALUE

Upon successful completion, the metrics_metric_open() function shall return a value of zero. Otherwise, it shall return the corresponding error number.

ERRORS

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.

AUTHORS

Agustin Espinosa , Andrés Terrasa , Ana García .

SEE ALSO

metrics_metric_getname(), metrics_metric_getdescription().