Source code for rsrtx.Implementations.Wgenerator

from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal.RepeatedCapability import RepeatedCapability
from ... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class WgeneratorCls:
	"""
	| Commands in total: 63
	| Subgroups: 12
	| Direct child commands: 1

	Repeated Capability Setting:
	
	.. code-block:: python
	
			# Range: Nr1 .. Nr2 \n
			driver.wgenerator.repcap_wgenerator_set(repcap.Wgenerator.Nr1)
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("wgenerator", core, parent)
		self._cmd_group.rep_cap = RepeatedCapability(self._cmd_group.group_name, 'repcap_wgenerator_get', 'repcap_wgenerator_set', repcap.Wgenerator.Nr1)

	def repcap_wgenerator_set(self, wgenerator: repcap.Wgenerator) -> None:
		"""
		Repeated Capability default value numeric suffix.
		This value is used, if you do not explicitely set it in the child set/get methods, or if you leave it to Wgenerator.Default.
		Default value after init: Wgenerator.Nr1
		"""
		self._cmd_group.set_repcap_enum_value(wgenerator)

	def repcap_wgenerator_get(self) -> repcap.Wgenerator:
		"""
		Returns the current default repeated capability for the child set/get methods.
		"""
		# noinspection PyTypeChecker
		return self._cmd_group.get_repcap_enum_value()

	@property
	def enable(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_enable'):
			from .Enable import EnableCls
			self._enable = EnableCls(self._core, self._cmd_group)
		return self._enable

	@property
	def acopy(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_acopy'):
			from .Acopy import AcopyCls
			self._acopy = AcopyCls(self._core, self._cmd_group)
		return self._acopy

	@property
	def source(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_source'):
			from .Source import SourceCls
			self._source = SourceCls(self._core, self._cmd_group)
		return self._source

	@property
	def frequency(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_frequency'):
			from .Frequency import FrequencyCls
			self._frequency = FrequencyCls(self._core, self._cmd_group)
		return self._frequency

	@property
	def period(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_period'):
			from .Period import PeriodCls
			self._period = PeriodCls(self._core, self._cmd_group)
		return self._period

	@property
	def coupling(self):
		"""
		| Commands in total: 6
		| Subgroups: 6
		| Direct child commands: 0
		"""
		if not hasattr(self, '_coupling'):
			from .Coupling import CouplingCls
			self._coupling = CouplingCls(self._core, self._cmd_group)
		return self._coupling

	@property
	def function(self):
		"""
		| Commands in total: 4
		| Subgroups: 4
		| Direct child commands: 0
		"""
		if not hasattr(self, '_function'):
			from .Function import FunctionCls
			self._function = FunctionCls(self._core, self._cmd_group)
		return self._function

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

	@property
	def voltage(self):
		"""
		| Commands in total: 6
		| Subgroups: 6
		| Direct child commands: 0
		"""
		if not hasattr(self, '_voltage'):
			from .Voltage import VoltageCls
			self._voltage = VoltageCls(self._core, self._cmd_group)
		return self._voltage

	@property
	def modulation(self):
		"""
		| Commands in total: 25
		| Subgroups: 10
		| Direct child commands: 0
		"""
		if not hasattr(self, '_modulation'):
			from .Modulation import ModulationCls
			self._modulation = ModulationCls(self._core, self._cmd_group)
		return self._modulation

	@property
	def sweep(self):
		"""
		| Commands in total: 3
		| Subgroups: 3
		| Direct child commands: 0
		"""
		if not hasattr(self, '_sweep'):
			from .Sweep import SweepCls
			self._sweep = SweepCls(self._core, self._cmd_group)
		return self._sweep

	@property
	def arbGen(self):
		"""
		| Commands in total: 12
		| Subgroups: 8
		| Direct child commands: 2
		"""
		if not hasattr(self, '_arbGen'):
			from .ArbGen import ArbGenCls
			self._arbGen = ArbGenCls(self._core, self._cmd_group)
		return self._arbGen

[docs] def preset(self, wgenerator=repcap.Wgenerator.Default) -> None: """ ``WGENerator<*>:PRESet`` \n Snippet: ``driver.wgenerator.preset(wgenerator = repcap.Wgenerator.Default)`` \n Sets the parameters of the waveform generator to their default values. :param wgenerator: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Wgenerator') """ wgenerator_cmd_val = self._cmd_group.get_repcap_cmd_value(wgenerator, repcap.Wgenerator) self._core.io.write(f'WGENerator{wgenerator_cmd_val}:PRESet')
[docs] def preset_and_wait(self, wgenerator=repcap.Wgenerator.Default, opc_timeout_ms: int = -1) -> None: wgenerator_cmd_val = self._cmd_group.get_repcap_cmd_value(wgenerator, repcap.Wgenerator) """ ``WGENerator<*>:PRESet`` \n Snippet: ``driver.wgenerator.preset_and_wait(wgenerator = repcap.Wgenerator.Default)`` \n Sets the parameters of the waveform generator to their default values. Same as preset, but waits for the operation to complete before continuing further. Use the RsRtx.utilities.opc_timeout_set() to set the timeout value. :param wgenerator: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Wgenerator') :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call. """ self._core.io.write_with_opc(f'WGENerator{wgenerator_cmd_val}:PRESet', opc_timeout_ms)
def clone(self) -> 'WgeneratorCls': """ 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 = WgeneratorCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group