#ifndef SERIAL_SAMPLE_CONNECTIONWINDOW_H #define SERIAL_SAMPLE_CONNECTIONWINDOW_H #include #include #include class ConnectionWindow { public: ConnectionWindow(); ~ConnectionWindow(); void initialize(); void render(bool* paramOpen); [[nodiscard]] bool isConnected() const { return connected; } [[nodiscard]] sp_port* getActivePort() const { return activePort; } void forceLogMessage(const std::string& msg); std::string& getSharedLog() { return txLog; } private: void refreshPorts(); struct SerialPortInfo { std::string portName; std::string description; }; std::vector ports; int selectedPortIdx; // Новые переменные для выпадающего списка Baud Rate std::vector baudRates; int selectedBaudIdx; bool connected; struct sp_port* activePort; std::string txLog; }; #endif // SERIAL_SAMPLE_CONNECTIONWINDOW_H