Source code for RsFsw.Implementations.System.Srecorder.FormatPy

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums


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

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

[docs] def set(self, format_py: enums.ScpiRecorderFormat) -> None: """ ``SYSTem:SRECorder:FORMat`` \n Snippet: ``driver.system.srecorder.formatPy.set(format_py = enums.ScpiRecorderFormat.LONG)`` \n Defines whether the commands are recorded using the short or long SCPI notation. :param format_py: SHORt | LONG SHORt The shortform of the keyword is used. Example: FREQ:CENT LONG The entire keyword is used. Example: FREQuency:CENTer """ param = Conversions.enum_scalar_to_str(format_py, enums.ScpiRecorderFormat) self._core.io.write(f'SYSTem:SRECorder:FORMat {param}')
# noinspection PyTypeChecker
[docs] def get(self) -> enums.ScpiRecorderFormat: """ ``SYSTem:SRECorder:FORMat`` \n Snippet: ``value: enums.ScpiRecorderFormat = driver.system.srecorder.formatPy.get()`` \n Defines whether the commands are recorded using the short or long SCPI notation. :return: format_py: SHORt | LONG SHORt The shortform of the keyword is used. Example: FREQ:CENT LONG The entire keyword is used. Example: FREQuency:CENTer """ response = self._core.io.query_str(f'SYSTem:SRECorder:FORMat?') return Conversions.str_to_scalar_enum(response, enums.ScpiRecorderFormat)