Source code for rsrtx.Implementations.Measurement.Lcheck

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 LcheckCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, lim_chk_st: enums.MeasLimitCheckState, measurement=repcap.Measurement.Default) -> None: """ ``MEASurement<*>:LCHeck`` \n Snippet: ``driver.measurement.lcheck.set(lim_chk_st = enums.MeasLimitCheckState.LIMit, measurement = repcap.Measurement.Default)`` \n Defines the type of the limit check that can run together with the measurement. :param lim_chk_st: OFF | LIMit | LMARgin \n - OFF: No limit check. - LIMit: Only limits are checked. - LMARgin: Limits and margins are checked. :param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') """ param = Conversions.enum_scalar_to_str(lim_chk_st, enums.MeasLimitCheckState) measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement) self._core.io.write_with_opc(f'MEASurement{measurement_cmd_val}:LCHeck {param}')
# noinspection PyTypeChecker
[docs] def get(self, measurement=repcap.Measurement.Default) -> enums.MeasLimitCheckState: """ ``MEASurement<*>:LCHeck`` \n Snippet: ``value: enums.MeasLimitCheckState = driver.measurement.lcheck.get(measurement = repcap.Measurement.Default)`` \n Defines the type of the limit check that can run together with the measurement. :param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement') """ measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement) response = self._core.io.query_str_with_opc(f'MEASurement{measurement_cmd_val}:LCHeck?') return Conversions.str_to_scalar_enum(response, enums.MeasLimitCheckState)