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 XCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("x", core, parent)
[docs]
def set(self, mask_test: str, mask_segment: int, msk_segm_pt: int, x: float) -> None:
"""
``MTESt:SEGMent:POINt:X`` \n
Snippet: ``driver.mtest.segment.point.x.set(mask_test = 'abc', mask_segment = 1, msk_segm_pt = 1, x = 1.0)`` \n
Defines the x-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 x: -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('x', x, DataType.Float))
self._core.io.write_with_opc(f'MTESt:SEGMent:POINt:X {param}'.rstrip())
[docs]
def get(self, mask_test: str, mask_segment: int, msk_segm_pt: int) -> float:
"""
``MTESt:SEGMent:POINt:X`` \n
Snippet: ``value: float = driver.mtest.segment.point.x.get(mask_test = 'abc', mask_segment = 1, msk_segm_pt = 1)`` \n
Defines the x-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: x: -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:X? {param}'.rstrip())
return Conversions.str_to_float(response)