Source code for rsrtx.Implementations.Differential.Common.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_output_2: bool, differential=repcap.Differential.Default) -> None: """ ``DIFFerential<*>:COMMon:STATe`` \n Snippet: ``driver.differential.common.state.set(state_output_2 = False, differential = repcap.Differential.Default)`` \n The commands enable the output waveforms if deembedding by software is active. In this case, all output waveforms can be displayed at the same time, and each output is enabled separately. :param state_output_2: OFF | ON :param differential: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Differential') """ param = Conversions.bool_to_str(state_output_2) differential_cmd_val = self._cmd_group.get_repcap_cmd_value(differential, repcap.Differential) self._core.io.write_with_opc(f'DIFFerential{differential_cmd_val}:COMMon:STATe {param}')
[docs] def get(self, differential=repcap.Differential.Default) -> bool: """ ``DIFFerential<*>:COMMon:STATe`` \n Snippet: ``value: bool = driver.differential.common.state.get(differential = repcap.Differential.Default)`` \n The commands enable the output waveforms if deembedding by software is active. In this case, all output waveforms can be displayed at the same time, and each output is enabled separately. :param differential: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Differential') """ differential_cmd_val = self._cmd_group.get_repcap_cmd_value(differential, repcap.Differential) response = self._core.io.query_str_with_opc(f'DIFFerential{differential_cmd_val}:COMMon:STATe?') return Conversions.str_to_bool(response)