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

Method ReadHeader4

lib/mdflib/mdflib/src/mdfblock.cpp:428–445  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426
427
428uint64_t MdfBlock::ReadHeader4(std::streambuf& buffer) {
429 file_position_ = GetFilePosition(buffer);
430 uint64_t bytes = ReadStr(buffer, block_type_, 4);
431 uint32_t reserved = 0;
432 bytes += ReadNumber(buffer, reserved);
433 bytes += ReadNumber(buffer, block_length_);
434 bytes += ReadNumber(buffer, link_count_);
435
436 block_size_ = static_cast<uint16_t>(block_length_);
437
438 link_list_.clear();
439 for (uint64_t ii = 0; ii < link_count_; ++ii) {
440 int64_t link = 0;
441 bytes += ReadNumber(buffer, link);
442 link_list_.emplace_back(link);
443 }
444 return bytes;
445}
446
447
448void MdfBlock::Init(const MdfBlock &id_block) {

Callers

nothing calls this directly

Calls 3

GetFilePositionFunction · 0.85
ReadStrFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected