<div dir="ltr"><div dir="ltr">Hi all:<div> <span style="color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"">Sensor reading, according to IPMI spec, is calculated as:</span></div><pre lang="none" style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;margin-bottom:16px;margin-top:0px;background-color:rgb(246,248,250);border-radius:3px;line-height:1.45;overflow:auto;padding:16px;color:rgb(36,41,46)"><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;background-color:transparent;border-radius:3px;margin:0px;padding:0px;border:0px;word-break:normal;display:inline;line-height:inherit;overflow:visible">y = L[(Mx + B * 10^(bExp)) * 10^(rExp)]
</code></pre><ul style="box-sizing:border-box;margin-bottom:16px;margin-top:0px;padding-left:2em;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol""><li style="box-sizing:border-box">y: the 'final value' as reported by IPMItool</li><li style="box-sizing:border-box;margin-top:0.25em">x: 8 bits, unsigned, reading data encoded in IPMI response packet</li><li style="box-sizing:border-box;margin-top:0.25em">M: 10 bits, signed integer multiplier,<span class="gmail-Apple-converted-space"> </span><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;background-color:rgba(27,31,35,0.047);border-radius:3px;margin:0px;padding:0.2em 0.4em">multiplierM</code><span class="gmail-Apple-converted-space"> </span>in YAML</li><li style="box-sizing:border-box;margin-top:0.25em">B: 10 bits, signed additive offset,<span class="gmail-Apple-converted-space"> </span><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;background-color:rgba(27,31,35,0.047);border-radius:3px;margin:0px;padding:0.2em 0.4em">offsetB</code><span class="gmail-Apple-converted-space"> </span>in YAML</li><li style="box-sizing:border-box;margin-top:0.25em">bExp: 4 bits, signed,<span class="gmail-Apple-converted-space"> </span><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;background-color:rgba(27,31,35,0.047);border-radius:3px;margin:0px;padding:0.2em 0.4em">bExp</code><span class="gmail-Apple-converted-space"> </span>in YAML</li><li style="box-sizing:border-box;margin-top:0.25em">rExp: 4 bits, signed,<span class="gmail-Apple-converted-space"> </span><code style="box-sizing:border-box;font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;background-color:rgba(27,31,35,0.047);border-radius:3px;margin:0px;padding:0.2em 0.4em">rExp</code><span class="gmail-Apple-converted-space"> </span>in YAML</li></ul><span style="color:rgb(36,41,46);font-family:-apple-system,system-ui,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol""> ipmid calculate raw data by </span><font color="#24292e" face="-apple-system, system-ui, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol"><br></font><div><div>double value = variant_ns::get<T>(propValue) * std::pow(10, sensorInfo.scale - sensorInfo.exponentR);</div><div>auto rawData = static_cast<uint8_t>((value - sensorInfo.scaledOffset) / sensorInfo.coefficientM);sue</div></div><div><br></div><div>I am confused about why process raw data with M and rExp? M, offsetB, bExp and rExp shall just responded to ipmitool and calculate with raw</div><div>data. I thought raw data only need calculated by scale if raw data need to be adjust before respond to ipmitool.</div><div>Now I met a problem, I have a raw data is 2100 and I want to display 12.0 in ipmitool sdr command. I don't know how to assign M, rExp and scale value in yaml.</div><div>Could some one tell me how to translate sensor value? tks.</div><div><br></div><div>Tyler</div><div><br></div><div><br></div></div></div>