from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class HysteresisCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("hysteresis", core, parent)
[docs]
def set(self, hyst_rel: float, power3PhaseMeas=repcap.Power3PhaseMeas.Default, refLevel=repcap.RefLevel.Default) -> None:
"""
``P3PHase<*>:QUALity:REFLevel<*>:RELative:HYSTeresis`` \n
Snippet: ``driver.p3Phase.quality.refLevel.relative.hysteresis.set(hyst_rel = 1.0, power3PhaseMeas = repcap.Power3PhaseMeas.Default, refLevel = repcap.RefLevel.Default)`` \n
Defines a hysteresis for the middle reference level. A rise or fall from the middle reference value that does not exceed
the hysteresis is rejected as noise.
:param hyst_rel: 0 to 50
:param power3PhaseMeas: optional repeated capability selector. Default value: Nr1 (settable in the interface 'P3Phase')
:param refLevel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'RefLevel')
"""
param = Conversions.decimal_value_to_str(hyst_rel)
power3PhaseMeas_cmd_val = self._cmd_group.get_repcap_cmd_value(power3PhaseMeas, repcap.Power3PhaseMeas)
refLevel_cmd_val = self._cmd_group.get_repcap_cmd_value(refLevel, repcap.RefLevel)
self._core.io.write(f'P3PHase{power3PhaseMeas_cmd_val}:QUALity:REFLevel{refLevel_cmd_val}:RELative:HYSTeresis {param}')
[docs]
def get(self, power3PhaseMeas=repcap.Power3PhaseMeas.Default, refLevel=repcap.RefLevel.Default) -> float:
"""
``P3PHase<*>:QUALity:REFLevel<*>:RELative:HYSTeresis`` \n
Snippet: ``value: float = driver.p3Phase.quality.refLevel.relative.hysteresis.get(power3PhaseMeas = repcap.Power3PhaseMeas.Default, refLevel = repcap.RefLevel.Default)`` \n
Defines a hysteresis for the middle reference level. A rise or fall from the middle reference value that does not exceed
the hysteresis is rejected as noise.
:param power3PhaseMeas: optional repeated capability selector. Default value: Nr1 (settable in the interface 'P3Phase')
:param refLevel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'RefLevel')
:return: hyst_rel: 0 to 50
"""
power3PhaseMeas_cmd_val = self._cmd_group.get_repcap_cmd_value(power3PhaseMeas, repcap.Power3PhaseMeas)
refLevel_cmd_val = self._cmd_group.get_repcap_cmd_value(refLevel, repcap.RefLevel)
response = self._core.io.query_str(f'P3PHase{power3PhaseMeas_cmd_val}:QUALity:REFLevel{refLevel_cmd_val}:RELative:HYSTeresis?')
return Conversions.str_to_float(response)