Source code for rsrtx.Implementations.Mtest.File.Name

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


# 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, mask_test_name: str, path: str) -> None: """ ``MTESt:FILE:NAME`` \n Snippet: ``driver.mtest.file.name.set(mask_test_name = 'abc', path = 'abc')`` \n Specifies a file to save the mask test. :param mask_test_name: String with the name of the mask test :param path: String containing path and file name, format .xml """ param = ArgSingleList().compose_cmd_string(ArgSingle('mask_test_name', mask_test_name, DataType.String), ArgSingle('path', path, DataType.String)) self._core.io.write(f'MTESt:FILE:NAME {param}'.rstrip())
[docs] def get(self, mask_test_name: str) -> str: """ ``MTESt:FILE:NAME`` \n Snippet: ``value: str = driver.mtest.file.name.get(mask_test_name = 'abc')`` \n Specifies a file to save the mask test. :param mask_test_name: String with the name of the mask test :return: path: String containing path and file name, format .xml """ param = Conversions.value_to_quoted_str(mask_test_name) response = self._core.io.query_str(f'MTESt:FILE:NAME? {param}') return trim_str_response(response)