#pragma once

#include <vector>

#include "shared_types.hpp"

namespace radar::drivers {

/**
 * @brief One forward sweep acquired from the radar.
 *
 * All vectors must have equal size and aligned indices.
 */
struct SweepTrace {
    std::vector<float> frequency_hz{};
    std::vector<ipc::Complex32> s11{};
    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 one
 * forward sweep.
 */
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 sweep containing the forward traces exposed by the driver. */
    [[nodiscard]] virtual auto acquire_sweep() -> SweepTrace = 0;
};

}  // namespace radar::drivers
