* @brief Feeds a pre-built payload directly into the frame processing pipeline. */
| 525 | * @brief Feeds a pre-built payload directly into the frame processing pipeline. |
| 526 | */ |
| 527 | void IO::ConnectionManager::processPayload(const QByteArray& payload) |
| 528 | { |
| 529 | Q_ASSERT(!payload.isEmpty()); |
| 530 | |
| 531 | if (payload.isEmpty()) |
| 532 | return; |
| 533 | |
| 534 | static auto& console = Console::Handler::instance(); |
| 535 | static auto& server = API::Server::instance(); |
| 536 | static auto& frameBuilder = DataModel::FrameBuilder::instance(); |
| 537 | |
| 538 | const auto captured = makeCapturedData(payload); |
| 539 | server.hotpathTxData(captured->data); |
| 540 | console.hotpathRxData(captured->data); |
| 541 | if (AppState::instance().operationMode() == SerialStudio::ProjectFile) |
| 542 | frameBuilder.hotpathRxSourceFrame(0, captured); |
| 543 | else |
| 544 | frameBuilder.hotpathRxFrame(captured); |
| 545 | |
| 546 | #ifdef ENABLE_GRPC |
| 547 | static auto& grpcServer = API::GRPC::GRPCServer::instance(); |
| 548 | grpcServer.hotpathTxData(captured->data); |
| 549 | #endif |
| 550 | } |
| 551 | |
| 552 | /** |
| 553 | * @brief Injects per-source payloads for multi-source playback. |
no test coverage detected