Fawkes API  Fawkes Development Version
fawkes::RRDArchive Class Reference

RRD Archive description. More...

#include <>>

Public Types

enum  ConsolidationFunction { AVERAGE, MIN, MAX, LAST }
 Consolidation function type. More...
 

Public Member Functions

 RRDArchive (ConsolidationFunction cf, float xff, unsigned int steps, unsigned int rows)
 Constructor. More...
 
 RRDArchive (const RRDArchive &rra)
 Copy constructor. More...
 
 ~RRDArchive ()
 Destructor. More...
 
const char * to_string () const
 Get string representation. More...
 
RRDArchiveoperator= (const RRDArchive &rra)
 Assignment operator. More...
 
ConsolidationFunction get_cf () const
 Get consolidation function type. More...
 
float get_xff () const
 Get xfiles factor. More...
 
unsigned int get_steps () const
 Get number of steps. More...
 
unsigned int get_rows () const
 Get number of rows. More...
 

Static Public Member Functions

static const char * cf_to_string (ConsolidationFunction cf)
 Convert consolidation function type to string. More...
 

Detailed Description

RRD Archive description.

Author
Tim Niemueller

Definition at line 86 of file rrd_descriptions.h.

Member Enumeration Documentation

◆ ConsolidationFunction

Consolidation function type.

Enumerator
AVERAGE 

Averaging consolidation function.

MIN 

Minimum consolidation function.

MAX 

Maximum consolidation function.

LAST 

Last value consolidation function.

Definition at line 90 of file rrd_descriptions.h.

Constructor & Destructor Documentation

◆ RRDArchive() [1/2]

fawkes::RRDArchive::RRDArchive ( ConsolidationFunction  cf,
float  xff,
unsigned int  steps,
unsigned int  rows 
)

Constructor.

Parameters
cfconsolidation function
xffThe xfiles factor defines what part of a consolidation interval may be made up from UNKNOWN data while the consolidated value is still regarded as known. It is given as the ratio of allowed UNKNOWN PDPs to the number of PDPs in the interval. Thus, it ranges from 0 to 1 (exclusive).
stepsdefines how many of these primary data points are used to build a consolidated data point which then goes into the archive.
rowsdefines how many generations of data values are kept in an RRA. Obviously, this has to be greater than zero.

Definition at line 179 of file rrd_descriptions.cpp.

◆ RRDArchive() [2/2]

fawkes::RRDArchive::RRDArchive ( const RRDArchive rra)

Copy constructor.

Parameters
rrainstance to copy

Definition at line 189 of file rrd_descriptions.cpp.

◆ ~RRDArchive()

fawkes::RRDArchive::~RRDArchive ( )

Destructor.

Definition at line 197 of file rrd_descriptions.cpp.

Member Function Documentation

◆ cf_to_string()

const char * fawkes::RRDArchive::cf_to_string ( ConsolidationFunction  cf)
static

Convert consolidation function type to string.

Parameters
cfconsolidation function type
Returns
string representation of cf, suitable for RRA lines.

Definition at line 246 of file rrd_descriptions.cpp.

References LAST, MAX, and MIN.

Referenced by fawkes::RRDGraphDataDefinition::to_string(), and fawkes::RRDGraphGPrint::to_string().

◆ get_cf()

ConsolidationFunction fawkes::RRDArchive::get_cf ( ) const
inline

Get consolidation function type.

Returns
consolidation function type

Definition at line 108 of file rrd_descriptions.h.

◆ get_rows()

unsigned int fawkes::RRDArchive::get_rows ( ) const
inline

Get number of rows.

Returns
number of rows

Definition at line 114 of file rrd_descriptions.h.

◆ get_steps()

unsigned int fawkes::RRDArchive::get_steps ( ) const
inline

Get number of steps.

Returns
number of steps

Definition at line 112 of file rrd_descriptions.h.

◆ get_xff()

float fawkes::RRDArchive::get_xff ( ) const
inline

Get xfiles factor.

Returns
xfiles factor

Definition at line 110 of file rrd_descriptions.h.

◆ operator=()

RRDArchive & fawkes::RRDArchive::operator= ( const RRDArchive rra)

Assignment operator.

Parameters
rrainstance to copy from
Returns
reference to this instance

Definition at line 207 of file rrd_descriptions.cpp.

◆ to_string()

const char * fawkes::RRDArchive::to_string ( ) const

Get string representation.

Returns
string representation suitable to be passed to rrd_create().

Definition at line 222 of file rrd_descriptions.cpp.

References LAST, MAX, and MIN.


The documentation for this class was generated from the following files: