Bugfix in sending of measurement data
This commit is contained in:
@@ -92,7 +92,10 @@ private:
|
||||
"serializeChunk: invalid startIdx" );
|
||||
|
||||
if( startIdx >= currentChunk->getStartIndex() ) {
|
||||
encoder.sendArrayPartialContents( currentChunk->getDataPointer(), currentChunk->numMeasurements() );
|
||||
const auto localStartIdx = startIdx - currentChunk->getStartIndex();
|
||||
const auto numElements = currentChunk->numMeasurements() - localStartIdx;
|
||||
assert(numElements <= currentChunk->numMeasurements(), "Internal problem in serializeChunk");
|
||||
encoder.sendArrayPartialContents( currentChunk->getDataPointer() + localStartIdx, numElements );
|
||||
return currentChunk->getStartIndex() + currentChunk->numMeasurements();
|
||||
} else if( startIdx >= otherChunk->getStartIndex() && otherChunkFilled() ) {
|
||||
encoder.sendArrayPartialContents( otherChunk->getDataPointer(), otherChunk->numMeasurements() );
|
||||
|
||||
Reference in New Issue
Block a user