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

Method writeFrameGroups

app/src/MDF4/Export.cpp:106–125  ·  view source on GitHub ↗

* @brief Persists one frame's groups to the MDF4 writer at the given timestamp. */

Source from the content-addressed store, hash-verified

104 * @brief Persists one frame's groups to the MDF4 writer at the given timestamp.
105 */
106void MDF4::ExportWorker::writeFrameGroups(const DataModel::Frame& frame,
107 qint64 timestamp_ns,
108 double timestamp_s)
109{
110 for (const auto& group : frame.groups) {
111 auto it = m_groupMap.find(group.groupId);
112 if (it == m_groupMap.end())
113 continue;
114
115 auto& info = it->second;
116 if (group.datasets.size() != info.channels.size())
117 continue;
118
119 if (info.timeChannel)
120 info.timeChannel->SetChannelValue(timestamp_s);
121
122 writeGroupDatasets(group, info);
123 m_writer->SaveSample(*info.channelGroup, static_cast<uint64_t>(timestamp_ns));
124 }
125}
126
127/**
128 * @brief Processes a batch of MDF4 frames

Callers

nothing calls this directly

Calls 4

findMethod · 0.80
sizeMethod · 0.45
SetChannelValueMethod · 0.45
SaveSampleMethod · 0.45

Tested by

no test coverage detected