from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ValueCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("value", core, parent)
[docs]
def set(self, att_thres: float, probe=repcap.Probe.Default) -> None:
"""
``PROBe<*>:SETup:ATTenuation:THReshold:VALue`` \n
Snippet: ``driver.probe.setup.attenuation.threshold.value.set(att_thres = 1.0, probe = repcap.Probe.Default)`` \n
Sets the threshold value if method ``RsRtx.probe.setup.attenuation.threshold.mode.set()`` is set to MANual.
:param att_thres: -0.236 to 0.236
:param probe: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Probe')
"""
param = Conversions.decimal_value_to_str(att_thres)
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:VALue {param}')
[docs]
def get(self, probe=repcap.Probe.Default) -> float:
"""
``PROBe<*>:SETup:ATTenuation:THReshold:VALue`` \n
Snippet: ``value: float = driver.probe.setup.attenuation.threshold.value.get(probe = repcap.Probe.Default)`` \n
Sets the threshold value if method ``RsRtx.probe.setup.attenuation.threshold.mode.set()`` is set to MANual.
: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:VALue?')
return Conversions.str_to_float(response)