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)  

Meter Class Referenceabstract

#include <meter.h>

Inheritance diagram for Meter:
Collaboration diagram for Meter:

Public Member Functions

 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)
virtual void checkevent (void)=0
virtual void draw (void)=0
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
virtual void checkResources (void)

Static Public Member Functions

static double scaleValue (double value, char *scale, bool metric)

Protected Member Functions

double samplesPerSecond ()
double secondsPerSample ()

Protected Attributes

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 14 of file meter.h.

Constructor & Destructor Documentation

◆ Meter()

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

◆ ~Meter()

Meter::~Meter ( void  )

Definition at line 26 of file meter.cc.

References legend_, and title_.

Member Function Documentation

◆ checkevent()

◆ checkResources()

◆ docaptions()

void Meter::docaptions ( int  val)

Definition at line 28 of file meter.h.

References docaptions_.

Referenced by XOSView::dolegends(), and Meter().

◆ dolegends()

void Meter::dolegends ( int  val)

Definition at line 29 of file meter.h.

References dolegends_.

Referenced by XOSView::dolegends(), and Meter().

◆ dousedlegends()

void Meter::dousedlegends ( int  val)

Definition at line 30 of file meter.h.

References dousedlegends_.

Referenced by XOSView::dolegends(), and Meter().

◆ draw()

virtual void Meter::draw ( void  )
pure virtual

Implemented in FieldMeter, BitMeter, and BitFieldMeter.

Referenced by XOSView::draw().

◆ getHeight()

int Meter::getHeight ( ) const

Definition at line 45 of file meter.h.

References height_.

◆ getWidth()

int Meter::getWidth ( ) const

Definition at line 44 of file meter.h.

References width_.

◆ getX()

int Meter::getX ( ) const

Definition at line 42 of file meter.h.

References x_.

◆ getY()

int Meter::getY ( ) const

Definition at line 43 of file meter.h.

References y_.

◆ legend() [1/2]

void Meter::legend ( const char *  legend)

Definition at line 48 of file meter.cc.

References legend(), and legend_.

◆ legend() [2/2]

◆ name()

◆ requestevent()

int Meter::requestevent ( void  )

Definition at line 31 of file meter.h.

References counter_, name(), and priority_.

Referenced by XOSView::run().

◆ resize()

void Meter::resize ( int  x,
int  y,
int  width,
int  height 

Definition at line 59 of file meter.cc.

References height_, width_, x_, and y_.

Referenced by Meter(), and XOSView::resize().

◆ samplesPerSecond()

double Meter::samplesPerSecond ( )

Definition at line 57 of file meter.h.

References MAX_SAMPLES_PER_SECOND, and priority_.

Referenced by secondsPerSample().

◆ scaleValue()

double Meter::scaleValue ( double  value,
char *  scale,
bool  metric 

◆ secondsPerSample()

double Meter::secondsPerSample ( )

Definition at line 58 of file meter.h.

References samplesPerSecond().

◆ title() [1/2]

void Meter::title ( const char *  title)

Definition at line 37 of file meter.cc.

References title(), and title_.

◆ title() [2/2]

const char* Meter::title ( void  )

Definition at line 25 of file meter.h.

References title_.

Referenced by LmsTemp::checksensors(), CPUMeter::CPUMeter(), Meter(), and title().

Member Data Documentation

◆ counter_

int Meter::counter_

Definition at line 54 of file meter.h.

Referenced by Meter(), and requestevent().

◆ docaptions_

int Meter::docaptions_

◆ dolegends_

◆ dousedlegends_

◆ height_

◆ legend_

char * Meter::legend_

◆ parent_

XOSView* Meter::parent_

Definition at line 52 of file meter.h.

Referenced by ACPITemp::ACPITemp(), BitFieldMeter::checkResources(), BtryMeter::checkResources(), CoreTemp::checkResources(), CPUMeter::checkResources(), DiskMeter::checkResources(), IntMeter::checkResources(), IrqRateMeter::checkResources(), LoadMeter::checkResources(), MemMeter::checkResources(), NetMeter::checkResources(), PageMeter::checkResources(), BSDSensor::checkResources(), SwapMeter::checkResources(), FieldMeter::checkResources(), FieldMeterGraph::checkResources(), GfxMeter::checkResources(), ACPITemp::checkResources(), LmsTemp::checkResources(), NFSStats::checkResources(), NFSDStats::checkResources(), RAIDMeter::checkResources(), SerialMeter::checkResources(), WirelessMeter::checkResources(), checkResources(), CPUMeter::CPUMeter(), BitFieldMeter::disableMeter(), BitMeter::disableMeter(), BitFieldMeter::draw(), BitMeter::draw(), FieldMeter::draw(), FieldMeterGraph::drawBar(), BitFieldMeter::drawBits(), BitMeter::drawBits(), BitFieldMeter::drawfieldlegend(), BitFieldMeter::drawfields(), FieldMeter::drawfields(), FieldMeterDecay::drawfields(), FieldMeterGraph::drawfields(), FieldMeter::drawlegend(), BitFieldMeter::drawused(), FieldMeter::drawused(), CoreTemp::findSysFiles(), ACPITemp::getacpitemp(), CoreTemp::getcoretemp(), LmsTemp::getlmstemp(), SerialMeter::getPortBase(), NetMeter::getProcStats(), WirelessMeter::getpwrinfo(), BtryMeter::getstats(), NetMeter::getSysStats(), GfxMeter::GfxMeter(), BtryMeter::handle_acpi_state(), BtryMeter::handle_apm_state(), LmsTemp::LmsTemp(), LoadMeter::LoadMeter(), MemMeter::MemMeter(), Meter(), NetMeter::NetMeter(), BitFieldMeter::setfieldcolor(), and FieldMeter::setfieldcolor().

◆ priority_

◆ textcolor_

unsigned long Meter::textcolor_

Definition at line 56 of file meter.h.

Referenced by checkResources(), BitFieldMeter::draw(), BitMeter::draw(), and FieldMeter::draw().

◆ title_

char* Meter::title_

Definition at line 55 of file meter.h.

Referenced by BitFieldMeter::draw(), BitMeter::draw(), FieldMeter::draw(), Meter(), title(), and ~Meter().

◆ width_

◆ x_

◆ y_

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