Encode integer value at bit level
encapsulated function integerBitPack 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"; input Integer value(min = 0) "Value to encode in with bits"; end integerBitPack;