/openbmc/intel-ipmi-oem/tests/ |
H A D | test_sensorcommands.cpp | 106 int16_t mValue; in testBounds() local 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() 311 int16_t mValue; in TEST() local 326 EXPECT_EQ(mValue, 1); in TEST() 347 EXPECT_EQ(mValue, 1); in TEST() 369 EXPECT_EQ(mValue, floor((16000.0 / 0xFF) + 0.5)); in TEST() 393 expected = 12.2 / (mValue * std::pow(10, rExp)); in TEST() [all …]
|
/openbmc/phosphor-host-ipmid/test/dbus-sdr/ |
H A D | sensorcommands_unittest.cpp | 107 int16_t mValue; in testBounds() local 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() 312 int16_t mValue; in TEST() local 327 EXPECT_EQ(mValue, 1); in TEST() 348 EXPECT_EQ(mValue, 1); in TEST() 370 EXPECT_EQ(mValue, floor((16000.0 / 0xFF) + 0.5)); in TEST() 394 expected = 12.2 / (mValue * std::pow(10, rExp)); in TEST() [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 | 150 bool getSensorAttributes(const double max, const double min, int16_t& mValue, in getSensorAttributes() argument 218 mValue = static_cast<int16_t>(std::round(dM)); in getSensorAttributes() 220 normalizeIntExp(mValue, rExp, dM); in getSensorAttributes() 223 if (mValue == 0) in getSensorAttributes() 257 uint8_t scaleIPMIValueFromDouble(const double value, const int16_t mValue, in scaleIPMIValueFromDouble() argument 262 if (mValue == 0) in scaleIPMIValueFromDouble() 267 auto dM = static_cast<double>(mValue); in scaleIPMIValueFromDouble() 308 int16_t mValue = 0; in getScaledIPMIValue() local 315 getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned); in getScaledIPMIValue() 321 return scaleIPMIValueFromDouble(value, mValue, rExp, bValue, bExp, bSigned); in getScaledIPMIValue()
|
H A D | sensorcommands.cpp | 489 int16_t mValue = 0; in calculateValue() local 502 value *= ((double)mValue); in calculateValue() 974 int16_t mValue = 0; in ipmiSenGetSensorReading() local 1165 int16_t mValue = 0; in ipmiSenSetSensorThresholds() local 1279 int16_t mValue = 0; in getIPMIThresholds() local 1303 value, mValue, rExp, bValue, bExp, bSigned); in getIPMIThresholds() 1313 value, mValue, rExp, bValue, bExp, bSigned); in getIPMIThresholds() 1848 int16_t mValue = 0; in constructSensorSdr() local 1875 record.body.m_lsb = mValue & 0xFF; in constructSensorSdr() 1877 uint8_t mBitSign = (mValue < 0) ? 1 : 0; in constructSensorSdr() [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 | 80 if (newValue == mValue) in updateValue() 87 std::cout << "Update value from " << mValue << " to " << newValue in updateValue() 106 mValue = newValue; in updateValue() 121 mValue = newValue; in updateValue() 334 if (mValue == normalValStr && propertyValue != normalValStr) in setSensorValue() 340 else if (mValue == hwIntrusionValStr && propertyValue == normalValStr) in setSensorValue() 352 "Status", mValue, in start() 364 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 | 72 uint16_t mValue = 0; member 116 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 | 736 int16_t mValue; in ipmiStorageGetSDR() local 742 if (!getSensorAttributes(max, min, mValue, rExp, bValue, bExp, bSigned)) in ipmiStorageGetSDR() 748 record.body.m_lsb = mValue & 0xFF; in ipmiStorageGetSDR() 752 uint8_t mMsb = (mValue & (1 << 8)) > 0 ? (1 << 6) : 0; in ipmiStorageGetSDR() 755 if (mValue < 0) in ipmiStorageGetSDR()
|