from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class HoppingCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("hopping", core, parent)
# noinspection PyTypeChecker
[docs]
def get_mode(self) -> enums.FadHoppMode:
"""
``[SOURce<HW>]:FSIMulator:HOPPing:MODE`` \n
Snippet: ``value: enums.FadHoppMode = driver.source.fsimulator.hopping.get_mode()`` \n
This is a password-protected function. Unlock the protection level 1 to access it. See method
``RsSmw.system.protect.state.set()`` . Enables frequency hopping and determines how fading is resumed after a frequency
hop. Note: Enable list mode and load the frequency table before enabling frequency hopping.
:return: mode: OFF | IBANd | OOBand OFF Disables frequency hopping. IBANd Enables an in-band frequency hopping. OOBand Enables an out of band frequency hopping.
"""
response = self._core.io.query_str('SOURce<HwInstance>:FSIMulator:HOPPing:MODE?')
return Conversions.str_to_scalar_enum(response, enums.FadHoppMode)
[docs]
def set_mode(self, mode: enums.FadHoppMode) -> None:
"""
``[SOURce<HW>]:FSIMulator:HOPPing:MODE`` \n
Snippet: ``driver.source.fsimulator.hopping.set_mode(mode = enums.FadHoppMode.IBANd)`` \n
This is a password-protected function. Unlock the protection level 1 to access it. See method
``RsSmw.system.protect.state.set()`` . Enables frequency hopping and determines how fading is resumed after a frequency
hop. Note: Enable list mode and load the frequency table before enabling frequency hopping.
:param mode: OFF | IBANd | OOBand OFF Disables frequency hopping. IBANd Enables an in-band frequency hopping. OOBand Enables an out of band frequency hopping.
"""
param = Conversions.enum_scalar_to_str(mode, enums.FadHoppMode)
self._core.io.write(f'SOURce<HwInstance>:FSIMulator:HOPPing:MODE {param}')