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 MskTopCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("mskTop", core, parent)
[docs]
def set(self, mask_test: str, add_top: bool) -> None:
"""
``MTESt:EYEMask:MSKTop`` \n
Snippet: ``driver.mtest.eyeMask.mskTop.set(mask_test = 'abc', add_top = False)`` \n
Enable the upper (top) and lower (bottom) mask region, respectively.
:param mask_test: OFF | ON
:param add_top: String with the name of the mask test
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('mask_test', mask_test, DataType.String), ArgSingle('add_top', add_top, DataType.Boolean))
self._core.io.write_with_opc(f'MTESt:EYEMask:MSKTop {param}'.rstrip())
[docs]
def get(self, mask_test: str) -> bool:
"""
``MTESt:EYEMask:MSKTop`` \n
Snippet: ``value: bool = driver.mtest.eyeMask.mskTop.get(mask_test = 'abc')`` \n
Enable the upper (top) and lower (bottom) mask region, respectively.
:param mask_test: OFF | ON
"""
param = Conversions.value_to_quoted_str(mask_test)
response = self._core.io.query_str_with_opc(f'MTESt:EYEMask:MSKTop? {param}')
return Conversions.str_to_bool(response)