Revision 19 logic/trunk/src/init/devicelist.h
devicelist.h | ||
---|---|---|
1 | 1 |
#ifndef DEVICELIST_H_INCLUDED |
2 | 2 |
#define DEVICELIST_H_INCLUDED |
3 |
|
|
4 |
// in seconds, history for each sensor is at most 600 seconds old |
|
5 |
// TODO maybe this isn't the best idea, perhaps every sensor needs different length of history |
|
6 |
#define HISTORY_LENGTH 600 |
|
7 |
|
|
8 |
#include "buf.h" |
|
3 | 9 |
|
4 | 10 |
//struct device_d ; /* Forward declaration */ |
5 | 11 |
|
... | ... | |
7 | 13 |
{ |
8 | 14 |
char *name; |
9 | 15 |
char *id; |
10 |
int minval; |
|
11 |
int maxval; |
|
16 |
int readitv; //in seconds |
|
12 | 17 |
char *action; |
13 | 18 |
char *param; |
19 |
d_bufr *buf; |
|
14 | 20 |
//TODO add circular buffer for each device |
15 | 21 |
struct device_d *nxt; |
16 | 22 |
}device; |
17 | 23 |
|
18 |
void setNewDeviceList(); // ony called on startup
|
|
24 |
int setNewDeviceList(); // ony called on startup
|
|
19 | 25 |
/* |
20 | 26 |
void updateDeviceList(device_d *deviceList); // called on HMI change |
21 | 27 |
char *getDeviceName(); |
Also available in: Unified diff