from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
from .......Internal.Utilities import trim_str_response
from .......Internal.StructBase import StructBase
from .......Internal.ArgStruct import ArgStruct
from ....... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DataCls:
"""
| Commands in total: 3
| Subgroups: 0
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("data", core, parent)
# noinspection PyTypeChecker
[docs]
class DpatternStruct(StructBase):
"""
Structure for reading output parameters. Fields: \n
- Dpattern: str: numeric
- Bitcount: int: integer Range: 1 to 64
"""
__meta_args_list = [
ArgStruct.scalar_raw_str('Dpattern'),
ArgStruct.scalar_int('Bitcount')]
def __init__(self):
StructBase.__init__(self, self)
self.Dpattern: str=None
self.Bitcount: int=None
[docs]
def get_dpattern(self) -> DpatternStruct:
"""
``[SOURce<HW>]:BB:BTOoth:ECONfiguration:PCONfiguration:DATA:DPATtern`` \n
Snippet: ``value: DpatternStruct = driver.source.bb.btooth.econfiguration.pconfiguration.data.get_dpattern()`` \n
Specifies the user-defined pattern. The setting is relevant for method
``RsSmw.source.bb.btooth.econfiguration.pconfiguration.data.value()`` PATTern
:return: structure: for return value, see the help for DpatternStruct structure arguments.
"""
return self._core.io.query_struct('SOURce<HwInstance>:BB:BTOoth:ECONfiguration:PCONfiguration:DATA:DPATtern?', self.__class__.DpatternStruct())
[docs]
def get_dselection(self) -> str:
"""
``[SOURce<HW>]:BB:BTOoth:ECONfiguration:PCONfiguration:DATA:DSELection`` \n
Snippet: ``value: str = driver.source.bb.btooth.econfiguration.pconfiguration.data.get_dselection()`` \n
Selects a data list file from the default directory or from the specific directory.
Using data list (DLISt) data requires one of the following commands: \n
- BB:BTO:ECON:PCON:DATA DLISt See method ``RsSmw.source.bb.btooth.econfiguration.pconfiguration.data.value()`` .
- BB:BTO:DTT:TPC:UPS DLISt See method ``RsSmw.source.bb.btooth.dtTest.tpConfiguration.up_source()`` .
Refer to 'Accessing Files in the Default or Specified Directory' for general information on file handling in the default
and in a specific directory.
:return: dselection: string
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:ECONfiguration:PCONfiguration:DATA:DSELection?')
return trim_str_response(response)
# noinspection PyTypeChecker
[docs]
def get_value(self) -> enums.DataSourceB:
"""
``[SOURce<HW>]:BB:BTOoth:ECONfiguration:PCONfiguration:DATA`` \n
Snippet: ``value: enums.DataSourceB = driver.source.bb.btooth.econfiguration.pconfiguration.data.get_value()`` \n
Selects the pattern source used for the payload.
:return: data: ALL0 | ALL1 | PATTern | PN09 | PN11 | PN15 | PN16 | PN20 | PN21 | PN23 | DLISt ALL0 / ALL1 All 0 or all 1 pattern PATTern User-defined pattern. The pattern can be specified via: method ``RsSmw.source.bb.btooth.econfiguration.pconfiguration.data.dpattern()`` PNxx Pseudo-random bit sequences (PRBS) of a length of xx bits. The length in bit can be 9, 11, 15, 16, 20, 21, or 23. DLISt Internal data list is used. The data list can be specified via: method ``RsSmw.source.bb.btooth.econfiguration.pconfiguration.data.dselection()``
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:ECONfiguration:PCONfiguration:DATA?')
return Conversions.str_to_scalar_enum(response, enums.DataSourceB)