Source code for RsSmbv.Implementations.Source.Bb.Nfc.Cblock.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. 4 total commands, 3 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 length(self): """length commands group. 0 Sub-classes, 1 commands.""" if not hasattr(self, '_length'): from .Length import LengthCls self._length = LengthCls(self._core, self._cmd_group) return self._length @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, commandBlock=repcap.CommandBlock.Default) -> None: """SCPI: [SOURce<HW>]:BB:NFC:CBLock<CH>:DATA \n Snippet: driver.source.bb.nfc.cblock.data.set(data = enums.DataSourceA.DLISt, commandBlock = repcap.CommandBlock.Default) \n Selects the data source type. \n :param data: ZERO| ONE| PATTern| PN9| PN11| PN15| PN16| PN20| PN21| PN23| DLISt :param commandBlock: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cblock') """ param = Conversions.enum_scalar_to_str(data, enums.DataSourceA) commandBlock_cmd_val = self._cmd_group.get_repcap_cmd_value(commandBlock, repcap.CommandBlock) self._core.io.write(f'SOURce<HwInstance>:BB:NFC:CBLock{commandBlock_cmd_val}:DATA {param}')
# noinspection PyTypeChecker
[docs] def get(self, commandBlock=repcap.CommandBlock.Default) -> enums.DataSourceA: """SCPI: [SOURce<HW>]:BB:NFC:CBLock<CH>:DATA \n Snippet: value: enums.DataSourceA = driver.source.bb.nfc.cblock.data.get(commandBlock = repcap.CommandBlock.Default) \n Selects the data source type. \n :param commandBlock: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cblock') :return: data: ZERO| ONE| PATTern| PN9| PN11| PN15| PN16| PN20| PN21| PN23| DLISt""" commandBlock_cmd_val = self._cmd_group.get_repcap_cmd_value(commandBlock, repcap.CommandBlock) response = self._core.io.query_str(f'SOURce<HwInstance>:BB:NFC:CBLock{commandBlock_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