34 lines
631 B
C++
34 lines
631 B
C++
#ifndef CPU_HPP
|
|
#define CPU_HPP
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
namespace cpu {
|
|
|
|
enum Module : uint8_t { unknown,
|
|
k10temp,
|
|
zenpower };
|
|
|
|
struct cpuSensors {
|
|
Module module = unknown;
|
|
uint8_t num_cores = 0;
|
|
int16_t tdie = 0;
|
|
int16_t tctl = 0;
|
|
int16_t tccd1 = 0;
|
|
// double pcore = 0.0;
|
|
// double psoc = 0.0;
|
|
float ptotal = 0.0;
|
|
// double vcore = 0.0;
|
|
// double vsoc = 0.0;
|
|
uint32_t avg_freq = 0;
|
|
std::string hwmon;
|
|
};
|
|
|
|
int detect(cpuSensors* target, const std::string& pci);
|
|
void update(cpuSensors* c);
|
|
|
|
} // namespace cpu
|
|
|
|
#endif
|