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)  

RAIDMeter Class Reference

#include <raidmeter.h>

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

Public Member Functions

 RAIDMeter (XOSView *parent, int raiddev=0)
 
 ~RAIDMeter (void)
 
void checkevent (void)
 
void checkResources (void)
 
- Public Member Functions inherited from BitFieldMeter
 BitFieldMeter (XOSView *parent, int numBits=1, int numfields=1, const char *title="", const char *bitlegend="", const char *fieldlegend="", int docaptions=0, int dolegends=0, int dousedlegends=0)
 
virtual ~BitFieldMeter (void)
 
virtual void drawfields (int mandatory=0)
 
void drawBits (int mandatory=0)
 
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 setBits (int startbit, unsigned char values)
 
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)
 
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
 

Static Public Member Functions

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

Protected Member Functions

int find1 (const char *key, const char *findwhat, int num1)
 
int find2 (const char *key, const char *findwhat, int num1, int num2)
 
int raidparse (char *cp)
 
void getRAIDstate (void)
 
- Protected Member Functions inherited from BitFieldMeter
void SetUsedFormat (const char *const str)
 
void drawfieldlegend (void)
 
void drawused (int mandatory)
 
bool checkX (int x, int width) const
 
void setNumFields (int n)
 
void setNumBits (int n)
 
void setfieldlegend (const char *fieldlegend)
 
void IntervalTimerStart ()
 
void IntervalTimerStop ()
 
double IntervalTimeInMicrosecs ()
 
double IntervalTimeInSecs ()
 
- Protected Member Functions inherited from Meter
double samplesPerSecond ()
 
double secondsPerSample ()
 

Protected Attributes

int _raiddev
 
char state [20]
 
char type [20]
 
char working_map [20]
 
char resync_state [20]
 
int disknum
 
unsigned long doneColor_
 
unsigned long todoColor_
 
unsigned long completeColor_
 
- Protected Attributes inherited from BitFieldMeter
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_
 
unsigned long onColor_
 
unsigned long offColor_
 
char * bits_
 
char * lastbits_
 
int numbits_
 
char * fieldLegend_
 
- 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_
 

Static Protected Attributes

static int mdnum
 

Additional Inherited Members

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

Detailed Description

Definition at line 15 of file raidmeter.h.

Constructor & Destructor Documentation

◆ RAIDMeter()

RAIDMeter::RAIDMeter ( XOSView parent,
int  raiddev = 0 
)

◆ ~RAIDMeter()

RAIDMeter::~RAIDMeter ( void  )

Definition at line 35 of file raidmeter.cc.

Member Function Documentation

◆ checkevent()

◆ checkResources()

◆ countRAIDs()

static int RAIDMeter::countRAIDs ( void  )
static

◆ find1()

int RAIDMeter::find1 ( const char *  key,
const char *  findwhat,
int  num1 
)
protected

Definition at line 73 of file raidmeter.cc.

Referenced by raidparse().

◆ find2()

int RAIDMeter::find2 ( const char *  key,
const char *  findwhat,
int  num1,
int  num2 
)
protected

Definition at line 84 of file raidmeter.cc.

◆ getRAIDstate()

void RAIDMeter::getRAIDstate ( void  )
protected

Definition at line 120 of file raidmeter.cc.

References RAIDFILE, and raidparse().

Referenced by checkevent(), and RAIDMeter().

◆ raidparse()

int RAIDMeter::raidparse ( char *  cp)
protected

Definition at line 96 of file raidmeter.cc.

References _raiddev, disknum, find1(), resync_state, state, type, and working_map.

Referenced by getRAIDstate().

Member Data Documentation

◆ _raiddev

int RAIDMeter::_raiddev
protected

Definition at line 28 of file raidmeter.h.

Referenced by RAIDMeter(), and raidparse().

◆ completeColor_

unsigned long RAIDMeter::completeColor_
protected

Definition at line 37 of file raidmeter.h.

Referenced by checkevent(), and checkResources().

◆ disknum

int RAIDMeter::disknum
protected

Definition at line 35 of file raidmeter.h.

Referenced by checkevent(), RAIDMeter(), and raidparse().

◆ doneColor_

unsigned long RAIDMeter::doneColor_
protected

Definition at line 37 of file raidmeter.h.

Referenced by checkevent(), and checkResources().

◆ mdnum

int RAIDMeter::mdnum
staticprotected

Definition at line 29 of file raidmeter.h.

◆ resync_state

char RAIDMeter::resync_state[20]
protected

Definition at line 34 of file raidmeter.h.

Referenced by checkevent(), and raidparse().

◆ state

char RAIDMeter::state[20]
protected

Definition at line 31 of file raidmeter.h.

Referenced by raidparse().

◆ todoColor_

unsigned long RAIDMeter::todoColor_
protected

Definition at line 37 of file raidmeter.h.

Referenced by checkevent(), and checkResources().

◆ type

char RAIDMeter::type[20]
protected

Definition at line 32 of file raidmeter.h.

Referenced by raidparse().

◆ working_map

char RAIDMeter::working_map[20]
protected

Definition at line 33 of file raidmeter.h.

Referenced by checkevent(), and raidparse().


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