Source code for rsrtx.Implementations.Trigger.Level.Noise.State

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 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, hysteresis_mode: enums.AutoManualMode, trigger=repcap.Trigger.Default, triggerLevel=repcap.TriggerLevel.Default) -> None: """ ``TRIGger<*>:LEVel<*>:NOISe[:STATe]`` \n Snippet: ``driver.trigger.level.noise.state.set(hysteresis_mode = enums.AutoManualMode.AUTO, trigger = repcap.Trigger.Default, triggerLevel = repcap.TriggerLevel.Default)`` \n Selects how the hysteresis is set. :param hysteresis_mode: AUTO | MANual \n - AUTO: This is the recommended mode. The hysteresis is set by the instrument to reject at least the internal noise of the instrument. You can define a higher minimum value using TRIGgert:LEVeln:NOISe:ABSolute. - MANual: The hysteresis is defined directly with TRIGgert:LEVeln:NOISe:ABSolute. :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') :param triggerLevel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Level') """ param = Conversions.enum_scalar_to_str(hysteresis_mode, enums.AutoManualMode) trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) triggerLevel_cmd_val = self._cmd_group.get_repcap_cmd_value(triggerLevel, repcap.TriggerLevel) self._core.io.write_with_opc(f'TRIGger{trigger_cmd_val}:LEVel{triggerLevel_cmd_val}:NOISe:STATe {param}')
# noinspection PyTypeChecker
[docs] def get(self, trigger=repcap.Trigger.Default, triggerLevel=repcap.TriggerLevel.Default) -> enums.AutoManualMode: """ ``TRIGger<*>:LEVel<*>:NOISe[:STATe]`` \n Snippet: ``value: enums.AutoManualMode = driver.trigger.level.noise.state.get(trigger = repcap.Trigger.Default, triggerLevel = repcap.TriggerLevel.Default)`` \n Selects how the hysteresis is set. :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') :param triggerLevel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Level') :return: hysteresis_mode: AUTO | MANual \n - AUTO: This is the recommended mode. The hysteresis is set by the instrument to reject at least the internal noise of the instrument. You can define a higher minimum value using TRIGgert:LEVeln:NOISe:ABSolute. - MANual: The hysteresis is defined directly with TRIGgert:LEVeln:NOISe:ABSolute. """ trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) triggerLevel_cmd_val = self._cmd_group.get_repcap_cmd_value(triggerLevel, repcap.TriggerLevel) response = self._core.io.query_str_with_opc(f'TRIGger{trigger_cmd_val}:LEVel{triggerLevel_cmd_val}:NOISe:STATe?') return Conversions.str_to_scalar_enum(response, enums.AutoManualMode)