MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / SetDataPosition

Method SetDataPosition

lib/mdflib/mdflib/src/samplequeue.cpp:479–498  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477}
478
479void SampleQueue::SetDataPosition(std::streambuf& buffer) {
480 if (writer_.CompressData()) {
481 return;
482 }
483 auto* dg4 = dynamic_cast<Dg4Block*>(&data_group_);
484 if (dg4 == nullptr) {
485 return;
486 }
487 auto& block_list = dg4->DataBlockList();
488 if (block_list.empty()) {
489 return;
490 }
491 auto* dt4 = dynamic_cast<Dt4Block*>(block_list.back().get());
492 if (dt4 == nullptr) {
493 return;
494 }
495 SetLastPosition(buffer);
496 const int64_t data_position = GetFilePosition(buffer);
497 dt4->DataPosition(data_position);
498}
499
500
501} // namespace mdf

Callers

nothing calls this directly

Calls 5

GetFilePositionFunction · 0.85
CompressDataMethod · 0.80
emptyMethod · 0.80
DataPositionMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected