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

Function WriteByte

lib/mdflib/mdflib/src/mdfblock.cpp:207–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207uint64_t WriteByte(std::streambuf& buffer, const std::vector<uint8_t> &source) {
208 const auto ret = buffer.sputn(
209 reinterpret_cast<const char*>(source.data()),
210 static_cast<std::streamsize>(source.size()) );
211 if (ret != source.size()) {
212 throw std::ios_base::failure("End of stream reached (EOF).");
213 }
214 return ret;
215}
216
217uint64_t WriteBytes(std::streambuf& buffer, uint64_t nof_bytes) {
218 const std::vector<uint8_t> empty_array(static_cast<size_t>(nof_bytes), 0);

Callers 9

TESTFunction · 0.85
WriteMethod · 0.85
WriteMethod · 0.85
WriteMethod · 0.85
WriteMethod · 0.85
WriteMethod · 0.85
WriteMethod · 0.85
WriteBytesFunction · 0.85
WriteMethod · 0.85

Calls 3

failureFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.68