Files
reHDD/include/smart.h
T
localhorst 55481b86fd Show HDD warnings based on sectors (#97)
If one of the following metrics is >0 an warning is shown

* Reallocated_Sector_Count
* Current_Pending_Sector
* Offline_Uncorrectable

Reviewed-on: #97
Co-authored-by: localhorst <localhorst@mosad.xyz>
Co-committed-by: localhorst <localhorst@mosad.xyz>
2026-05-01 15:03:15 +02:00

39 lines
840 B
C++

/**
* @file smart.h
* @brief read S.M.A.R.T values
* @author hendrik schutter
* @date 01.05.2020
*/
#ifndef SMART_H_
#define SMART_H_
#include "reHDD.h"
/**
* @brief SMART data reader for drives
*
* Parses smartctl JSON output to extract:
* - Device information (model, serial, capacity)
* - Power statistics (hours, cycles)
* - Temperature
* - Critical sector counts (reallocated, pending, uncorrectable)
*
* Uses deterministic state machine parser for reliable multi-line JSON parsing.
*/
class SMART
{
protected:
public:
/**
* @brief Read S.M.A.R.T. data from drive and populate Drive object
* @param drive Pointer to Drive instance to populate with SMART data
*/
static void readSMARTData(Drive *drive);
private:
SMART(void); // Utility class - no instances
};
#endif // SMART_H_