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

Method SetLastPosition

lib/mdflib/mdflib/src/samplequeue.cpp:461–477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459bool SampleQueue::IsEmpty() const { return queue_.empty(); }
460
461void SampleQueue::SetLastPosition(std::streambuf& buffer) {
462 buffer.pubseekoff(0, std::ios_base::end);
463
464 auto *dg3 = dynamic_cast<Dg3Block *>(&data_group_);
465 if (dg3 == nullptr) {
466 return;
467 }
468
469 if (dg3->Link(3) > 0) {
470 return;
471 }
472
473 dg3->SetLastFilePosition(buffer);
474 const auto position = detail::GetFilePosition(buffer);
475 dg3->UpdateLink(buffer, 3, position);
476 dg3->SetLastFilePosition(buffer);
477}
478
479void SampleQueue::SetDataPosition(std::streambuf& buffer) {
480 if (writer_.CompressData()) {

Callers

nothing calls this directly

Calls 4

GetFilePositionFunction · 0.85
SetLastFilePositionMethod · 0.80
UpdateLinkMethod · 0.80
LinkMethod · 0.45

Tested by

no test coverage detected