Regular API function

simTransformBuffer / sim.transformBuffer

Description Modified a buffer than contains packed data. See also the data packing/unpacking functions.
C synopsis
-
C parameters
-
C return value
-
Lua synopsis
1) string outBuffer=sim.transformBuffer(string inBuffer,number inFormat,number multiplier,number offset,number outFormat)
2) table outBuffer=sim.transformBuffer(string inBuffer,sim.buffer_uint8,0,number splitSize,sim.buffer_split)
Lua parameters
inBuffer: the input buffer that contains packed data.
inFormat: a buffer type.
multiplier: a multiplier value. We have out=offset+multiplier*in
offset/splitSize: an offset or split size value. We have out=offset+multiplier*in
outFormat: the desired buffer type for the returned buffer.
Lua return values
1) outBuffer: the modified buffer, or nil in case of an error
2) table: the various split buffers, or nil in case of an error

All regular API functions on one page