1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
//
// Copyright (c) 1997 by Mike Romberg ( romberg@fsl.noaa.gov )
//
// This file may be distributed under terms of the GPL
//
//
#ifndef _WIRELESSMETER_H_
#define _WIRELESSMETER_H_
#include "fieldmetergraph.h"
#include "xosview.h"
#include <string>
static const char WLFILENAME[] = "/proc/net/wireless";
class WirelessMeter : public FieldMeterGraph {
public:
WirelessMeter( XOSView *parent, int ID = 0, const char *wlID = "WL");
~WirelessMeter( void );
const char *name( void ) const { return "WirelessMeter"; }
void checkevent( void );
void checkResources( void );
static int countdevices(void);
static const char *wirelessStr(int num);
protected:
void getpwrinfo( void );
private:
unsigned long _poorqualcol, _fairqualcol, _goodqualcol;
int _lastquality, _number;
std::string _devname;
bool _lastlink;
};
#endif
|