blob: 1f946f4081d75091dee293ef15addb85ac753bea [file] [log] [blame]
Tony Lee84d430c2019-06-13 15:26:15 +08001#include "nvme_manager.hpp"
2
3#include <phosphor-logging/elog-errors.hpp>
4#include <phosphor-logging/log.hpp>
5
6#define MONITOR_INTERVAL_SECONDS 1
7namespace phosphor
8{
9namespace nvme
10{
11
12using namespace std;
13using namespace phosphor::logging;
14
15void Nvme::run()
16{
17 init();
18
19 std::function<void()> callback(std::bind(&Nvme::read, this));
20 try
21 {
22 u_int64_t interval = MONITOR_INTERVAL_SECONDS * 1000000;
23 _timer.restart(std::chrono::microseconds(interval));
24 }
25 catch (const std::exception& e)
26 {
27 log<level::ERR>("Error in polling loop. "),
28 entry("ERROR = %s", e.what());
29 }
30}
31
32void Nvme::init()
33{
34}
35
36void Nvme::read()
37{
38}
39} // namespace nvme
40} // namespace phosphor