Fawkes API
Fawkes Development Version
|
Class to represent a RRD data source. More...
#include <>>
Public Types | |
enum | Type { GAUGE, COUNTER, DERIVE, ABSOLUTE, COMPUTE } |
Data source type. More... | |
Public Member Functions | |
RRDDataSource (const char *name, Type type, unsigned int heartbeat=30, float min=0, float max=UNKNOWN) | |
Constructor for regular data source. More... | |
RRDDataSource (const char *name, const char *rpn_expression) | |
Constructor for expression RRDs. More... | |
RRDDataSource (const RRDDataSource &other) | |
Copy constructor. More... | |
~RRDDataSource () | |
Destructor. More... | |
RRDDataSource & | operator= (const RRDDataSource &other) |
Assignment operator. More... | |
const char * | to_string () const |
Get string reprensetation. More... | |
const char * | get_name () const |
Get name. More... | |
Type | get_type () const |
Get type. More... | |
unsigned int | get_heartbeat () const |
Get heartbeat. More... | |
float | get_min () const |
Get minimum. More... | |
float | get_max () const |
Get maximum. More... | |
const char * | get_rpn_expression () const |
Get RPN expression. More... | |
Static Public Attributes | |
static const float | UNKNOWN = FLT_MIN |
Use for unknown min or max values. More... | |
Class to represent a RRD data source.
Definition at line 37 of file rrd_descriptions.h.
Data source type.
Enumerator | |
---|---|
GAUGE | Gauge value. |
COUNTER | Counter value. |
DERIVE | Derived value. |
ABSOLUTE | Absolute value. |
COMPUTE | Computed value. |
Definition at line 41 of file rrd_descriptions.h.
fawkes::RRDDataSource::RRDDataSource | ( | const char * | name, |
Type | type, | ||
unsigned int | heartbeat = 30 , |
||
float | min = 0 , |
||
float | max = UNKNOWN |
||
) |
Constructor for regular data source.
name | name of the data source |
type | type of the data source, may not be COMPUTE. |
heartbeat | Number of seconds after which a new value must be received before the value is considered to be unknown. |
min | minimum value, use UNKNOWN constant if not known |
max | maximum value, use UNKNOWN constant if not known |
Definition at line 56 of file rrd_descriptions.cpp.
References COMPUTE.
fawkes::RRDDataSource::RRDDataSource | ( | const char * | name, |
const char * | rpn_expression | ||
) |
Constructor for expression RRDs.
name | name of the data source |
rpn_expression | RPN expression |
Definition at line 72 of file rrd_descriptions.cpp.
fawkes::RRDDataSource::RRDDataSource | ( | const RRDDataSource & | other | ) |
Copy constructor.
other | other instance to copy |
Definition at line 81 of file rrd_descriptions.cpp.
fawkes::RRDDataSource::~RRDDataSource | ( | ) |
Destructor.
Definition at line 91 of file rrd_descriptions.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
RRDDataSource & fawkes::RRDDataSource::operator= | ( | const RRDDataSource & | other | ) |
Assignment operator.
other | Instance to copy data from. |
Definition at line 103 of file rrd_descriptions.cpp.
Referenced by fawkes::RRDGraphLine::clone(), and fawkes::RRDGraphArea::clone().
const char * fawkes::RRDDataSource::to_string | ( | ) | const |
Get string reprensetation.
Definition at line 125 of file rrd_descriptions.cpp.
References ABSOLUTE, COMPUTE, COUNTER, DERIVE, and UNKNOWN.
Referenced by fawkes::RRDGraphGPrint::clone(), fawkes::RRDGraphLine::clone(), and fawkes::RRDGraphArea::clone().
|
static |
Use for unknown min or max values.
Definition at line 49 of file rrd_descriptions.h.
Referenced by to_string().