Source code for rsrtx.Implementations.Mtest.EyeMask.Height.Value

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
from ..... import repcap


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

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

[docs] def set(self, mask_test_name: str, value: float, mtestHeight=repcap.MtestHeight.Default) -> None: """ ``MTESt:EYEMask:HEIGht<*>[:VALue]`` \n Snippet: ``driver.mtest.eyeMask.height.value.set(mask_test_name = 'abc', value = 1.0, mtestHeight = repcap.MtestHeight.Default)`` \n Defines the main heigth af all eye mask shapes and the minor height for octagon mask shapes. :param mask_test_name: String with the name of the mask test :param mtestHeight: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Height') """ param = ArgSingleList().compose_cmd_string(ArgSingle('mask_test_name', mask_test_name, DataType.String), ArgSingle('value', value, DataType.Float)) mtestHeight_cmd_val = self._cmd_group.get_repcap_cmd_value(mtestHeight, repcap.MtestHeight) self._core.io.write_with_opc(f'MTESt:EYEMask:HEIGht{mtestHeight_cmd_val}:VALue {param}'.rstrip())
[docs] def get(self, mtestHeight=repcap.MtestHeight.Default) -> float: """ ``MTESt:EYEMask:HEIGht<*>[:VALue]`` \n Snippet: ``value: float = driver.mtest.eyeMask.height.value.get(mtestHeight = repcap.MtestHeight.Default)`` \n Defines the main heigth af all eye mask shapes and the minor height for octagon mask shapes. :param mtestHeight: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Height') """ mtestHeight_cmd_val = self._cmd_group.get_repcap_cmd_value(mtestHeight, repcap.MtestHeight) response = self._core.io.query_str_with_opc(f'MTESt:EYEMask:HEIGht{mtestHeight_cmd_val}:VALue?') return Conversions.str_to_float(response)