Source code for rsrtx.Implementations.Mtest.EyeMask.Width.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, eyeMaskWidth=repcap.EyeMaskWidth.Default) -> None: """ ``MTESt:EYEMask:WIDTh<*>[:VALue]`` \n Snippet: ``driver.mtest.eyeMask.width.value.set(mask_test_name = 'abc', value = 1.0, eyeMaskWidth = repcap.EyeMaskWidth.Default)`` \n Defines the main width af all eye mask shapes and the minor width for hexagon and octagon mask shapes. :param mask_test_name: String with the name of the mask test :param eyeMaskWidth: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Width') """ param = ArgSingleList().compose_cmd_string(ArgSingle('mask_test_name', mask_test_name, DataType.String), ArgSingle('value', value, DataType.Float)) eyeMaskWidth_cmd_val = self._cmd_group.get_repcap_cmd_value(eyeMaskWidth, repcap.EyeMaskWidth) self._core.io.write_with_opc(f'MTESt:EYEMask:WIDTh{eyeMaskWidth_cmd_val}:VALue {param}'.rstrip())
[docs] def get(self, eyeMaskWidth=repcap.EyeMaskWidth.Default) -> float: """ ``MTESt:EYEMask:WIDTh<*>[:VALue]`` \n Snippet: ``value: float = driver.mtest.eyeMask.width.value.get(eyeMaskWidth = repcap.EyeMaskWidth.Default)`` \n Defines the main width af all eye mask shapes and the minor width for hexagon and octagon mask shapes. :param eyeMaskWidth: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Width') """ eyeMaskWidth_cmd_val = self._cmd_group.get_repcap_cmd_value(eyeMaskWidth, repcap.EyeMaskWidth) response = self._core.io.query_str_with_opc(f'MTESt:EYEMask:WIDTh{eyeMaskWidth_cmd_val}:VALue?') return Conversions.str_to_float(response)