* @brief Writes all dataset values (final + raw) for one channel group. */
| 79 | * @brief Writes all dataset values (final + raw) for one channel group. |
| 80 | */ |
| 81 | void 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. |
nothing calls this directly
no test coverage detected