metrics_metric_getname , metrics_metric_getdescription — Get the name and the description of a metric identifier
Metrics
#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; |
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}).
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.
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.
Agustin Espinosa <aespinos@dsic.upv.es>, Andrés Terrasa <aterrasa@dsic.upv.es>, Ana García <agarcia@dsic.upv.es>.