Source code for rsrtx.Implementations.Power.OnOff

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class OnOffCls:
	"""
	| Commands in total: 13
	| Subgroups: 3
	| Direct child commands: 9
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("onOff", 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: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		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_type_py(self) -> enums.PwrOnOffMeasType: """ ``POWer:ONOFf:TYPE`` \n Snippet: ``value: enums.PwrOnOffMeasType = driver.power.onOff.get_type_py()`` \n Selects the measurement type. :return: meas_type: TON - Turn on measurement TOFF - Turn off measurement """ response = self._core.io.query_str('POWer:ONOFf:TYPE?') return Conversions.str_to_scalar_enum(response, enums.PwrOnOffMeasType)
[docs] def set_type_py(self, meas_type: enums.PwrOnOffMeasType) -> None: """ ``POWer:ONOFf:TYPE`` \n Snippet: ``driver.power.onOff.set_type_py(meas_type = enums.PwrOnOffMeasType.TOFF)`` \n Selects the measurement type. :param meas_type: TON - Turn on measurement TOFF - Turn off measurement """ param = Conversions.enum_scalar_to_str(meas_type, enums.PwrOnOffMeasType) self._core.io.write(f'POWer:ONOFf:TYPE {param}')
# noinspection PyTypeChecker
[docs] def get_input_py(self) -> enums.PwrOnOffInputType: """ ``POWer:ONOFf:INPut`` \n Snippet: ``value: enums.PwrOnOffInputType = driver.power.onOff.get_input_py()`` \n Sets the input type. :return: input_type: AC | DC """ response = self._core.io.query_str('POWer:ONOFf:INPut?') return Conversions.str_to_scalar_enum(response, enums.PwrOnOffInputType)
[docs] def set_input_py(self, input_type: enums.PwrOnOffInputType) -> None: """ ``POWer:ONOFf:INPut`` \n Snippet: ``driver.power.onOff.set_input_py(input_type = enums.PwrOnOffInputType.AC)`` \n Sets the input type. :param input_type: AC | DC """ param = Conversions.enum_scalar_to_str(input_type, enums.PwrOnOffInputType) self._core.io.write(f'POWer:ONOFf:INPut {param}')
[docs] def get_at_on(self) -> float: """ ``POWer:ONOFf:ATON`` \n Snippet: ``value: float = driver.power.onOff.get_at_on()`` \n Triggers the beginning of the measurements at the moment the AC input voltage reaches the set value. :return: act_rig_lev_on: -1E+6 to 1E+6 """ response = self._core.io.query_str('POWer:ONOFf:ATON?') return Conversions.str_to_float(response)
[docs] def set_at_on(self, act_rig_lev_on: float) -> None: """ ``POWer:ONOFf:ATON`` \n Snippet: ``driver.power.onOff.set_at_on(act_rig_lev_on = 1.0)`` \n Triggers the beginning of the measurements at the moment the AC input voltage reaches the set value. :param act_rig_lev_on: -1E+6 to 1E+6 """ param = Conversions.decimal_value_to_str(act_rig_lev_on) self._core.io.write(f'POWer:ONOFf:ATON {param}')
[docs] def get_at_off(self) -> float: """ ``POWer:ONOFf:ATOFf`` \n Snippet: ``value: float = driver.power.onOff.get_at_off()`` \n Triggers the beginning of the measurements at the moment the AC input voltage reaches the set value. """ response = self._core.io.query_str('POWer:ONOFf:ATOFf?') return Conversions.str_to_float(response)
[docs] def set_at_off(self, act_rig_lev_off: float) -> None: """ ``POWer:ONOFf:ATOFf`` \n Snippet: ``driver.power.onOff.set_at_off(act_rig_lev_off = 1.0)`` \n Triggers the beginning of the measurements at the moment the AC input voltage reaches the set value. :param act_rig_lev_off: -1E+6 to 1E+6 """ param = Conversions.decimal_value_to_str(act_rig_lev_off) self._core.io.write(f'POWer:ONOFf:ATOFf {param}')
[docs] def get_dt_on(self) -> float: """ ``POWer:ONOFf:DTON`` \n Snippet: ``value: float = driver.power.onOff.get_dt_on()`` \n Sets the percentage of the steady state level of the DC output that has to be reached. """ response = self._core.io.query_str('POWer:ONOFf:DTON?') return Conversions.str_to_float(response)
[docs] def set_dt_on(self, act_rig_lev_on: float) -> None: """ ``POWer:ONOFf:DTON`` \n Snippet: ``driver.power.onOff.set_dt_on(act_rig_lev_on = 1.0)`` \n Sets the percentage of the steady state level of the DC output that has to be reached. :param act_rig_lev_on: 0 to 100 """ param = Conversions.decimal_value_to_str(act_rig_lev_on) self._core.io.write(f'POWer:ONOFf:DTON {param}')
[docs] def get_dt_off(self) -> float: """ ``POWer:ONOFf:DTOFf`` \n Snippet: ``value: float = driver.power.onOff.get_dt_off()`` \n Sets the percentage of the steady state level of the DC output that has to be reached. """ response = self._core.io.query_str('POWer:ONOFf:DTOFf?') return Conversions.str_to_float(response)
[docs] def set_dt_off(self, act_rig_lev_off: float) -> None: """ ``POWer:ONOFf:DTOFf`` \n Snippet: ``driver.power.onOff.set_dt_off(act_rig_lev_off = 1.0)`` \n Sets the percentage of the steady state level of the DC output that has to be reached. :param act_rig_lev_off: 0 to 100 """ param = Conversions.decimal_value_to_str(act_rig_lev_off) self._core.io.write(f'POWer:ONOFf:DTOFf {param}')
[docs] def get_dson(self) -> float: """ ``POWer:ONOFf:DSON`` \n Snippet: ``value: float = driver.power.onOff.get_dson()`` \n Sets the percentage of the steady state level of the DC output that has to be reached. """ response = self._core.io.query_str('POWer:ONOFf:DSON?') return Conversions.str_to_float(response)
[docs] def set_dson(self, dc_steady_st_lev_on: float) -> None: """ ``POWer:ONOFf:DSON`` \n Snippet: ``driver.power.onOff.set_dson(dc_steady_st_lev_on = 1.0)`` \n Sets the percentage of the steady state level of the DC output that has to be reached. :param dc_steady_st_lev_on: 0 to 100 """ param = Conversions.decimal_value_to_str(dc_steady_st_lev_on) self._core.io.write(f'POWer:ONOFf:DSON {param}')
[docs] def get_ds_off(self) -> float: """ ``POWer:ONOFf:DSOFf`` \n Snippet: ``value: float = driver.power.onOff.get_ds_off()`` \n Sets the percentage of the steady state level of the DC output that has to be reached. """ response = self._core.io.query_str('POWer:ONOFf:DSOFf?') return Conversions.str_to_float(response)
[docs] def set_ds_off(self, dc_steady_st_lev_off: float) -> None: """ ``POWer:ONOFf:DSOFf`` \n Snippet: ``driver.power.onOff.set_ds_off(dc_steady_st_lev_off = 1.0)`` \n Sets the percentage of the steady state level of the DC output that has to be reached. :param dc_steady_st_lev_off: 0 to 100 """ param = Conversions.decimal_value_to_str(dc_steady_st_lev_off) self._core.io.write(f'POWer:ONOFf:DSOFf {param}')
[docs] def get_time(self) -> float: """ ``POWer:ONOFf:TIME`` \n Snippet: ``value: float = driver.power.onOff.get_time()`` \n Sets the time, the start of the measurement of the turn off time is delay with, after the trigger point. :return: time: 100E-12 to 10000 """ response = self._core.io.query_str('POWer:ONOFf:TIME?') return Conversions.str_to_float(response)
[docs] def set_time(self, time: float) -> None: """ ``POWer:ONOFf:TIME`` \n Snippet: ``driver.power.onOff.set_time(time = 1.0)`` \n Sets the time, the start of the measurement of the turn off time is delay with, after the trigger point. :param time: 100E-12 to 10000 """ param = Conversions.decimal_value_to_str(time) self._core.io.write(f'POWer:ONOFf:TIME {param}')
def clone(self) -> 'OnOffCls': """ 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 = OnOffCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group