blob: 2f57e996e40a752fc234e895006f55ceac0930c1 [file] [log] [blame]
Patrick Venture09334bb2020-08-16 12:22:54 -07001#pragma once
2
3#include <cstdint>
4#include <string>
5
George Liu92110f82025-07-02 15:07:35 +08006namespace pid_control::ipmi
Patrick Venture09334bb2020-08-16 12:22:54 -07007{
8
9// Implement this interface to control a zone's mode or read back its status.
10class ZoneControlInterface
11{
12 public:
Patrick Venturead971e12020-09-28 09:43:01 -070013 virtual ~ZoneControlInterface() = default;
14
Patrick Venture09334bb2020-08-16 12:22:54 -070015 // Reads the fan control property (either manual or failsafe) and returns an
16 // IPMI code based on success or failure of this.
17 virtual uint8_t getFanCtrlProperty(uint8_t zoneId, bool* value,
18 const std::string& property) = 0;
19
20 // Sets the fan control property (only manual mode is settable presently)
21 // and returns an IPMI code based on success or failure of this.
22 virtual uint8_t setFanCtrlProperty(uint8_t zoneId, bool value,
23 const std::string& property) = 0;
24};
25
George Liu92110f82025-07-02 15:07:35 +080026} // namespace pid_control::ipmi