stats-display/stats-viewer/stats_dto.h
2020-08-18 04:59:37 +02:00

41 lines
882 B
C

#include <stdint.h>
#define MAGIC_START 0xAAAAAAAA
#define MAGIC_START_ASSTR "\xAA\xAA\xAA\xAA"
#define MAGIC_END 0xCCCCCCCC
typedef struct __attribute__((packed)) stats {
uint32_t magic_start; // int
// Temps
uint8_t cpu_temp;
uint8_t vr_mos_temp;
uint8_t gpu_temp;
uint8_t chipset_temp; // int
uint8_t system_temp;
uint8_t ssd_temp;
// Fans
uint16_t pump; // int
uint16_t gpu_fan;
uint16_t chipset_fan; // int
uint16_t bottom_fan;
uint16_t top_fan; // int
uint16_t back_fan;
// CPU + RAM
uint16_t cpu_freq; // int
uint32_t cpu_load_avg; // int
uint32_t ram_used; // int
uint16_t cpu_perc;
uint16_t cpu_perc_max; // int
uint16_t cpu_perc_kernel;
uint8_t ram_perc;
uint8_t ram_perc_buffers; // int
uint8_t padding1;
uint16_t padding2;
uint8_t checkxor; // int
uint32_t magic_end;
} stats_t;