Unpack integer value encoded at bit level
encapsulated function integerBitUnpack import Modelica; extends Modelica.Icons.Function; import Modelica_DeviceDrivers.Packaging.SerialPackager; input SerialPackager pkg; input Integer bitOffset "Bit offset from current packager position until first encoding bit"; input Integer width "Number of bits that encode the integer value"; output Integer value "Decoded integer value"; end integerBitUnpack;