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 RenameCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("rename", core, parent)
[docs]
def set(self, app_name_1: str, app_name_2: str) -> None:
"""
``INSTrument:REName`` \n
Snippet: ``driver.instrument.rename.set(app_name_1 = 'abc', app_name_2 = 'abc')`` \n
Renames a channel.
:param app_name_1: String containing the name of the channel you want to rename.
:param app_name_2: String containing the new channel name. Note that you cannot assign an existing channel name to a new channel. If you do, an error occurs. Channel names can have a maximum of 31 characters, and must be compatible with the Windows conventions for file names. In particular, they must not contain special characters such as ':', '*', '?'.
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('app_name_1', app_name_1, DataType.String), ArgSingle('app_name_2', app_name_2, DataType.String))
self._core.io.write(f'INSTrument:REName {param}'.rstrip())