| /openbmc/intel-ipmi-oem/tests/ |
| H A D | test_sensorcommands.cpp | 106 int16_t mValue; in testBounds() local 113 result = ipmi::getSensorAttributes(yMax, yMin, mValue, rExp, bValue, bExp, in testBounds() 126 yMin, yMax, mValue, (int)rExp, bValue, (int)bExp, (int)bSigned); in testBounds() 146 testValue(xMin, yMin, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() 147 testValue(x25p, y25p, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() 148 testValue(x50p, y50p, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() 149 testValue(x75p, y75p, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() 150 testValue(xMax, yMax, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() 160 testValue(xMin, yMin, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() 161 testValue(x25p, y25p, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() [all …]
|
| /openbmc/phosphor-host-ipmid/test/dbus-sdr/ |
| H A D | sensorcommands_unittest.cpp | 107 int16_t mValue; in testBounds() local 114 result = ipmi::getSensorAttributes(yMax, yMin, mValue, rExp, bValue, bExp, in testBounds() 127 yMin, yMax, mValue, (int)rExp, bValue, (int)bExp, (int)bSigned); in testBounds() 147 testValue(xMin, yMin, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() 148 testValue(x25p, y25p, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() 149 testValue(x50p, y50p, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() 150 testValue(x75p, y75p, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() 151 testValue(xMax, yMax, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() 161 testValue(xMin, yMin, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() 162 testValue(x25p, y25p, mValue, rExp, bValue, bExp, bSigned, yRange); in testBounds() [all …]
|
| /openbmc/intel-ipmi-oem/include/ |
| H A D | sensorutils.hpp | 159 const double max, const double min, int16_t& mValue, int8_t& rExp, in getSensorAttributes() argument 226 mValue = static_cast<int16_t>(std::round(dM)); in getSensorAttributes() 228 normalizeIntExp(mValue, rExp, dM); in getSensorAttributes() 231 if (mValue == 0) in getSensorAttributes() 266 const double value, const int16_t mValue, const int8_t rExp, in scaleIPMIValueFromDouble() argument 270 if (mValue == 0) in scaleIPMIValueFromDouble() 275 auto dM = static_cast<double>(mValue); in scaleIPMIValueFromDouble() 316 int16_t mValue = 0; in getScaledIPMIValue() local 323 getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned); in getScaledIPMIValue() 329 return scaleIPMIValueFromDouble(value, mValue, rExp, bValue, bExp, bSigned); in getScaledIPMIValue()
|
| /openbmc/phosphor-host-ipmid/dbus-sdr/ |
| H A D | sensorutils.cpp | 151 bool getSensorAttributes(const double max, const double min, int16_t& mValue, in getSensorAttributes() argument 221 mValue = static_cast<int16_t>(std::round(dM)); in getSensorAttributes() 223 normalizeIntExp(mValue, rExp, dM); in getSensorAttributes() 226 if (mValue == 0) in getSensorAttributes() 261 uint8_t scaleIPMIValueFromDouble(const double value, const int16_t mValue, in scaleIPMIValueFromDouble() argument 266 if (mValue == 0) in scaleIPMIValueFromDouble() 271 auto dM = static_cast<double>(mValue); in scaleIPMIValueFromDouble() 312 int16_t mValue = 0; in getScaledIPMIValue() local 319 getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned); in getScaledIPMIValue() 325 return scaleIPMIValueFromDouble(value, mValue, rExp, bValue, bExp, bSigned); in getScaledIPMIValue()
|
| H A D | sensorcommands.cpp | 500 int16_t mValue = 0; in calculateValue() local 506 if (!getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned)) in calculateValue() 513 value *= ((double)mValue); in calculateValue() 987 int16_t mValue = 0; in ipmiSenGetSensorReading() local 993 if (!getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned)) in ipmiSenGetSensorReading() 999 scaleIPMIValueFromDouble(reading, mValue, rExp, bValue, bExp, bSigned); in ipmiSenGetSensorReading() 1054 "MIN", min, "MAX", max, "STEP", step, "MVALUE", mValue, "REXP", in ipmiSenGetSensorReading() 1179 int16_t mValue = 0; in ipmiSenSetSensorThresholds() local 1185 if (!getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned)) in ipmiSenSetSensorThresholds() 1265 double valueToSet = ((mValue * std::get<thresholdValue>(property)) + in ipmiSenSetSensorThresholds() [all …]
|
| /openbmc/fb-ipmi-oem/include/ |
| H A D | sensorutils.hpp | 168 const double max, const double min, int16_t& mValue, int8_t& rExp, in getSensorAttributes() argument 271 mValue = static_cast<int16_t>(mDouble) & maxInt10; in getSensorAttributes() 278 const double value, const uint16_t mValue, const int8_t rExp, in scaleIPMIValueFromDouble() argument 283 (mValue * std::pow(10, rExp)); in scaleIPMIValueFromDouble() 303 int16_t mValue = 0; in getScaledIPMIValue() local 310 result = getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned); in getScaledIPMIValue() 315 return scaleIPMIValueFromDouble(value, mValue, rExp, bValue, bExp, bSigned); in getScaledIPMIValue()
|
| /openbmc/dbus-sensors/src/intrusion/ |
| H A D | ChassisIntrusionSensor.cpp | 79 if (newValue == mValue) in updateValue() 84 lg2::debug("Update value from '{VALUE}' to '{NEWVALUE}'", "VALUE", mValue, in updateValue() 102 mValue = newValue; in updateValue() 117 mValue = newValue; in updateValue() 317 if (mValue == normalValStr && propertyValue != normalValStr) in setSensorValue() 323 else if (mValue == hwIntrusionValStr && propertyValue == normalValStr) in setSensorValue() 335 "Status", mValue, in start() 347 mValue(normalValStr), mAutoRearm(autoRearm), mObjServer(objServer) in ChassisIntrusionSensor()
|
| H A D | ChassisIntrusionSensor.hpp | 29 std::string mValue; member in ChassisIntrusionSensor
|
| /openbmc/phosphor-host-ipmid/include/dbus-sdr/ |
| H A D | sensorutils.hpp | 30 bool getSensorAttributes(const double max, const double min, int16_t& mValue, 34 uint8_t scaleIPMIValueFromDouble(const double value, const int16_t mValue,
|
| /openbmc/dbus-sensors/src/ipmb/ |
| H A D | IpmbSDRSensor.hpp | 79 uint16_t mValue = 0; member 123 inline static double sensorValCalculation(uint16_t mValue, double bValue,
|
| H A D | IpmbSDRSensor.cpp | 347 double IpmbSDRDevice::sensorValCalculation(uint16_t mValue, double bValue, in sensorValCalculation() argument 350 double sensorValue = ((mValue * value) + bValue) * expValue; in sensorValCalculation()
|
| /openbmc/fb-ipmi-oem/src/ |
| H A D | storagecommands.cpp | 737 int16_t mValue; in ipmiStorageGetSDR() local 743 if (!getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned)) in ipmiStorageGetSDR() 749 record.body.m_lsb = mValue & 0xFF; in ipmiStorageGetSDR() 753 uint8_t mMsb = (mValue & (1 << 8)) > 0 ? (1 << 6) : 0; in ipmiStorageGetSDR() 756 if (mValue < 0) in ipmiStorageGetSDR()
|