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 OneFileCls:
"""
| Commands in total: 4
| Subgroups: 0
| Direct child commands: 4
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("oneFile", core, parent)
[docs]
def get_name(self) -> str:
"""
``SAVeset:ONEFile:NAME`` \n
Snippet: ``value: str = driver.saveset.oneFile.get_name()`` \n
Sets the path and the file name of the One File. The file format is ZIP.
"""
response = self._core.io.query_str_with_opc('SAVeset:ONEFile:NAME?')
return trim_str_response(response)
[docs]
def set_name(self, path_one_file: str) -> None:
"""
``SAVeset:ONEFile:NAME`` \n
Snippet: ``driver.saveset.oneFile.set_name(path_one_file = 'abc')`` \n
Sets the path and the file name of the One File. The file format is ZIP.
:param path_one_file: String parameter
"""
param = Conversions.value_to_quoted_str(path_one_file)
self._core.io.write_with_opc(f'SAVeset:ONEFile:NAME {param}')
[docs]
def save(self) -> None:
"""
``SAVeset:ONEFile:SAVE`` \n
Snippet: ``driver.saveset.oneFile.save()`` \n
No help available
"""
self._core.io.write(f'SAVeset:ONEFile:SAVE')
[docs]
def save_and_wait(self, opc_timeout_ms: int = -1) -> None:
"""
``SAVeset:ONEFile:SAVE`` \n
Snippet: ``driver.saveset.oneFile.save_and_wait()`` \n
No help available
Same as save, but waits for the operation to complete before continuing further. Use the RsRtx.utilities.opc_timeout_set() to set the timeout value.
:param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.
"""
self._core.io.write_with_opc(f'SAVeset:ONEFile:SAVE', opc_timeout_ms)
[docs]
def open(self) -> None:
"""
``SAVeset:ONEFile:OPEN`` \n
Snippet: ``driver.saveset.oneFile.open()`` \n
Loads the One File that is specified with method ``RsRtx.saveset.oneFile.name()`` .
"""
self._core.io.write(f'SAVeset:ONEFile:OPEN')
[docs]
def open_and_wait(self, opc_timeout_ms: int = -1) -> None:
"""
``SAVeset:ONEFile:OPEN`` \n
Snippet: ``driver.saveset.oneFile.open_and_wait()`` \n
Loads the One File that is specified with method ``RsRtx.saveset.oneFile.name()`` .
Same as open, but waits for the operation to complete before continuing further. Use the RsRtx.utilities.opc_timeout_set() to set the timeout value.
:param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.
"""
self._core.io.write_with_opc(f'SAVeset:ONEFile:OPEN', opc_timeout_ms)
[docs]
def get_user_pref(self) -> bool:
"""
``SAVeset:ONEFile:USERpref`` \n
Snippet: ``value: bool = driver.saveset.oneFile.get_user_pref()`` \n
If ON, the user preferences settings are also restored together with the saveset and reference waveform. User preferences
settings include the user-specific display settings like diagram layout, toolbar, intensity and transparency settings.
"""
response = self._core.io.query_str_with_opc('SAVeset:ONEFile:USERpref?')
return Conversions.str_to_bool(response)
[docs]
def set_user_pref(self, include_usr_preferences_in_one_file: bool) -> None:
"""
``SAVeset:ONEFile:USERpref`` \n
Snippet: ``driver.saveset.oneFile.set_user_pref(include_usr_preferences_in_one_file = False)`` \n
If ON, the user preferences settings are also restored together with the saveset and reference waveform. User preferences
settings include the user-specific display settings like diagram layout, toolbar, intensity and transparency settings.
:param include_usr_preferences_in_one_file: OFF | ON
"""
param = Conversions.bool_to_str(include_usr_preferences_in_one_file)
self._core.io.write_with_opc(f'SAVeset:ONEFile:USERpref {param}')