root / logic / trunk / src / logics / conditions.h @ 61
History | View | Annotate | Download (808 Bytes)
1 |
#ifndef CONDITIONS_H_INCLUDED
|
---|---|
2 |
#define CONDITIONS_H_INCLUDED
|
3 |
|
4 |
#include "../logics/operators.h" |
5 |
#include "../init/devicelist.h" |
6 |
|
7 |
#define FUNCTION_UNKNOWN -1 |
8 |
#define FUNCTION_STATIC 0 |
9 |
#define FUNCTION_LINEAR 1 |
10 |
#define FUNCTION_LOGARITHMIC 2 |
11 |
#define FUNCTION_QUADRATIC 3 |
12 |
|
13 |
typedef struct condition_list |
14 |
{ |
15 |
int OPERATOR_TYPE;
|
16 |
int value;
|
17 |
struct device_d *dev;
|
18 |
struct condition_list *nxt_lst;
|
19 |
struct condition_list *sub_lst;
|
20 |
}cond_lst; |
21 |
|
22 |
int evaluateAdditionalConditions(cond_lst *cl, device *dev);
|
23 |
//int evaluateAdditionalConditions(cond_lst *cl);
|
24 |
float getNewWeightedMeasurement(float oldval, float newval, float alpha); |
25 |
int getPowerPercentage(int a, int b, int o, float *val, int func); |
26 |
#endif // CONDITIONS_H_INCLUDED |