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, path: str, deembedding=repcap.Deembedding.Default) -> None:
"""
``DEEMbedding<*>:NAME`` \n
Snippet: ``driver.deembedding.name.set(path = 'abc', deembedding = repcap.Deembedding.Default)`` \n
Sets the file name, file format and path of the deembedding setup file. The file format is always .xml.
:param path: String with path and file name with extension .xml
:param deembedding: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Deembedding')
"""
param = Conversions.value_to_quoted_str(path)
deembedding_cmd_val = self._cmd_group.get_repcap_cmd_value(deembedding, repcap.Deembedding)
self._core.io.write_with_opc(f'DEEMbedding{deembedding_cmd_val}:NAME {param}')
[docs]
def get(self, deembedding=repcap.Deembedding.Default) -> str:
"""
``DEEMbedding<*>:NAME`` \n
Snippet: ``value: str = driver.deembedding.name.get(deembedding = repcap.Deembedding.Default)`` \n
Sets the file name, file format and path of the deembedding setup file. The file format is always .xml.
:param deembedding: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Deembedding')
:return: path: String with path and file name with extension .xml
"""
deembedding_cmd_val = self._cmd_group.get_repcap_cmd_value(deembedding, repcap.Deembedding)
response = self._core.io.query_str_with_opc(f'DEEMbedding{deembedding_cmd_val}:NAME?')
return trim_str_response(response)