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 PtypeCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("ptype", core, parent)
[docs]
def set(self, pad_type: enums.PadType, inputPy=repcap.InputPy.Default) -> None:
"""
``INPut<ip>:IQ:IMPedance:PTYPe`` \n
Snippet: ``driver.applications.iqAnalyzer.inputPy.iq.impedance.ptype.set(pad_type = enums.PadType.MLPad, inputPy = repcap.InputPy.Default)`` \n
Defines the type of matching pad used for impedance conversion for analog baseband input. For RF input, use the method
``RsFsw.inputPy.impedance.ptype.set()`` command.
:param pad_type: SRESistor | MLPad SRESistor Series-R MLPad Minimum Loss Pad
:param inputPy: optional repeated capability selector. Default value: Nr1 (settable in the interface 'InputPy')
"""
param = Conversions.enum_scalar_to_str(pad_type, enums.PadType)
inputPy_cmd_val = self._cmd_group.get_repcap_cmd_value(inputPy, repcap.InputPy)
self._core.io.write(f'INPut{inputPy_cmd_val}:IQ:IMPedance:PTYPe {param}')
# noinspection PyTypeChecker
[docs]
def get(self, inputPy=repcap.InputPy.Default) -> enums.PadType:
"""
``INPut<ip>:IQ:IMPedance:PTYPe`` \n
Snippet: ``value: enums.PadType = driver.applications.iqAnalyzer.inputPy.iq.impedance.ptype.get(inputPy = repcap.InputPy.Default)`` \n
Defines the type of matching pad used for impedance conversion for analog baseband input. For RF input, use the method
``RsFsw.inputPy.impedance.ptype.set()`` command.
:param inputPy: optional repeated capability selector. Default value: Nr1 (settable in the interface 'InputPy')
:return: pad_type: SRESistor | MLPad SRESistor Series-R MLPad Minimum Loss Pad
"""
inputPy_cmd_val = self._cmd_group.get_repcap_cmd_value(inputPy, repcap.InputPy)
response = self._core.io.query_str(f'INPut{inputPy_cmd_val}:IQ:IMPedance:PTYPe?')
return Conversions.str_to_scalar_enum(response, enums.PadType)