Revision 34 logic/trunk/src/init/devicelist.h

View differences:

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"
9 3

  
10
//struct device_d ; /* Forward declaration */
11

  
12 4
typedef struct device_d
13 5
{
14 6
    char    *name;
......
16 8
    int     readitv; //in seconds
17 9
    char    *action;
18 10
    char    *param;
19
    d_bufr  *buf;
20
    //TODO add circular buffer for each device
11
    //d_bufr  *buf;
12
    int     buf;
13
    int     running;
21 14
    struct  device_d *nxt;
22 15
} device;
23 16

  
24 17
int setNewDeviceList(); // ony called on startup
18
int getNumberOfDevices();
19
device *getDevice(device *dev, char *devName);
20
device *getAvailableDevice(device *dev);
21

  
25 22
/*
26 23
void updateDeviceList(device_d *deviceList); // called on HMI change
27 24
char *getDeviceName();

Also available in: Unified diff