Source code for RsFsw.Implementations.Sense.Roscillator.External.Fallback

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


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

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

[docs] def set(self, state: bool) -> None: """ ``[SENSe]:ROSCillator:EXTernal:FALLback`` \n Snippet: ``driver.sense.roscillator.external.fallback.set(state = False)`` \n Defines how the instrument reacts if an external reference is selected but none is available. :param state: ON | OFF | 0 | 1 OFF | 0 If no valid external reference signal is available, the error message 'External reference missing' is displayed. Additionally, the flag 'NO REF' is displayed to indicate that no synchronization was performed for the last measurement. ON | 1 If no external reference is available, the instrument automatically switches back to the internal reference. Note that you must re-activate the external reference if it becomes available again at a later time. """ param = Conversions.bool_to_str(state) self._core.io.write(f'SENSe:ROSCillator:EXTernal:FALLback {param}')
[docs] def get(self) -> bool: """ ``[SENSe]:ROSCillator:EXTernal:FALLback`` \n Snippet: ``value: bool = driver.sense.roscillator.external.fallback.get()`` \n Defines how the instrument reacts if an external reference is selected but none is available. :return: state: ON | OFF | 0 | 1 OFF | 0 If no valid external reference signal is available, the error message 'External reference missing' is displayed. Additionally, the flag 'NO REF' is displayed to indicate that no synchronization was performed for the last measurement. ON | 1 If no external reference is available, the instrument automatically switches back to the internal reference. Note that you must re-activate the external reference if it becomes available again at a later time. """ response = self._core.io.query_str(f'SENSe:ROSCillator:EXTernal:FALLback?') return Conversions.str_to_bool(response)