#pragma once #include "pid/ec/pid.hpp" #include #include #include #include namespace pid_control { void tryRestartControlLoops(void); /* * Given a configuration structure, fill out the information we use within the * PID loop. */ void initializePIDStruct(ec::pid_info_t* info, const ec::pidinfo& initial); void dumpPIDStruct(ec::pid_info_t* info); struct SensorThresholds { double lowerThreshold = std::numeric_limits::quiet_NaN(); double upperThreshold = std::numeric_limits::quiet_NaN(); }; const std::string sensorintf = "xyz.openbmc_project.Sensor.Value"; const std::string criticalThreshInf = "xyz.openbmc_project.Sensor.Threshold.Critical"; const std::string propertiesintf = "org.freedesktop.DBus.Properties"; std::string getSensorPath(const std::string& type, const std::string& id); std::string getMatch(const std::string& type, const std::string& id); void scaleSensorReading(const double min, const double max, double& value); bool validType(const std::string& type); /* * Given a path that optionally has a glob portion, fill it out. */ std::string FixupPath(std::string original); } // namespace pid_control