* @brief Recomputes the cached any-async-consumer flag from every export/output module. The * TCP and gRPC servers only count while a client is connected: with zero clients their * workers drop every frame, so the per-frame detached copy would be pure waste. */
| 506 | * workers drop every frame, so the per-frame detached copy would be pure waste. |
| 507 | */ |
| 508 | void DataModel::FrameBuilder::refreshAnyAsyncSink() |
| 509 | { |
| 510 | const auto& server = API::Server::instance(); |
| 511 | bool any = CSV::Export::instance().exportEnabled() || MDF4::Export::instance().exportEnabled() |
| 512 | || (server.enabled() && server.clientCount() > 0); |
| 513 | #ifdef BUILD_COMMERCIAL |
| 514 | any = |
| 515 | any || Sessions::Export::instance().exportEnabled() || MQTT::Publisher::instance().enabled(); |
| 516 | #endif |
| 517 | #ifdef ENABLE_GRPC |
| 518 | const auto& grpc = API::GRPC::GRPCServer::instance(); |
| 519 | any = any || (grpc.enabled() && grpc.clientCount() > 0); |
| 520 | #endif |
| 521 | |
| 522 | m_anyAsyncSink = any; |
| 523 | } |
| 524 | |
| 525 | /** |
| 526 | * @brief Recomputes the cached latest-frame capture flag (control script or API server active); |
nothing calls this directly
no test coverage detected