#pragma once

#include <cstdint>
#include <string>
#include <vector>

#include "radar_driver.hpp"
#include "run_config.hpp"

namespace radar::drivers {

struct RemoteCompactMK209DriverSettings {
    std::string host = "127.0.0.1";
    std::uint32_t port = 50209;
    config::RadarSweepSettings sweep{};
    std::uint32_t timeout_ms = 20'000;
};

class RemoteCompactMK209Driver final : public RadarDriver {
  public:
    explicit RemoteCompactMK209Driver(RemoteCompactMK209DriverSettings settings);
    ~RemoteCompactMK209Driver() override;

    void open() override;
    void close() override;
    [[nodiscard]] auto acquire_sweep() -> SweepTrace override;

  private:
    RemoteCompactMK209DriverSettings settings_{};
    int socket_fd_ = -1;
    std::vector<float> frequency_hz_{};
};

}  // namespace radar::drivers
