Source code for rsrtx.Implementations.Power.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: 34
	| Subgroups: 4
	| Direct child commands: 8
	"""

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

	@property
	def execute(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_execute'):
			from .Execute import ExecuteCls
			self._execute = ExecuteCls(self._core, self._cmd_group)
		return self._execute

	@property
	def gate(self):
		"""
		| Commands in total: 8
		| Subgroups: 4
		| Direct child commands: 0
		"""
		if not hasattr(self, '_gate'):
			from .Gate import GateCls
			self._gate = GateCls(self._core, self._cmd_group)
		return self._gate

	@property
	def report(self):
		"""
		| Commands in total: 1
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_report'):
			from .Report import ReportCls
			self._report = ReportCls(self._core, self._cmd_group)
		return self._report

	@property
	def result(self):
		"""
		| Commands in total: 16
		| Subgroups: 2
		| Direct child commands: 0
		"""
		if not hasattr(self, '_result'):
			from .Result import ResultCls
			self._result = ResultCls(self._core, self._cmd_group)
		return self._result

	# noinspection PyTypeChecker
[docs] def get_auto(self) -> enums.AutoScale: """ ``POWer:SWITching:AUTO`` \n Snippet: ``value: enums.AutoScale = driver.power.switching.get_auto()`` \n Selects the scaling for the display of the results. :return: auto_scale: AUTO | MANUAL """ response = self._core.io.query_str('POWer:SWITching:AUTO?') return Conversions.str_to_scalar_enum(response, enums.AutoScale)
[docs] def set_auto(self, auto_scale: enums.AutoScale) -> None: """ ``POWer:SWITching:AUTO`` \n Snippet: ``driver.power.switching.set_auto(auto_scale = enums.AutoScale.AUTO)`` \n Selects the scaling for the display of the results. :param auto_scale: AUTO | MANUAL """ param = Conversions.enum_scalar_to_str(auto_scale, enums.AutoScale) self._core.io.write(f'POWer:SWITching:AUTO {param}')
[docs] def get_swit(self) -> bool: """ ``POWer:SWITching:SWIT`` \n Snippet: ``value: bool = driver.power.switching.get_swit()`` \n Activates or deactivates the measurements of the switching frequency. """ response = self._core.io.query_str('POWer:SWITching:SWIT?') return Conversions.str_to_bool(response)
[docs] def set_swit(self, measure_switching_freq: bool) -> None: """ ``POWer:SWITching:SWIT`` \n Snippet: ``driver.power.switching.set_swit(measure_switching_freq = False)`` \n Activates or deactivates the measurements of the switching frequency. :param measure_switching_freq: OFF | ON """ param = Conversions.bool_to_str(measure_switching_freq) self._core.io.write(f'POWer:SWITching:SWIT {param}')
[docs] def get_ton(self) -> bool: """ ``POWer:SWITching:TON`` \n Snippet: ``value: bool = driver.power.switching.get_ton()`` \n Enables the measurement during the respective period. """ response = self._core.io.query_str('POWer:SWITching:TON?') return Conversions.str_to_bool(response)
[docs] def set_ton(self, measure_turn_on: bool) -> None: """ ``POWer:SWITching:TON`` \n Snippet: ``driver.power.switching.set_ton(measure_turn_on = False)`` \n Enables the measurement during the respective period. :param measure_turn_on: OFF | ON """ param = Conversions.bool_to_str(measure_turn_on) self._core.io.write(f'POWer:SWITching:TON {param}')
[docs] def get_cond(self) -> bool: """ ``POWer:SWITching:COND`` \n Snippet: ``value: bool = driver.power.switching.get_cond()`` \n Enables the measurement during the respective period. """ response = self._core.io.query_str('POWer:SWITching:COND?') return Conversions.str_to_bool(response)
[docs] def set_cond(self, measure_conduction: bool) -> None: """ ``POWer:SWITching:COND`` \n Snippet: ``driver.power.switching.set_cond(measure_conduction = False)`` \n Enables the measurement during the respective period. :param measure_conduction: OFF | ON """ param = Conversions.bool_to_str(measure_conduction) self._core.io.write(f'POWer:SWITching:COND {param}')
[docs] def get_toff(self) -> bool: """ ``POWer:SWITching:TOFF`` \n Snippet: ``value: bool = driver.power.switching.get_toff()`` \n Enables the measurement during the respective period. """ response = self._core.io.query_str('POWer:SWITching:TOFF?') return Conversions.str_to_bool(response)
[docs] def set_toff(self, measure_turn_off: bool) -> None: """ ``POWer:SWITching:TOFF`` \n Snippet: ``driver.power.switching.set_toff(measure_turn_off = False)`` \n Enables the measurement during the respective period. :param measure_turn_off: OFF | ON """ param = Conversions.bool_to_str(measure_turn_off) self._core.io.write(f'POWer:SWITching:TOFF {param}')
[docs] def get_ncon(self) -> bool: """ ``POWer:SWITching:NCON`` \n Snippet: ``value: bool = driver.power.switching.get_ncon()`` \n Enables the measurement during the respective period. """ response = self._core.io.query_str('POWer:SWITching:NCON?') return Conversions.str_to_bool(response)
[docs] def set_ncon(self, measure_non_conduction: bool) -> None: """ ``POWer:SWITching:NCON`` \n Snippet: ``driver.power.switching.set_ncon(measure_non_conduction = False)`` \n Enables the measurement during the respective period. :param measure_non_conduction: OFF | ON """ param = Conversions.bool_to_str(measure_non_conduction) self._core.io.write(f'POWer:SWITching:NCON {param}')
[docs] def get_total(self) -> bool: """ ``POWer:SWITching:TOTal`` \n Snippet: ``value: bool = driver.power.switching.get_total()`` \n Enables the measurement during the respective period. :return: measure_total: OFF | ON """ response = self._core.io.query_str('POWer:SWITching:TOTal?') return Conversions.str_to_bool(response)
[docs] def set_total(self, measure_total: bool) -> None: """ ``POWer:SWITching:TOTal`` \n Snippet: ``driver.power.switching.set_total(measure_total = False)`` \n Enables the measurement during the respective period. :param measure_total: OFF | ON """ param = Conversions.bool_to_str(measure_total) self._core.io.write(f'POWer:SWITching:TOTal {param}')
[docs] def get_swi_frequency(self) -> float: """ ``POWer:SWITching:SWIFrequency`` \n Snippet: ``value: float = driver.power.switching.get_swi_frequency()`` \n Sets the switching frequency. :return: switching_freq: 1 to 500E+9 """ response = self._core.io.query_str('POWer:SWITching:SWIFrequency?') return Conversions.str_to_float(response)
[docs] def set_swi_frequency(self, switching_freq: float) -> None: """ ``POWer:SWITching:SWIFrequency`` \n Snippet: ``driver.power.switching.set_swi_frequency(switching_freq = 1.0)`` \n Sets the switching frequency. :param switching_freq: 1 to 500E+9 """ param = Conversions.decimal_value_to_str(switching_freq) self._core.io.write(f'POWer:SWITching:SWIFrequency {param}')
def clone(self) -> 'SwitchingCls': """ 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 = SwitchingCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group