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)  

SerialMeter Class Reference

#include <serialmeter.h>

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

Public Types

enum  Device {
  S0 , S1 , S2 , S3 ,
  S4 , S5 , S6 , S7 ,
  S8 , S9
}
 

Public Member Functions

 SerialMeter (XOSView *parent, Device device)
 
 ~SerialMeter (void)
 
void checkevent (void)
 
void checkResources (void)
 
- Public Member Functions inherited from BitMeter
 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 draw (void)
 
void disableMeter (void)
 
int numBits (void) const
 
void setNumBits (int n)
 
- 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 numDevices (void)
 
static const char * getResourceName (Device dev)
 
- Static Public Member Functions inherited from Meter
static double scaleValue (double value, char *scale, bool metric)
 

Private Member Functions

void getserial (void)
 
bool getport (unsigned short int port)
 
const char * getTitle (Device dev) const
 
unsigned short int getPortBase (Device dev) const
 

Private Attributes

unsigned short int _port
 
Device _device
 

Additional Inherited Members

- Protected Member Functions inherited from BitMeter
void setBits (int startbit, unsigned char values)
 
void drawBits (int mandatory=0)
 
- Protected Member Functions inherited from Meter
double samplesPerSecond ()
 
double secondsPerSample ()
 
- Protected Attributes inherited from BitMeter
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_
 

Detailed Description

Definition at line 18 of file serialmeter.h.

Member Enumeration Documentation

◆ Device

Enumerator
S0 
S1 
S2 
S3 
S4 
S5 
S6 
S7 
S8 
S9 

Definition at line 20 of file serialmeter.h.

Constructor & Destructor Documentation

◆ SerialMeter()

SerialMeter::SerialMeter ( XOSView parent,
Device  device 
)

Definition at line 32 of file serialmeter.cc.

References _device, and _port.

◆ ~SerialMeter()

SerialMeter::~SerialMeter ( void  )

Definition at line 38 of file serialmeter.cc.

Member Function Documentation

◆ checkevent()

void SerialMeter::checkevent ( void  )
virtual

Reimplemented from BitMeter.

Definition at line 41 of file serialmeter.cc.

References BitMeter::checkevent(), and getserial().

◆ checkResources()

void SerialMeter::checkResources ( void  )
virtual

◆ getport()

bool SerialMeter::getport ( unsigned short int  port)
private

Definition at line 60 of file serialmeter.cc.

Referenced by checkResources().

◆ getPortBase()

unsigned short int SerialMeter::getPortBase ( Device  dev) const
private

Definition at line 96 of file serialmeter.cc.

References XWin::getResource(), getResourceName(), and Meter::parent_.

Referenced by checkResources().

◆ getResourceName()

const char * SerialMeter::getResourceName ( Device  dev)
static

Definition at line 86 of file serialmeter.cc.

Referenced by getPortBase().

◆ getserial()

void SerialMeter::getserial ( void  )
private

Definition at line 68 of file serialmeter.cc.

References _port, BitMeter::setBits(), UART_LSR, and UART_MSR.

Referenced by checkevent().

◆ getTitle()

const char * SerialMeter::getTitle ( Device  dev) const
private

Definition at line 79 of file serialmeter.cc.

◆ numDevices()

static int SerialMeter::numDevices ( void  )
inlinestatic

Definition at line 21 of file serialmeter.h.

Member Data Documentation

◆ _device

Device SerialMeter::_device
private

Definition at line 34 of file serialmeter.h.

Referenced by checkResources(), and SerialMeter().

◆ _port

unsigned short int SerialMeter::_port
private

Definition at line 33 of file serialmeter.h.

Referenced by checkResources(), getserial(), and SerialMeter().


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