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

Method processPayload

app/src/IO/ConnectionManager.cpp:527–550  ·  view source on GitHub ↗

* @brief Feeds a pre-built payload directly into the frame processing pipeline. */

Source from the content-addressed store, hash-verified

525 * @brief Feeds a pre-built payload directly into the frame processing pipeline.
526 */
527void 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.

Callers 3

injectFrameMethod · 0.80
injectFrameMethod · 0.80
injectFrameMethod · 0.80

Calls 7

makeCapturedDataFunction · 0.85
isEmptyMethod · 0.80
hotpathRxDataMethod · 0.80
operationModeMethod · 0.80
hotpathRxSourceFrameMethod · 0.80
hotpathTxDataMethod · 0.45
hotpathRxFrameMethod · 0.45

Tested by

no test coverage detected