from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class BandwidthCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("bandwidth", core, parent)
[docs]
def set(self, bandwidth_limit: enums.BwConverterLimit, probe=repcap.Probe.Default) -> None:
"""
``PROBe<*>:CONVerter:BANDwidth`` \n
Snippet: ``driver.probe.converter.bandwidth.set(bandwidth_limit = enums.BwConverterLimit.B20, probe = repcap.Probe.Default)`` \n
Sets the bandwidth limit of the R&S RT-Z1M probe adapter.
:param bandwidth_limit: B200 = 200 MHz, B20 = 20 MHz
:param probe: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Probe')
"""
param = Conversions.enum_scalar_to_str(bandwidth_limit, enums.BwConverterLimit)
probe_cmd_val = self._cmd_group.get_repcap_cmd_value(probe, repcap.Probe)
self._core.io.write_with_opc(f'PROBe{probe_cmd_val}:CONVerter:BANDwidth {param}')
# noinspection PyTypeChecker
[docs]
def get(self, probe=repcap.Probe.Default) -> enums.BwConverterLimit:
"""
``PROBe<*>:CONVerter:BANDwidth`` \n
Snippet: ``value: enums.BwConverterLimit = driver.probe.converter.bandwidth.get(probe = repcap.Probe.Default)`` \n
Sets the bandwidth limit of the R&S RT-Z1M probe adapter.
:param probe: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Probe')
:return: bandwidth_limit: B200 = 200 MHz, B20 = 20 MHz
"""
probe_cmd_val = self._cmd_group.get_repcap_cmd_value(probe, repcap.Probe)
response = self._core.io.query_str_with_opc(f'PROBe{probe_cmd_val}:CONVerter:BANDwidth?')
return Conversions.str_to_scalar_enum(response, enums.BwConverterLimit)