from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ......Internal.RepeatedCapability import RepeatedCapability
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class LimitCls:
"""
| Commands in total: 77
| Subgroups: 11
| Direct child commands: 2
Repeated Capability Setting:
.. code-block:: python
# Range: Nr1 .. Nr32 \n
driver.applications.k10Xlte.calculate.limit.repcap_limitIx_set(repcap.LimitIx.Nr1)
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("limit", core, parent)
self._cmd_group.rep_cap = RepeatedCapability(self._cmd_group.group_name, 'repcap_limitIx_get', 'repcap_limitIx_set', repcap.LimitIx.Nr1)
def repcap_limitIx_set(self, limitIx: repcap.LimitIx) -> None:
"""
Repeated Capability default value numeric suffix.
This value is used, if you do not explicitely set it in the child set/get methods, or if you leave it to LimitIx.Default.
Default value after init: LimitIx.Nr1
"""
self._cmd_group.set_repcap_enum_value(limitIx)
def repcap_limitIx_get(self) -> repcap.LimitIx:
"""
Returns the current default repeated capability for the child set/get methods.
"""
# noinspection PyTypeChecker
return self._cmd_group.get_repcap_enum_value()
@property
def acPower(self):
"""
| Commands in total: 16
| Subgroups: 4
| Direct child commands: 0
"""
if not hasattr(self, '_acPower'):
from .AcPower import AcPowerCls
self._acPower = AcPowerCls(self._core, self._cmd_group)
return self._acPower
@property
def active(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_active'):
from .Active import ActiveCls
self._active = ActiveCls(self._core, self._cmd_group)
return self._active
@property
def cc(self):
"""
| Commands in total: 45
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_cc'):
from .Cc import CcCls
self._cc = CcCls(self._core, self._cmd_group)
return self._cc
@property
def clear(self):
"""
| Commands in total: 1
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_clear'):
from .Clear import ClearCls
self._clear = ClearCls(self._core, self._cmd_group)
return self._clear
@property
def comment(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_comment'):
from .Comment import CommentCls
self._comment = CommentCls(self._core, self._cmd_group)
return self._comment
@property
def fail(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_fail'):
from .Fail import FailCls
self._fail = FailCls(self._core, self._cmd_group)
return self._fail
@property
def name(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_name'):
from .Name import NameCls
self._name = NameCls(self._core, self._cmd_group)
return self._name
@property
def ooPower(self):
"""
| Commands in total: 6
| Subgroups: 2
| Direct child commands: 0
"""
if not hasattr(self, '_ooPower'):
from .OoPower import OoPowerCls
self._ooPower = OoPowerCls(self._core, self._cmd_group)
return self._ooPower
@property
def state(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_state'):
from .State import StateCls
self._state = StateCls(self._core, self._cmd_group)
return self._state
@property
def trace(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_trace'):
from .Trace import TraceCls
self._trace = TraceCls(self._core, self._cmd_group)
return self._trace
@property
def unit(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_unit'):
from .Unit import UnitCls
self._unit = UnitCls(self._core, self._cmd_group)
return self._unit
[docs]
def copy(self, limit_line: int, window=repcap.Window.Default, limitIx=repcap.LimitIx.Default) -> None:
"""
``CALCulate<n>:LIMit<li>:COPY`` \n
Snippet: ``driver.applications.k10Xlte.calculate.limit.copy(limit_line = 1, window = repcap.Window.Default, limitIx = repcap.LimitIx.Default)`` \n
Copies a limit line.
: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')
"""
param = Conversions.decimal_value_to_str(limit_line)
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)
self._core.io.write(f'CALCulate{window_cmd_val}:LIMit{limitIx_cmd_val}:COPY {param}')
[docs]
def delete(self, window=repcap.Window.Default, limitIx=repcap.LimitIx.Default) -> None:
"""
``CALCulate<n>:LIMit<li>:DELete`` \n
Snippet: ``driver.applications.k10Xlte.calculate.limit.delete(window = repcap.Window.Default, limitIx = repcap.LimitIx.Default)`` \n
Deletes a limit line.
: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')
"""
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)
self._core.io.write(f'CALCulate{window_cmd_val}:LIMit{limitIx_cmd_val}:DELete')
[docs]
def delete_with_opc(self, window=repcap.Window.Default, limitIx=repcap.LimitIx.Default, opc_timeout_ms: int = -1) -> None:
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)
"""
``CALCulate<n>:LIMit<li>:DELete`` \n
Snippet: ``driver.applications.k10Xlte.calculate.limit.delete_with_opc(window = repcap.Window.Default, limitIx = repcap.LimitIx.Default)`` \n
Deletes a limit line.
Same as delete, but waits for the operation to complete before continuing further. Use the RsFsw.utilities.opc_timeout_set() to set the timeout value.
: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')
:param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.
"""
self._core.io.write_with_opc(f'CALCulate{window_cmd_val}:LIMit{limitIx_cmd_val}:DELete', opc_timeout_ms)
def clone(self) -> 'LimitCls':
"""
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 = LimitCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group