Regular API function

simUnpackUInt16Table / sim.unpackUInt16Table

Description Unpacks a string (or part of it) into a table of uint16 numbers. See also sim.packUInt16Table and the other packing/unpacking functions.
C/C++
synopsis
C/C++
parameters
C/C++
return value
Lua
synopsis
int[] uint16Numbers=sim.unpackUInt16Table(buffer data,int starUint16Index=0,int uint16Count=0,int additionalByteOffset)
Lua
parameters
data: a string (values between 0 and 255) that contains packed uint16 numbers
starUint16Index: the zero-based index from which on data should be unpacked (from data[2*starUint16Index+1+additionalByteOffset]). Can be omitted in which case 0 is used.
uint16Count: the amount of uint16s that should be unpacked. Can be omitted in which case 0 is used (which indicates that the maximum of uint16s should be unpacked from the indicated starUint16Index).
additionalByteOffset: a byte offset that will be added before reading the uint16s. Can be omitted, in which case 0 is used.
Lua
return values
uint16Numbers: a table containing unpacked uint16 numbers
Python
synopsis
list uint16Numbers=sim.unpackUInt16Table(bytes data,int starUint16Index=0,int uint16Count=0,int additionalByteOffset)