Source code for RsFsw.Implementations.System.Communicate.Rdevice.Oscilloscope.Alignment.Step.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, step=repcap.Step.Default) -> None: """ ``SYSTem:COMMunicate:RDEVice:OSCilloscope:ALIGnment:STEP<st>[:STATe]`` \n Snippet: ``driver.system.communicate.rdevice.oscilloscope.alignment.step.state.set(state = False, step = repcap.Step.Default)`` \n No help available :param step: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Step') """ param = Conversions.bool_to_str(state) step_cmd_val = self._cmd_group.get_repcap_cmd_value(step, repcap.Step) self._core.io.write(f'SYSTem:COMMunicate:RDEVice:OSCilloscope:ALIGnment:STEP{step_cmd_val}:STATe {param}')
[docs] def get(self, step=repcap.Step.Default) -> bool: """ ``SYSTem:COMMunicate:RDEVice:OSCilloscope:ALIGnment:STEP<st>[:STATe]`` \n Snippet: ``value: bool = driver.system.communicate.rdevice.oscilloscope.alignment.step.state.get(step = repcap.Step.Default)`` \n No help available :param step: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Step') """ step_cmd_val = self._cmd_group.get_repcap_cmd_value(step, repcap.Step) response = self._core.io.query_str(f'SYSTem:COMMunicate:RDEVice:OSCilloscope:ALIGnment:STEP{step_cmd_val}:STATe?') return Conversions.str_to_bool(response)