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.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 1994, 1995, 2006 by Mike Romberg ( mike.romberg@noaa.gov )
3 //
4 // This file may be distributed under terms of the GPL
5 //
6 
7 #ifndef _SERIALMETER_H_
8 #define _SERIALMETER_H_
9 
10 // hack for not having linux/serial_reg.h, (Debian bug #427599)
11 #define UART_LSR 5
12 #define UART_MSR 6
13 
14 #include "bitmeter.h"
15 #include "xosview.h"
16 
17 
18 class SerialMeter : public BitMeter {
19 public:
20  enum Device { S0, S1, S2, S3, S4, S5, S6, S7, S8, S9 };
21  static int numDevices(void) { return 10; }
22 
23  SerialMeter( XOSView *parent, Device device);
24  ~SerialMeter( void );
25 
26  static const char *getResourceName(Device dev);
27 
28  void checkevent( void );
29 
30  void checkResources( void );
31 
32 private:
33  unsigned short int _port;
35 
36  void getserial( void );
37  bool getport(unsigned short int port);
38  const char *getTitle(Device dev) const;
39  unsigned short int getPortBase(Device dev) const;
40 };
41 
42 #endif
unsigned short int getPortBase(Device dev) const
Definition: serialmeter.cc:96
SerialMeter(XOSView *parent, Device device)
Definition: serialmeter.cc:32
unsigned short int _port
Definition: serialmeter.h:33
static const char * getResourceName(Device dev)
Definition: serialmeter.cc:86
void checkResources(void)
Definition: serialmeter.cc:46
void checkevent(void)
Definition: serialmeter.cc:41
static int numDevices(void)
Definition: serialmeter.h:21
Device _device
Definition: serialmeter.h:34
const char * getTitle(Device dev) const
Definition: serialmeter.cc:79
bool getport(unsigned short int port)
Definition: serialmeter.cc:60
~SerialMeter(void)
Definition: serialmeter.cc:38
void getserial(void)
Definition: serialmeter.cc:68