embeddedLibrary/include/dataAcquisition.h

31 lines
684 B
C
Raw Normal View History

#ifndef DATA_ACQUISITION_H
#define DATA_ACQUISITION_H
#include <stdbool.h>
#include <math.h>
#include <stdlib.h>
void initializeReadings();
bool freeReadings();
int getSensorsNumber();
int getSlidingWindowSize();
bool isFull(int sensorIndex);
void addReading(float value, int sensorIndex);
float getAverageOnSensor(int sensorIndex);
float getAverageOnAllSensors();
float getOverallAverage();
float getStandardDeviationOnSensor(int sensorIndex);
float getStandardDeviationOnAllSensors();
float getOverallStandardDeviation();
float getLastReading(int sensorIndex);
bool anomalyDetect(float average, float standardDeviation);
int getOutlierCount();
#endif // DATA_ACQUISITION_H