* @brief Dispatches a captured chunk to the parser for the current operation mode. */
| 659 | * @brief Dispatches a captured chunk to the parser for the current operation mode. |
| 660 | */ |
| 661 | void DataModel::FrameBuilder::hotpathRxFrame(const IO::CapturedDataPtr& data) |
| 662 | { |
| 663 | Q_ASSERT(data); |
| 664 | Q_ASSERT(!data->data.isEmpty()); |
| 665 | Q_ASSERT(m_operationMode == AppState::instance().operationMode()); |
| 666 | |
| 667 | if (m_captureLatestFrame) [[unlikely]] |
| 668 | captureLatestChunk(0, data); |
| 669 | |
| 670 | switch (m_operationMode) { |
| 671 | case SerialStudio::QuickPlot: |
| 672 | parseQuickPlotFrame(data); |
| 673 | break; |
| 674 | case SerialStudio::ProjectFile: |
| 675 | parseProjectFrame(data); |
| 676 | break; |
| 677 | case SerialStudio::ConsoleOnly: |
| 678 | break; |
| 679 | default: |
| 680 | break; |
| 681 | } |
| 682 | } |
| 683 | |
| 684 | /** |
| 685 | * @brief Per-source variant of hotpathRxFrame -- routes data through the matching source parser. |
no test coverage detected