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 RangeCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("range", core, parent)
[docs]
def set(self, probe_range: enums.ProbeRange, probe=repcap.Probe.Default) -> None:
"""
``PROBe<*>:SETup:ADVanced:RANGe`` \n
Snippet: ``driver.probe.setup.advanced.range.set(probe_range = enums.ProbeRange.AUTO, probe = repcap.Probe.Default)`` \n
Sets the voltage range of a R&S RT-ZHD probe.
:param probe_range: AUTO | MHIGh | MLOW \n
- AUTO: The voltage range is set with CHANnelch:SCALe.
- MHIGh: Sets the higher voltage range of the connected probe. To query the value, use PROBech:SETup:ATTenuation[:AUTO]?.
- MLOW: Sets the lower voltage range of the connected probe. To query the value, use PROBech:SETup:ATTenuation[:AUTO]?.
:param probe: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Probe')
"""
param = Conversions.enum_scalar_to_str(probe_range, enums.ProbeRange)
probe_cmd_val = self._cmd_group.get_repcap_cmd_value(probe, repcap.Probe)
self._core.io.write_with_opc(f'PROBe{probe_cmd_val}:SETup:ADVanced:RANGe {param}')
# noinspection PyTypeChecker
[docs]
def get(self, probe=repcap.Probe.Default) -> enums.ProbeRange:
"""
``PROBe<*>:SETup:ADVanced:RANGe`` \n
Snippet: ``value: enums.ProbeRange = driver.probe.setup.advanced.range.get(probe = repcap.Probe.Default)`` \n
Sets the voltage range of a R&S RT-ZHD probe.
:param probe: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Probe')
:return: probe_range: AUTO | MHIGh | MLOW \n
- AUTO: The voltage range is set with CHANnelch:SCALe.
- MHIGh: Sets the higher voltage range of the connected probe. To query the value, use PROBech:SETup:ATTenuation[:AUTO]?.
- MLOW: Sets the lower voltage range of the connected probe. To query the value, use PROBech:SETup:ATTenuation[:AUTO]?.
"""
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}:SETup:ADVanced:RANGe?')
return Conversions.str_to_scalar_enum(response, enums.ProbeRange)