from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class LevelCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("level", core, parent)
[docs]
def set(self, threshold: float) -> None:
"""
``[SENSe]:ADEMod:SQUelch:LEVel`` \n
Snippet: ``driver.sense.ademod.squelch.level.set(threshold = 1.0)`` \n
Defines the level threshold below which the demodulated data is set to 0 if squelching is enabled (see method
``RsFsw.sense.ademod.squelch.state.set()`` ) .
:param threshold: numeric value The absolute threshold level Range: -150 dBm to 30 dBm
"""
param = Conversions.decimal_value_to_str(threshold)
self._core.io.write(f'SENSe:ADEMod:SQUelch:LEVel {param}')
[docs]
def get(self) -> float:
"""
``[SENSe]:ADEMod:SQUelch:LEVel`` \n
Snippet: ``value: float = driver.sense.ademod.squelch.level.get()`` \n
Defines the level threshold below which the demodulated data is set to 0 if squelching is enabled (see method
``RsFsw.sense.ademod.squelch.state.set()`` ) .
:return: threshold: numeric value The absolute threshold level Range: -150 dBm to 30 dBm
"""
response = self._core.io.query_str(f'SENSe:ADEMod:SQUelch:LEVel?')
return Conversions.str_to_float(response)