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)  

BitMeter Class Reference

#include <bitmeter.h>

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

Public Member Functions

 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 checkevent (void)
 
void draw (void)
 
void disableMeter (void)
 
int numBits (void) const
 
void setNumBits (int n)
 
void checkResources (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)
 
virtual const char * name (void) const
 
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
 

Protected Member Functions

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

Protected Attributes

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_
 

Additional Inherited Members

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

Detailed Description

Definition at line 14 of file bitmeter.h.

Constructor & Destructor Documentation

◆ BitMeter()

BitMeter::BitMeter ( XOSView parent,
const char *  title = "",
const char *  legend = "",
int  numBits = 1,
int  docaptions = 0,
int  dolegends = 0,
int  dousedlegends = 0 
)

Definition at line 10 of file bitmeter.cc.

References numBits(), and setNumBits().

◆ ~BitMeter()

BitMeter::~BitMeter ( void  )
virtual

Definition at line 18 of file bitmeter.cc.

References bits_, and lastbits_.

Member Function Documentation

◆ checkevent()

void BitMeter::checkevent ( void  )
virtual

Implements Meter.

Reimplemented in SerialMeter, IntMeter, and IntMeter.

Definition at line 47 of file bitmeter.cc.

References drawBits().

Referenced by IntMeter::checkevent(), and SerialMeter::checkevent().

◆ checkResources()

void BitMeter::checkResources ( void  )
virtual

Reimplemented from Meter.

Reimplemented in SerialMeter, IntMeter, and IntMeter.

Definition at line 43 of file bitmeter.cc.

References Meter::checkResources().

Referenced by IntMeter::checkResources(), and SerialMeter::checkResources().

◆ disableMeter()

void BitMeter::disableMeter ( void  )

Definition at line 35 of file bitmeter.cc.

References XWin::allocColor(), disabled_, Meter::legend(), offColor_, onColor_, and Meter::parent_.

Referenced by IntMeter::IntMeter().

◆ draw()

◆ drawBits()

void BitMeter::drawBits ( int  mandatory = 0)
protected

◆ numBits()

int BitMeter::numBits ( void  ) const
inline

Definition at line 25 of file bitmeter.h.

References numbits_.

Referenced by BitMeter(), and IntMeter::updateirqcount().

◆ setBits()

void BitMeter::setBits ( int  startbit,
unsigned char  values 
)
protected

Definition at line 106 of file bitmeter.cc.

References bits_.

Referenced by SerialMeter::getserial().

◆ setNumBits()

void BitMeter::setNumBits ( int  n)

Definition at line 23 of file bitmeter.cc.

References bits_, lastbits_, and numbits_.

Referenced by BitMeter(), and IntMeter::updateirqcount().

Member Data Documentation

◆ bits_

char* BitMeter::bits_
protected

Definition at line 31 of file bitmeter.h.

Referenced by IntMeter::checkevent(), drawBits(), setBits(), setNumBits(), and ~BitMeter().

◆ disabled_

bool BitMeter::disabled_
protected

Definition at line 33 of file bitmeter.h.

Referenced by disableMeter().

◆ lastbits_

char * BitMeter::lastbits_
protected

Definition at line 31 of file bitmeter.h.

Referenced by drawBits(), setNumBits(), and ~BitMeter().

◆ numbits_

int BitMeter::numbits_
protected

Definition at line 32 of file bitmeter.h.

Referenced by drawBits(), numBits(), and setNumBits().

◆ offColor_

unsigned long BitMeter::offColor_
protected

◆ onColor_

unsigned long BitMeter::onColor_
protected

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