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