loading data from collector
This commit is contained in:
@ -8,20 +8,29 @@ void collector_setup();
|
||||
|
||||
void collector_loop();
|
||||
|
||||
#define WEEK 1500
|
||||
#define MONTH 750
|
||||
|
||||
class Collector
|
||||
{
|
||||
protected:
|
||||
float week_in[1500]; // 10 per hour, 1 week
|
||||
float week_in[WEEK]; // 10 per hour, 1 week
|
||||
float week_out[1500]; // 10 per hour, 1 week
|
||||
float month_in[750]; // 1 per hour, about a month
|
||||
float month_out[750]; // 1 per hour, about a month
|
||||
float minute = 0 ;
|
||||
int counter = 0;
|
||||
int bucket = 30; // sampling every 2 sec
|
||||
|
||||
String one_week( float[] );
|
||||
String one_month( float[] );
|
||||
|
||||
public:
|
||||
const int bucket = 30; // sampling every 2 sec
|
||||
|
||||
void add(float in , float out) ;
|
||||
|
||||
String week_data();
|
||||
String month_data();
|
||||
|
||||
};
|
||||
|
||||
extern Collector collector;
|
||||
|
Reference in New Issue
Block a user