#pragma once #include "fgc/Config.h" #include #include #include namespace fgc { // Command-line / runtime options that override config at launch. struct RuntimeOptions { bool init = false; // run the endstop-finding init sequence bool start = false; // begin capture automatically bool demo = false; // demo mode (copy placeholder image instead of encoding) // Tri-state feature overrides (unset => use the config value). std::optional use_mqtt; std::optional mock_camera; std::optional mock_serial; std::optional use_tui; // --tui / --no-tui; unset => [UI] enable_tui std::string log_level; // empty => default std::string trace_categories; // comma list (serial,mqtt,camera,control,all); empty => unset }; // Owns the component lifecycle and the control loop. Builds the concrete // motor controller, control channel and camera source from config + options // (real or mock), wires them to the ImagePipeline and CaptureScheduler, and // runs until "exit" / SIGINT. class Application { public: Application(AppConfig config, RuntimeOptions options); ~Application(); int run(); private: struct Impl; std::unique_ptr impl_; }; } // namespace fgc