Source code for rsmxo.Implementations.Export.Hmeasurement.Name

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 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, save_as_path: str, measIndex=repcap.MeasIndex.Default) -> None: """ ``EXPort:HMEasurement<*>:NAME`` \n Snippet: ``driver.export.hmeasurement.name.set(save_as_path = 'abc', measIndex = repcap.MeasIndex.Default)`` \n Sets the path, the filename and the file format of the export file for histogram. The command affects all histogram exports. :param save_as_path: String with path and file name with extension .csv. :param measIndex: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Hmeasurement') """ param = Conversions.value_to_quoted_str(save_as_path) measIndex_cmd_val = self._cmd_group.get_repcap_cmd_value(measIndex, repcap.MeasIndex) self._core.io.write(f'EXPort:HMEasurement{measIndex_cmd_val}:NAME {param}')
[docs] def get(self, measIndex=repcap.MeasIndex.Default) -> str: """ ``EXPort:HMEasurement<*>:NAME`` \n Snippet: ``value: str = driver.export.hmeasurement.name.get(measIndex = repcap.MeasIndex.Default)`` \n Sets the path, the filename and the file format of the export file for histogram. The command affects all histogram exports. :param measIndex: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Hmeasurement') :return: save_as_path: String with path and file name with extension .csv. """ measIndex_cmd_val = self._cmd_group.get_repcap_cmd_value(measIndex, repcap.MeasIndex) response = self._core.io.query_str(f'EXPort:HMEasurement{measIndex_cmd_val}:NAME?') return trim_str_response(response)