AverageAnalyzer.h 591 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//
// Created by Netti, Alessio on 16.01.19.
//

#ifndef PROJECT_AVERAGEANALYZER_H
#define PROJECT_AVERAGEANALYZER_H

#include "../../includes/AnalyzerTemplate.h"

class AverageAnalyzer : public AnalyzerTemplate<SensorBase> {

public:
    AverageAnalyzer(const std::string& name);
    virtual ~AverageAnalyzer();

Alessio Netti's avatar
Alessio Netti committed
16
17
18
    void setWindow(unsigned long long w) { _window = w; }
    unsigned long long getWindow() { return _window; }

19
20
21
22
23
private:

    void compute(int unitID)			override;

    vector<reading_t> *_buffer = NULL;
Alessio Netti's avatar
Alessio Netti committed
24
    unsigned long long _window;
25
26
27
28

};

#endif //PROJECT_AVERAGEANALYZER_H