#pragma once #include "runtime/Gallery_Runtime.hpp" #include #include #include #include namespace aethera::mcp { struct Control_Service::Private { struct Entry : std::enable_shared_from_this { static constexpr std::size_t maximum_taskflow_trace_frames{120}; std::unique_ptr components{}; web::Gallery_Runtime runtime{}; std::string id{}; Gallery_Output output{}; std::atomic> terminal_failure{}; std::atomic_size_t taskflow_trace_remaining{}; std::atomic_uint64_t taskflow_trace_control{}; std::array>, maximum_taskflow_trace_frames> taskflow_trace_slots{}; Entry(std::string value_id, web::Gallery_Build build, Gallery_Output value_output); ~Entry(); Entry(const Entry&) = delete; Entry& operator=(const Entry&) = delete; void start(); void stop() noexcept; [[nodiscard]] std::shared_ptr policy() const noexcept; [[nodiscard]] std::shared_ptr create_policy( Frame_Policy_Type type, double fixed_rate_fps); void replace_policy(Frame_Policy_Type type); void prepare_frame(not_null frame, const Frame_Production& production); [[nodiscard]] Frame_Publication_Dispatch publish_frame( not_null frame, const Frame_Production& production); void fail(std::exception_ptr failure) noexcept; [[nodiscard]] nlohmann::json schema() const; [[nodiscard]] nlohmann::json diagnostics() const; void request_trace(std::size_t frame_count); [[nodiscard]] nlohmann::json trace() const; }; Gallery_Output output{}; std::unordered_map> plots; }; }