from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
from ....... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class NextCls:
"""
| Commands in total: 3
| Subgroups: 1
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("next", core, parent)
@property
def execute(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_execute'):
from .Execute import ExecuteCls
self._execute = ExecuteCls(self._core, self._cmd_group)
return self._execute
# noinspection PyTypeChecker
[docs]
def get_source(self) -> enums.ArbSegmNextSource:
"""
``[SOURce<HW>]:BB:ARBitrary:WSEGment:NEXT:SOURce`` \n
Snippet: ``value: enums.ArbSegmNextSource = driver.source.bb.arbitrary.wsegment.next.get_source()`` \n
Selects the next segment source.
:return: source: INTernal | NSEGM1 | INTernal | NSEGM1 | NSEGM2
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:ARBitrary:WSEGment:NEXT:SOURce?')
return Conversions.str_to_scalar_enum(response, enums.ArbSegmNextSource)
[docs]
def set_source(self, source: enums.ArbSegmNextSource) -> None:
"""
``[SOURce<HW>]:BB:ARBitrary:WSEGment:NEXT:SOURce`` \n
Snippet: ``driver.source.bb.arbitrary.wsegment.next.set_source(source = enums.ArbSegmNextSource.INTernal)`` \n
Selects the next segment source.
:param source: INTernal | NSEGM1 | INTernal | NSEGM1 | NSEGM2
"""
param = Conversions.enum_scalar_to_str(source, enums.ArbSegmNextSource)
self._core.io.write(f'SOURce<HwInstance>:BB:ARBitrary:WSEGment:NEXT:SOURce {param}')
[docs]
def get_value(self) -> int:
"""
``[SOURce<HW>]:BB:ARBitrary:WSEGment:NEXT`` \n
Snippet: ``value: int = driver.source.bb.arbitrary.wsegment.next.get_value()`` \n
Selects the segment to be output.
:return: next_py: integer Range: 0 to 1023
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:ARBitrary:WSEGment:NEXT?')
return Conversions.str_to_int(response)
[docs]
def set_value(self, next_py: int) -> None:
"""
``[SOURce<HW>]:BB:ARBitrary:WSEGment:NEXT`` \n
Snippet: ``driver.source.bb.arbitrary.wsegment.next.set_value(next_py = 1)`` \n
Selects the segment to be output.
:param next_py: integer Range: 0 to 1023
"""
param = Conversions.decimal_value_to_str(next_py)
self._core.io.write(f'SOURce<HwInstance>:BB:ARBitrary:WSEGment:NEXT {param}')
def clone(self) -> 'NextCls':
"""
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 = NextCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group