Source code for rsmxo.Implementations.P3Phase.Quality.Display.Current.Rms.Enable

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class EnableCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, display_state: bool, power3PhaseMeas=repcap.Power3PhaseMeas.Default, power3Phase=repcap.Power3Phase.Default) -> None: """ ``P3PHase<*>:QUALity:DISPlay:CURRent:RMS<*>[:ENABle]`` \n Snippet: ``driver.p3Phase.quality.display.current.rms.enable.set(display_state = False, power3PhaseMeas = repcap.Power3PhaseMeas.Default, power3Phase = repcap.Power3Phase.Default)`` \n Enables the current RMS measurement for individual phases for the 3-phase power quality analysis. :param display_state: OFF | ON :param power3PhaseMeas: optional repeated capability selector. Default value: Nr1 (settable in the interface 'P3Phase') :param power3Phase: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Rms') """ param = Conversions.bool_to_str(display_state) power3PhaseMeas_cmd_val = self._cmd_group.get_repcap_cmd_value(power3PhaseMeas, repcap.Power3PhaseMeas) power3Phase_cmd_val = self._cmd_group.get_repcap_cmd_value(power3Phase, repcap.Power3Phase) self._core.io.write(f'P3PHase{power3PhaseMeas_cmd_val}:QUALity:DISPlay:CURRent:RMS{power3Phase_cmd_val}:ENABle {param}')
[docs] def get(self, power3PhaseMeas=repcap.Power3PhaseMeas.Default, power3Phase=repcap.Power3Phase.Default) -> bool: """ ``P3PHase<*>:QUALity:DISPlay:CURRent:RMS<*>[:ENABle]`` \n Snippet: ``value: bool = driver.p3Phase.quality.display.current.rms.enable.get(power3PhaseMeas = repcap.Power3PhaseMeas.Default, power3Phase = repcap.Power3Phase.Default)`` \n Enables the current RMS measurement for individual phases for the 3-phase power quality analysis. :param power3PhaseMeas: optional repeated capability selector. Default value: Nr1 (settable in the interface 'P3Phase') :param power3Phase: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Rms') :return: display_state: OFF | ON """ power3PhaseMeas_cmd_val = self._cmd_group.get_repcap_cmd_value(power3PhaseMeas, repcap.Power3PhaseMeas) power3Phase_cmd_val = self._cmd_group.get_repcap_cmd_value(power3Phase, repcap.Power3Phase) response = self._core.io.query_str(f'P3PHase{power3PhaseMeas_cmd_val}:QUALity:DISPlay:CURRent:RMS{power3Phase_cmd_val}:ENABle?') return Conversions.str_to_bool(response)