#pragma once

#include <vector>

#include "shared_types.hpp"

namespace radar::drivers {

/**
 * @brief One S21 sweep acquired from the radar.
 *
 * Both vectors must have equal size and aligned indices.
 */
struct SweepTrace {
    std::vector<float> frequency_hz{};
    std::vector<ipc::Complex32> s21{};
};

/**
 * @brief Minimal radar interface used by the sweep orchestrator.
 *
 * Implementations are expected to be lightweight: configuration is handled by
 * the Python layer, while this interface only opens/closes and acquires S21.
 */
class RadarDriver {
  public:
    virtual ~RadarDriver() = default;

    /** @brief Open underlying transport and prepare acquisition. */
    virtual void open() = 0;
    /** @brief Release all allocated resources. */
    virtual void close() = 0;
    /** @brief Acquire one S21 sweep. */
    [[nodiscard]] virtual auto acquire_s21_sweep() -> SweepTrace = 0;
};

}  // namespace radar::drivers
