/tmp/l4check/full_tree/trunk/l4/pkg/rt_mon/include/histogram2d.h File Reference

Some functions to work with 2d histograms. More...

#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.


Detailed Description

Some functions to work with 2d histograms.

Date:
08/20/2004
Author:
Martin Pohlack <mp26@os.inf.tu-dresden.de>

Function Documentation

void rt_mon_hist2d_avg ( rt_mon_histogram2d_t *  hist,
double(*)  avg[2],
int  layer 
)

Compute the average values for a 2d histogram.

Parameters:
hist histogram to operate on
Return values:
avg average values for both abscissae dimensions
Parameters:
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.

Parameters:
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
Returns:
pointer to newly malloc'ed, registered and initialized histogram, otherwise
  • NULL in case of error (like out of memory)

void rt_mon_hist2d_dump ( rt_mon_histogram2d_t *  hist  ) 

Dump the content of a histogram using printf.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
hist histogram to get data from
x point to get data from
layer layer to get data from
Returns:
value from histogram

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.

Parameters:
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.

Note:
The histogram is not modified.
Parameters:
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.:

  • underflow and overflow counter
  • histogram content itself

Parameters:
hist histogram to reset

void rt_mon_hist2d_start ( rt_mon_histogram2d_t *  hist  )  [inline]

Set start point in time for a duration measurement.

Parameters:
hist histogram to operate on


Generated on Wed Apr 11 06:43:00 2012 for rt_mon - runtime monitoring by  doxygen 1.5.6