from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from ....Internal.Utilities import trim_str_response
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class NameCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("name", core, parent)
[docs]
def set(self, file_path: str, wgenerator=repcap.Wgenerator.Default) -> None:
"""
``WGENerator<*>:ARBGen:NAME`` \n
Snippet: ``driver.wgenerator.arbGen.name.set(file_path = 'abc', wgenerator = repcap.Wgenerator.Default)`` \n
Sets the file path and the file for an arbitrary waveform, if method ``RsRtx.wgenerator.arbGen.source.set()`` is set to
ARBitrary. If not path is given, the default path C:/Users/Public/Public Documents/Rohde-Schwarz/RTx/RefWaveforms is used.
This command is only relevant for files with one waveform defined. For multichannel arbitrary waveform files, see method
``RsRtx.wgenerator.arbGen.multiChannel.open()`` .
:param wgenerator: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Wgenerator')
"""
param = Conversions.value_to_quoted_str(file_path)
wgenerator_cmd_val = self._cmd_group.get_repcap_cmd_value(wgenerator, repcap.Wgenerator)
self._core.io.write(f'WGENerator{wgenerator_cmd_val}:ARBGen:NAME {param}')
[docs]
def get(self, wgenerator=repcap.Wgenerator.Default) -> str:
"""
``WGENerator<*>:ARBGen:NAME`` \n
Snippet: ``value: str = driver.wgenerator.arbGen.name.get(wgenerator = repcap.Wgenerator.Default)`` \n
Sets the file path and the file for an arbitrary waveform, if method ``RsRtx.wgenerator.arbGen.source.set()`` is set to
ARBitrary. If not path is given, the default path C:/Users/Public/Public Documents/Rohde-Schwarz/RTx/RefWaveforms is used.
This command is only relevant for files with one waveform defined. For multichannel arbitrary waveform files, see method
``RsRtx.wgenerator.arbGen.multiChannel.open()`` .
:param wgenerator: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Wgenerator')
"""
wgenerator_cmd_val = self._cmd_group.get_repcap_cmd_value(wgenerator, repcap.Wgenerator)
response = self._core.io.query_str(f'WGENerator{wgenerator_cmd_val}:ARBGen:NAME?')
return trim_str_response(response)