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

Method sendValue

app/src/UI/Widgets/Output/Base.cpp:140–153  ·  view source on GitHub ↗

* @brief Evaluates the transmit function and sends the result to the device. */

Source from the content-addressed store, hash-verified

138 * @brief Evaluates the transmit function and sends the result to the device.
139 */
140void Widgets::Output::Base::sendValue(const QVariant& value)
141{
142 if (m_rateLimiter.elapsed() < kMinSendIntervalMs)
143 return;
144
145 m_rateLimiter.restart();
146 const auto& tk = Licensing::CommercialToken::current();
147 if (!tk.isValid() || !SS_LICENSE_GUARD() || tk.featureTier() < Licensing::FeatureTier::Trial)
148 return;
149
150 const auto data = evaluateTransmitFunction(value);
151 if (!data.isEmpty())
152 (void)IO::ConnectionManager::instance().writeDataToDevice(m_sourceId, data);
153}
154
155/**
156 * @brief Runs the JavaScript transmit(value) function and returns the result as a QByteArray.

Callers

nothing calls this directly

Calls 4

featureTierMethod · 0.80
isEmptyMethod · 0.80
writeDataToDeviceMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected