Source code for RsSmw.Implementations.Source.Bb.Evdo.Terminal.Dchannel.Packet.Data

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, packet=repcap.Packet.Default) -> None: """SCPI: [SOURce<HW>]:BB:EVDO:TERMinal<ST>:DCHannel:PACKet<CH>:DATA \n Snippet: driver.source.bb.evdo.terminal.dchannel.packet.data.set(data = enums.DataSourceA.DLISt, terminal = repcap.Terminal.Default, packet = repcap.Packet.Default) \n Selects the data source of an access terminal working in traffic mode \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 packet: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Packet') """ param = Conversions.enum_scalar_to_str(data, enums.DataSourceA) terminal_cmd_val = self._cmd_group.get_repcap_cmd_value(terminal, repcap.Terminal) packet_cmd_val = self._cmd_group.get_repcap_cmd_value(packet, repcap.Packet) self._core.io.write(f'SOURce<HwInstance>:BB:EVDO:TERMinal{terminal_cmd_val}:DCHannel:PACKet{packet_cmd_val}:DATA {param}')
# noinspection PyTypeChecker
[docs] def get(self, terminal=repcap.Terminal.Default, packet=repcap.Packet.Default) -> enums.DataSourceA: """SCPI: [SOURce<HW>]:BB:EVDO:TERMinal<ST>:DCHannel:PACKet<CH>:DATA \n Snippet: value: enums.DataSourceA = driver.source.bb.evdo.terminal.dchannel.packet.data.get(terminal = repcap.Terminal.Default, packet = repcap.Packet.Default) \n Selects the data source of an access terminal working in traffic mode \n :param terminal: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Terminal') :param packet: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Packet') :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) packet_cmd_val = self._cmd_group.get_repcap_cmd_value(packet, repcap.Packet) response = self._core.io.query_str(f'SOURce<HwInstance>:BB:EVDO:TERMinal{terminal_cmd_val}:DCHannel:PACKet{packet_cmd_val}: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