xosview  1.23
About: xosview is an X Windows based system monitor (cpu, memory, swap and network usage; interrupt and serial activities; load average).
  Fossies Dox: xosview-1.23.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

GfxMeter Class Reference

#include <gfxmeter.h>

Inheritance diagram for GfxMeter:
[legend]
Collaboration diagram for GfxMeter:
[legend]

Public Member Functions

 GfxMeter (XOSView *parent, int max)
 
 ~GfxMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
- Public Member Functions inherited from FieldMeterGraph
 FieldMeterGraph (XOSView *parent, int numfields, const char *title="", const char *legend="", int docaptions=0, int dolegends=0, int dousedlegends=0)
 
virtual ~FieldMeterGraph (void)
 
virtual void drawfields (int mandatory=0)
 
- Public Member Functions inherited from FieldMeterDecay
 FieldMeterDecay (XOSView *parent, int numfields, const char *title="", const char *legend="", int docaptions=0, int dolegends=0, int dousedlegends=0)
 
virtual ~FieldMeterDecay (void)
 
- Public Member Functions inherited from FieldMeter
 FieldMeter (XOSView *parent, int numfields, const char *title="", const char *legend="", int docaptions=0, int dolegends=0, int dousedlegends=0)
 
virtual ~FieldMeter (void)
 
void setfieldcolor (int field, const char *color)
 
void setfieldcolor (int field, unsigned long color)
 
void docaptions (int val)
 
void dolegends (int val)
 
void dousedlegends (int val)
 
void reset (void)
 
void setUsed (double val, double total)
 
void draw (void)
 
void disableMeter (void)
 
- Public Member Functions inherited from Meter
 Meter (XOSView *parent, const char *title="", const char *legend="", int docaptions=0, int dolegends=0, int dousedlegends=0)
 
virtual ~Meter (void)
 
void resize (int x, int y, int width, int height)
 
void title (const char *title)
 
const char * title (void)
 
void legend (const char *legend)
 
const char * legend (void)
 
void docaptions (int val)
 
void dolegends (int val)
 
void dousedlegends (int val)
 
int requestevent (void)
 
int getX () const
 
int getY () const
 
int getWidth () const
 
int getHeight () const
 

Static Public Member Functions

static int nPipes (void)
 
- Static Public Member Functions inherited from Meter
static double scaleValue (double value, char *scale, bool metric)
 

Protected Member Functions

void getgfxinfo (void)
 
- Protected Member Functions inherited from FieldMeterGraph
void setNumCols (int n)
 
- Protected Member Functions inherited from FieldMeter
void SetUsedFormat (const char *const str)
 
void drawlegend (void)
 
void drawused (int mandatory)
 
bool checkX (int x, int width) const
 
void setNumFields (int n)
 
void IntervalTimerStart ()
 
void IntervalTimerStop ()
 
double IntervalTimeInMicrosecs ()
 
double IntervalTimeInSecs ()
 
- Protected Member Functions inherited from Meter
double samplesPerSecond ()
 
double secondsPerSample ()
 

Protected Attributes

unsigned long swapgfxcol_
 
unsigned long warngfxcol_
 
unsigned long critgfxcol_
 
- Protected Attributes inherited from FieldMeterGraph
int useGraph_
 
int graphNumCols_
 
int graphpos_
 
double * heightfield_
 
- Protected Attributes inherited from FieldMeterDecay
int dodecay_
 
int firsttime_
 
double * decay_
 
double * lastDecayval_
 
- Protected Attributes inherited from FieldMeter
int numfields_
 
double * fields_
 
double total_
 
double used_
 
double lastused_
 
int * lastvals_
 
int * lastx_
 
unsigned long * colors_
 
unsigned long usedcolor_
 
UsedType print_
 
int printedZeroTotalMesg_
 
int numWarnings_
 
bool metric_
 
int usedoffset_
 
- Protected Attributes inherited from Meter
XOSViewparent_
 
int x_
 
int y_
 
int width_
 
int height_
 
int docaptions_
 
int dolegends_
 
int dousedlegends_
 
int priority_
 
int counter_
 
char * title_
 
char * legend_
 
unsigned long textcolor_
 

Private Attributes

int warnThreshold
 
int critThreshold
 
int alarmstate
 
int lastalarmstate
 
int _nPipes
 

Additional Inherited Members

- Protected Types inherited from FieldMeter
enum  UsedType {
  INVALID_0 , FLOAT , PERCENT , AUTOSCALE ,
  INVALID_TAIL
}
 

Detailed Description

Definition at line 12 of file gfxmeter.h.

Constructor & Destructor Documentation

◆ GfxMeter()

GfxMeter::GfxMeter ( XOSView parent,
int  max 
)

Definition at line 17 of file gfxmeter.cc.

References _nPipes, XWin::done(), lastalarmstate, max, nPipes(), Meter::parent_, and FieldMeter::total_.

◆ ~GfxMeter()

GfxMeter::~GfxMeter ( void  )

Definition at line 31 of file gfxmeter.cc.

Member Function Documentation

◆ checkevent()

void GfxMeter::checkevent ( void  )
virtual

Reimplemented from FieldMeter.

Definition at line 82 of file gfxmeter.cc.

References FieldMeterGraph::drawfields(), and getgfxinfo().

◆ checkResources()

◆ getgfxinfo()

◆ name()

const char* GfxMeter::name ( void  ) const
inlinevirtual

Reimplemented from Meter.

Definition at line 18 of file gfxmeter.h.

◆ nPipes()

int GfxMeter::nPipes ( void  )
static

Definition at line 35 of file gfxmeter.cc.

References _nPipes.

Referenced by GfxMeter().

Member Data Documentation

◆ _nPipes

int GfxMeter::_nPipes
private

Definition at line 31 of file gfxmeter.h.

Referenced by checkResources(), GfxMeter(), and nPipes().

◆ alarmstate

int GfxMeter::alarmstate
private

Definition at line 30 of file gfxmeter.h.

Referenced by getgfxinfo().

◆ critgfxcol_

unsigned long GfxMeter::critgfxcol_
protected

Definition at line 27 of file gfxmeter.h.

Referenced by checkResources(), and getgfxinfo().

◆ critThreshold

int GfxMeter::critThreshold
private

Definition at line 30 of file gfxmeter.h.

Referenced by checkResources(), and getgfxinfo().

◆ lastalarmstate

int GfxMeter::lastalarmstate
private

Definition at line 30 of file gfxmeter.h.

Referenced by getgfxinfo(), and GfxMeter().

◆ swapgfxcol_

unsigned long GfxMeter::swapgfxcol_
protected

Definition at line 27 of file gfxmeter.h.

Referenced by checkResources(), and getgfxinfo().

◆ warngfxcol_

unsigned long GfxMeter::warngfxcol_
protected

Definition at line 27 of file gfxmeter.h.

Referenced by checkResources(), and getgfxinfo().

◆ warnThreshold

int GfxMeter::warnThreshold
private

Definition at line 30 of file gfxmeter.h.

Referenced by checkResources(), and getgfxinfo().


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