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 SourceCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("source", core, parent)
[docs]
def set(self, cycle_source: enums.SignalSource, power3PhaseMeas=repcap.Power3PhaseMeas.Default) -> None:
"""
``P3PHase<*>:QUALity:SOURce:CYCLe[:SOURce]`` \n
Snippet: ``driver.p3Phase.quality.source.cycle.source.set(cycle_source = enums.SignalSource.C1, power3PhaseMeas = repcap.Power3PhaseMeas.Default)`` \n
Selects the channel (voltage source) to serve as the timing reference for data calculations across all sources when the
periods are not aligned on the x-axis.
:param cycle_source: C1 | C2 | ... | C8
:param power3PhaseMeas: optional repeated capability selector. Default value: Nr1 (settable in the interface 'P3Phase')
"""
param = Conversions.enum_scalar_to_str(cycle_source, 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:CYCLe:SOURce {param}')
# noinspection PyTypeChecker
[docs]
def get(self, power3PhaseMeas=repcap.Power3PhaseMeas.Default) -> enums.SignalSource:
"""
``P3PHase<*>:QUALity:SOURce:CYCLe[:SOURce]`` \n
Snippet: ``value: enums.SignalSource = driver.p3Phase.quality.source.cycle.source.get(power3PhaseMeas = repcap.Power3PhaseMeas.Default)`` \n
Selects the channel (voltage source) to serve as the timing reference for data calculations across all sources when the
periods are not aligned on the x-axis.
:param power3PhaseMeas: optional repeated capability selector. Default value: Nr1 (settable in the interface 'P3Phase')
:return: cycle_source: C1 | C2 | ... | C8
"""
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:CYCLe:SOURce?')
return Conversions.str_to_scalar_enum(response, enums.SignalSource)