Source code for rsrtx.Implementations.Mtest.EyeMask.Hposition

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from ....Internal.Types import DataType
from ....Internal.ArgSingleList import ArgSingleList
from ....Internal.ArgSingle import ArgSingle


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

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

[docs] def set(self, mask_test: str, pat_offset_x: float) -> None: """ ``MTESt:EYEMask:HPOSition`` \n Snippet: ``driver.mtest.eyeMask.hposition.set(mask_test = 'abc', pat_offset_x = 1.0)`` \n Sets the horizontal (time) value of the eye shape enter and thus defines the horizontal position of the eye shape on the display. :param mask_test: String with the name of the mask test :param pat_offset_x: -100 to 100 """ param = ArgSingleList().compose_cmd_string(ArgSingle('mask_test', mask_test, DataType.String), ArgSingle('pat_offset_x', pat_offset_x, DataType.Float)) self._core.io.write_with_opc(f'MTESt:EYEMask:HPOSition {param}'.rstrip())
[docs] def get(self, mask_test: str) -> float: """ ``MTESt:EYEMask:HPOSition`` \n Snippet: ``value: float = driver.mtest.eyeMask.hposition.get(mask_test = 'abc')`` \n Sets the horizontal (time) value of the eye shape enter and thus defines the horizontal position of the eye shape on the display. :param mask_test: String with the name of the mask test :return: pat_offset_x: -100 to 100 """ param = Conversions.value_to_quoted_str(mask_test) response = self._core.io.query_str_with_opc(f'MTESt:EYEMask:HPOSition? {param}') return Conversions.str_to_float(response)