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

Method FinalizeMeasurement

lib/mdflib/mdflib/src/mdfconverter.cpp:75–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75bool MdfConverter::FinalizeMeasurement() {
76 write_cache_.Exit();
77
78 // Save outstanding non-written blocks and any block updates as
79 // sample counters which changes during DG/DT updates
80 if (!mdf_file_) {
81 MDF_ERROR() << "The MDF file is not created. Invalid use of the function.";
82 return false;
83 }
84
85 if (!IsOpen()) {
86 MDF_ERROR() << "Failed to open the file for writing. File: " << filename_;
87 return false;
88 }
89 const bool write = mdf_file_ && mdf_file_->Write(*file_);
90 const bool signal_data = WriteSignalData(*file_);
91 Close();
92
93 write_state_ = WriteState::Finalize;
94 return write && signal_data;
95}
96
97
98

Callers

nothing calls this directly

Calls 2

ExitMethod · 0.80
WriteMethod · 0.45

Tested by

no test coverage detected