* @brief Routes a completed frame from device @p deviceId to FrameBuilder. */
| 1358 | * @brief Routes a completed frame from device @p deviceId to FrameBuilder. |
| 1359 | */ |
| 1360 | void IO::ConnectionManager::onFrameReady(int deviceId, const IO::CapturedDataPtr& frame) |
| 1361 | { |
| 1362 | Q_ASSERT(deviceId >= 0); |
| 1363 | Q_ASSERT(frame); |
| 1364 | Q_ASSERT(!frame->data.isEmpty()); |
| 1365 | |
| 1366 | if (m_paused) |
| 1367 | return; |
| 1368 | |
| 1369 | static auto& frameBuilder = DataModel::FrameBuilder::instance(); |
| 1370 | |
| 1371 | if (AppState::instance().operationMode() == SerialStudio::ProjectFile) |
| 1372 | frameBuilder.hotpathRxSourceFrame(deviceId, frame); |
| 1373 | else |
| 1374 | frameBuilder.hotpathRxFrame(frame); |
| 1375 | |
| 1376 | #ifdef BUILD_COMMERCIAL |
| 1377 | static auto& mqttPublisher = MQTT::Publisher::instance(); |
| 1378 | mqttPublisher.hotpathTxRawFrame(deviceId, frame); |
| 1379 | #endif |
| 1380 | } |
| 1381 | |
| 1382 | /** |
| 1383 | * @brief Forwards raw bytes from device @p deviceId to Console and API Server. |
nothing calls this directly
no test coverage detected