Implement HwmonTemperatureSensor, add serialization
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
#ifndef HWMONTEMPERATURESENSOR_H_
|
||||
#define HWMONTEMPERATURESENSOR_H_
|
||||
|
||||
#include <sensors/sensors.h>
|
||||
|
||||
#include <TemperatureSensor.h>
|
||||
|
||||
class HwmonTemperatureSensor : public TemperatureSensor {
|
||||
public:
|
||||
int getTemperature() override;
|
||||
std::string toJson() override;
|
||||
|
||||
private:
|
||||
sensors_chip_name mChipName;
|
||||
sensors_subfeature mSubFeature;
|
||||
};
|
||||
|
||||
#endif // HWMONTEMPERATURESENSOR_H_
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
#ifndef TEMPERATURESENSOR_H_
|
||||
#define TEMPERATURESENSOR_H_
|
||||
|
||||
#include <iostream>
|
||||
|
||||
class TemperatureSensor {
|
||||
public:
|
||||
virtual int getTemperature() = 0;
|
||||
virtual std::string toJson() = 0;
|
||||
};
|
||||
|
||||
#endif // TEMPERATURESENSOR_H_
|
||||
|
||||
Reference in New Issue
Block a user