Source code for RsSmw.Implementations.Source.Bb.Btooth.DtTest

from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DtTestCls:
	"""
	| Commands in total: 18
	| Subgroups: 3
	| Direct child commands: 7
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("dtTest", core, parent)

	@property
	def stDefault(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_stDefault'):
			from .StDefault import StDefaultCls
			self._stDefault = StDefaultCls(self._core, self._cmd_group)
		return self._stDefault

	@property
	def table(self):
		"""
		| Commands in total: 7
		| Subgroups: 2
		| Direct child commands: 0
		"""
		if not hasattr(self, '_table'):
			from .Table import TableCls
			self._table = TableCls(self._core, self._cmd_group)
		return self._table

	@property
	def tpConfiguration(self):
		"""
		| Commands in total: 3
		| Subgroups: 0
		| Direct child commands: 3
		"""
		if not hasattr(self, '_tpConfiguration'):
			from .TpConfiguration import TpConfigurationCls
			self._tpConfiguration = TpConfigurationCls(self._core, self._cmd_group)
		return self._tpConfiguration

[docs] def get_drift(self) -> bool: """ ``[SOURce<HW>]:BB:BTOoth:DTTest:DIRft`` \n Snippet: ``value: bool = driver.source.bb.btooth.dtTest.get_drift()`` \n No help available """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:DTTest:DIRft?') return Conversions.str_to_bool(response)
[docs] def get_dtt_state(self) -> bool: """ ``[SOURce<HW>]:BB:BTOoth:DTTest:DTTState`` \n Snippet: ``value: bool = driver.source.bb.btooth.dtTest.get_dtt_state()`` \n Activates the 'Dirty Transmitter Test'. For EDR packets, the parameter sets apply for 20 packets each. :return: dtt_state: 1 | ON | 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:DTTest:DTTState?') return Conversions.str_to_bool(response)
[docs] def get_fd_deviation(self) -> int: """ ``[SOURce<HW>]:BB:BTOoth:DTTest:FDDeviation`` \n Snippet: ``value: int = driver.source.bb.btooth.dtTest.get_fd_deviation()`` \n Sets a frequency drift rate. A sine wave is used to drift the modulated Bluetooth signal around center frequency + carrier frequency offset. The maximum deviation reached during the drift equals the set frequency drift deviation. :return: fd_deviation: integer Range: -100 to 100 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:DTTest:FDDeviation?') return Conversions.str_to_int(response)
[docs] def get_fd_rate(self) -> float: """ ``[SOURce<HW>]:BB:BTOoth:DTTest:FDRate`` \n Snippet: ``value: float = driver.source.bb.btooth.dtTest.get_fd_rate()`` \n Sets a frequency drift rate. A sine wave is used to drift the modulated Bluetooth signal around center frequency + carrier frequency offset with the set frequency drift rate. :return: fd_rate: 0.3 KHz | 0.5 KHz | 1.6 KHz | 10 KHz Range: depends on packet type to depends on packet type """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:DTTest:FDRate?') return Conversions.str_to_float(response)
# noinspection PyTypeChecker
[docs] def get_mi_mode(self) -> enums.BtoModIdxMode: """ ``[SOURce<HW>]:BB:BTOoth:DTTest:MIMode`` \n Snippet: ``value: enums.BtoModIdxMode = driver.source.bb.btooth.dtTest.get_mi_mode()`` \n Determines standard or stable mode for the modulation index of dirty transmitter according to the Bluetooth core specification. :return: mi_mode: STANdard | STABle """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:DTTest:MIMode?') return Conversions.str_to_scalar_enum(response, enums.BtoModIdxMode)
# noinspection PyTypeChecker
[docs] def get_nppset(self) -> enums.BtoNumOfPackPerSet: """ ``[SOURce<HW>]:BB:BTOoth:DTTest:NPPSet`` \n Snippet: ``value: enums.BtoNumOfPackPerSet = driver.source.bb.btooth.dtTest.get_nppset()`` \n Specifies the number of packets per dirty transmitter set. Specifies the number of packets or CS steps per dirty transmitter set. Bluetooth mode / Channel type / Number of packets \n - BR + EDR / 50, 2, 1 packets - LE / Advertising, data / 50, 2, 1 packets - LE / Channel sounding / 50, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 1 CS steps :return: num_pack: NP50 | NP2 | NP1 | NP4 | NP6 | NP8 | NP10 | NP12 | NP14 | NP16 | NP18 | NP20 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:DTTest:NPPSet?') return Conversions.str_to_scalar_enum(response, enums.BtoNumOfPackPerSet)
[docs] def get_sphase(self) -> int: """ ``[SOURce<HW>]:BB:BTOoth:DTTest:SPHase`` \n Snippet: ``value: int = driver.source.bb.btooth.dtTest.get_sphase()`` \n The command enters a start phase. The start phase applies to the sine wave that is used to drift the modulated Bluetooth signal. The drift is around the center frequency plus the carrier frequency offset. :return: sphase: integer Range: 0 to 359, Unit: degree """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:DTTest:SPHase?') return Conversions.str_to_int(response)
def clone(self) -> 'DtTestCls': """ 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 = DtTestCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group