from typing import Iterator, NamedTuple, Protocol

import numpy as np
import numpy.typing as npt

from .csi_frame import CSI

CSIHost = tuple[str, int]


class MergedCSI(NamedTuple):
    """Merged CSI data from all antennas"""

    frames: dict[CSIHost, CSI]
    matrix: npt.NDArray[np.complex64]


class CSIProducer(Protocol):
    is_live: bool

    def __call__(self) -> Iterator[MergedCSI]: ...
    def stop(self) -> None: ...
