Patrick Venture | e620656 | 2018-03-08 15:36:53 -0800 | [diff] [blame] | 1 | #pragma once |
| 2 | |
James Feist | 0c8223b | 2019-05-08 15:33:33 -0700 | [diff] [blame] | 3 | #include "pid/ec/pid.hpp" |
| 4 | |
James Feist | 5ec2027 | 2019-07-10 11:59:57 -0700 | [diff] [blame] | 5 | #include <phosphor-logging/log.hpp> |
James Feist | 0c8223b | 2019-05-08 15:33:33 -0700 | [diff] [blame] | 6 | #include <sdbusplus/bus.hpp> |
Patrick Venture | a83a3ec | 2020-08-04 09:52:05 -0700 | [diff] [blame] | 7 | |
| 8 | #include <limits> |
Patrick Venture | da06428 | 2018-06-12 19:33:47 -0700 | [diff] [blame] | 9 | #include <string> |
| 10 | |
Patrick Venture | a076487 | 2020-08-08 07:48:43 -0700 | [diff] [blame] | 11 | namespace pid_control |
| 12 | { |
| 13 | |
Yong Li | 298a95c | 2020-04-07 15:11:02 +0800 | [diff] [blame] | 14 | void tryRestartControlLoops(void); |
James Feist | 1fe0895 | 2019-05-07 09:17:16 -0700 | [diff] [blame] | 15 | |
James Feist | 0c8223b | 2019-05-08 15:33:33 -0700 | [diff] [blame] | 16 | /* |
| 17 | * Given a configuration structure, fill out the information we use within the |
| 18 | * PID loop. |
| 19 | */ |
| 20 | void initializePIDStruct(ec::pid_info_t* info, const ec::pidinfo& initial); |
| 21 | |
| 22 | void dumpPIDStruct(ec::pid_info_t* info); |
| 23 | |
James Feist | 0c8223b | 2019-05-08 15:33:33 -0700 | [diff] [blame] | 24 | struct SensorThresholds |
| 25 | { |
| 26 | double lowerThreshold = std::numeric_limits<double>::quiet_NaN(); |
| 27 | double upperThreshold = std::numeric_limits<double>::quiet_NaN(); |
| 28 | }; |
| 29 | |
| 30 | const std::string sensorintf = "xyz.openbmc_project.Sensor.Value"; |
| 31 | const std::string criticalThreshInf = |
| 32 | "xyz.openbmc_project.Sensor.Threshold.Critical"; |
| 33 | const std::string propertiesintf = "org.freedesktop.DBus.Properties"; |
| 34 | |
James Feist | 0c8223b | 2019-05-08 15:33:33 -0700 | [diff] [blame] | 35 | /* |
| 36 | * Given a path that optionally has a glob portion, fill it out. |
| 37 | */ |
| 38 | std::string FixupPath(std::string original); |
Patrick Venture | a076487 | 2020-08-08 07:48:43 -0700 | [diff] [blame] | 39 | |
| 40 | } // namespace pid_control |