Fawkes API
Fawkes Development Version
|
Class representing a graph definition. More...
#include <>>
Public Member Functions | |
RRDGraphDefinition (const char *name, RRDDefinition *rrd_def, const char *title, const char *vertical_label, std::vector< RRDGraphDataDefinition > &def, std::vector< RRDGraphElement *> &elements, time_t start=-600, time_t end=-10, unsigned int step=10, unsigned int update_interval=10, bool slope_mode=false) | |
Constructor. More... | |
RRDGraphDefinition (const RRDGraphDefinition &other) | |
Copy constructor. More... | |
~RRDGraphDefinition () | |
Destructor. More... | |
void | set_filename (const char *filename) |
Set filename. More... | |
const char ** | get_argv (size_t &argc) const |
Get argument array and size. More... | |
const char * | get_name () const |
Get graph definition name. More... | |
const RRDDefinition * | get_rrd_def () const |
Get RRD definition. More... | |
time_t | get_start () const |
Get start time. More... | |
time_t | get_end () const |
Get end time. More... | |
unsigned int | get_step () const |
Get step size. More... | |
const char * | get_title () const |
Get title. More... | |
const char * | get_vertical_label () const |
Get vertical label. More... | |
const unsigned int | get_update_interval () const |
Get update interval. More... | |
const bool | get_slope_mode () const |
Get slope moe. More... | |
const std::vector< RRDGraphDataDefinition > & | get_defs () const |
Get definitions. More... | |
const std::vector< RRDGraphElement * > & | get_elements () const |
Get graph elements. More... | |
unsigned int | get_width () const |
Get line width. More... | |
const std::vector< const char * > | get_fonts () const |
Get fonts. More... | |
const char * | get_filename () const |
Get filename. More... | |
Class representing a graph definition.
This graph definition is used to generate all required parameters to create a graph from an RRD.
Definition at line 313 of file rrd_descriptions.h.
fawkes::RRDGraphDefinition::RRDGraphDefinition | ( | const char * | name, |
RRDDefinition * | rrd_def, | ||
const char * | title, | ||
const char * | vertical_label, | ||
std::vector< RRDGraphDataDefinition > & | def, | ||
std::vector< RRDGraphElement *> & | elements, | ||
time_t | start = -600 , |
||
time_t | end = -10 , |
||
unsigned int | step = 10 , |
||
unsigned int | update_interval = 10 , |
||
bool | slope_mode = false |
||
) |
Constructor.
name | name of this graph definition, used internally, name must be unique among all registered graphs. |
rrd_def | pointer to definition of the RRD to graph |
start | time from where to start graphing. Maybe an absolute time or a negative number for relative times, e.g. "-300" for 5 minutes back from now. |
end | time where to end graphing. Maybe an absolute time or a negative number for relative times, e.g. "-300" for 5 minutes back from now. |
step | step size in seconds |
title | Graph title to print on top of graph |
vertical_label | string printed rotated by 90° counter-clockwise besides the vertical axis. Usually should carry description of the Y axis units. |
update_interval | The interval at which the graph should be generated. |
slope_mode | true to enable slope mode when graphing |
def | data definitions for the graph |
elements | elements to print in the graph. This graph definition takes ownership of the graph elemenets and will delete them in its dtor. |
Definition at line 817 of file rrd_descriptions.cpp.
References fawkes::StringConversions::to_string().
fawkes::RRDGraphDefinition::RRDGraphDefinition | ( | const RRDGraphDefinition & | other | ) |
Copy constructor.
other | instance to copy |
Definition at line 848 of file rrd_descriptions.cpp.
References fawkes::StringConversions::to_string().
fawkes::RRDGraphDefinition::~RRDGraphDefinition | ( | ) |
Destructor.
Definition at line 873 of file rrd_descriptions.cpp.
const char ** fawkes::RRDGraphDefinition::get_argv | ( | size_t & | argc | ) | const |
Get argument array and size.
argc | upon completion contains the number of arguments in the return value. |
Definition at line 914 of file rrd_descriptions.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get graph definition name.
Definition at line 330 of file rrd_descriptions.h.
Referenced by RRDThread::add_graph().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void fawkes::RRDGraphDefinition::set_filename | ( | const char * | filename | ) |
Set filename.
This can be done only once. Do not do this manually, rather let the RRDManager handle this!
filename | new filename, should be absolute, otherwise considered relative to current working directory. |
Definition at line 899 of file rrd_descriptions.cpp.
References fawkes::RRDDefinition::get_name().
Referenced by RRDThread::add_graph().