-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.cpp
35 lines (26 loc) · 798 Bytes
/
test.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "test.h"
void foo(){
printf("in->out");
}
void foo2(){
printf("out->in");
}
void test()
{
/**first choose the desired algorithm for signal processing*/
FFTAlgorithm algorithm;
/**second choose the subscription implementation for the context aware */
subscribe_light_aware sub;
/**call the desired context aware implementation*/
light_aware light_awareness(algorithm, ADCInit::NO_TIMER, sub);
/**register callback function with a trigger rule*/
light_awareness.registration(TRIGGER_rule::IN_OUT, &foo);
light_awareness.registration(TRIGGER_rule::OUT_IN, &foo2);
/**
* example to call directly light awareness
*
* light_awareness.isOutdoor();
*
* light_awareness.getMeasure();
*/
}