CPU and GPU data working!
The Data Sources
For CPU, mostly OSHI. For CPU frequency, I’ve also decided to go back to OSHI for various reasons. CPU temperature is queried using PawnIO.
For GPU(s), D3DKMTHK is used for a list of GPUs and GPU temperature. For all other metrics, NVAPI (NVIDIA API) is used. AMD GPUs will also get support in the near future (via ADLX), Intel GPUs won’t be supported though.
The Architecture of the PawnIO Reader Data Path
The Hardware Manager calls the method requestData in WindowsReader which hands it a SensorData object, which contains the CPU temperature and a list of GpuData object, which look like this:
public record GpuData(
String name,
double tempC,
double usagePct,
long vramUsedMb,
long vramTotalMb
) {}
This data is then passed to all subclasses of the hardware manager that need it (Cpu, Gpu).
Other Improvements
The hardware manager now has a new method called addUpdateListener with which you can register a class that implements the HwUpdateListener interface. The hardware manager will then call onHwUpdate on all registered classes as soon as it has refreshed its data via OSHI and PawnIO-Reader.
Additionally, the fan panel will not be displayed on windows because of reasons mentioned in the last devlog (too time-consuming to implement properly)
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.