-
Notifications
You must be signed in to change notification settings - Fork 0
/
testWriter.h
68 lines (55 loc) · 1.25 KB
/
testWriter.h
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef __TEST_WRITER__
#define __TEST_WRITER__
#include "WeatherSink.h"
#include "ncurses.h"
#define TITLE "CURRENT WEATHER"
class TestWriter: public WeatherSink
{
public:
TestWriter( Config cfg, WeatherData *wd );
~TestWriter();
void newData();
void main( );
private:
struct
{
time_t now;
double outsideTemp;
double outsideTempTrend;
double outsideHumidity;
double outsideHumidityTrend;
double solarRadiation;
int solarRadiationPercent;
double UV;
double windSpeed;
double instantWindSpeed;
double windGust;
double barometer;
double barometricTrend;
double dailyRain;
double rainRate;
double rain24Hour;
double instantRain;
double dewPoint;
int cloudHeight;
double apparentTemp;
int windDirection;
int windGustDir;
int instantWindDirection;
const char *cardinal;
const char *gustCardinal;
const char *instantCardinal;
std::string barometricTrendString;
} data;
WINDOW *mainWin;
WINDOW *titleWin;
WINDOW *dataWin;
pthread_mutex_t notify;
private:
void setupWindow();
void teardownWindow();
void getData();
public:
static int winch;
};
#endif //__TEST_WRITER__