Source code for rsrtx.Implementations.Power.Modulation

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ModulationCls:
	"""
	| Commands in total: 14
	| Subgroups: 3
	| Direct child commands: 4
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("modulation", 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 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: 8
		| Subgroups: 8
		| 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:MODulation:AUTO`` \n Snippet: ``value: enums.AutoScale = driver.power.modulation.get_auto()`` \n Selects the scaling for the display of the results. :return: auto_scale: AUTO | MANUAL """ response = self._core.io.query_str('POWer:MODulation:AUTO?') return Conversions.str_to_scalar_enum(response, enums.AutoScale)
[docs] def set_auto(self, auto_scale: enums.AutoScale) -> None: """ ``POWer:MODulation:AUTO`` \n Snippet: ``driver.power.modulation.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:MODulation:AUTO {param}')
# noinspection PyTypeChecker
[docs] def get_source(self) -> enums.PowerRippleMeasType: """ ``POWer:MODulation:SOURce`` \n Snippet: ``value: enums.PowerRippleMeasType = driver.power.modulation.get_source()`` \n Selects the source for the measurement. :return: source: CURRENT | VOLTAGE """ response = self._core.io.query_str('POWer:MODulation:SOURce?') return Conversions.str_to_scalar_enum(response, enums.PowerRippleMeasType)
[docs] def set_source(self, source: enums.PowerRippleMeasType) -> None: """ ``POWer:MODulation:SOURce`` \n Snippet: ``driver.power.modulation.set_source(source = enums.PowerRippleMeasType.CURRENT)`` \n Selects the source for the measurement. :param source: CURRENT | VOLTAGE """ param = Conversions.enum_scalar_to_str(source, enums.PowerRippleMeasType) self._core.io.write(f'POWer:MODulation:SOURce {param}')
# noinspection PyTypeChecker
[docs] def get_type_py(self) -> enums.PwrAnalysisType: """ ``POWer:MODulation:TYPE`` \n Snippet: ``value: enums.PwrAnalysisType = driver.power.modulation.get_type_py()`` \n Sets the type of measurement. :return: analysis_type: TURNON | CONT """ response = self._core.io.query_str('POWer:MODulation:TYPE?') return Conversions.str_to_scalar_enum(response, enums.PwrAnalysisType)
[docs] def set_type_py(self, analysis_type: enums.PwrAnalysisType) -> None: """ ``POWer:MODulation:TYPE`` \n Snippet: ``driver.power.modulation.set_type_py(analysis_type = enums.PwrAnalysisType.CONT)`` \n Sets the type of measurement. :param analysis_type: TURNON | CONT """ param = Conversions.enum_scalar_to_str(analysis_type, enums.PwrAnalysisType) self._core.io.write(f'POWer:MODulation:TYPE {param}')
[docs] def get_dhistogram(self) -> bool: """ ``POWer:MODulation:DHIStogram`` \n Snippet: ``value: bool = driver.power.modulation.get_dhistogram()`` \n Activates or deactivates the display of a histogram. :return: disp_histg: OFF | ON """ response = self._core.io.query_str('POWer:MODulation:DHIStogram?') return Conversions.str_to_bool(response)
[docs] def set_dhistogram(self, disp_histg: bool) -> None: """ ``POWer:MODulation:DHIStogram`` \n Snippet: ``driver.power.modulation.set_dhistogram(disp_histg = False)`` \n Activates or deactivates the display of a histogram. :param disp_histg: OFF | ON """ param = Conversions.bool_to_str(disp_histg) self._core.io.write(f'POWer:MODulation:DHIStogram {param}')
def clone(self) -> 'ModulationCls': """ 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 = ModulationCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group