Tony Lee | 84d430c | 2019-06-13 15:26:15 +0800 | [diff] [blame^] | 1 | #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 |
| 7 | namespace phosphor |
| 8 | { |
| 9 | namespace nvme |
| 10 | { |
| 11 | |
| 12 | using namespace std; |
| 13 | using namespace phosphor::logging; |
| 14 | |
| 15 | void 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 | |
| 32 | void Nvme::init() |
| 33 | { |
| 34 | } |
| 35 | |
| 36 | void Nvme::read() |
| 37 | { |
| 38 | } |
| 39 | } // namespace nvme |
| 40 | } // namespace phosphor |