from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class MtestCls:
"""
| Commands in total: 86
| Subgroups: 17
| Direct child commands: 6
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("mtest", core, parent)
@property
def condition(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_condition'):
from .Condition import ConditionCls
self._condition = ConditionCls(self._core, self._cmd_group)
return self._condition
@property
def source(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_source'):
from .Source import SourceCls
self._source = SourceCls(self._core, self._cmd_group)
return self._source
@property
def state(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_state'):
from .State import StateCls
self._state = StateCls(self._core, self._cmd_group)
return self._state
@property
def tolerance(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_tolerance'):
from .Tolerance import ToleranceCls
self._tolerance = ToleranceCls(self._core, self._cmd_group)
return self._tolerance
@property
def sbitNumber(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_sbitNumber'):
from .SbitNumber import SbitNumberCls
self._sbitNumber = SbitNumberCls(self._core, self._cmd_group)
return self._sbitNumber
@property
def ctype(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_ctype'):
from .Ctype import CtypeCls
self._ctype = CtypeCls(self._core, self._cmd_group)
return self._ctype
@property
def refWfm(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_refWfm'):
from .RefWfm import RefWfmCls
self._refWfm = RefWfmCls(self._core, self._cmd_group)
return self._refWfm
@property
def rename(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_rename'):
from .Rename import RenameCls
self._rename = RenameCls(self._core, self._cmd_group)
return self._rename
@property
def rst(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_rst'):
from .Rst import RstCls
self._rst = RstCls(self._core, self._cmd_group)
return self._rst
@property
def file(self):
"""
| Commands in total: 4
| Subgroups: 1
| Direct child commands: 3
"""
if not hasattr(self, '_file'):
from .File import FileCls
self._file = FileCls(self._core, self._cmd_group)
return self._file
@property
def highlight(self):
"""
| Commands in total: 3
| Subgroups: 0
| Direct child commands: 3
"""
if not hasattr(self, '_highlight'):
from .Highlight import HighlightCls
self._highlight = HighlightCls(self._core, self._cmd_group)
return self._highlight
@property
def color(self):
"""
| Commands in total: 4
| Subgroups: 0
| Direct child commands: 4
"""
if not hasattr(self, '_color'):
from .Color import ColorCls
self._color = ColorCls(self._core, self._cmd_group)
return self._color
@property
def onViolation(self):
"""
| Commands in total: 8
| Subgroups: 8
| Direct child commands: 0
"""
if not hasattr(self, '_onViolation'):
from .OnViolation import OnViolationCls
self._onViolation = OnViolationCls(self._core, self._cmd_group)
return self._onViolation
@property
def result(self):
"""
| Commands in total: 14
| Subgroups: 6
| Direct child commands: 0
"""
if not hasattr(self, '_result'):
from .Result import ResultCls
self._result = ResultCls(self._core, self._cmd_group)
return self._result
@property
def segment(self):
"""
| Commands in total: 18
| Subgroups: 7
| Direct child commands: 2
"""
if not hasattr(self, '_segment'):
from .Segment import SegmentCls
self._segment = SegmentCls(self._core, self._cmd_group)
return self._segment
@property
def eyeMask(self):
"""
| Commands in total: 16
| Subgroups: 16
| Direct child commands: 0
"""
if not hasattr(self, '_eyeMask'):
from .EyeMask import EyeMaskCls
self._eyeMask = EyeMaskCls(self._core, self._cmd_group)
return self._eyeMask
@property
def wfmRescale(self):
"""
| Commands in total: 4
| Subgroups: 4
| Direct child commands: 0
"""
if not hasattr(self, '_wfmRescale'):
from .WfmRescale import WfmRescaleCls
self._wfmRescale = WfmRescaleCls(self._core, self._cmd_group)
return self._wfmRescale
[docs]
def set_add(self, mask_test_name: str) -> None:
"""
``MTESt:ADD`` \n
Snippet: ``driver.mtest.set_add(mask_test_name = 'abc')`` \n
Creates a new mask test definition with the specified name.
:param mask_test_name: String with the name of the mask test
"""
param = Conversions.value_to_quoted_str(mask_test_name)
self._core.io.write_with_opc(f'MTESt:ADD {param}')
[docs]
def get_show(self) -> bool:
"""
``MTESt:SHOW`` \n
Snippet: ``value: bool = driver.mtest.get_show()`` \n
Switches the display of all mask segments on or off.
:return: state: OFF | ON
"""
response = self._core.io.query_str_with_opc('MTESt:SHOW?')
return Conversions.str_to_bool(response)
[docs]
def set_show(self, state: bool) -> None:
"""
``MTESt:SHOW`` \n
Snippet: ``driver.mtest.set_show(state = False)`` \n
Switches the display of all mask segments on or off.
:param state: OFF | ON
"""
param = Conversions.bool_to_str(state)
self._core.io.write_with_opc(f'MTESt:SHOW {param}')
[docs]
def get_label(self) -> bool:
"""
``MTESt:LABel`` \n
Snippet: ``value: bool = driver.mtest.get_label()`` \n
Switches the display of the mask test name on or off. To change the name of the mask test, use method
``RsRtx.mtest.rename.set()`` .
:return: label_state: OFF | ON
"""
response = self._core.io.query_str_with_opc('MTESt:LABel?')
return Conversions.str_to_bool(response)
[docs]
def set_label(self, label_state: bool) -> None:
"""
``MTESt:LABel`` \n
Snippet: ``driver.mtest.set_label(label_state = False)`` \n
Switches the display of the mask test name on or off. To change the name of the mask test, use method
``RsRtx.mtest.rename.set()`` .
:param label_state: OFF | ON
"""
param = Conversions.bool_to_str(label_state)
self._core.io.write_with_opc(f'MTESt:LABel {param}')
[docs]
def set_remove(self, mask_test_name: str) -> None:
"""
``MTESt:REMove`` \n
Snippet: ``driver.mtest.set_remove(mask_test_name = 'abc')`` \n
Deletes the mask test definition with the specified name.
:param mask_test_name: String with the name of the mask test
"""
param = Conversions.value_to_quoted_str(mask_test_name)
self._core.io.write_with_opc(f'MTESt:REMove {param}')
[docs]
def set_wfml_update(self, mask_test: str) -> None:
"""
``MTESt:WFMLupdate`` \n
Snippet: ``driver.mtest.set_wfml_update(mask_test = 'abc')`` \n
Creates the upper and lower mask limit from the envelope of the selected reference waveform. If the reference waveform
was not defined before, it is created automatically from the mask test source waveform which is set wtih method
``RsRtx.mtest.source.set()`` .
:param mask_test: String containing the name of the mask test
"""
param = Conversions.value_to_quoted_str(mask_test)
self._core.io.write_with_opc(f'MTESt:WFMLupdate {param}')
[docs]
def set_ce_mask(self, mask_test: str) -> None:
"""
``MTESt:CEMask`` \n
Snippet: ``driver.mtest.set_ce_mask(mask_test = 'abc')`` \n
Converts the test and mask definitions of the current mask test to a new mask test of type 'User'.
:param mask_test: String with the name of the mask test
"""
param = Conversions.value_to_quoted_str(mask_test)
self._core.io.write_with_opc(f'MTESt:CEMask {param}')
def clone(self) -> 'MtestCls':
"""
Clones the group by creating new object from it and its whole existing subgroups.
Also copies all the existing default Repeated Capabilities setting,
which you can change independently without affecting the original group.
"""
new_group = MtestCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group