Source code for RsSmbv.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 set_drift(self, drift: bool) -> None: """ ``[SOURce<HW>]:BB:BTOoth:DTTest:DIRft`` \n Snippet: ``driver.source.bb.btooth.dtTest.set_drift(drift = False)`` \n No help available """ param = Conversions.bool_to_str(drift) self._core.io.write(f'SOURce<HwInstance>:BB:BTOoth:DTTest:DIRft {param}')
[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 set_dtt_state(self, dtt_state: bool) -> None: """ ``[SOURce<HW>]:BB:BTOoth:DTTest:DTTState`` \n Snippet: ``driver.source.bb.btooth.dtTest.set_dtt_state(dtt_state = False)`` \n Activates the 'Dirty Transmitter Test'. For EDR packets, the parameter sets apply for 20 packets each. :param dtt_state: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(dtt_state) self._core.io.write(f'SOURce<HwInstance>:BB:BTOoth:DTTest:DTTState {param}')
[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 set_fd_deviation(self, fd_deviation: int) -> None: """ ``[SOURce<HW>]:BB:BTOoth:DTTest:FDDeviation`` \n Snippet: ``driver.source.bb.btooth.dtTest.set_fd_deviation(fd_deviation = 1)`` \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. :param fd_deviation: integer Range: -100 to 100 """ param = Conversions.decimal_value_to_str(fd_deviation) self._core.io.write(f'SOURce<HwInstance>:BB:BTOoth:DTTest:FDDeviation {param}')
[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)
[docs] def set_fd_rate(self, fd_rate: float) -> None: """ ``[SOURce<HW>]:BB:BTOoth:DTTest:FDRate`` \n Snippet: ``driver.source.bb.btooth.dtTest.set_fd_rate(fd_rate = 1.0)`` \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. :param fd_rate: 0.3 KHz | 0.5 KHz | 1.6 KHz | 10 KHz Range: depends on packet type to depends on packet type """ param = Conversions.decimal_value_to_str(fd_rate) self._core.io.write(f'SOURce<HwInstance>:BB:BTOoth:DTTest:FDRate {param}')
# 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)
[docs] def set_mi_mode(self, mi_mode: enums.BtoModIdxMode) -> None: """ ``[SOURce<HW>]:BB:BTOoth:DTTest:MIMode`` \n Snippet: ``driver.source.bb.btooth.dtTest.set_mi_mode(mi_mode = enums.BtoModIdxMode.STABle)`` \n Determines standard or stable mode for the modulation index of dirty transmitter according to the Bluetooth core specification. :param mi_mode: STANdard | STABle """ param = Conversions.enum_scalar_to_str(mi_mode, enums.BtoModIdxMode) self._core.io.write(f'SOURce<HwInstance>:BB:BTOoth:DTTest:MIMode {param}')
# 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. Bluetooth mode / Channel type / Number of packets \n - BR + EDR / 50, 2, 1 packets - LE / Advertising, data / 50, 2, 1 packets :return: num_pack: NP50 | NP2 | NP1 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:DTTest:NPPSet?') return Conversions.str_to_scalar_enum(response, enums.BtoNumOfPackPerSet)
[docs] def set_nppset(self, num_pack: enums.BtoNumOfPackPerSet) -> None: """ ``[SOURce<HW>]:BB:BTOoth:DTTest:NPPSet`` \n Snippet: ``driver.source.bb.btooth.dtTest.set_nppset(num_pack = enums.BtoNumOfPackPerSet.NP1)`` \n Specifies the number of packets 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 :param num_pack: NP50 | NP2 | NP1 """ param = Conversions.enum_scalar_to_str(num_pack, enums.BtoNumOfPackPerSet) self._core.io.write(f'SOURce<HwInstance>:BB:BTOoth:DTTest:NPPSet {param}')
[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)
[docs] def set_sphase(self, sphase: int) -> None: """ ``[SOURce<HW>]:BB:BTOoth:DTTest:SPHase`` \n Snippet: ``driver.source.bb.btooth.dtTest.set_sphase(sphase = 1)`` \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. :param sphase: integer Range: 0 to 359, Unit: degree """ param = Conversions.decimal_value_to_str(sphase) self._core.io.write(f'SOURce<HwInstance>:BB:BTOoth:DTTest:SPHase {param}')
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