from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class InRushCls:
"""
| Commands in total: 11
| Subgroups: 4
| Direct child commands: 5
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("inRush", core, parent)
@property
def execute(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_execute'):
from .Execute import ExecuteCls
self._execute = ExecuteCls(self._core, self._cmd_group)
return self._execute
@property
def add(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_add'):
from .Add import AddCls
self._add = AddCls(self._core, self._cmd_group)
return self._add
@property
def report(self):
"""
| Commands in total: 1
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_report'):
from .Report import ReportCls
self._report = ReportCls(self._core, self._cmd_group)
return self._report
@property
def gate(self):
"""
| Commands in total: 3
| Subgroups: 3
| Direct child commands: 0
"""
if not hasattr(self, '_gate'):
from .Gate import GateCls
self._gate = GateCls(self._core, self._cmd_group)
return self._gate
[docs]
def get_max_current(self) -> float:
"""
``POWer:INRush:MAXCurrent`` \n
Snippet: ``value: float = driver.power.inRush.get_max_current()`` \n
Sets the maximum expected current for the vertical scale.
:return: max_exp_curr: -1000 to 1000
"""
response = self._core.io.query_str('POWer:INRush:MAXCurrent?')
return Conversions.str_to_float(response)
[docs]
def set_max_current(self, max_exp_curr: float) -> None:
"""
``POWer:INRush:MAXCurrent`` \n
Snippet: ``driver.power.inRush.set_max_current(max_exp_curr = 1.0)`` \n
Sets the maximum expected current for the vertical scale.
:param max_exp_curr: -1000 to 1000
"""
param = Conversions.decimal_value_to_str(max_exp_curr)
self._core.io.write(f'POWer:INRush:MAXCurrent {param}')
[docs]
def get_trigger(self) -> float:
"""
``POWer:INRush:TRIGger`` \n
Snippet: ``value: float = driver.power.inRush.get_trigger()`` \n
Sets the current value for the trigger.
"""
response = self._core.io.query_str('POWer:INRush:TRIGger?')
return Conversions.str_to_float(response)
[docs]
def set_trigger(self, trig_curr_val: float) -> None:
"""
``POWer:INRush:TRIGger`` \n
Snippet: ``driver.power.inRush.set_trigger(trig_curr_val = 1.0)`` \n
Sets the current value for the trigger.
:param trig_curr_val: -1000 to 1000
"""
param = Conversions.decimal_value_to_str(trig_curr_val)
self._core.io.write(f'POWer:INRush:TRIGger {param}')
[docs]
def set_insert(self, gate_index: int) -> None:
"""
``POWer:INRush:INSert`` \n
Snippet: ``driver.power.inRush.set_insert(gate_index = 1)`` \n
Inserts a gate.
"""
param = Conversions.decimal_value_to_str(gate_index)
self._core.io.write(f'POWer:INRush:INSert {param}')
[docs]
def set_remove(self, gate_index: int) -> None:
"""
``POWer:INRush:REMove`` \n
Snippet: ``driver.power.inRush.set_remove(gate_index = 1)`` \n
Removes a gate
"""
param = Conversions.decimal_value_to_str(gate_index)
self._core.io.write(f'POWer:INRush:REMove {param}')
[docs]
def get_count(self) -> int:
"""
``POWer:INRush:COUNt`` \n
Snippet: ``value: int = driver.power.inRush.get_count()`` \n
Queries the number of inrush current gates.
"""
response = self._core.io.query_str('POWer:INRush:COUNt?')
return Conversions.str_to_int(response)
def clone(self) -> 'InRushCls':
"""
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 = InRushCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group