Source code for rsmxo.Implementations.P3Phase.Quality.Source.Current.W2V2A

from typing import List

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


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

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

[docs] def set(self, sources: List[enums.SignalSource], power3PhaseMeas=repcap.Power3PhaseMeas.Default) -> None: """ ``P3PHase<*>:QUALity:SOURce:CURRent:W2V2a`` \n Snippet: ``driver.p3Phase.quality.source.current.w2V2A.set(sources = [SignalSource.C1, SignalSource.XY4], power3PhaseMeas = repcap.Power3PhaseMeas.Default)`` \n Selects the current source waveform. Analog channels and math waveforms can be used. :param sources: C1 | C2 | ... | C8 | M1 | M2 | ... | M8 :param power3PhaseMeas: optional repeated capability selector. Default value: Nr1 (settable in the interface 'P3Phase') """ param = Conversions.enum_list_to_str(sources, enums.SignalSource) power3PhaseMeas_cmd_val = self._cmd_group.get_repcap_cmd_value(power3PhaseMeas, repcap.Power3PhaseMeas) self._core.io.write(f'P3PHase{power3PhaseMeas_cmd_val}:QUALity:SOURce:CURRent:W2V2a {param}')
# noinspection PyTypeChecker
[docs] def get(self, power3PhaseMeas=repcap.Power3PhaseMeas.Default) -> List[enums.SignalSource]: """ ``P3PHase<*>:QUALity:SOURce:CURRent:W2V2a`` \n Snippet: ``value: List[enums.SignalSource] = driver.p3Phase.quality.source.current.w2V2A.get(power3PhaseMeas = repcap.Power3PhaseMeas.Default)`` \n Selects the current source waveform. Analog channels and math waveforms can be used. :param power3PhaseMeas: optional repeated capability selector. Default value: Nr1 (settable in the interface 'P3Phase') :return: sources: C1 | C2 | ... | C8 | M1 | M2 | ... | M8 """ power3PhaseMeas_cmd_val = self._cmd_group.get_repcap_cmd_value(power3PhaseMeas, repcap.Power3PhaseMeas) response = self._core.io.query_str(f'P3PHase{power3PhaseMeas_cmd_val}:QUALity:SOURce:CURRent:W2V2a?') return Conversions.str_to_list_enum(response, enums.SignalSource)