Source code for rsrtx.Implementations.Deembedding.State

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


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

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

[docs] def set(self, state: bool, deembedding=repcap.Deembedding.Default) -> None: """ ``DEEMbedding<*>[:STATe]`` \n Snippet: ``driver.deembedding.state.set(state = False, deembedding = repcap.Deembedding.Default)`` \n Activates the deembedding - the correction of parasitic effects of the measurement setup on the measured signal. :param state: OFF | ON :param deembedding: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Deembedding') """ param = Conversions.bool_to_str(state) deembedding_cmd_val = self._cmd_group.get_repcap_cmd_value(deembedding, repcap.Deembedding) self._core.io.write_with_opc(f'DEEMbedding{deembedding_cmd_val}:STATe {param}')
[docs] def get(self, deembedding=repcap.Deembedding.Default) -> bool: """ ``DEEMbedding<*>[:STATe]`` \n Snippet: ``value: bool = driver.deembedding.state.get(deembedding = repcap.Deembedding.Default)`` \n Activates the deembedding - the correction of parasitic effects of the measurement setup on the measured signal. :param deembedding: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Deembedding') :return: state: OFF | ON """ deembedding_cmd_val = self._cmd_group.get_repcap_cmd_value(deembedding, repcap.Deembedding) response = self._core.io.query_str_with_opc(f'DEEMbedding{deembedding_cmd_val}:STATe?') return Conversions.str_to_bool(response)