from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DeskewCls:
"""
| Commands in total: 5
| Subgroups: 2
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("deskew", 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 current(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_current'):
from .Current import CurrentCls
self._current = CurrentCls(self._core, self._cmd_group)
return self._current
[docs]
def get_reset(self) -> bool:
"""
``POWer:DESKew:RESet`` \n
Snippet: ``value: bool = driver.power.deskew.get_reset()`` \n
Overwrites the present skew setup.
"""
response = self._core.io.query_str('POWer:DESKew:RESet?')
return Conversions.str_to_bool(response)
[docs]
def set_reset(self, overwrite_currskw_set: bool) -> None:
"""
``POWer:DESKew:RESet`` \n
Snippet: ``driver.power.deskew.set_reset(overwrite_currskw_set = False)`` \n
Overwrites the present skew setup.
:param overwrite_currskw_set: OFF | ON
"""
param = Conversions.bool_to_str(overwrite_currskw_set)
self._core.io.write(f'POWer:DESKew:RESet {param}')
[docs]
def get_ud_preset(self) -> bool:
"""
``POWer:DESKew:UDPReset`` \n
Snippet: ``value: bool = driver.power.deskew.get_ud_preset()`` \n
Activates or deactivates a user defined setup. If ON, the instrument setup including probe setup and the deskew values
are written to a user defined preset file (saveset) that can be loaded using method ``RsRtx.massMemory.recall()`` . The
default path is: C:/Users/Public/Documents/Rohde-Schwarz/RTO6/SaveSets/
:return: usr_defined_preset: OFF | ON
"""
response = self._core.io.query_str('POWer:DESKew:UDPReset?')
return Conversions.str_to_bool(response)
[docs]
def set_ud_preset(self, usr_defined_preset: bool) -> None:
"""
``POWer:DESKew:UDPReset`` \n
Snippet: ``driver.power.deskew.set_ud_preset(usr_defined_preset = False)`` \n
Activates or deactivates a user defined setup. If ON, the instrument setup including probe setup and the deskew values
are written to a user defined preset file (saveset) that can be loaded using method ``RsRtx.massMemory.recall()`` . The
default path is: C:/Users/Public/Documents/Rohde-Schwarz/RTO6/SaveSets/
:param usr_defined_preset: OFF | ON
"""
param = Conversions.bool_to_str(usr_defined_preset)
self._core.io.write(f'POWer:DESKew:UDPReset {param}')
[docs]
def get_time(self) -> float:
"""
``POWer:DESKew:TIME`` \n
Snippet: ``value: float = driver.power.deskew.get_time()`` \n
Queries the result of the auto deskew.
:return: auto_deskew_offs: -100E-9 to 100E-9
"""
response = self._core.io.query_str('POWer:DESKew:TIME?')
return Conversions.str_to_float(response)
def clone(self) -> 'DeskewCls':
"""
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 = DeskewCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group