Source code for RsWaveform.LoadInterface

"""Load R&S waveform files."""

from __future__ import annotations

import abc
import typing

from .ParentStorage import ParentStorage

if typing.TYPE_CHECKING:
    from pathlib import Path


[docs] class LoadInterface(abc.ABC): """Load R&S waveform implementation."""
[docs] @abc.abstractmethod def load(self, file: typing.Union[str, typing.IO, Path]) -> ParentStorage: """Abstract load implementation."""
[docs] @abc.abstractmethod def load_in_chunks( self, file: typing.Union[str, typing.IO, Path], samples: int, offset: int ) -> ParentStorage: """Abstract load implementation for chunks."""
[docs] @abc.abstractmethod def load_meta(self, file: typing.Union[str, typing.IO, Path]) -> ParentStorage: """Abstract load implementation for meta information only."""