from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class LimitCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("limit", core, parent)
[docs]
def set(self, upper_limit: float, measurement=repcap.Measurement.Default, limitCheck=repcap.LimitCheck.Default) -> None:
"""
``MEASurement<*>:HISTogram:LCHeck<*>:UPPer:LIMit`` \n
Snippet: ``driver.measurement.histogram.lcheck.upper.limit.set(upper_limit = 1.0, measurement = repcap.Measurement.Default, limitCheck = repcap.LimitCheck.Default)`` \n
Define the lower and upper limits for the limit check, respectively. The valid range is defined using the method
``RsRtx.measurement.histogram.lcheck.valid.set()`` command.
:param upper_limit: -100 to 100
:param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement')
:param limitCheck: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lcheck')
"""
param = Conversions.decimal_value_to_str(upper_limit)
measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement)
limitCheck_cmd_val = self._cmd_group.get_repcap_cmd_value(limitCheck, repcap.LimitCheck)
self._core.io.write_with_opc(f'MEASurement{measurement_cmd_val}:HISTogram:LCHeck{limitCheck_cmd_val}:UPPer:LIMit {param}')
[docs]
def get(self, measurement=repcap.Measurement.Default, limitCheck=repcap.LimitCheck.Default) -> float:
"""
``MEASurement<*>:HISTogram:LCHeck<*>:UPPer:LIMit`` \n
Snippet: ``value: float = driver.measurement.histogram.lcheck.upper.limit.get(measurement = repcap.Measurement.Default, limitCheck = repcap.LimitCheck.Default)`` \n
Define the lower and upper limits for the limit check, respectively. The valid range is defined using the method
``RsRtx.measurement.histogram.lcheck.valid.set()`` command.
:param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement')
:param limitCheck: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lcheck')
"""
measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement)
limitCheck_cmd_val = self._cmd_group.get_repcap_cmd_value(limitCheck, repcap.LimitCheck)
response = self._core.io.query_str_with_opc(f'MEASurement{measurement_cmd_val}:HISTogram:LCHeck{limitCheck_cmd_val}:UPPer:LIMit?')
return Conversions.str_to_float(response)