* @brief Evaluates the transmit function and sends the result to the device. */
| 138 | * @brief Evaluates the transmit function and sends the result to the device. |
| 139 | */ |
| 140 | void 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. |
nothing calls this directly
no test coverage detected