from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from .....Internal.Utilities import trim_str_response
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class FileCls:
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("file", core, parent)
[docs]
def set_predefined(self, filename: str) -> None:
"""
``SCONfiguration:RFALignment:SETup:FILE:PREDefined`` \n
Snippet: ``driver.sconfiguration.rfAlignment.setup.file.set_predefined(filename = 'abc')`` \n
Loads the selected predefined file.
:param filename: 'filename' File extension can be omitted. Query the filenames of predefined setup files with the method ``RsSmw.sconfiguration.rfAlignment.setup.predefined.catalog()`` .
"""
param = Conversions.value_to_quoted_str(filename)
self._core.io.write(f'SCONfiguration:RFALignment:SETup:FILE:PREDefined {param}')
[docs]
def get_value(self) -> str:
"""
``SCONfiguration:RFALignment:SETup:FILE`` \n
Snippet: ``value: str = driver.sconfiguration.rfAlignment.setup.file.get_value()`` \n
Loads the selected file from the default or the specified directory. Loaded are files with extension rfsa.
:return: setup_file: 'filename' Filename or complete file path; file extension can be omitted. Query the filenames of existing setup files with the method ``RsSmw.sconfiguration.rfAlignment.setup.catalog()`` .
"""
response = self._core.io.query_str('SCONfiguration:RFALignment:SETup:FILE?')
return trim_str_response(response)
[docs]
def set_value(self, setup_file: str) -> None:
"""
``SCONfiguration:RFALignment:SETup:FILE`` \n
Snippet: ``driver.sconfiguration.rfAlignment.setup.file.set_value(setup_file = 'abc')`` \n
Loads the selected file from the default or the specified directory. Loaded are files with extension rfsa.
:param setup_file: 'filename' Filename or complete file path; file extension can be omitted. Query the filenames of existing setup files with the method ``RsSmw.sconfiguration.rfAlignment.setup.catalog()`` .
"""
param = Conversions.value_to_quoted_str(setup_file)
self._core.io.write(f'SCONfiguration:RFALignment:SETup:FILE {param}')