from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
from ....... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class UserCls:
"""
| Commands in total: 24
| Subgroups: 6
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("user", core, parent)
@property
def slist(self):
"""
| Commands in total: 10
| Subgroups: 7
| Direct child commands: 2
"""
if not hasattr(self, '_slist'):
from .Slist import SlistCls
self._slist = SlistCls(self._core, self._cmd_group)
return self._slist
@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 adjust(self):
"""
| Commands in total: 1
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_adjust'):
from .Adjust import AdjustCls
self._adjust = AdjustCls(self._core, self._cmd_group)
return self._adjust
@property
def refresh(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_refresh'):
from .Refresh import RefreshCls
self._refresh = RefreshCls(self._core, self._cmd_group)
return self._refresh
@property
def store(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_store'):
from .Store import StoreCls
self._store = StoreCls(self._core, self._cmd_group)
return self._store
@property
def flist(self):
"""
| Commands in total: 8
| Subgroups: 7
| Direct child commands: 1
"""
if not hasattr(self, '_flist'):
from .Flist import FlistCls
self._flist = FlistCls(self._core, self._cmd_group)
return self._flist
[docs]
def preset(self, inputPy=repcap.InputPy.Default) -> None:
"""
``[SENSe]:CORRection:FRESponse:INPut<ip>:USER:PRESet`` \n
Snippet: ``driver.sense.correction.fresponse.inputPy.user.preset(inputPy = repcap.InputPy.Default)`` \n
Restores the default frequency response correction settings (containing only files specific to the FSW itself) .
Frequency response correction using .fres files is deactivated.
:param inputPy: optional repeated capability selector. Default value: Nr1 (settable in the interface 'InputPy')
"""
inputPy_cmd_val = self._cmd_group.get_repcap_cmd_value(inputPy, repcap.InputPy)
self._core.io.write(f'SENSe:CORRection:FRESponse:INPut{inputPy_cmd_val}:USER:PRESet')
[docs]
def preset_with_opc(self, inputPy=repcap.InputPy.Default, opc_timeout_ms: int = -1) -> None:
inputPy_cmd_val = self._cmd_group.get_repcap_cmd_value(inputPy, repcap.InputPy)
"""
``[SENSe]:CORRection:FRESponse:INPut<ip>:USER:PRESet`` \n
Snippet: ``driver.sense.correction.fresponse.inputPy.user.preset_with_opc(inputPy = repcap.InputPy.Default)`` \n
Restores the default frequency response correction settings (containing only files specific to the FSW itself) .
Frequency response correction using .fres files is deactivated.
Same as preset, but waits for the operation to complete before continuing further. Use the RsFsw.utilities.opc_timeout_set() to set the timeout value.
:param inputPy: optional repeated capability selector. Default value: Nr1 (settable in the interface 'InputPy')
:param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.
"""
self._core.io.write_with_opc(f'SENSe:CORRection:FRESponse:INPut{inputPy_cmd_val}:USER:PRESet', opc_timeout_ms)
[docs]
def load(self, file_path: str, inputPy=repcap.InputPy.Default) -> None:
"""
``[SENSe]:CORRection:FRESponse:INPut<ip>:USER:LOAD`` \n
Snippet: ``driver.sense.correction.fresponse.inputPy.user.load(file_path = 'abc', inputPy = repcap.InputPy.Default)`` \n
Loads a stored user-defined frequency response correction scenario.
:param file_path: string
:param inputPy: optional repeated capability selector. Default value: Nr1 (settable in the interface 'InputPy')
"""
param = Conversions.value_to_quoted_str(file_path)
inputPy_cmd_val = self._cmd_group.get_repcap_cmd_value(inputPy, repcap.InputPy)
self._core.io.write(f'SENSe:CORRection:FRESponse:INPut{inputPy_cmd_val}:USER:LOAD {param}')
def clone(self) -> 'UserCls':
"""
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 = UserCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group