Source code for rsrtx.Implementations.RefCurve.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, path: str, refCurve=repcap.RefCurve.Default) -> None: """ ``REFCurve<*>:NAME`` \n Snippet: ``driver.refCurve.name.set(path = 'abc', refCurve = repcap.RefCurve.Default)`` \n Defines the name of the reference waveform file to be loaded, saved or deleted. :param path: Path and name of the file that contains the reference waveform or to which the reference waveform is to be stored (.xml or .bin format) , enclosed in single quotes. :param refCurve: optional repeated capability selector. Default value: Nr1 (settable in the interface 'RefCurve') """ param = Conversions.value_to_quoted_str(path) refCurve_cmd_val = self._cmd_group.get_repcap_cmd_value(refCurve, repcap.RefCurve) self._core.io.write_with_opc(f'REFCurve{refCurve_cmd_val}:NAME {param}')
[docs] def get(self, refCurve=repcap.RefCurve.Default) -> str: """ ``REFCurve<*>:NAME`` \n Snippet: ``value: str = driver.refCurve.name.get(refCurve = repcap.RefCurve.Default)`` \n Defines the name of the reference waveform file to be loaded, saved or deleted. :param refCurve: optional repeated capability selector. Default value: Nr1 (settable in the interface 'RefCurve') """ refCurve_cmd_val = self._cmd_group.get_repcap_cmd_value(refCurve, repcap.RefCurve) response = self._core.io.query_str_with_opc(f'REFCurve{refCurve_cmd_val}:NAME?') return trim_str_response(response)