Source code for rsrtx.Implementations.Lane.Embedding.Component.Identical

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class IdenticalCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, matched_paths: bool, lane=repcap.Lane.Default, component=repcap.Component.Default) -> None: """ ``LANE<*>:EMBedding:COMPonent<*>:IDENtical`` \n Snippet: ``driver.lane.embedding.component.identical.set(matched_paths = False, lane = repcap.Lane.Default, component = repcap.Component.Default)`` \n The setting is relevant if the measurement setup is a 4-port, and the component is a 2- port. Usually, these components are cables and adapters, which are described by s2p files. In case of a 4-port setup, 2 cables or 2 adapters are used. If they are identical, for example, when a matched-pair cable is used, they can be described by the same file. In this case, set the command to ON. :param matched_paths: OFF | ON :param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane') :param component: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Component') """ param = Conversions.bool_to_str(matched_paths) lane_cmd_val = self._cmd_group.get_repcap_cmd_value(lane, repcap.Lane) component_cmd_val = self._cmd_group.get_repcap_cmd_value(component, repcap.Component) self._core.io.write_with_opc(f'LANE{lane_cmd_val}:EMBedding:COMPonent{component_cmd_val}:IDENtical {param}')
[docs] def get(self, lane=repcap.Lane.Default, component=repcap.Component.Default) -> bool: """ ``LANE<*>:EMBedding:COMPonent<*>:IDENtical`` \n Snippet: ``value: bool = driver.lane.embedding.component.identical.get(lane = repcap.Lane.Default, component = repcap.Component.Default)`` \n The setting is relevant if the measurement setup is a 4-port, and the component is a 2- port. Usually, these components are cables and adapters, which are described by s2p files. In case of a 4-port setup, 2 cables or 2 adapters are used. If they are identical, for example, when a matched-pair cable is used, they can be described by the same file. In this case, set the command to ON. :param lane: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Lane') :param component: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Component') :return: matched_paths: OFF | ON """ lane_cmd_val = self._cmd_group.get_repcap_cmd_value(lane, repcap.Lane) component_cmd_val = self._cmd_group.get_repcap_cmd_value(component, repcap.Component) response = self._core.io.query_str_with_opc(f'LANE{lane_cmd_val}:EMBedding:COMPonent{component_cmd_val}:IDENtical?') return Conversions.str_to_bool(response)