Source code for rsrtx.Implementations.Export.Eye

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


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

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

	# noinspection PyTypeChecker
[docs] def get_select(self) -> enums.SelectableEye: """ ``EXPort:EYE:SELect`` \n Snippet: ``value: enums.SelectableEye = driver.export.eye.get_select()`` \n Selects the eye that you want to save to a file. :return: selectable_eye: EYE1 | EYE2 | EYE3 | EYE4 """ response = self._core.io.query_str_with_opc('EXPort:EYE:SELect?') return Conversions.str_to_scalar_enum(response, enums.SelectableEye)
[docs] def set_select(self, selectable_eye: enums.SelectableEye) -> None: """ ``EXPort:EYE:SELect`` \n Snippet: ``driver.export.eye.set_select(selectable_eye = enums.SelectableEye.EYE1)`` \n Selects the eye that you want to save to a file. :param selectable_eye: EYE1 | EYE2 | EYE3 | EYE4 """ param = Conversions.enum_scalar_to_str(selectable_eye, enums.SelectableEye) self._core.io.write_with_opc(f'EXPort:EYE:SELect {param}')
# noinspection PyTypeChecker
[docs] def get_source(self) -> enums.SignalSource: """ ``EXPort:EYE:SOURce`` \n Snippet: ``value: enums.SignalSource = driver.export.eye.get_source()`` \n Returns the source of the eye measurement, selected with method ``RsRtx.export.eye.select()`` . :return: source: C1W1 | C1W2 | C1W3 | C1W4 | C2W1 | C2W2 | C2W3 | C2W4 | C3W1 | C3W2 | C3W3 | C3W4 | C4W1 | C4W2 | C4W3 | C4W4 """ response = self._core.io.query_str_with_opc('EXPort:EYE:SOURce?') return Conversions.str_to_scalar_enum(response, enums.SignalSource)
[docs] def save(self) -> None: """ ``EXPort:EYE:SAVE`` \n Snippet: ``driver.export.eye.save()`` \n Saves the selected eye to the file that is specified with method ``RsRtx.export.eye.name()`` . """ self._core.io.write(f'EXPort:EYE:SAVE')
[docs] def save_and_wait(self, opc_timeout_ms: int = -1) -> None: """ ``EXPort:EYE:SAVE`` \n Snippet: ``driver.export.eye.save_and_wait()`` \n Saves the selected eye to the file that is specified with method ``RsRtx.export.eye.name()`` . Same as save, but waits for the operation to complete before continuing further. Use the RsRtx.utilities.opc_timeout_set() to set the timeout value. :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call. """ self._core.io.write_with_opc(f'EXPort:EYE:SAVE', opc_timeout_ms)
[docs] def get_data(self) -> float: """ ``EXPort:EYE:DATA`` \n Snippet: ``value: float = driver.export.eye.get_data()`` \n Transfers the eye data to the controlling computer. The data can be used in MATLAB, for example. To set the export data format, use method ``RsRtx.formatPy.data.set()`` . """ response = self._core.io.query_str('EXPort:EYE:DATA?') return Conversions.str_to_float(response)
[docs] def get_name(self) -> str: """ ``EXPort:EYE:NAME`` \n Snippet: ``value: str = driver.export.eye.get_name()`` \n Sets the path, the file name, and the file format for the eye file. Available file formats are ``csv`` and ``bin``. """ response = self._core.io.query_str_with_opc('EXPort:EYE:NAME?') return trim_str_response(response)
[docs] def set_name(self, path: str) -> None: """ ``EXPort:EYE:NAME`` \n Snippet: ``driver.export.eye.set_name(path = 'abc')`` \n Sets the path, the file name, and the file format for the eye file. Available file formats are ``csv`` and ``bin``. """ param = Conversions.value_to_quoted_str(path) self._core.io.write_with_opc(f'EXPort:EYE:NAME {param}')