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)  

BSDSensor Class Reference

#include <sensor.h>

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

Public Member Functions

 BSDSensor (XOSView *parent, const char *name, const char *high, const char *low, const char *label, const char *caption, int nbr)
 
 ~BSDSensor (void)
 
const char * name (void) const
 
void checkevent (void)
 
void checkResources (void)
 
- Public Member Functions inherited from SensorFieldMeter
 SensorFieldMeter (XOSView *parent, const char *title="", const char *legend="", int docaptions=0, int dolegends=0, int dousedlegends=0)
 
 ~SensorFieldMeter (void)
 
- Public Member Functions inherited from FieldMeter
 FieldMeter (XOSView *parent, int numfields, const char *title="", const char *legend="", int docaptions=0, int dolegends=0, int dousedlegends=0)
 
virtual ~FieldMeter (void)
 
virtual void drawfields (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 draw (void)
 
void checkevent (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)
 
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 getsensor (void)
 
- Protected Member Functions inherited from SensorFieldMeter
void updateLegend (void)
 
void checkFields (double low, double high)
 
- Protected Member Functions inherited from FieldMeter
void SetUsedFormat (const char *const str)
 
void drawlegend (void)
 
void drawused (int mandatory)
 
bool checkX (int x, int width) const
 
void setNumFields (int n)
 
void IntervalTimerStart ()
 
void IntervalTimerStop ()
 
double IntervalTimeInMicrosecs ()
 
double IntervalTimeInSecs ()
 
- Protected Member Functions inherited from Meter
double samplesPerSecond ()
 
double secondsPerSample ()
 

Private Attributes

char name_ [32]
 
char highname_ [32]
 
char lowname_ [32]
 
char val_ [32]
 
char highval_ [32]
 
char lowval_ [32]
 
int nbr_
 

Additional Inherited Members

- Static Public Member Functions inherited from Meter
static double scaleValue (double value, char *scale, bool metric)
 
- Protected Types inherited from FieldMeter
enum  UsedType {
  INVALID_0 , FLOAT , PERCENT , AUTOSCALE ,
  INVALID_TAIL
}
 
- Protected Attributes inherited from SensorFieldMeter
char unit_ [8]
 
double high_
 
double low_
 
bool has_high_
 
bool has_low_
 
bool negative_
 
unsigned long actcolor_
 
unsigned long highcolor_
 
unsigned long lowcolor_
 
- Protected Attributes inherited from FieldMeter
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_
 
- 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 20 of file sensor.h.

Constructor & Destructor Documentation

◆ BSDSensor()

BSDSensor::BSDSensor ( XOSView parent,
const char *  name,
const char *  high,
const char *  low,
const char *  label,
const char *  caption,
int  nbr 
)

◆ ~BSDSensor()

BSDSensor::~BSDSensor ( void  )

Definition at line 54 of file sensor.cc.

Member Function Documentation

◆ checkevent()

void BSDSensor::checkevent ( void  )
virtual

Implements Meter.

Definition at line 87 of file sensor.cc.

References FieldMeter::drawfields(), and getsensor().

◆ checkResources()

◆ getsensor()

void BSDSensor::getsensor ( void  )
protected

◆ name()

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

Reimplemented from Meter.

Definition at line 26 of file sensor.h.

Referenced by BSDSensor().

Member Data Documentation

◆ highname_

char BSDSensor::highname_[32]
private

Definition at line 34 of file sensor.h.

Referenced by BSDSensor(), and getsensor().

◆ highval_

char BSDSensor::highval_[32]
private

Definition at line 35 of file sensor.h.

Referenced by BSDSensor(), and getsensor().

◆ lowname_

char BSDSensor::lowname_[32]
private

Definition at line 34 of file sensor.h.

Referenced by BSDSensor(), and getsensor().

◆ lowval_

char BSDSensor::lowval_[32]
private

Definition at line 35 of file sensor.h.

Referenced by BSDSensor(), and getsensor().

◆ name_

char BSDSensor::name_[32]
private

Definition at line 34 of file sensor.h.

Referenced by BSDSensor(), checkResources(), and getsensor().

◆ nbr_

int BSDSensor::nbr_
private

Definition at line 36 of file sensor.h.

Referenced by BSDSensor(), and checkResources().

◆ val_

char BSDSensor::val_[32]
private

Definition at line 35 of file sensor.h.

Referenced by BSDSensor(), checkResources(), and getsensor().


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