from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class FrequencyCls:
"""
| Commands in total: 3
| Subgroups: 0
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("frequency", core, parent)
# noinspection PyTypeChecker
[docs]
def get_mode(self) -> enums.AvionicCarrFreqMode:
"""
``[SOURce<HW>]:BB:VOR:FREQuency:MODE`` \n
Snippet: ``value: enums.AvionicCarrFreqMode = driver.source.bb.vor.frequency.get_mode()`` \n
Sets the mode for the carrier frequency of the signal.
:return: mode: DECimal | ICAO DECimal Activates user-defined variation of the carrier frequency. ICAO Activates variation in predefined steps according to standard VOR transmitting frequencies (see Table 'VOR ICAO channels and frequencies (MHz) ') .
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:VOR:FREQuency:MODE?')
return Conversions.str_to_scalar_enum(response, enums.AvionicCarrFreqMode)
[docs]
def set_mode(self, mode: enums.AvionicCarrFreqMode) -> None:
"""
``[SOURce<HW>]:BB:VOR:FREQuency:MODE`` \n
Snippet: ``driver.source.bb.vor.frequency.set_mode(mode = enums.AvionicCarrFreqMode.DECimal)`` \n
Sets the mode for the carrier frequency of the signal.
:param mode: DECimal | ICAO DECimal Activates user-defined variation of the carrier frequency. ICAO Activates variation in predefined steps according to standard VOR transmitting frequencies (see Table 'VOR ICAO channels and frequencies (MHz) ') .
"""
param = Conversions.enum_scalar_to_str(mode, enums.AvionicCarrFreqMode)
self._core.io.write(f'SOURce<HwInstance>:BB:VOR:FREQuency:MODE {param}')
# noinspection PyTypeChecker
[docs]
def get_step(self) -> enums.AvionicKnobStep:
"""
``[SOURce<HW>]:[BB]:VOR:FREQuency:STEP`` \n
Snippet: ``value: enums.AvionicKnobStep = driver.source.bb.vor.frequency.get_step()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:VOR:FREQuency:STEP?')
return Conversions.str_to_scalar_enum(response, enums.AvionicKnobStep)
[docs]
def set_step(self, step: enums.AvionicKnobStep) -> None:
"""
``[SOURce<HW>]:[BB]:VOR:FREQuency:STEP`` \n
Snippet: ``driver.source.bb.vor.frequency.set_step(step = enums.AvionicKnobStep.DECimal)`` \n
No help available
"""
param = Conversions.enum_scalar_to_str(step, enums.AvionicKnobStep)
self._core.io.write(f'SOURce<HwInstance>:BB:VOR:FREQuency:STEP {param}')
[docs]
def get_value(self) -> float:
"""
``[SOURce<HW>]:BB:VOR:FREQuency`` \n
Snippet: ``value: float = driver.source.bb.vor.frequency.get_value()`` \n
Sets the carrier frequency of the signal.
:return: carrier_freq: float Range: 100E3 to 6E9
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:VOR:FREQuency?')
return Conversions.str_to_float(response)
[docs]
def set_value(self, carrier_freq: float) -> None:
"""
``[SOURce<HW>]:BB:VOR:FREQuency`` \n
Snippet: ``driver.source.bb.vor.frequency.set_value(carrier_freq = 1.0)`` \n
Sets the carrier frequency of the signal.
:param carrier_freq: float Range: 100E3 to 6E9
"""
param = Conversions.decimal_value_to_str(carrier_freq)
self._core.io.write(f'SOURce<HwInstance>:BB:VOR:FREQuency {param}')