Jason M. Bills | 5245ed6 | 2020-12-04 16:50:21 -0800 | [diff] [blame] | 1 | /* |
| 2 | // Copyright (c) 2021 Intel Corporation |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | */ |
| 16 | #pragma once |
| 17 | #include <sdbusplus/asio/object_server.hpp> |
| 18 | // #include <error_monitors/smi_monitor.hpp> |
| 19 | |
| 20 | #include <memory> |
| 21 | |
| 22 | namespace host_error_monitor::error_monitors |
| 23 | { |
| 24 | // Error signals to monitor |
| 25 | // static std::unique_ptr<host_error_monitor::smi_monitor::SMIMonitor> |
| 26 | // smiMonitor; |
| 27 | |
| 28 | // Check if all the signal monitors started successfully |
| 29 | bool checkMonitors() |
| 30 | { |
| 31 | bool ret = true; |
| 32 | |
| 33 | // ret &= smiMonitor->isValid(); |
| 34 | |
| 35 | return ret; |
| 36 | } |
| 37 | |
| 38 | // Start the signal monitors |
| 39 | bool startMonitors(boost::asio::io_service& io, |
| 40 | std::shared_ptr<sdbusplus::asio::connection> conn) |
| 41 | { |
| 42 | // smiMonitor = |
| 43 | // std::make_unique<host_error_monitor::smi_monitor::SMIMonitor>( |
| 44 | // io, conn, "SMI"); |
| 45 | |
| 46 | return checkMonitors(); |
| 47 | } |
| 48 | |
| 49 | // Notify the signal monitors of host on event |
| 50 | void sendHostOn() |
| 51 | { |
| 52 | // smiMonitor->hostOn(); |
| 53 | } |
| 54 | |
| 55 | } // namespace host_error_monitor::error_monitors |