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

Method Write

lib/mdflib/mdflib/src/fh4block.cpp:43–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43uint64_t Fh4Block::Write(std::streambuf& buffer) {
44 const bool update =
45 FilePosition() > 0; // Write or update the values inside the block
46 if (update) {
47 return block_length_;
48 }
49 block_type_ = "##FH";
50 block_length_ = 24 + (2 * 8) + 8 + 2 + 2 + 1 + 3;
51 link_list_.resize(2, 0);
52
53 uint64_t bytes = MdfBlock::Write(buffer);
54 bytes += timestamp_.Write(buffer);
55 bytes += WriteBytes(buffer, 3);
56 UpdateBlockSize(buffer, bytes);
57 WriteMdComment(buffer, kIndexMd);
58 return bytes;
59}
60
61IMetaData *Fh4Block::CreateMetaData() { return MdfBlock::CreateMetaData(); }
62

Callers

nothing calls this directly

Calls 2

WriteBytesFunction · 0.85
resizeMethod · 0.45

Tested by

no test coverage detected