from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SpfSelectionCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("spfSelection", core, parent)
[docs]
def set(self, sparam_file_sel: enums.SparamFileSelect, deembedding=repcap.Deembedding.Default, component=repcap.Component.Default) -> None:
"""
``DEEMbedding<*>:COMPonent<*>:SPFSelection`` \n
Snippet: ``driver.deembedding.component.spfSelection.set(sparam_file_sel = enums.SparamFileSelect.SPF1, deembedding = repcap.Deembedding.Default, component = repcap.Component.Default)`` \n
Selects the Touchstone file for response curve display.
:param sparam_file_sel: SPF1 | SPF2
:param deembedding: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Deembedding')
:param component: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Component')
"""
param = Conversions.enum_scalar_to_str(sparam_file_sel, enums.SparamFileSelect)
deembedding_cmd_val = self._cmd_group.get_repcap_cmd_value(deembedding, repcap.Deembedding)
component_cmd_val = self._cmd_group.get_repcap_cmd_value(component, repcap.Component)
self._core.io.write_with_opc(f'DEEMbedding{deembedding_cmd_val}:COMPonent{component_cmd_val}:SPFSelection {param}')
# noinspection PyTypeChecker
[docs]
def get(self, deembedding=repcap.Deembedding.Default, component=repcap.Component.Default) -> enums.SparamFileSelect:
"""
``DEEMbedding<*>:COMPonent<*>:SPFSelection`` \n
Snippet: ``value: enums.SparamFileSelect = driver.deembedding.component.spfSelection.get(deembedding = repcap.Deembedding.Default, component = repcap.Component.Default)`` \n
Selects the Touchstone file for response curve display.
:param deembedding: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Deembedding')
:param component: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Component')
:return: sparam_file_sel: SPF1 | SPF2
"""
deembedding_cmd_val = self._cmd_group.get_repcap_cmd_value(deembedding, repcap.Deembedding)
component_cmd_val = self._cmd_group.get_repcap_cmd_value(component, repcap.Component)
response = self._core.io.query_str_with_opc(f'DEEMbedding{deembedding_cmd_val}:COMPonent{component_cmd_val}:SPFSelection?')
return Conversions.str_to_scalar_enum(response, enums.SparamFileSelect)