Source code for rsrtx.Implementations.Deembedding.Component.OpTwo

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 OpTwoCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("opTwo", core, parent)

[docs] def set(self, output_port_2: enums.DeembeddingInputPort, deembedding=repcap.Deembedding.Default, component=repcap.Component.Default) -> None: """ ``DEEMbedding<*>:COMPonent<*>:OPTWo`` \n Snippet: ``driver.deembedding.component.opTwo.set(output_port_2 = enums.DeembeddingInputPort.FIVE, deembedding = repcap.Deembedding.Default, component = repcap.Component.Default)`` \n Assign the ports to the input and output of the component according to the data in the Touchstone file. This information is not directly written in the file. You need background information how the S-parameters were determined, i.e. which port was input and which port was output. :param output_port_2: Port number that is assigned to the input or output. :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(output_port_2, enums.DeembeddingInputPort) 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}:OPTWo {param}')
# noinspection PyTypeChecker
[docs] def get(self, deembedding=repcap.Deembedding.Default, component=repcap.Component.Default) -> enums.DeembeddingInputPort: """ ``DEEMbedding<*>:COMPonent<*>:OPTWo`` \n Snippet: ``value: enums.DeembeddingInputPort = driver.deembedding.component.opTwo.get(deembedding = repcap.Deembedding.Default, component = repcap.Component.Default)`` \n Assign the ports to the input and output of the component according to the data in the Touchstone file. This information is not directly written in the file. You need background information how the S-parameters were determined, i.e. which port was input and which port was output. :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: output_port_2: Port number that is assigned to the input or output. """ 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}:OPTWo?') return Conversions.str_to_scalar_enum(response, enums.DeembeddingInputPort)