from ........Internal.Core import Core
from ........Internal.CommandsGroup import CommandsGroup
from ........Internal import Conversions
from ........ import enums
from ........ import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class DataCls:
"""Data commands group definition. 3 total commands, 2 Subgroups, 1 group commands"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("data", core, parent)
@property
def dselection(self):
"""dselection commands group. 0 Sub-classes, 1 commands."""
if not hasattr(self, '_dselection'):
from .Dselection import DselectionCls
self._dselection = DselectionCls(self._core, self._cmd_group)
return self._dselection
@property
def pattern(self):
"""pattern commands group. 0 Sub-classes, 1 commands."""
if not hasattr(self, '_pattern'):
from .Pattern import PatternCls
self._pattern = PatternCls(self._core, self._cmd_group)
return self._pattern
[docs] def set(self, data: enums.DataSourceA, terminal=repcap.Terminal.Default) -> None:
"""SCPI: [SOURce<HW>]:BB:EVDO:TERMinal<ST>:DCHannel:DATA \n
Snippet: driver.source.bb.evdo.terminal.dchannel.data.set(data = enums.DataSourceA.DLISt, terminal = repcap.Terminal.Default) \n
Selects the data source, e.g. a sequence of 0 or 1, a pseudo-random sequence with different length, a pattern or a data
list (DLISt) . \n
:param data: ZERO| ONE| PATTern| PN9| PN11| PN15| PN16| PN20| PN21| PN23| DLISt
:param terminal: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Terminal')
"""
param = Conversions.enum_scalar_to_str(data, enums.DataSourceA)
terminal_cmd_val = self._cmd_group.get_repcap_cmd_value(terminal, repcap.Terminal)
self._core.io.write(f'SOURce<HwInstance>:BB:EVDO:TERMinal{terminal_cmd_val}:DCHannel:DATA {param}')
# noinspection PyTypeChecker
[docs] def get(self, terminal=repcap.Terminal.Default) -> enums.DataSourceA:
"""SCPI: [SOURce<HW>]:BB:EVDO:TERMinal<ST>:DCHannel:DATA \n
Snippet: value: enums.DataSourceA = driver.source.bb.evdo.terminal.dchannel.data.get(terminal = repcap.Terminal.Default) \n
Selects the data source, e.g. a sequence of 0 or 1, a pseudo-random sequence with different length, a pattern or a data
list (DLISt) . \n
:param terminal: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Terminal')
:return: data: ZERO| ONE| PATTern| PN9| PN11| PN15| PN16| PN20| PN21| PN23| DLISt"""
terminal_cmd_val = self._cmd_group.get_repcap_cmd_value(terminal, repcap.Terminal)
response = self._core.io.query_str(f'SOURce<HwInstance>:BB:EVDO:TERMinal{terminal_cmd_val}:DCHannel:DATA?')
return Conversions.str_to_scalar_enum(response, enums.DataSourceA)
def clone(self) -> 'DataCls':
"""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 = DataCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group