root / logic / trunk / src / init / devicelist.h @ 25
History | View | Annotate | Download (842 Bytes)
1 |
#ifndef DEVICELIST_H_INCLUDED
|
---|---|
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" |
9 |
|
10 |
//struct device_d ; /* Forward declaration */
|
11 |
|
12 |
typedef struct device_d |
13 |
{ |
14 |
char *name;
|
15 |
char *id;
|
16 |
int readitv; //in seconds |
17 |
char *action;
|
18 |
char *param;
|
19 |
d_bufr *buf; |
20 |
//TODO add circular buffer for each device
|
21 |
struct device_d *nxt;
|
22 |
} device; |
23 |
|
24 |
int setNewDeviceList(); // ony called on startup |
25 |
/*
|
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 |