from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal.Types import DataType
from ......Internal.StructBase import StructBase
from ......Internal.ArgStruct import ArgStruct
from ......Internal.ArgSingleList import ArgSingleList
from ......Internal.ArgSingle import ArgSingle
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class IselectCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("iselect", core, parent)
[docs]
def set(self, instr_name: str, rf_path: str=None, index=repcap.Index.Default) -> None:
"""
``SCONfiguration:EXTernal:CODer<CH>:REMote:ISELect`` \n
Snippet: ``driver.sconfiguration.external.coder.remote.iselect.set(instr_name = 'abc', rf_path = 'abc', index = repcap.Index.Default)`` \n
Selects an external instrument for the selected connector.
:param instr_name: String Instrument alias name, as retrieved with the method ``RsSmw.sconfiguration.external.remote.list_py()`` . The name can also be defined with the method ``RsSmw.sconfiguration.external.remote.add.set()`` .
:param rf_path: String Determines the used RF output of the external instrument.
:param index: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Coder')
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('instr_name', instr_name, DataType.String), ArgSingle('rf_path', rf_path, DataType.String, None, is_optional=True))
index_cmd_val = self._cmd_group.get_repcap_cmd_value(index, repcap.Index)
self._core.io.write(f'SCONfiguration:EXTernal:CODer{index_cmd_val}:REMote:ISELect {param}'.rstrip())
# noinspection PyTypeChecker
[docs]
class IselectStruct(StructBase):
"""
Response structure. Fields: \n
- 1 Instr_Name: str: String Instrument alias name, as retrieved with the method ``RsSmw.sconfiguration.external.remote.list_py()`` . The name can also be defined with the method ``RsSmw.sconfiguration.external.remote.add.set()`` .
- 2 Rf_Path: str: String Determines the used RF output of the external instrument.
"""
__meta_args_list = [
ArgStruct.scalar_str('Instr_Name'),
ArgStruct.scalar_str('Rf_Path')]
def __init__(self):
StructBase.__init__(self, self)
self.Instr_Name: str = None
self.Rf_Path: str = None
[docs]
def get(self, index=repcap.Index.Default) -> IselectStruct:
"""
``SCONfiguration:EXTernal:CODer<CH>:REMote:ISELect`` \n
Snippet: ``value: IselectStruct = driver.sconfiguration.external.coder.remote.iselect.get(index = repcap.Index.Default)`` \n
Selects an external instrument for the selected connector.
:param index: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Coder')
:return: structure: for return value, see the help for IselectStruct structure arguments.
"""
index_cmd_val = self._cmd_group.get_repcap_cmd_value(index, repcap.Index)
return self._core.io.query_struct(f'SCONfiguration:EXTernal:CODer{index_cmd_val}:REMote:ISELect?', self.__class__.IselectStruct())