Source code for rsrtx.Implementations.Mtest.Segment.Point.Y

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 YCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, mask_test: str, mask_segment: int, msk_segm_pt: int, y: float) -> None: """ ``MTESt:SEGMent:POINt:Y`` \n Snippet: ``driver.mtest.segment.point.y.set(mask_test = 'abc', mask_segment = 1, msk_segm_pt = 1, y = 1.0)`` \n Defines the y-value of the mask segment point. :param mask_test: String with the name of the mask test :param mask_segment: Number of the segment. Counting starts from 0. :param msk_segm_pt: Number of the point. Counting starts from 0. :param y: -100E+24 to 100E+24 """ param = ArgSingleList().compose_cmd_string(ArgSingle('mask_test', mask_test, DataType.String), ArgSingle('mask_segment', mask_segment, DataType.Integer), ArgSingle('msk_segm_pt', msk_segm_pt, DataType.Integer), ArgSingle('y', y, DataType.Float)) self._core.io.write_with_opc(f'MTESt:SEGMent:POINt:Y {param}'.rstrip())
[docs] def get(self, mask_test: str, mask_segment: int, msk_segm_pt: int) -> float: """ ``MTESt:SEGMent:POINt:Y`` \n Snippet: ``value: float = driver.mtest.segment.point.y.get(mask_test = 'abc', mask_segment = 1, msk_segm_pt = 1)`` \n Defines the y-value of the mask segment point. :param mask_test: String with the name of the mask test :param mask_segment: Number of the segment. Counting starts from 0. :param msk_segm_pt: Number of the point. Counting starts from 0. :return: y: -100E+24 to 100E+24 """ param = ArgSingleList().compose_cmd_string(ArgSingle('mask_test', mask_test, DataType.String), ArgSingle('mask_segment', mask_segment, DataType.Integer), ArgSingle('msk_segm_pt', msk_segm_pt, DataType.Integer)) response = self._core.io.query_str_with_opc(f'MTESt:SEGMent:POINt:Y? {param}'.rstrip()) return Conversions.str_to_float(response)