Source code for rsrtx.Implementations.Measurement.Histogram.Lcheck.Lower.Margin

from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class MarginCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("margin", core, parent)

[docs] def set(self, lower_margin: float, measurement=repcap.Measurement.Default, limitCheck=repcap.LimitCheck.Default) -> None: """ ``MEASurement<*>:HISTogram:LCHeck<*>:LOWer:MARGin`` \n Snippet: ``driver.measurement.histogram.lcheck.lower.margin.set(lower_margin = 1.0, measurement = repcap.Measurement.Default, limitCheck = repcap.LimitCheck.Default)`` \n Define the lower and upper margins for the limit check, respectively. Margins are not as strict as limits and must be within the valid value range. The valid range is defined using the method ``RsRtx.measurement.histogram.lcheck.valid.set()`` command. :param lower_margin: -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(lower_margin) 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}:LOWer:MARGin {param}')
[docs] def get(self, measurement=repcap.Measurement.Default, limitCheck=repcap.LimitCheck.Default) -> float: """ ``MEASurement<*>:HISTogram:LCHeck<*>:LOWer:MARGin`` \n Snippet: ``value: float = driver.measurement.histogram.lcheck.lower.margin.get(measurement = repcap.Measurement.Default, limitCheck = repcap.LimitCheck.Default)`` \n Define the lower and upper margins for the limit check, respectively. Margins are not as strict as limits and must be within the valid value range. 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}:LOWer:MARGin?') return Conversions.str_to_float(response)