from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal.Types import DataType
from ....Internal.ArgSingleList import ArgSingleList
from ....Internal.ArgSingle import ArgSingle
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class StateCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("state", core, parent)
[docs]
def set(self, data_set: int, destination_file: str) -> None:
"""
``MMEMory:STORe:STATe`` \n
Snippet: ``driver.massMemory.store.state.set(data_set = 1, destination_file = 'abc')`` \n
Saves the current instrument setting in the specified file. Save the instrument settings to the internal memory with the
same number using the common command ``*SAV``.
:param data_set: Corresponds to the specific number defined with the ``*SAV`` command, e.g. ``*SAV`` 4.
:param destination_file: Filename with file extension savrcltxt.
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('data_set', data_set, DataType.Integer), ArgSingle('destination_file', destination_file, DataType.String))
self._core.io.write(f'MMEMory:STORe:STATe {param}'.rstrip())