48 char *alias; /* Friendly name */ |
48 char *alias; /* Friendly name */ |
49 int present; /* 1=present, 0=absent */ |
49 int present; /* 1=present, 0=absent */ |
50 int lastval; /* Last valid value */ |
50 int lastval; /* Last valid value */ |
51 } w1_therm; |
51 } w1_therm; |
52 |
52 |
|
53 typedef struct _rc_switch { |
|
54 struct _rc_switch *next; |
|
55 char *address; /* Address code */ |
|
56 char *alias; /* Friendly name */ |
|
57 } rc_switch; |
|
58 |
53 typedef struct _sys_config { |
59 typedef struct _sys_config { |
54 char *name; /* Configuration name */ |
60 char *name; /* Configuration name */ |
55 char *mosq_host; /* mosquitto server hostname */ |
61 char *mosq_host; /* mosquitto server hostname */ |
56 int mosq_port; /* mosquitto server port */ |
62 int mosq_port; /* mosquitto server port */ |
57 w1_therm *w1therms; /* 1-wire temp sensors */ |
63 w1_therm *w1therms; /* 1-wire temp sensors */ |
58 #ifdef HAVE_WIRINGPI_H |
64 #ifdef HAVE_WIRINGPI_H |
59 int lcd_cols; /* LCD display columns */ |
65 int lcd_cols; /* LCD display columns */ |
60 int lcd_rows; /* LCD display rows */ |
66 int lcd_rows; /* LCD display rows */ |
|
67 int rx433; /* 433 MHz receiver pin */ |
|
68 int tx433; /* 433 MHz transmitter pin */ |
|
69 rc_switch *rcswitch; /* 433 MHz RC Power switches */ |
61 #endif |
70 #endif |
62 } sys_config; |
71 } sys_config; |
63 |
72 |
64 |
73 |
65 |
74 |
66 void killconfig(void); |
75 void killconfig(void); |
67 int rdconfig(void); |
76 int rdconfig(char *); |
68 |
77 |
69 |
78 |
70 /* xutil.c */ |
79 /* xutil.c */ |
71 char *xmalloc(size_t); |
80 char *xmalloc(size_t); |
72 char *xstrcpy(char *); |
81 char *xstrcpy(char *); |