from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class GainCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("gain", core, parent)
[docs]
def set(self, gain: float) -> None:
"""
``SYSTem:CONFigure:DUT:GAIN`` \n
Snippet: ``driver.applications.k30NoiseFigure.system.configure.dut.gain.set(gain = 1.0)`` \n
Defines the expected 'gain' of the DUT. The application uses the 'gain' for automatic reference level detection.
:param gain: Range: 10 to 1000, Unit: DB
"""
param = Conversions.decimal_value_to_str(gain)
self._core.io.write(f'SYSTem:CONFigure:DUT:GAIN {param}')
[docs]
def get(self) -> float:
"""
``SYSTem:CONFigure:DUT:GAIN`` \n
Snippet: ``value: float = driver.applications.k30NoiseFigure.system.configure.dut.gain.get()`` \n
Defines the expected 'gain' of the DUT. The application uses the 'gain' for automatic reference level detection.
:return: gain: Range: 10 to 1000, Unit: DB
"""
response = self._core.io.query_str(f'SYSTem:CONFigure:DUT:GAIN?')
return Conversions.str_to_float(response)