47 lines
877 B
C
47 lines
877 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 "refurbishingHddTool.h"
|
||
|
#include "drive.h"
|
||
|
|
||
|
|
||
|
class SMART {
|
||
|
protected:
|
||
|
|
||
|
|
||
|
public:
|
||
|
|
||
|
static void readSMARTData(Drive drive);
|
||
|
|
||
|
|
||
|
private:
|
||
|
SMART(void);
|
||
|
|
||
|
static void parseModelFamily(string sLine);
|
||
|
static void parseModelName(string sLine);
|
||
|
static void parseSerial(string sLine);
|
||
|
static void parseCapacity(string sLine);
|
||
|
static void parseErrorCount(string sLine);
|
||
|
static void parsePowerOnHours(string sLine);
|
||
|
static void parseSpinUpCount(string sLine);
|
||
|
|
||
|
static string modelFamily;
|
||
|
static string modelName;
|
||
|
static string serial;
|
||
|
static string capacity;
|
||
|
static uint32_t errorCount;
|
||
|
static uint32_t powerOnHours;
|
||
|
static uint32_t spinUpCount;
|
||
|
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
#endif // SMART_H_
|