added filter algo for existing drives

This commit is contained in:
2020-08-04 17:18:32 +02:00
parent a61d4321f6
commit 27b48de32a
9 changed files with 90 additions and 105 deletions

View File

@ -48,8 +48,8 @@ private:
uint32_t u32PowerCycles = 0U;
uint32_t u32ShredPercentage = 0U; //in percent
};

View File

@ -16,10 +16,11 @@
#include <time.h>
#include <chrono>
#include <curses.h>
#include <thread>
#include <thread>
#include <unistd.h>
#include <mutex>
#include <sys/select.h>
#include<algorithm>
using namespace std;
@ -49,12 +50,12 @@ private:
vector <Drive> vecDrives; //stores all drive data
static void searchDrives(vector <Drive>* pvecDrives);
static void searchDrives(vector <Drive>* pvecDrives);
static void printDrives(vector <Drive>* pvecDrives);
static void filterIgnoredDrives(vector <Drive>* pvecDrives);
static void filterIgnoredDrives(vector <Drive>* pvecDrives);
static void addSMARTData(vector <Drive>* pvecDrives);
@ -62,11 +63,11 @@ private:
static void ThreadScannDevices();
void filterNewDrives(vector <Drive>* pvecOldDrives, vector <Drive>* pvecNewDrives);
};

View File

@ -22,17 +22,17 @@ protected:
public:
TUI(void);
TUI(void);
void initTUI();
void initTUI();
void updateTUI(TUI_DATA data);
private:
void centerTitle(WINDOW *pwin, const char * title);
void centerTitle(WINDOW *pwin, const char * title);

View File

@ -23,22 +23,22 @@ protected:
public:
TUI_DATA(vector <Drive>* pvecDrives);
TUI_DATA(vector <Drive>* pvecDrives);
private:
string sCpuUsage;
string sRamUsage;
string sLocalTime;
string sCpuUsage;
string sRamUsage;
string sLocalTime;
};