root / logic / trunk / src / logics / conditions.h @ 61
History | View | Annotate | Download (808 Bytes)
1 | 32 | Janez1 | #ifndef CONDITIONS_H_INCLUDED
|
---|---|---|---|
2 | #define CONDITIONS_H_INCLUDED
|
||
3 | |||
4 | #include "../logics/operators.h" |
||
5 | #include "../init/devicelist.h" |
||
6 | |||
7 | 44 | Janez1 | #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 | 32 | Janez1 | typedef struct condition_list |
14 | { |
||
15 | 36 | Janez1 | int OPERATOR_TYPE;
|
16 | int value;
|
||
17 | struct device_d *dev;
|
||
18 | struct condition_list *nxt_lst;
|
||
19 | struct condition_list *sub_lst;
|
||
20 | 32 | Janez1 | }cond_lst; |
21 | 36 | Janez1 | |
22 | 40 | Janez1 | int evaluateAdditionalConditions(cond_lst *cl, device *dev);
|
23 | //int evaluateAdditionalConditions(cond_lst *cl);
|
||
24 | 44 | Janez1 | float getNewWeightedMeasurement(float oldval, float newval, float alpha); |
25 | int getPowerPercentage(int a, int b, int o, float *val, int func); |
||
26 | 32 | Janez1 | #endif // CONDITIONS_H_INCLUDED |