from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from .....Internal.Utilities import trim_str_response
from ..... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DexchangeCls:
"""
| Commands in total: 8
| Subgroups: 2
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("dexchange", core, parent)
@property
def afile(self):
"""
| Commands in total: 5
| Subgroups: 1
| Direct child commands: 3
"""
if not hasattr(self, '_afile'):
from .Afile import AfileCls
self._afile = AfileCls(self._core, self._cmd_group)
return self._afile
@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
# noinspection PyTypeChecker
[docs]
def get_mode(self) -> enums.DexchMode:
"""
``[SOURce<HW>]:CORRection:DEXChange:MODE`` \n
Snippet: ``value: enums.DexchMode = driver.source.correction.dexchange.get_mode()`` \n
Determines import or export of a user correction list. Specify the source or destination file with the method
``RsSmw.source.correction.dexchange.select()`` .
:return: mode: IMPort | EXPort
"""
response = self._core.io.query_str('SOURce<HwInstance>:CORRection:DEXChange:MODE?')
return Conversions.str_to_scalar_enum(response, enums.DexchMode)
[docs]
def set_mode(self, mode: enums.DexchMode) -> None:
"""
``[SOURce<HW>]:CORRection:DEXChange:MODE`` \n
Snippet: ``driver.source.correction.dexchange.set_mode(mode = enums.DexchMode.EXPort)`` \n
Determines import or export of a user correction list. Specify the source or destination file with the method
``RsSmw.source.correction.dexchange.select()`` .
:param mode: IMPort | EXPort
"""
param = Conversions.enum_scalar_to_str(mode, enums.DexchMode)
self._core.io.write(f'SOURce<HwInstance>:CORRection:DEXChange:MODE {param}')
[docs]
def get_select(self) -> str:
"""
``[SOURce<HW>]:CORRection:DEXChange:SELect`` \n
Snippet: ``value: str = driver.source.correction.dexchange.get_select()`` \n
Selects the ASCII file for import or export, containing a user correction list.
:return: filename: string Filename or complete file path; file extension can be omitted.
"""
response = self._core.io.query_str('SOURce<HwInstance>:CORRection:DEXChange:SELect?')
return trim_str_response(response)
[docs]
def set_select(self, filename: str) -> None:
"""
``[SOURce<HW>]:CORRection:DEXChange:SELect`` \n
Snippet: ``driver.source.correction.dexchange.set_select(filename = 'abc')`` \n
Selects the ASCII file for import or export, containing a user correction list.
:param filename: string Filename or complete file path; file extension can be omitted.
"""
param = Conversions.value_to_quoted_str(filename)
self._core.io.write(f'SOURce<HwInstance>:CORRection:DEXChange:SELect {param}')
def clone(self) -> 'DexchangeCls':
"""
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 = DexchangeCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group