2024-11-20 00:50:35 +01:00
|
|
|
#ifndef DATA_ACQUISITION_H
|
|
|
|
|
#define DATA_ACQUISITION_H
|
|
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
#include <math.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
|
|
void initializeReadings();
|
2024-11-21 16:35:08 +01:00
|
|
|
bool freeReadings();
|
2024-11-20 00:50:35 +01:00
|
|
|
|
|
|
|
|
int getSensorsNumber();
|
|
|
|
|
int getSlidingWindowSize();
|
|
|
|
|
bool isFull(int sensorIndex);
|
|
|
|
|
|
2024-11-25 11:27:49 +01:00
|
|
|
void addReading(float value);
|
2024-11-20 00:50:35 +01:00
|
|
|
|
|
|
|
|
float getAverageOnSensor(int sensorIndex);
|
|
|
|
|
float getAverageOnAllSensors();
|
|
|
|
|
float getOverallAverage();
|
|
|
|
|
|
|
|
|
|
float getStandardDeviationOnSensor(int sensorIndex);
|
|
|
|
|
float getStandardDeviationOnAllSensors();
|
2024-11-21 16:35:08 +01:00
|
|
|
float getOverallStandardDeviation();
|
|
|
|
|
|
|
|
|
|
float getLastReading(int sensorIndex);
|
|
|
|
|
|
|
|
|
|
bool anomalyDetect(float average, float standardDeviation);
|
|
|
|
|
|
|
|
|
|
int getOutlierCount();
|
2024-11-20 00:50:35 +01:00
|
|
|
|
|
|
|
|
#endif // DATA_ACQUISITION_H
|