Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

histhandler.h File Reference


Detailed Description

Histogram handlers receive events with data that will be histogramed, and max,min,mean calculated. Additionally, they can receive events that: Events accepted:
Event NameTypeDescription
datapt AW_EVENT_TYPE_INT32 |
AW_EVENT_TYPE_INT64 |
AW_EVENT_TYPE_FLOAT32 |
AW_EVENT_TYPE_FLOAT64 |
AW_EVENT_TYPE_TIMESTAMP
Add data point to histogram
copy_cmd ignored Copy histogram an generate a copy event
reset_cmd ignored Reset histogram
Events generated:
Event NameTypeDescription
copy AW_EVENT_TYPE_VALUEPTR Received a copy_cmd event, send copy of histogram

#include <stdio.h>
#include "monitor.h"

Go to the source code of this file.

Data Structures

struct  aw_hist_data_t
 Holds the basic histogram data. More...

struct  aw_hist_events_t
 Events generated and processed. More...

struct  aw_hist_in_events_t
 Events consumed. More...

struct  aw_hist_out_events_t
 Events generated. More...

struct  aw_histhandler_t
 Hist handler object. More...


Enumerations

enum  aw_hist_flag_t { AW_HIST_RESET_ON_COPY = 0x1 }
 Flags to set behavior. More...


Functions

aw_hist_data_t * aw_copy_hist_data (aw_hist_data_t *data)
 Copy hist data and all associated resources.

aw_histhandler_t * aw_create_histhandler (float64_t min, float64_t max, u_int32_t nbins, aw_hist_flag_t flags, aw_hist_events_t *events, int32_t(*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), int32_t(*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), const aw_alarm_sched_t *sched, aw_logger_t *logger)
 Create a histogram handler.

void aw_destroy_hist_data (aw_hist_data_t *data)
 Free hist data and all associated resources.

void aw_free_histhandler (aw_histhandler_t *h)
 Free handler and all associated resources.

void aw_writehist (aw_hist_data_t *hist_data, FILE *outstream)
 Write histogram as text to stream as a single line. Format is:.


Enumeration Type Documentation

enum aw_hist_flag_t
 

Flags to set behavior.

Enumeration values:
AW_HIST_RESET_ON_COPY 


Function Documentation

aw_hist_data_t* aw_copy_hist_data (  aw_hist_data_t *  data  ) 
 

Copy hist data and all associated resources.

aw_copy_hist_data

Parameters:
data The data
Returns:
Copy of data, NULL on error

aw_histhandler_t* aw_create_histhandler (  float64_t  min,
float64_t  max,
u_int32_t  nbins,
aw_hist_flag_t  flags,
aw_hist_events_t *  events,
int32_t(*  regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
int32_t(*  regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
const aw_alarm_sched_t *  sched,
aw_logger_t *  logger
) 
 

Create a histogram handler.

aw_create_histhandler

Parameters:
min Smallest allowed value
max Largest allowed value
nbins Number of bins in histogram
flags Bitvector of flags
events Events to receive/generate
regevent Function pointer for event registration
regmaskevent Function pointer for event mask registration
sched Run schedule
logger Logger object
Returns:
Handler object

void aw_destroy_hist_data (  aw_hist_data_t *  data  ) 
 

Free hist data and all associated resources.

aw_destroy_hist_data

Parameters:
data The data

void aw_free_histhandler (  aw_histhandler_t *  h  ) 
 

Free handler and all associated resources.

aw_free_histhandler

Parameters:
h The handler

void aw_writehist (  aw_hist_data_t *  hist_data,
FILE *  outstream
) 
 

Write histogram as text to stream as a single line. Format is:.

aw_writehist


[ < min limit > \t < max limit > \t < bin width > \t < n bins > ],[ < min sample > \t < max sample > \t < mean > \t < n samples > ]\t < 0 bin value > \t < 1 bin value > ... \n

Parameters:
hist_data The data
outstream FILE pointer to write data

Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)