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)  

SarMeter Class Reference

#include <sarmeter.h>

Collaboration diagram for SarMeter:
[legend]

Classes

struct  DiskInfo
 
struct  GfxInfo
 

Public Member Functions

GfxInfogetGfxInfo (void)
 
DiskInfogetDiskInfo (void)
 

Static Public Member Functions

static SarMeterInstance ()
 

Private Member Functions

 SarMeter ()
 
 ~SarMeter (void)
 
int setupSadc (void)
 
void checkSadc (void)
 
bool readLine (void)
 
void parseBuffer (void)
 
void forwardBufferTo (char *ptr)
 
void newGfxInfo (void)
 
void newDiskInfo (void)
 

Private Attributes

int _input
 
off_t _bufSize
 
char _buf [0x2000]
 
struct {
   gfxinfo   current
 
   gfxinfo   last
 
   GfxInfo   info
 
_gi
 
struct {
   diskinfo   current [16]
 
   diskinfo   last [16]
 
   DiskInfo   info
 
_di
 

Static Private Attributes

static SarMeter_instance = NULL
 

Detailed Description

Definition at line 32 of file sarmeter.h.

Constructor & Destructor Documentation

◆ SarMeter()

SarMeter::SarMeter ( void  )
private

Definition at line 19 of file sarmeter.cc.

References _di, _gi, _input, MAX_DISKS, and setupSadc().

Referenced by Instance().

◆ ~SarMeter()

SarMeter::~SarMeter ( void  )
inlineprivate

Definition at line 62 of file sarmeter.h.

Member Function Documentation

◆ checkSadc()

void SarMeter::checkSadc ( void  )
private

Definition at line 57 of file sarmeter.cc.

References parseBuffer(), and readLine().

Referenced by getDiskInfo(), and getGfxInfo().

◆ forwardBufferTo()

void SarMeter::forwardBufferTo ( char *  ptr)
private

Definition at line 170 of file sarmeter.cc.

References _buf, and _bufSize.

Referenced by parseBuffer().

◆ getDiskInfo()

DiskInfo* SarMeter::getDiskInfo ( void  )
inline

Definition at line 54 of file sarmeter.h.

References _di, and checkSadc().

Referenced by DiskMeter::getdiskinfo().

◆ getGfxInfo()

GfxInfo* SarMeter::getGfxInfo ( void  )
inline

Definition at line 48 of file sarmeter.h.

References _gi, and checkSadc().

Referenced by GfxMeter::getgfxinfo().

◆ Instance()

SarMeter * SarMeter::Instance ( )
static

Definition at line 11 of file sarmeter.cc.

References _instance, and SarMeter().

Referenced by DiskMeter::getdiskinfo(), and GfxMeter::getgfxinfo().

◆ newDiskInfo()

void SarMeter::newDiskInfo ( void  )
private

Definition at line 151 of file sarmeter.cc.

References _di.

Referenced by parseBuffer().

◆ newGfxInfo()

void SarMeter::newGfxInfo ( void  )
private

Definition at line 139 of file sarmeter.cc.

References _gi.

Referenced by parseBuffer().

◆ parseBuffer()

void SarMeter::parseBuffer ( void  )
private

Definition at line 68 of file sarmeter.cc.

References _buf, _bufSize, _di, _gi, forwardBufferTo(), MAX_DISKS, newDiskInfo(), and newGfxInfo().

Referenced by checkSadc().

◆ readLine()

bool SarMeter::readLine ( void  )
private

Definition at line 38 of file sarmeter.cc.

References _buf, _bufSize, _input, and BUFSIZE.

Referenced by checkSadc().

◆ setupSadc()

int SarMeter::setupSadc ( void  )
private

Definition at line 180 of file sarmeter.cc.

Referenced by SarMeter().

Member Data Documentation

◆ _buf

char SarMeter::_buf[0x2000]
private

Definition at line 79 of file sarmeter.h.

Referenced by forwardBufferTo(), parseBuffer(), and readLine().

◆ _bufSize

off_t SarMeter::_bufSize
private

Definition at line 78 of file sarmeter.h.

Referenced by forwardBufferTo(), parseBuffer(), and readLine().

◆ 

struct { ... } SarMeter::_di

◆ 

struct { ... } SarMeter::_gi

◆ _input

int SarMeter::_input
private

Definition at line 77 of file sarmeter.h.

Referenced by readLine(), and SarMeter().

◆ _instance

SarMeter * SarMeter::_instance = NULL
staticprivate

Definition at line 76 of file sarmeter.h.

Referenced by Instance().

◆ current [1/2]

gfxinfo SarMeter::current

Definition at line 82 of file sarmeter.h.

◆ current [2/2]

diskinfo SarMeter::current[16]

Definition at line 88 of file sarmeter.h.

◆ info [1/2]

GfxInfo SarMeter::info

Definition at line 84 of file sarmeter.h.

◆ info [2/2]

DiskInfo SarMeter::info

Definition at line 90 of file sarmeter.h.

◆ last [1/2]

gfxinfo SarMeter::last

Definition at line 83 of file sarmeter.h.

◆ last [2/2]

diskinfo SarMeter::last[16]

Definition at line 89 of file sarmeter.h.


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