MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / processValue

Function processValue

app/rcc/scripts/parser/js/modbus.js:144–148  ·  view source on GitHub ↗

* Applies scaling and sign conversion to a raw 16-bit register value.

(index, rawValue)

Source from the content-addressed store, hash-verified

142 * Applies scaling and sign conversion to a raw 16-bit register value.
143 */
144function processValue(index, rawValue) {
145 var config = getRegisterConfig(index);
146 var value = config.signed ? toSigned16(rawValue) : rawValue;
147 return value / (config.scale || 1);
148}
149
150//------------------------------------------------------------------------------
151// Main Parser Function

Callers 2

parseFunction · 0.85
evaluateAlarmsMethod · 0.85

Calls 2

getRegisterConfigFunction · 0.85
toSigned16Function · 0.85

Tested by

no test coverage detected