reHDD/include/smart.h

42 lines
929 B
C
Raw Normal View History

2020-05-02 00:49:11 +02:00
/**
2020-05-02 22:06:47 +02:00
* @file smart.h
* @brief read S.M.A.R.T values
* @author hendrik schutter
* @date 01.05.2020
2020-05-02 00:49:11 +02:00
*/
#ifndef SMART_H_
#define SMART_H_
2020-05-02 22:06:47 +02:00
#include "reHDD.h"
2020-05-02 00:49:11 +02:00
class SMART
{
2020-05-02 00:49:11 +02:00
protected:
public:
static void readSMARTData(Drive* drive);
2020-05-02 00:49:11 +02:00
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);
2020-05-02 13:25:27 +02:00
static void parsePowerCycle(string sLine);
static void parseTemperature(string sLine);
2020-05-02 00:49:11 +02:00
static string modelFamily;
static string modelName;
static string serial;
2020-05-02 13:25:27 +02:00
static uint64_t capacity;
2020-05-02 00:49:11 +02:00
static uint32_t errorCount;
static uint32_t powerOnHours;
2020-05-02 13:25:27 +02:00
static uint32_t powerCycle;
static uint32_t temperature;
2020-05-02 00:49:11 +02:00
};
#endif // SMART_H_