Source code for rsrtx.Implementations.Power.Report.Test.Comment

from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from .....Internal.Types import DataType
from .....Internal.Utilities import trim_str_response
from .....Internal.ArgSingleList import ArgSingleList
from .....Internal.ArgSingle import ArgSingle
from ..... import enums


# 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, meas_type: enums.PwrReportResultMeasType, comment: str) -> None: """ ``POWer:REPort:TEST:COMMent`` \n Snippet: ``driver.power.report.test.comment.set(meas_type = enums.PwrReportResultMeasType.DONR, comment = 'abc')`` \n Sets a comment for the report. :param meas_type: QUAL | RUSH | HARM | MODU | DONR | SLEW | SOA | TURN | SWIT | EFF | RIPP | TRANS | SPEC """ param = ArgSingleList().compose_cmd_string(ArgSingle('meas_type', meas_type, DataType.Enum, enums.PwrReportResultMeasType), ArgSingle('comment', comment, DataType.String)) self._core.io.write(f'POWer:REPort:TEST:COMMent {param}'.rstrip())
[docs] def get(self, meas_type: enums.PwrReportResultMeasType) -> str: """ ``POWer:REPort:TEST:COMMent`` \n Snippet: ``value: str = driver.power.report.test.comment.get(meas_type = enums.PwrReportResultMeasType.DONR)`` \n Sets a comment for the report. :param meas_type: QUAL | RUSH | HARM | MODU | DONR | SLEW | SOA | TURN | SWIT | EFF | RIPP | TRANS | SPEC """ param = Conversions.enum_scalar_to_str(meas_type, enums.PwrReportResultMeasType) response = self._core.io.query_str(f'POWer:REPort:TEST:COMMent? {param}') return trim_str_response(response)