from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class TpConfigurationCls:
"""
| Commands in total: 3
| Subgroups: 0
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("tpConfiguration", core, parent)
[docs]
def get_tp_interval(self) -> float:
"""
``[SOURce<HW>]:BB:BTOoth:DTTest:TPConfiguration:TPINterval`` \n
Snippet: ``value: float = driver.source.bb.btooth.dtTest.tpConfiguration.get_tp_interval()`` \n
Sets the time interval between two consecutive test packets, regarding the starting points. Command sets the values in ms.
Query returns values in s.
:return: tp_interval: float Range: 0.625E-3 s to 27.5E-3 s - depends on packet characteristics , Unit: ms
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:DTTest:TPConfiguration:TPINterval?')
return Conversions.str_to_float(response)
[docs]
def get_up_length(self) -> int:
"""
``[SOURce<HW>]:BB:BTOoth:DTTest:TPConfiguration:UPLength`` \n
Snippet: ``value: int = driver.source.bb.btooth.dtTest.tpConfiguration.get_up_length()`` \n
Sets the payload length.
:return: up_length: integer Range: 0 to 255
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:DTTest:TPConfiguration:UPLength?')
return Conversions.str_to_int(response)
# noinspection PyTypeChecker
[docs]
def get_up_source(self) -> enums.BtoPyLdSour:
"""
``[SOURce<HW>]:BB:BTOoth:DTTest:TPConfiguration:UPSource`` \n
Snippet: ``value: enums.BtoPyLdSour = driver.source.bb.btooth.dtTest.tpConfiguration.get_up_source()`` \n
Selects the data source used for the payload test packets.
:return: up_source: PN09 | PAT1 | PAT2 | PN15 | PAT3 | PAT4 | PAT5 | PAT6 | DLIS PN9 | PN15 Pseudo random bit sequences (PRBS) with length in bits. The length can be 9 bits or 15 bits. PAT1 Predefined pattern: 11110000 PAT2 Predefined pattern: 10101010 PAT3 Predefined pattern: 11111111 PAT4 Predefined pattern: 00000000 PAT5 Predefined pattern: 00001111 PAT6 Predefined pattern: 01010101 DLISt Binary data from data lists as a data source. Set the data list file via the following command: method ``RsSmw.source.bb.btooth.econfiguration.pconfiguration.data.dselection()``
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:DTTest:TPConfiguration:UPSource?')
return Conversions.str_to_scalar_enum(response, enums.BtoPyLdSour)