xref: /openbmc/phosphor-pid-control/ipmi/control.hpp (revision 92110f8ddbc5e73ccdccdf4016fc0be8a40048c1)
1 #pragma once
2 
3 #include <cstdint>
4 #include <string>
5 
6 namespace pid_control::ipmi
7 {
8 
9 // Implement this interface to control a zone's mode or read back its status.
10 class ZoneControlInterface
11 {
12   public:
13     virtual ~ZoneControlInterface() = default;
14 
15     // 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 
26 } // namespace pid_control::ipmi
27