forked from openbmc/phosphor-pid-control
-
Notifications
You must be signed in to change notification settings - Fork 0
/
util.hpp
40 lines (29 loc) · 968 Bytes
/
util.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#include "pid/ec/pid.hpp"
#include <phosphor-logging/log.hpp>
#include <sdbusplus/bus.hpp>
#include <limits>
#include <string>
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<double>::quiet_NaN();
double upperThreshold = std::numeric_limits<double>::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";
/*
* Given a path that optionally has a glob portion, fill it out.
*/
std::string FixupPath(std::string original);
} // namespace pid_control