26 #include <limits.h> |
26 #include <limits.h> |
27 #include <sys/socket.h> |
27 #include <sys/socket.h> |
28 #include <arpa/inet.h> |
28 #include <arpa/inet.h> |
29 #include <netdb.h> |
29 #include <netdb.h> |
30 #include <poll.h> |
30 #include <poll.h> |
31 #include <stdbool.h> |
|
32 #ifndef HAVE_WIRINGPI_H |
31 #ifndef HAVE_WIRINGPI_H |
33 #include <pthread.h> |
32 #include <pthread.h> |
34 #endif |
33 #endif |
35 #include <libxml/xmlmemory.h> |
34 #include <libxml/xmlmemory.h> |
36 #include <libxml/parser.h> |
35 #include <libxml/parser.h> |
37 |
36 #include <libxml/encoding.h> |
|
37 #include <libxml/xmlwriter.h> |
38 |
38 |
39 #ifdef HAVE_WIRINGPI_H |
39 #ifdef HAVE_WIRINGPI_H |
40 /* wiringPi */ |
40 /* wiringPi */ |
41 #include <wiringPi.h> |
41 #include <wiringPi.h> |
42 #include <pcf8574.h> |
42 #include <pcf8574.h> |
72 float air_temp; /* Air temperature */ |
72 float air_temp; /* Air temperature */ |
73 char *beer_address; /* DS18B20 address */ |
73 char *beer_address; /* DS18B20 address */ |
74 float beer_temp; /* Beer temperature */ |
74 float beer_temp; /* Beer temperature */ |
75 char *io_address; /* DS2408 address */ |
75 char *io_address; /* DS2408 address */ |
76 unsigned char io_read; /* I/O ports read state */ |
76 unsigned char io_read; /* I/O ports read state */ |
77 bool heater_available; /* Heater available */ |
77 int heater_available; /* Heater available */ |
78 int heater_state; /* Heater status */ |
78 int heater_state; /* Heater status */ |
79 bool cooler_available; /* Cooler available */ |
79 int cooler_available; /* Cooler available */ |
80 int cooler_state; /* Cooler status */ |
80 int cooler_state; /* Cooler status */ |
81 bool fan_available; /* Fan available */ |
81 int fan_available; /* Fan available */ |
82 int fan_state; /* Fan status */ |
82 int fan_state; /* Fan status */ |
83 bool light_available; /* Door sensor and int. light */ |
83 int light_available; /* Door sensor and int. light */ |
84 int light_state; /* Door and light status */ |
84 int light_state; /* Door and light status */ |
85 int mode; /* Unit mode */ |
85 int mode; /* Unit mode */ |
86 char *profile; /* Active profile */ |
86 char *profile; /* Active profile */ |
87 time_t prof_started; /* Profile start time */ |
87 time_t prof_started; /* Profile start time */ |
88 } units_list; |
88 } units_list; |