Source code for RsFsw.Implementations.Sense.Sweep.Egate.Trace.Comment

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

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

[docs] def set(self, comment: str, trace=repcap.Trace.Default) -> None: """ ``[SENSe]:SWEep:EGATe:TRACe<t>:COMMent`` \n Snippet: ``driver.sense.sweep.egate.trace.comment.set(comment = 'abc', trace = repcap.Trace.Default)`` \n Defines a comment for the gate of a particular trace. :param comment: String containing the comment. :param trace: optional repeated capability selector. Default value: Tr1 (settable in the interface 'Trace') """ param = Conversions.value_to_quoted_str(comment) trace_cmd_val = self._cmd_group.get_repcap_cmd_value(trace, repcap.Trace) self._core.io.write(f'SENSe:SWEep:EGATe:TRACe{trace_cmd_val}:COMMent {param}')
[docs] def get(self, trace=repcap.Trace.Default) -> str: """ ``[SENSe]:SWEep:EGATe:TRACe<t>:COMMent`` \n Snippet: ``value: str = driver.sense.sweep.egate.trace.comment.get(trace = repcap.Trace.Default)`` \n Defines a comment for the gate of a particular trace. :param trace: optional repeated capability selector. Default value: Tr1 (settable in the interface 'Trace') :return: comment: String containing the comment. """ trace_cmd_val = self._cmd_group.get_repcap_cmd_value(trace, repcap.Trace) response = self._core.io.query_str(f'SENSe:SWEep:EGATe:TRACe{trace_cmd_val}:COMMent?') return trim_str_response(response)