Source code for RsSmw.Implementations.Source.Regenerator

from typing import List

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class RegeneratorCls:
	"""
	| Commands in total: 79
	| Subgroups: 7
	| Direct child commands: 5
	"""

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

	@property
	def diagram(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_diagram'):
			from .Diagram import DiagramCls
			self._diagram = DiagramCls(self._core, self._cmd_group)
		return self._diagram

	@property
	def object(self):
		"""
		| Commands in total: 30
		| Subgroups: 15
		| Direct child commands: 2
		"""
		if not hasattr(self, '_object'):
			from .Object import ObjectCls
			self._object = ObjectCls(self._core, self._cmd_group)
		return self._object

	@property
	def radar(self):
		"""
		| Commands in total: 13
		| Subgroups: 4
		| Direct child commands: 1
		"""
		if not hasattr(self, '_radar'):
			from .Radar import RadarCls
			self._radar = RadarCls(self._core, self._cmd_group)
		return self._radar

	@property
	def restart(self):
		"""
		| Commands in total: 7
		| Subgroups: 3
		| Direct child commands: 4
		"""
		if not hasattr(self, '_restart'):
			from .Restart import RestartCls
			self._restart = RestartCls(self._core, self._cmd_group)
		return self._restart

	@property
	def simulation(self):
		"""
		| Commands in total: 19
		| Subgroups: 5
		| Direct child commands: 6
		"""
		if not hasattr(self, '_simulation'):
			from .Simulation import SimulationCls
			self._simulation = SimulationCls(self._core, self._cmd_group)
		return self._simulation

	@property
	def test(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_test'):
			from .Test import TestCls
			self._test = TestCls(self._core, self._cmd_group)
		return self._test

	@property
	def unit(self):
		"""
		| Commands in total: 3
		| Subgroups: 0
		| Direct child commands: 3
		"""
		if not hasattr(self, '_unit'):
			from .Unit import UnitCls
			self._unit = UnitCls(self._core, self._cmd_group)
		return self._unit

[docs] def get_catalog(self) -> List[str]: """ ``[SOURce<HW>]:REGenerator:CATalog`` \n Snippet: ``value: List[str] = driver.source.regenerator.get_catalog()`` \n Queries the files with settings in the default directory. Listed are files with the file extension reg. Refer to 'Accessing Files in the Default or Specified Directory' for general information on file handling in the default and in a specific directory. :return: filenames: filename1,filename2,... Returns a string of file names separated by commas. """ response = self._core.io.query_str('SOURce<HwInstance>:REGenerator:CATalog?') return Conversions.str_to_str_list(response)
[docs] def load(self, filename: str) -> None: """ ``[SOURce<HW>]:REGenerator:LOAD`` \n Snippet: ``driver.source.regenerator.load(filename = 'abc')`` \n Loads the selected file from the default or the specified directory. Loaded are files with extension reg. Refer to 'Accessing Files in the Default or Specified Directory' for general information on file handling in the default and in a specific directory. :param filename: string file name or complete file path; file extension can be omitted """ param = Conversions.value_to_quoted_str(filename) self._core.io.write(f'SOURce<HwInstance>:REGenerator:LOAD {param}')
[docs] def preset(self) -> None: """ ``[SOURce<HW>]:REGenerator:PRESet`` \n Snippet: ``driver.source.regenerator.preset()`` \n Calls the default settings. """ self._core.io.write(f'SOURce<HwInstance>:REGenerator:PRESet')
[docs] def preset_with_opc(self, opc_timeout_ms: int = -1) -> None: """ ``[SOURce<HW>]:REGenerator:PRESet`` \n Snippet: ``driver.source.regenerator.preset_with_opc()`` \n Calls the default settings. Same as preset, but waits for the operation to complete before continuing further. Use the RsSmw.utilities.opc_timeout_set() to set the timeout value. :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call. """ self._core.io.write_with_opc(f'SOURce<HwInstance>:REGenerator:PRESet', opc_timeout_ms)
[docs] def set_store(self, filename: str) -> None: """ ``[SOURce<HW>]:REGenerator:STORe`` \n Snippet: ``driver.source.regenerator.set_store(filename = 'abc')`` \n Stores the current settings into the selected file; the file extension (reg) is assigned automatically. Refer to 'Accessing Files in the Default or Specified Directory' for general information on file handling in the default and in a specific directory. :param filename: string """ param = Conversions.value_to_quoted_str(filename) self._core.io.write(f'SOURce<HwInstance>:REGenerator:STORe {param}')
[docs] def get_state(self) -> bool: """ ``[SOURce<HW>]:REGenerator:[STATe]`` \n Snippet: ``value: bool = driver.source.regenerator.get_state()`` \n Enables/disables the Radar Echo Generation. :return: state: 1 | ON | 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:REGenerator:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, state: bool) -> None: """ ``[SOURce<HW>]:REGenerator:[STATe]`` \n Snippet: ``driver.source.regenerator.set_state(state = False)`` \n Enables/disables the Radar Echo Generation. :param state: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(state) self._core.io.write(f'SOURce<HwInstance>:REGenerator:STATe {param}')
def clone(self) -> 'RegeneratorCls': """ 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 = RegeneratorCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group