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

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


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

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

[docs] def set(self, name: str, lane=repcap.Lane.Default, component=repcap.Component.Default) -> None: """ ``LANE<*>:EMBedding:COMPonent<*>:NAME`` \n Snippet: ``driver.lane.embedding.component.name.set(name = 'abc', lane = repcap.Lane.Default, component = repcap.Component.Default)`` \n Sets a name for the indicated component that helps you identifying it. :param name: String parameter, name of the component :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.value_to_quoted_str(name) 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}:NAME {param}')
[docs] def get(self, lane=repcap.Lane.Default, component=repcap.Component.Default) -> str: """ ``LANE<*>:EMBedding:COMPonent<*>:NAME`` \n Snippet: ``value: str = driver.lane.embedding.component.name.get(lane = repcap.Lane.Default, component = repcap.Component.Default)`` \n Sets a name for the indicated component that helps you identifying it. :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: name: String parameter, name of the component """ 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}:NAME?') return trim_str_response(response)