Source code for RsSmw.Implementations.Source.Efrontend.Loscillator

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class LoscillatorCls:
	"""
	| Commands in total: 4
	| Subgroups: 2
	| Direct child commands: 1
	"""

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

	@property
	def inputPy(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_inputPy'):
			from .InputPy import InputPyCls
			self._inputPy = InputPyCls(self._core, self._cmd_group)
		return self._inputPy

	@property
	def output(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_output'):
			from .Output import OutputCls
			self._output = OutputCls(self._core, self._cmd_group)
		return self._output

	# noinspection PyTypeChecker
[docs] def get_mode(self) -> enums.SourceInt: """ ``[SOURce<HW>]:EFRontend:LOSCillator:MODE`` \n Snippet: ``value: enums.SourceInt = driver.source.efrontend.loscillator.get_mode()`` \n Selects the LO input source for the connected external frontend. :return: mode: INTernal | EXTernal INTernal Uses the internally generated LO signal. EXTernal Uses an externally supplied LO signal. """ response = self._core.io.query_str('SOURce<HwInstance>:EFRontend:LOSCillator:MODE?') return Conversions.str_to_scalar_enum(response, enums.SourceInt)
[docs] def set_mode(self, mode: enums.SourceInt) -> None: """ ``[SOURce<HW>]:EFRontend:LOSCillator:MODE`` \n Snippet: ``driver.source.efrontend.loscillator.set_mode(mode = enums.SourceInt.EXTernal)`` \n Selects the LO input source for the connected external frontend. :param mode: INTernal | EXTernal INTernal Uses the internally generated LO signal. EXTernal Uses an externally supplied LO signal. """ param = Conversions.enum_scalar_to_str(mode, enums.SourceInt) self._core.io.write(f'SOURce<HwInstance>:EFRontend:LOSCillator:MODE {param}')
def clone(self) -> 'LoscillatorCls': """ Clones the group by creating new object from it and its whole existing subgroups. Also copies all the existing default Repeated Capabilities setting, which you can change independently without affecting the original group. """ new_group = LoscillatorCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group