Patrick Venture | d82d0b7 | 2020-08-16 09:17:37 -0700 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Patrick Venture | 09334bb | 2020-08-16 12:22:54 -0700 | [diff] [blame] | 3 | #include "control.hpp" |
| 4 | |
Patrick Venture | d82d0b7 | 2020-08-16 09:17:37 -0700 | [diff] [blame] | 5 | #include <cstdint> |
| 6 | #include <string> |
| 7 | |
George Liu | 92110f8 | 2025-07-02 15:07:35 +0800 | [diff] [blame^] | 8 | namespace pid_control::ipmi |
Patrick Venture | d82d0b7 | 2020-08-16 09:17:37 -0700 | [diff] [blame] | 9 | { |
| 10 | |
Patrick Venture | 09334bb | 2020-08-16 12:22:54 -0700 | [diff] [blame] | 11 | class DbusZoneControl : public ZoneControlInterface |
| 12 | { |
| 13 | public: |
| 14 | DbusZoneControl() = default; |
Ed Tanous | d2768c5 | 2025-06-26 11:42:57 -0700 | [diff] [blame] | 15 | ~DbusZoneControl() override = default; |
Patrick Venture | 09334bb | 2020-08-16 12:22:54 -0700 | [diff] [blame] | 16 | |
| 17 | /* |
| 18 | * busctl call xyz.openbmc_project.State.FanCtrl \ |
| 19 | * /xyz/openbmc_project/settings/fanctrl/zone1 \ |
| 20 | * org.freedesktop.DBus.Properties \ |
| 21 | * GetAll \ |
| 22 | * s \ |
| 23 | * xyz.openbmc_project.Control.Mode |
| 24 | * a{sv} 2 "Manual" b false "FailSafe" b false |
| 25 | * |
| 26 | * This returns an IPMI code as a uint8_t (which will always be sufficient |
| 27 | * to hold the result). NOTE: This does not return the typedef value to |
| 28 | * avoid including a header with conflicting types. |
| 29 | */ |
| 30 | uint8_t getFanCtrlProperty(uint8_t zoneId, bool* value, |
| 31 | const std::string& property) override; |
| 32 | |
| 33 | uint8_t setFanCtrlProperty(uint8_t zoneId, bool value, |
| 34 | const std::string& property) override; |
| 35 | }; |
Patrick Venture | d82d0b7 | 2020-08-16 09:17:37 -0700 | [diff] [blame] | 36 | |
George Liu | 92110f8 | 2025-07-02 15:07:35 +0800 | [diff] [blame^] | 37 | } // namespace pid_control::ipmi |