from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SegmentCls:
"""
| Commands in total: 18
| Subgroups: 7
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("segment", core, parent)
@property
def count(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_count'):
from .Count import CountCls
self._count = CountCls(self._core, self._cmd_group)
return self._count
@property
def insert(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_insert'):
from .Insert import InsertCls
self._insert = InsertCls(self._core, self._cmd_group)
return self._insert
@property
def region(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_region'):
from .Region import RegionCls
self._region = RegionCls(self._core, self._cmd_group)
return self._region
@property
def remove(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_remove'):
from .Remove import RemoveCls
self._remove = RemoveCls(self._core, self._cmd_group)
return self._remove
@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 point(self):
"""
| Commands in total: 6
| Subgroups: 6
| Direct child commands: 0
"""
if not hasattr(self, '_point'):
from .Point import PointCls
self._point = PointCls(self._core, self._cmd_group)
return self._point
@property
def rescale(self):
"""
| Commands in total: 5
| Subgroups: 5
| Direct child commands: 0
"""
if not hasattr(self, '_rescale'):
from .Rescale import RescaleCls
self._rescale = RescaleCls(self._core, self._cmd_group)
return self._rescale
[docs]
def set_add(self, mask_test_name: str) -> None:
"""
``MTESt:SEGMent:ADD`` \n
Snippet: ``driver.mtest.segment.set_add(mask_test_name = 'abc')`` \n
Creates a new segment in the mask definition.
: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:SEGMent:ADD {param}')
[docs]
def clear(self, mask_test_name: str) -> None:
"""
``MTESt:SEGMent:CLEar`` \n
Snippet: ``driver.mtest.segment.clear(mask_test_name = 'abc')`` \n
Deletes all mask segments of the indicated mask test.
: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:SEGMent:CLEar {param}')
def clone(self) -> 'SegmentCls':
"""
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 = SegmentCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group