PreviousNext
Buffers
Help > OS functions > Buffers

All functions for copying buffers (copyBufferINFO2RF, copyBufferINFO2COM, copyBufferRF2COM, copyBufferRF2INFO, copyBufferCOM2RF, copyBufferCOM2INFO)  can use offsets memoryOffsetFrom and memoryOffsetTo. Offsets are applied when at least one of them is different from zero only. Then the following principle will take place: memoryOffsetFrom specifies a relative offset in the From buffer and memoryOffsetTo specifies a relative offset in the To buffer. It means that data is not read starting from bufferXX[0] but bufferXX[memoryOffsetFrom] and is not stored starting from bufferYY[0] but bufferYY[memoryOffsetTo]. Just the final part of the bufferXX is copied (from memoryOffsetFrom up to the end of the bufferXX or bufferYY, whichever is reached first, further optionally reduced by memoryLimit). In addition to this, the memoryLimit variable can be used to specify number of bytes to be transferred.

If both memoryOffsetFrom = 0 and memoryOffsetTo = 0, complete buffers (optionally reduced by memoryLimit) are copied. Offsets and the memoryLimit are default disabled (cleared after reset as well as after every buffer copy).