#include <l4/rt_mon/types.h>
Go to the source code of this file.
Functions | |
EXTERN_C_BEGIN rt_mon_histogram2d_t * | rt_mon_hist2d_create (double low[2], double high[2], int bins[2], int layers, const char *name, const char *unit_ord, const char *unit_abs1, const char *unit_abs2, int clock) |
Creates a new histogram, allocates memory for it and registers it at the coordinator. | |
void | rt_mon_hist2d_insert_data (rt_mon_histogram2d_t *hist, rt_mon_time_t x[2], int layer, unsigned int val) |
Inserts an amount into the histogram. | |
int | rt_mon_hist2d_get_data (rt_mon_histogram2d_t *hist, rt_mon_time_t x[2], int layer) |
Get a data point from a histogram. | |
void | rt_mon_hist2d_free (rt_mon_histogram2d_t *hist) |
Destroys a histogram, unregisters it at the coordinator and frees its memory. | |
void | rt_mon_hist2d_reset (rt_mon_histogram2d_t *hist) |
completely re-initialize histogram | |
void | rt_mon_hist2d_dump (rt_mon_histogram2d_t *hist) |
Dump the content of a histogram using printf. | |
void | rt_mon_hist2d_start (rt_mon_histogram2d_t *hist) |
Set start point in time for a duration measurement. | |
void | rt_mon_hist2d_end (rt_mon_histogram2d_t *hist, rt_mon_time_t y, int layer) |
Set end point in time for a duration measurement, insert resulting duration into the histogram. | |
rt_mon_time_t | rt_mon_hist2d_measure (rt_mon_histogram2d_t *hist) |
Get a current time stamp for a histogram. | |
void | rt_mon_hist2d_avg (rt_mon_histogram2d_t *hist, double(*avg)[2], int layer) |
Compute the average values for a 2d histogram. |
void rt_mon_hist2d_avg | ( | rt_mon_histogram2d_t * | hist, | |
double(*) | avg[2], | |||
int | layer | |||
) |
Compute the average values for a 2d histogram.
hist | histogram to operate on |
avg | average values for both abscissae dimensions |
layer | layer to work on |
EXTERN_C_BEGIN rt_mon_histogram2d_t* rt_mon_hist2d_create | ( | double | low[2], | |
double | high[2], | |||
int | bins[2], | |||
int | layers, | |||
const char * | name, | |||
const char * | unit_ord, | |||
const char * | unit_abs1, | |||
const char * | unit_abs2, | |||
int | clock | |||
) |
Creates a new histogram, allocates memory for it and registers it at the coordinator.
low | lower bound for both abscissae | |
high | upper bound for both abscissae | |
bins | number of bins to use between low[0] and high[0] resp. low[0] and high[0] | |
layers | number of layers to allocate for histogram | |
name | name of the histogram | |
unit_ord | measurement units for the ordinate | |
unit_abs1 | measurement units for the first abscissa | |
unit_abs2 | measurement units for the second abscissa | |
clock | type of time source to use for this sensor |
void rt_mon_hist2d_dump | ( | rt_mon_histogram2d_t * | hist | ) |
Dump the content of a histogram using printf.
hist | histogram to dump |
void rt_mon_hist2d_end | ( | rt_mon_histogram2d_t * | hist, | |
rt_mon_time_t | y, | |||
int | layer | |||
) | [inline] |
Set end point in time for a duration measurement, insert resulting duration into the histogram.
hist | histogram to operate on | |
y | point an second abscissa | |
layer | layer to put to to |
void rt_mon_hist2d_free | ( | rt_mon_histogram2d_t * | hist | ) |
Destroys a histogram, unregisters it at the coordinator and frees its memory.
hist | histogram to free |
int rt_mon_hist2d_get_data | ( | rt_mon_histogram2d_t * | hist, | |
rt_mon_time_t | x[2], | |||
int | layer | |||
) | [inline] |
Get a data point from a histogram.
hist | histogram to get data from | |
x | point to get data from | |
layer | layer to get data from |
void rt_mon_hist2d_insert_data | ( | rt_mon_histogram2d_t * | hist, | |
rt_mon_time_t | x[2], | |||
int | layer, | |||
unsigned int | val | |||
) |
Inserts an amount into the histogram.
hist | histogram to insert data to | |
x | point on both abscissae | |
layer | layer to add value to | |
val | value to add to the specified point |
rt_mon_time_t rt_mon_hist2d_measure | ( | rt_mon_histogram2d_t * | hist | ) | [inline] |
Get a current time stamp for a histogram.
hist | histogram to operate on |
void rt_mon_hist2d_reset | ( | rt_mon_histogram2d_t * | hist | ) |
completely re-initialize histogram
Reset all the collected date, i.e.:
hist | histogram to reset |
void rt_mon_hist2d_start | ( | rt_mon_histogram2d_t * | hist | ) | [inline] |
Set start point in time for a duration measurement.
hist | histogram to operate on |