Name

metrics_metric_getname , metrics_metric_getdescription — Get the name and the description of a metric identifier

Metrics

Synopsis

#include <metrics.h>
int metrics_metric_getname (metric_id,  
 metric_name); 
metrics_metric_id_t  metric_id;
char *  metric_name;
int metrics_metric_getdescription (metric_id,  
 metric_description); 
metrics_metric_id_t  metric_id;
char *  metric_description;

DESCRIPTION

The metrics_metric_getname() function shall return, in the argument pointed to by metric_name, the metric name associated with the metric identifier identified by the argument metric_id. The description of the metric shall have a maximum of {METRICS_NAME_MAX} characters (which has the minimum value {_METRICS_NAME_MAX}).

The metrics_metric_getdescription() function shall return, in the argument pointed to by metric_description, the metric description associated with metric identifier identified by the argument metric_id. The name of the metric shall have a maximum of {METRICS_DESCRIPTION_MAX} characters (which has the minimum value {METRICS_DESCRIPTION_MAX}).

RETURN VALUE

Upon successful completion, the metrics_metric_getname() and metrics_metric_getdescription() functions shall return a value of zero. Otherwise, they shall return the corresponding error number.

ERRORS

The metrics_metric_getname() and metrics_metric_getdescription() functions shall fail if:

[EINVAL]:

The metric_id argument was not a valid metric identifier.

The argument metric_name or the argument metric_description was NULL.

AUTHORS

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

SEE ALSO

metrics_metric_open().