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

Method onFrameReady

app/src/IO/ConnectionManager.cpp:1360–1380  ·  view source on GitHub ↗

* @brief Routes a completed frame from device @p deviceId to FrameBuilder. */

Source from the content-addressed store, hash-verified

1358 * @brief Routes a completed frame from device @p deviceId to FrameBuilder.
1359 */
1360void 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.

Callers

nothing calls this directly

Calls 5

isEmptyMethod · 0.80
operationModeMethod · 0.80
hotpathRxSourceFrameMethod · 0.80
hotpathTxRawFrameMethod · 0.80
hotpathRxFrameMethod · 0.45

Tested by

no test coverage detected