1 #ifndef _MASH_H |
|
2 #define _MASH_H |
|
3 |
|
4 |
|
5 #define TRUE 1 |
|
6 #define FALSE 0 |
|
7 |
|
8 #include "../config.h" |
|
9 |
|
10 #include <stdlib.h> |
|
11 #include <stdio.h> |
|
12 #include <stdint.h> |
|
13 #include <stdarg.h> |
|
14 #include <string.h> |
|
15 #include <ctype.h> |
|
16 #include <sys/types.h> |
|
17 #include <sys/stat.h> |
|
18 #include <sys/time.h> |
|
19 #include <time.h> |
|
20 #include <fcntl.h> |
|
21 #include <syslog.h> |
|
22 #include <unistd.h> |
|
23 #include <errno.h> |
|
24 #include <signal.h> |
|
25 #include <getopt.h> |
|
26 #include <limits.h> |
|
27 #include <sys/socket.h> |
|
28 #include <arpa/inet.h> |
|
29 #include <netdb.h> |
|
30 #include <poll.h> |
|
31 #include <libxml/xmlmemory.h> |
|
32 #include <libxml/parser.h> |
|
33 |
|
34 |
|
35 #define MBSE_SS(x) (x)?(x):"(null)" |
|
36 |
|
37 |
|
38 /* rdconfig.c */ |
|
39 typedef struct _key_list { |
|
40 char *key; |
|
41 int (*prc)(char **); |
|
42 char **dest; |
|
43 } key_list; |
|
44 |
|
45 typedef struct _w1_therm { |
|
46 struct _w1_therm *next; |
|
47 char *master; /* Master for this device */ |
|
48 int bus; /* Reserved for ds2482-800 */ |
|
49 char *name; /* Name of this device */ |
|
50 char *alias; /* Friendly name */ |
|
51 int present; /* 1=present, 0=absent */ |
|
52 int lastval; /* Last valid value */ |
|
53 int update; /* Value updated */ |
|
54 } w1_therm; |
|
55 |
|
56 typedef struct _sys_config { |
|
57 char *name; /* Configuration name */ |
|
58 int my_port; /* my client/server port */ |
|
59 w1_therm *w1therms; /* 1-wire temp sensors */ |
|
60 int lcd_cols; /* LCD display columns */ |
|
61 int lcd_rows; /* LCD display rows */ |
|
62 } sys_config; |
|
63 |
|
64 |
|
65 void killconfig(void); |
|
66 int rdconfig(char *); |
|
67 int wrconfig(char *); |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 #endif |
|
73 |
|