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)  

IntMeter Class Reference

#include <intmeter.h>

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

Public Member Functions

 IntMeter (XOSView *parent, const char *title="", const char *legend="", int dolegends=0, int dousedlegends=0)
 
 ~IntMeter (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
 IntMeter (XOSView *parent, int cpu=0)
 
 ~IntMeter (void)
 
void checkevent (void)
 
void checkResources (void)
 
- Public Member Functions inherited from BitMeter
 BitMeter (XOSView *parent, const char *title="", const char *legend="", int numBits=1, int docaptions=0, int dolegends=0, int dousedlegends=0)
 
virtual ~BitMeter (void)
 
void draw (void)
 
void disableMeter (void)
 
int numBits (void) const
 
void setNumBits (int n)
 
- 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 countCPUs (void)
 
- Static Public Member Functions inherited from Meter
static double scaleValue (double value, char *scale, bool metric)
 

Protected Member Functions

void getirqs (void)
 
void updateirqcount (bool init=false)
 
- Protected Member Functions inherited from BitMeter
void setBits (int startbit, unsigned char values)
 
void drawBits (int mandatory=0)
 
- Protected Member Functions inherited from Meter
double samplesPerSecond ()
 
double secondsPerSample ()
 

Private Member Functions

void getirqs (void)
 
void updateirqcount (int n, bool init)
 
void initirqcount (void)
 

Private Attributes

uint64_t * irqs_
 
uint64_t * lastirqs_
 
unsigned int * inbrs_
 
unsigned int irqcount_
 
std::map< int, int > realintnum_
 
unsigned long * _irqs
 
unsigned long * _lastirqs
 
int _cpu
 
bool _separate
 

Additional Inherited Members

- Protected Attributes inherited from BitMeter
unsigned long onColor_
 
unsigned long offColor_
 
char * bits_
 
char * lastbits_
 
int numbits_
 
bool disabled_
 
- 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_
 

Detailed Description

Definition at line 15 of file intmeter.h.

Constructor & Destructor Documentation

◆ IntMeter() [1/2]

IntMeter::IntMeter ( XOSView parent,
const char *  title = "",
const char *  legend = "",
int  dolegends = 0,
int  dousedlegends = 0 
)

◆ ~IntMeter() [1/2]

IntMeter::~IntMeter ( void  )

Definition at line 25 of file intmeter.cc.

References inbrs_, irqs_, and lastirqs_.

◆ IntMeter() [2/2]

IntMeter::IntMeter ( XOSView parent,
int  cpu = 0 
)

Definition at line 20 of file intmeter.cc.

References _irqs, _lastirqs, and initirqcount().

◆ ~IntMeter() [2/2]

IntMeter::~IntMeter ( void  )

Member Function Documentation

◆ checkevent() [1/2]

void IntMeter::checkevent ( void  )
virtual

Reimplemented from BitMeter.

Definition at line 31 of file intmeter.cc.

References BitMeter::bits_, BitMeter::checkevent(), getirqs(), inbrs_, irqcount_, irqs_, lastirqs_, realintnum_, and updateirqcount().

◆ checkevent() [2/2]

void IntMeter::checkevent ( void  )
virtual

Reimplemented from BitMeter.

◆ checkResources() [1/2]

void IntMeter::checkResources ( void  )
virtual

◆ checkResources() [2/2]

void IntMeter::checkResources ( void  )
virtual

Reimplemented from BitMeter.

◆ countCPUs()

static int IntMeter::countCPUs ( void  )
inlinestatic

Definition at line 22 of file intmeter.h.

References CPUMeter::countCPUs().

◆ getirqs() [1/2]

void IntMeter::getirqs ( void  )
protected

Definition at line 57 of file intmeter.cc.

References BSDGetIntrStats(), inbrs_, and irqs_.

Referenced by checkevent(), and updateirqcount().

◆ getirqs() [2/2]

void IntMeter::getirqs ( void  )
private

◆ initirqcount()

void IntMeter::initirqcount ( void  )
private

Definition at line 156 of file intmeter.cc.

References INTFILE, max, realintnum, and updateirqcount().

Referenced by IntMeter().

◆ name()

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

Reimplemented from Meter.

Definition at line 21 of file intmeter.h.

◆ updateirqcount() [1/2]

void IntMeter::updateirqcount ( bool  init = false)
protected

Definition at line 61 of file intmeter.cc.

References getirqs(), inbrs_, irqcount_, Meter::legend(), realintnum_, and BitMeter::setNumBits().

Referenced by checkevent(), initirqcount(), and IntMeter().

◆ updateirqcount() [2/2]

void IntMeter::updateirqcount ( int  n,
bool  init 
)
private

Member Data Documentation

◆ _cpu

int IntMeter::_cpu
private

Definition at line 26 of file intmeter.h.

◆ _irqs

unsigned long* IntMeter::_irqs
private

Definition at line 25 of file intmeter.h.

Referenced by IntMeter(), and updateirqcount().

◆ _lastirqs

unsigned long * IntMeter::_lastirqs
private

Definition at line 25 of file intmeter.h.

Referenced by IntMeter(), and updateirqcount().

◆ _separate

bool IntMeter::_separate
private

Definition at line 27 of file intmeter.h.

◆ inbrs_

unsigned int* IntMeter::inbrs_
private

Definition at line 27 of file intmeter.h.

Referenced by checkevent(), getirqs(), IntMeter(), updateirqcount(), and ~IntMeter().

◆ irqcount_

unsigned int IntMeter::irqcount_
private

Definition at line 28 of file intmeter.h.

Referenced by checkevent(), IntMeter(), and updateirqcount().

◆ irqs_

uint64_t* IntMeter::irqs_
private

Definition at line 26 of file intmeter.h.

Referenced by checkevent(), getirqs(), IntMeter(), and ~IntMeter().

◆ lastirqs_

uint64_t * IntMeter::lastirqs_
private

Definition at line 26 of file intmeter.h.

Referenced by checkevent(), IntMeter(), and ~IntMeter().

◆ realintnum_

std::map<int,int> IntMeter::realintnum_
private

Definition at line 29 of file intmeter.h.

Referenced by checkevent(), and updateirqcount().


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