root / logic / trunk / src / init / devicelist.h @ 25
History | View | Annotate | Download (842 Bytes)
1 | 10 | Janez1 | #ifndef DEVICELIST_H_INCLUDED
|
---|---|---|---|
2 | #define DEVICELIST_H_INCLUDED
|
||
3 | 19 | Janez1 | |
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" |
||
9 | 10 | Janez1 | |
10 | //struct device_d ; /* Forward declaration */
|
||
11 | |||
12 | typedef struct device_d |
||
13 | { |
||
14 | char *name;
|
||
15 | char *id;
|
||
16 | 19 | Janez1 | int readitv; //in seconds |
17 | 10 | Janez1 | char *action;
|
18 | char *param;
|
||
19 | 19 | Janez1 | d_bufr *buf; |
20 | 10 | Janez1 | //TODO add circular buffer for each device
|
21 | struct device_d *nxt;
|
||
22 | 25 | Janez1 | } device; |
23 | 10 | Janez1 | |
24 | 19 | Janez1 | int setNewDeviceList(); // ony called on startup |
25 | 10 | Janez1 | /*
|
26 | void updateDeviceList(device_d *deviceList); // called on HMI change
|
||
27 | char *getDeviceName();
|
||
28 | char *getDeviceID();
|
||
29 | ? requestDeviceUpdate(); //HMI naj nastavi parametre napravi
|
||
30 | /**/
|
||
31 | //check status?
|
||
32 | |||
33 | #endif // DEVICELIST_H_INCLUDED |