Source code for rsmxo.Implementations.Gate.Show

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


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

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

[docs] def set(self, display_state: bool, gate=repcap.Gate.Default) -> None: """ ``GATE<*>:SHOW`` \n Snippet: ``driver.gate.show.set(display_state = False, gate = repcap.Gate.Default)`` \n If enabled, the gate area is indicated in the source diagram. :param display_state: OFF | ON :param gate: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Gate') """ param = Conversions.bool_to_str(display_state) gate_cmd_val = self._cmd_group.get_repcap_cmd_value(gate, repcap.Gate) self._core.io.write(f'GATE{gate_cmd_val}:SHOW {param}')
[docs] def get(self, gate=repcap.Gate.Default) -> bool: """ ``GATE<*>:SHOW`` \n Snippet: ``value: bool = driver.gate.show.get(gate = repcap.Gate.Default)`` \n If enabled, the gate area is indicated in the source diagram. :param gate: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Gate') :return: display_state: OFF | ON """ gate_cmd_val = self._cmd_group.get_repcap_cmd_value(gate, repcap.Gate) response = self._core.io.query_str(f'GATE{gate_cmd_val}:SHOW?') return Conversions.str_to_bool(response)