Add mapping logic and serialization for writing
This commit is contained in:
@@ -13,6 +13,8 @@ public:
|
||||
int value() override;
|
||||
const std::string toString() const override;
|
||||
|
||||
json toJson() const override;
|
||||
|
||||
private:
|
||||
const sensors_chip_name *mChipName;
|
||||
const sensors_feature *mFeature;
|
||||
|
||||
@@ -11,6 +11,8 @@ public:
|
||||
int value() override;
|
||||
|
||||
const std::string toString() const override;
|
||||
|
||||
json toJson() const override;
|
||||
};
|
||||
|
||||
#endif // NVIDIASENSOR_H_
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
#define SENSOR_H_
|
||||
|
||||
#include <Printable.h>
|
||||
#include <Serializable.h>
|
||||
|
||||
class Sensor : public Printable {
|
||||
class Sensor : public Printable, public Serializable {
|
||||
public:
|
||||
// Read the current value
|
||||
virtual int value() = 0;
|
||||
|
||||
Reference in New Issue
Block a user