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

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

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

[docs] def set(self, meas_type: enums.PwrReportResultMeasType, directory_path: str) -> None: """ ``POWer:REPort:TEST:DIRectory`` \n Snippet: ``driver.power.report.test.directory.set(meas_type = enums.PwrReportResultMeasType.DONR, directory_path = 'abc')`` \n Selects the directory, in which the reports are saved. :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('directory_path', directory_path, DataType.String)) self._core.io.write(f'POWer:REPort:TEST:DIRectory {param}'.rstrip())
[docs] def get(self, meas_type: enums.PwrReportResultMeasType) -> str: """ ``POWer:REPort:TEST:DIRectory`` \n Snippet: ``value: str = driver.power.report.test.directory.get(meas_type = enums.PwrReportResultMeasType.DONR)`` \n Selects the directory, in which the reports are saved. :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:DIRectory? {param}') return trim_str_response(response)