Source code for rsrtx.Implementations.RefLevel.Ldetection

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

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

[docs] def set(self, mode: enums.AutoManualMode, refLevel=repcap.RefLevel.Default) -> None: """ ``REFLevel<*>:LDETection`` \n Snippet: ``driver.refLevel.ldetection.set(mode = enums.AutoManualMode.AUTO, refLevel = repcap.RefLevel.Default)`` \n Defines whether the reference level is configured manually or automatically. For automatic configuration, select the signal level to be used (see method ``RsRtx.refLevel.auto.mode.set()`` ) . :param mode: AUTO | MANual :param refLevel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'RefLevel') """ param = Conversions.enum_scalar_to_str(mode, enums.AutoManualMode) refLevel_cmd_val = self._cmd_group.get_repcap_cmd_value(refLevel, repcap.RefLevel) self._core.io.write_with_opc(f'REFLevel{refLevel_cmd_val}:LDETection {param}')
# noinspection PyTypeChecker
[docs] def get(self, refLevel=repcap.RefLevel.Default) -> enums.AutoManualMode: """ ``REFLevel<*>:LDETection`` \n Snippet: ``value: enums.AutoManualMode = driver.refLevel.ldetection.get(refLevel = repcap.RefLevel.Default)`` \n Defines whether the reference level is configured manually or automatically. For automatic configuration, select the signal level to be used (see method ``RsRtx.refLevel.auto.mode.set()`` ) . :param refLevel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'RefLevel') :return: mode: AUTO | MANual """ refLevel_cmd_val = self._cmd_group.get_repcap_cmd_value(refLevel, repcap.RefLevel) response = self._core.io.query_str_with_opc(f'REFLevel{refLevel_cmd_val}:LDETection?') return Conversions.str_to_scalar_enum(response, enums.AutoManualMode)