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

Method writeGroupDatasets

app/src/MDF4/Export.cpp:81–101  ·  view source on GitHub ↗

* @brief Writes all dataset values (final + raw) for one channel group. */

Source from the content-addressed store, hash-verified

79 * @brief Writes all dataset values (final + raw) for one channel group.
80 */
81void MDF4::ExportWorker::writeGroupDatasets(const DataModel::Group& group, ChannelGroupInfo& info)
82{
83 for (size_t i = 0; i < group.datasets.size(); ++i) {
84 const auto& dataset = group.datasets.at(i);
85
86 auto* channel = info.channels[i];
87 if (info.isNumeric[i])
88 channel->SetChannelValue(dataset.numericValue);
89 else
90 channel->SetChannelValue(dataset.value.toStdString());
91
92 if (i >= info.rawChannels.size() || !info.rawChannels[i])
93 continue;
94
95 auto* rawCh = info.rawChannels[i];
96 if (info.isNumeric[i])
97 rawCh->SetChannelValue(dataset.rawNumericValue);
98 else
99 rawCh->SetChannelValue(dataset.rawValue.toStdString());
100 }
101}
102
103/**
104 * @brief Persists one frame's groups to the MDF4 writer at the given timestamp.

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
SetChannelValueMethod · 0.45

Tested by

no test coverage detected