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 ModeCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("mode", core, parent)
[docs]
def set(self, att_thres_md: enums.AutoManualMode, probe=repcap.Probe.Default) -> None:
"""
``PROBe<*>:SETup:ATTenuation:THReshold:MODE`` \n
Snippet: ``driver.probe.setup.attenuation.threshold.mode.set(att_thres_md = enums.AutoManualMode.AUTO, probe = repcap.Probe.Default)`` \n
The threshold for switching the probe attenuation can be set automatically by the instrument (AUTO) , or you can set it
yourself (MANual) . If set to MANual, define the threshold value with method
``RsRtx.probe.setup.attenuation.threshold.value.set()`` .
:param att_thres_md: AUTO | MANual
:param probe: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Probe')
"""
param = Conversions.enum_scalar_to_str(att_thres_md, enums.AutoManualMode)
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:ATTenuation:THReshold:MODE {param}')
# noinspection PyTypeChecker
[docs]
def get(self, probe=repcap.Probe.Default) -> enums.AutoManualMode:
"""
``PROBe<*>:SETup:ATTenuation:THReshold:MODE`` \n
Snippet: ``value: enums.AutoManualMode = driver.probe.setup.attenuation.threshold.mode.get(probe = repcap.Probe.Default)`` \n
The threshold for switching the probe attenuation can be set automatically by the instrument (AUTO) , or you can set it
yourself (MANual) . If set to MANual, define the threshold value with method
``RsRtx.probe.setup.attenuation.threshold.value.set()`` .
:param probe: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Probe')
"""
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:ATTenuation:THReshold:MODE?')
return Conversions.str_to_scalar_enum(response, enums.AutoManualMode)