Source code for RsSmw.Implementations.Source.Bb.Dm.Switching

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


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

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

	# noinspection PyTypeChecker
[docs] def get_source(self) -> enums.SourceInt: """ ``[SOURce<HW>]:BB:DM:SWITching:SOURce`` \n Snippet: ``value: enums.SourceInt = driver.source.bb.dm.switching.get_source()`` \n No help available """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:SWITching:SOURce?') return Conversions.str_to_scalar_enum(response, enums.SourceInt)
[docs] def set_source(self, source: enums.SourceInt) -> None: """ ``[SOURce<HW>]:BB:DM:SWITching:SOURce`` \n Snippet: ``driver.source.bb.dm.switching.set_source(source = enums.SourceInt.EXTernal)`` \n No help available """ param = Conversions.enum_scalar_to_str(source, enums.SourceInt) self._core.io.write(f'SOURce<HwInstance>:BB:DM:SWITching:SOURce {param}')
[docs] def get_state(self) -> bool: """ ``[SOURce<HW>]:BB:DM:SWITching:STATe`` \n Snippet: ``value: bool = driver.source.bb.dm.switching.get_state()`` \n Enables switching between a modulated and an unmodulated signal. :return: state: 1 | ON | 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DM:SWITching:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, state: bool) -> None: """ ``[SOURce<HW>]:BB:DM:SWITching:STATe`` \n Snippet: ``driver.source.bb.dm.switching.set_state(state = False)`` \n Enables switching between a modulated and an unmodulated signal. :param state: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(state) self._core.io.write(f'SOURce<HwInstance>:BB:DM:SWITching:STATe {param}')