from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class BandwidthCls:
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("bandwidth", core, parent)
[docs]
def get_state(self) -> bool:
"""
``[SOURce<HW>]:NOISe:BWIDth:STATe`` \n
Snippet: ``value: bool = driver.source.noise.bandwidth.get_state()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:NOISe:BWIDth:STATe?')
return Conversions.str_to_bool(response)
[docs]
def set_state(self, state: bool) -> None:
"""
``[SOURce<HW>]:NOISe:BWIDth:STATe`` \n
Snippet: ``driver.source.noise.bandwidth.set_state(state = False)`` \n
No help available
"""
param = Conversions.bool_to_str(state)
self._core.io.write(f'SOURce<HwInstance>:NOISe:BWIDth:STATe {param}')
[docs]
def get_value(self) -> float:
"""
``[SOURce<HW>]:NOISe:BANDwidth`` \n
Snippet: ``value: float = driver.source.noise.bandwidth.get_value()`` \n
Sets the noise level in the system bandwidth when bandwidth limitation is enabled.
:return: bwidth: float Range: 100E3 to 10E6
"""
response = self._core.io.query_str('SOURce<HwInstance>:NOISe:BANDwidth?')
return Conversions.str_to_float(response)
[docs]
def set_value(self, bwidth: float) -> None:
"""
``[SOURce<HW>]:NOISe:BANDwidth`` \n
Snippet: ``driver.source.noise.bandwidth.set_value(bwidth = 1.0)`` \n
Sets the noise level in the system bandwidth when bandwidth limitation is enabled.
:param bwidth: float Range: 100E3 to 10E6
"""
param = Conversions.decimal_value_to_str(bwidth)
self._core.io.write(f'SOURce<HwInstance>:NOISe:BANDwidth {param}')