33 lines
964 B
C++
33 lines
964 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"
|
|
|
|
class SMART
|
|
{
|
|
protected:
|
|
public:
|
|
static void readSMARTData(Drive *drive);
|
|
|
|
private:
|
|
SMART(void);
|
|
|
|
static bool parseExitStatus(std::string sLine, uint8_t &status);
|
|
static bool parseModelFamily(std::string sLine, std::string &modelFamily);
|
|
static bool parseModelName(std::string sLine, std::string &modelName);
|
|
static bool parseSerial(std::string sLine, std::string &serial);
|
|
static bool parseCapacity(std::string sLine, uint64_t &capacity);
|
|
static bool parseErrorCount(std::string sLine, uint32_t &errorCount);
|
|
static bool parsePowerOnHours(std::string sLine, uint32_t &powerOnHours);
|
|
static bool parsePowerCycles(std::string sLine, uint32_t &powerCycles);
|
|
static bool parseTemperature(std::string sLine, uint32_t &temperature);
|
|
};
|
|
|
|
#endif // SMART_H_
|