from ........Internal.Core import Core
from ........Internal.CommandsGroup import CommandsGroup
from ........Internal import Conversions
from ........Internal.Utilities import trim_str_response
from ........ import enums
from ........ import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class TransientCls:
"""
| Commands in total: 3
| Subgroups: 2
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("transient", core, parent)
@property
def offToOn(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_offToOn'):
from .OffToOn import OffToOnCls
self._offToOn = OffToOnCls(self._core, self._cmd_group)
return self._offToOn
@property
def onToOff(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_onToOff'):
from .OnToOff import OnToOffCls
self._onToOff = OnToOffCls(self._core, self._cmd_group)
return self._onToOff
[docs]
def get(self, result: enums.ResultTypeE, window=repcap.Window.Default, limitIx=repcap.LimitIx.Default) -> str:
"""
``CALCulate<n>:LIMit<li>:OOPower:TRANsient`` \n
Snippet: ``value: str = driver.applications.k10Xlte.calculate.limit.ooPower.transient.get(result = enums.ResultTypeE.ALL, window = repcap.Window.Default, limitIx = repcap.LimitIx.Default)`` \n
Queries the results of the limit check during the transient periods of the on/off power measurement.
:param result: ALL Queries the overall limit check results. FALLing Queries the limit check results of falling transients. RISing Queries the limit check results of rising transients.
:param window: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Calculate')
:param limitIx: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Limit')
:return: limit_check: Returns one value for every 'Off' period. PASSED Limit check has passed. FAILED Limit check has failed.
"""
param = Conversions.enum_scalar_to_str(result, enums.ResultTypeE)
window_cmd_val = self._cmd_group.get_repcap_cmd_value(window, repcap.Window)
limitIx_cmd_val = self._cmd_group.get_repcap_cmd_value(limitIx, repcap.LimitIx)
response = self._core.io.query_str(f'CALCulate{window_cmd_val}:LIMit{limitIx_cmd_val}:OOPower:TRANsient? {param}')
return trim_str_response(response)
def clone(self) -> 'TransientCls':
"""
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 = TransientCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group