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: 2
| Subgroups: 0
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("frequency", core, parent)
# noinspection PyTypeChecker
[docs]
def get_mode(self) -> enums.AvionicCarrFreqModeMrkBcn:
"""
``[SOURce<HW>]:[BB]:[ILS]:MBEacon:FREQuency:MODE`` \n
Snippet: ``value: enums.AvionicCarrFreqModeMrkBcn = driver.source.bb.ils.mbeacon.frequency.get_mode()`` \n
Sets the mode for the carrier frequency of the signal.
:return: mode: USER | PREDefined
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:ILS:MBEacon:FREQuency:MODE?')
return Conversions.str_to_scalar_enum(response, enums.AvionicCarrFreqModeMrkBcn)
[docs]
def set_mode(self, mode: enums.AvionicCarrFreqModeMrkBcn) -> None:
"""
``[SOURce<HW>]:[BB]:[ILS]:MBEacon:FREQuency:MODE`` \n
Snippet: ``driver.source.bb.ils.mbeacon.frequency.set_mode(mode = enums.AvionicCarrFreqModeMrkBcn.PREDefined)`` \n
Sets the mode for the carrier frequency of the signal.
:param mode: USER | PREDefined
"""
param = Conversions.enum_scalar_to_str(mode, enums.AvionicCarrFreqModeMrkBcn)
self._core.io.write(f'SOURce<HwInstance>:BB:ILS:MBEacon:FREQuency:MODE {param}')
[docs]
def get_value(self) -> float:
"""
``[SOURce<HW>]:[BB]:[ILS]:MBEacon:FREQuency`` \n
Snippet: ``value: float = driver.source.bb.ils.mbeacon.frequency.get_value()`` \n
Sets the carrier frequency for the ILS marker beacon signal.
:return: carrier_freq: float Range: 100E3 to 6E9
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:ILS:MBEacon:FREQuency?')
return Conversions.str_to_float(response)
[docs]
def set_value(self, carrier_freq: float) -> None:
"""
``[SOURce<HW>]:[BB]:[ILS]:MBEacon:FREQuency`` \n
Snippet: ``driver.source.bb.ils.mbeacon.frequency.set_value(carrier_freq = 1.0)`` \n
Sets the carrier frequency for the ILS marker beacon 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:ILS:MBEacon:FREQuency {param}')