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

Method ReadHeader

lib/mdflib/mdflib/src/mdf3file.cpp:41–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39IHeader *Mdf3File::Header() const { return hd_block_.get(); }
40
41void Mdf3File::ReadHeader(std::streambuf& buffer) {
42 if (!id_block_) {
43 id_block_ = std::make_unique<IdBlock>();
44 }
45 if (id_block_->FilePosition() < 0) {
46 SetFilePosition(buffer, 0);
47 id_block_->Read(buffer);
48 }
49
50 if (!hd_block_) {
51 hd_block_ = std::make_unique<Hd3Block>();
52 }
53 if (hd_block_->FilePosition() <= 0) {
54 hd_block_->Init(*id_block_);
55 SetFilePosition(buffer, 64);
56 hd_block_->Read(buffer);
57 }
58}
59
60void Mdf3File::ReadMeasurementInfo(std::streambuf& buffer) {
61 ReadHeader(buffer);

Callers

nothing calls this directly

Calls 4

SetFilePositionFunction · 0.85
FilePositionMethod · 0.45
ReadMethod · 0.45
InitMethod · 0.45

Tested by

no test coverage detected