# NanoVNASaver # # A python program to view and export Touchstone data from a NanoVNA # Copyright (C) 2019, 2020 Rune B. Broberg # Copyright (C) 2020 NanoVNA-Saver Authors # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . from .Hardware import get_interfaces from .NanoVNA_V2 import NanoVNA_V2_H4 class MetaVna(type): def __call__(cls, *args, **kwargs): return super(MetaVna, NanoVNA_V2_H4).__call__(*args, **kwargs) class Vna: name = "Vna" def __init__(self, *args, **kwargs): super(Vna, self).__init__(*args, **kwargs) def connect(self) -> bool: assert NotImplementedError('Device does not support this method') def disconnect(self) -> bool: assert NotImplementedError('Device does not support this method') def set_bw(self): assert NotImplementedError('Device does not support this method') def set_sweep(self, freq_start: float, freq_end: float, points: int): assert NotImplementedError('Device does not support this method') def get_bw(self) -> float: assert NotImplementedError('Device does not support this method') def get_sweep(self) -> list: assert NotImplementedError('Device does not support this method') def get_info(self) -> dict: assert NotImplementedError('Device does not support this method') def measure(self) -> list: assert NotImplementedError('Device does not support this method') def set_power(self, power: float): assert NotImplementedError('Device does not support this method') def get_power(self) -> float: assert NotImplementedError('Device does not support this method') def set_cal(self): assert NotImplementedError('Device does not support this method') def get_cal(self): assert NotImplementedError('Device does not support this method')