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

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class BtoothCls:
	"""
	| Commands in total: 401
	| Subgroups: 21
	| Direct child commands: 18
	"""

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

	@property
	def ccrc(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_ccrc'):
			from .Ccrc import CcrcCls
			self._ccrc = CcrcCls(self._core, self._cmd_group)
		return self._ccrc

	@property
	def clipping(self):
		"""
		| Commands in total: 3
		| Subgroups: 0
		| Direct child commands: 3
		"""
		if not hasattr(self, '_clipping'):
			from .Clipping import ClippingCls
			self._clipping = ClippingCls(self._core, self._cmd_group)
		return self._clipping

	@property
	def clock(self):
		"""
		| Commands in total: 3
		| Subgroups: 0
		| Direct child commands: 3
		"""
		if not hasattr(self, '_clock'):
			from .Clock import ClockCls
			self._clock = ClockCls(self._core, self._cmd_group)
		return self._clock

	@property
	def cs(self):
		"""
		| Commands in total: 114
		| Subgroups: 3
		| Direct child commands: 20
		"""
		if not hasattr(self, '_cs'):
			from .Cs import CsCls
			self._cs = CsCls(self._core, self._cmd_group)
		return self._cs

	@property
	def dtTest(self):
		"""
		| Commands in total: 18
		| Subgroups: 3
		| Direct child commands: 7
		"""
		if not hasattr(self, '_dtTest'):
			from .DtTest import DtTestCls
			self._dtTest = DtTestCls(self._core, self._cmd_group)
		return self._dtTest

	@property
	def econfig(self):
		"""
		| Commands in total: 2
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_econfig'):
			from .Econfig import EconfigCls
			self._econfig = EconfigCls(self._core, self._cmd_group)
		return self._econfig

	@property
	def econfiguration(self):
		"""
		| Commands in total: 151
		| Subgroups: 3
		| Direct child commands: 12
		"""
		if not hasattr(self, '_econfiguration'):
			from .Econfiguration import EconfigurationCls
			self._econfiguration = EconfigurationCls(self._core, self._cmd_group)
		return self._econfiguration

	@property
	def filterPy(self):
		"""
		| Commands in total: 16
		| Subgroups: 3
		| Direct child commands: 4
		"""
		if not hasattr(self, '_filterPy'):
			from .FilterPy import FilterPyCls
			self._filterPy = FilterPyCls(self._core, self._cmd_group)
		return self._filterPy

	@property
	def hdr(self):
		"""
		| Commands in total: 2
		| Subgroups: 1
		| Direct child commands: 1
		"""
		if not hasattr(self, '_hdr'):
			from .Hdr import HdrCls
			self._hdr = HdrCls(self._core, self._cmd_group)
		return self._hdr

	@property
	def hr(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_hr'):
			from .Hr import HrCls
			self._hr = HrCls(self._core, self._cmd_group)
		return self._hr

	@property
	def mhdt(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_mhdt'):
			from .Mhdt import MhdtCls
			self._mhdt = MhdtCls(self._core, self._cmd_group)
		return self._mhdt

	@property
	def msettings(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_msettings'):
			from .Msettings import MsettingsCls
			self._msettings = MsettingsCls(self._core, self._cmd_group)
		return self._msettings

	@property
	def pconfiguration(self):
		"""
		| Commands in total: 25
		| Subgroups: 1
		| Direct child commands: 20
		"""
		if not hasattr(self, '_pconfiguration'):
			from .Pconfiguration import PconfigurationCls
			self._pconfiguration = PconfigurationCls(self._core, self._cmd_group)
		return self._pconfiguration

	@property
	def phymacCfg(self):
		"""
		| Commands in total: 7
		| Subgroups: 0
		| Direct child commands: 7
		"""
		if not hasattr(self, '_phymacCfg'):
			from .PhymacCfg import PhymacCfgCls
			self._phymacCfg = PhymacCfgCls(self._core, self._cmd_group)
		return self._phymacCfg

	@property
	def pramping(self):
		"""
		| Commands in total: 4
		| Subgroups: 0
		| Direct child commands: 4
		"""
		if not hasattr(self, '_pramping'):
			from .Pramping import PrampingCls
			self._pramping = PrampingCls(self._core, self._cmd_group)
		return self._pramping

	@property
	def qhs(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_qhs'):
			from .Qhs import QhsCls
			self._qhs = QhsCls(self._core, self._cmd_group)
		return self._qhs

	@property
	def setting(self):
		"""
		| Commands in total: 5
		| Subgroups: 1
		| Direct child commands: 3
		"""
		if not hasattr(self, '_setting'):
			from .Setting import SettingCls
			self._setting = SettingCls(self._core, self._cmd_group)
		return self._setting

	@property
	def symbolRate(self):
		"""
		| Commands in total: 2
		| Subgroups: 1
		| Direct child commands: 1
		"""
		if not hasattr(self, '_symbolRate'):
			from .SymbolRate import SymbolRateCls
			self._symbolRate = SymbolRateCls(self._core, self._cmd_group)
		return self._symbolRate

	@property
	def trigger(self):
		"""
		| Commands in total: 24
		| Subgroups: 6
		| Direct child commands: 5
		"""
		if not hasattr(self, '_trigger'):
			from .Trigger import TriggerCls
			self._trigger = TriggerCls(self._core, self._cmd_group)
		return self._trigger

	@property
	def unit(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_unit'):
			from .Unit import UnitCls
			self._unit = UnitCls(self._core, self._cmd_group)
		return self._unit

	@property
	def waveform(self):
		"""
		| Commands in total: 1
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_waveform'):
			from .Waveform import WaveformCls
			self._waveform = WaveformCls(self._core, self._cmd_group)
		return self._waveform

	# noinspection PyTypeChecker
[docs] def get_bc_role(self) -> enums.BtoCtrlRol: """ ``[SOURce<HW>]:BB:BTOoth:BCRole`` \n Snippet: ``value: enums.BtoCtrlRol = driver.source.bb.btooth.get_bc_role()`` \n Sets the Bluetooth controller role. Depending on the selected channel type different roles are assigned to the controller. For channel type 'Data', you can assign Central or Peripheral. If the channel type is 'Advertising', the parameter is read only and displayed directly above the graph. :return: bc_role: CENTral | PERipheral | ADVertiser | SCANner | INITiator CENTral Selects Central as controller role. PERipheral Selects Peripheral as controller role. ADVertiser | SCANner | INITiator Assigned roles depending on the selected packet type of the respective channel type. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:BCRole?') return Conversions.str_to_scalar_enum(response, enums.BtoCtrlRol)
[docs] def get_bc_text(self) -> str: """ ``[SOURce<HW>]:BB:BTOoth:BCText`` \n Snippet: ``value: str = driver.source.bb.btooth.get_bc_text()`` \n Queries the state and controller role. :return: bc_text: string Connected (only data channel type) Advertiser (only advertising channel type) ADV_IND, ADV_DIRECT_IND, ADV_NONCONN_IND, ADV_SCAN_IND Within R&S SMW-K117 also ADV_EXT_IND, AUX_ADV_IND, AUX_SYNC_IND, AUX_CHAIN_IND Scanner (only advertising channel type) SCAN_REQ, SCAN_RSP Within R&S SMW-K117 also AUX_SCAN_REQ, AUX_SCAN_RSP Initiator (only advertising channel type) CONNECT_IND Within R&S SMW-K117 also AUX_CONNECT_REQ, AUX_CONNECT_RSP """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:BCText?') return trim_str_response(response)
# noinspection PyTypeChecker
[docs] def get_bmode(self) -> enums.BtoMode: """ ``[SOURce<HW>]:BB:BTOoth:BMODe`` \n Snippet: ``value: enums.BtoMode = driver.source.bb.btooth.get_bmode()`` \n Sets the Bluetooth mode. :return: bmode: BASic | BLENergy BASic Sets basic rate (BR) or enhanced data rate (EDR) Bluetooth mode. BLENergy Sets low energy (LE) Bluetooth mode. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:BMODe?') return Conversions.str_to_scalar_enum(response, enums.BtoMode)
# noinspection PyTypeChecker
[docs] def get_ctype(self) -> enums.BtoChnnelType: """ ``[SOURce<HW>]:BB:BTOoth:CTYPe`` \n Snippet: ``value: enums.BtoChnnelType = driver.source.bb.btooth.get_ctype()`` \n Determines the channel type. Advertising and data are available. :return: ctype: ADVertising | DATA | | CS ADVertising Selects channel type advertising. DATA Selects channel type data. Devices in a connected state transmit data channel packets in connection events with a start point and an interval. CS Requires R&S SMW-K178. Selects channel type channel sounding. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:CTYPe?') return Conversions.str_to_scalar_enum(response, enums.BtoChnnelType)
# noinspection PyTypeChecker
[docs] def get_dcycle(self) -> enums.LowHigh: """ ``[SOURce<HW>]:BB:BTOoth:DCYCle`` \n Snippet: ``value: enums.LowHigh = driver.source.bb.btooth.get_dcycle()`` \n Specifies duty cycle for directed advertising (packet type ADV_DIRECT_IND) . :return: dcycle: LOW | HIGH """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:DCYCle?') return Conversions.str_to_scalar_enum(response, enums.LowHigh)
[docs] def get_duration(self) -> float: """ ``[SOURce<HW>]:BB:BTOoth:DURation`` \n Snippet: ``value: float = driver.source.bb.btooth.get_duration()`` \n Sets the transmission duration for continuous payload transmission. This transmission requires a CONTINUOUS packet: SOURce1:BB:BTOoth:UPTYpe CONT Command sets the values in ms. Query returns values in s. The duration range, increment and default value depend on the modulation format, symbols per a bit and payload type. For more information, refer to the specifications document. :return: duration: float Range: depends on settings , Unit: ms """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:DURation?') return Conversions.str_to_float(response)
# noinspection PyTypeChecker
[docs] def get_hdrp_phy(self) -> enums.BtoHdrpPhy: """ ``[SOURce<HW>]:BB:BTOoth:HDRPphy`` \n Snippet: ``value: enums.BtoHdrpPhy = driver.source.bb.btooth.get_hdrp_phy()`` \n No help available """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:HDRPphy?') return Conversions.str_to_scalar_enum(response, enums.BtoHdrpPhy)
# noinspection PyTypeChecker
[docs] def get_mformat(self) -> enums.PackFormat: """ ``[SOURce<HW>]:BB:BTOoth:MFORmat`` \n Snippet: ``value: enums.PackFormat = driver.source.bb.btooth.get_mformat()`` \n Sets the LE PHY for continuous payload transmission. This transmission requires a CONTINUOUS packet: SOURce1:BB:BTOoth:UPTYpe CONT :return: mod_fmt: L1M | L2M | LCOD L1M: LE 1M L2M: LE 2M LCOD: LE coded See also method ``RsSmw.source.bb.btooth.pformat()`` . """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:MFORmat?') return Conversions.str_to_scalar_enum(response, enums.PackFormat)
# noinspection PyTypeChecker
[docs] def get_pformat(self) -> enums.BtoPackFormat: """ ``[SOURce<HW>]:BB:BTOoth:PFORmat`` \n Snippet: ``value: enums.BtoPackFormat = driver.source.bb.btooth.get_pformat()`` \n Selects the packet format that is the format according to the physical layer (PHY) that supports the packet type or PDU type. :return: pformat: L1M | L2M | LCOD | L2M2B L1M LE uncoded PHY with 1 Msymbol/s modulation. L2M LE uncoded PHY with 2 Msymbol/s modulation and bandwidth time product BT = 0.5. LCOD LE coded PHY with 1 Msymbol/s modulation. L2M2B LE uncoded PHY with 2 Msymbol/s modulation and bandwidth time product BT = 2. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:PFORmat?') return Conversions.str_to_scalar_enum(response, enums.BtoPackFormat)
[docs] def preset(self) -> None: """ ``[SOURce<HW>]:BB:BTOoth:PRESet`` \n Snippet: ``driver.source.bb.btooth.preset()`` \n Sets the parameters of the digital standard to their default values (``*RST`` values specified for the commands) . Not affected is the state set with the command SOURce<hw>:BB:BTOoth:STATe. """ self._core.io.write(f'SOURce<HwInstance>:BB:BTOoth:PRESet')
[docs] def preset_with_opc(self, opc_timeout_ms: int = -1) -> None: """ ``[SOURce<HW>]:BB:BTOoth:PRESet`` \n Snippet: ``driver.source.bb.btooth.preset_with_opc()`` \n Sets the parameters of the digital standard to their default values (``*RST`` values specified for the commands) . Not affected is the state set with the command SOURce<hw>:BB:BTOoth:STATe. Same as preset, but waits for the operation to complete before continuing further. Use the RsSmw.utilities.opc_timeout_set() to set the timeout value. :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call. """ self._core.io.write_with_opc(f'SOURce<HwInstance>:BB:BTOoth:PRESet', opc_timeout_ms)
# noinspection PyTypeChecker
[docs] def get_ptype(self) -> enums.BtoPckType: """ ``[SOURce<HW>]:BB:BTOoth:PTYPe`` \n Snippet: ``value: enums.BtoPckType = driver.source.bb.btooth.get_ptype()`` \n The available packets depend on the selected transport mode. All packet types as defined in the Bluetooth specifications are supported. :return: ptype: ID | NULL | POLL | FHS | DM1 | DH1 | DM3 | DH3 | DM5 | DH5 | AUX1 | ADH1 | ADH3 | ADH5 | AEDH1 | AEDH3 | AEDH5 | HV1 | HV2 | HV3 | DV | EV3 | EV4 | EV5 | EEV3 | EEV5 | EEEV3 | EEEV5 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:PTYPe?') return Conversions.str_to_scalar_enum(response, enums.BtoPckType)
[docs] def get_slength(self) -> int: """ ``[SOURce<HW>]:BB:BTOoth:SLENgth`` \n Snippet: ``value: int = driver.source.bb.btooth.get_slength()`` \n Sets the sequence length of the Bluetooth signal in number of frames. This signal is calculated in advance and output in the arbitrary waveform generator. :return: slength: integer Range: depends on the number of states in dirty transmitter test to dynamic """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:SLENgth?') return Conversions.str_to_int(response)
[docs] def get_state(self) -> bool: """ ``[SOURce<HW>]:BB:BTOoth:STATe`` \n Snippet: ``value: bool = driver.source.bb.btooth.get_state()`` \n Activates the standard and deactivates all the other digital standards and digital modulation modes in the same path. :return: state: 1 | ON | 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:STATe?') return Conversions.str_to_bool(response)
# noinspection PyTypeChecker
[docs] def get_stiming(self) -> enums.BtoSlotTiming: """ ``[SOURce<HW>]:BB:BTOoth:STIMing`` \n Snippet: ``value: enums.BtoSlotTiming = driver.source.bb.btooth.get_stiming()`` \n Selects the Rx slot timing mode. :return: slot_timing: TX | LOOPback """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:STIMing?') return Conversions.str_to_scalar_enum(response, enums.BtoSlotTiming)
# noinspection PyTypeChecker
[docs] def get_tmode(self) -> enums.BtoTranMode: """ ``[SOURce<HW>]:BB:BTOoth:TMODe`` \n Snippet: ``value: enums.BtoTranMode = driver.source.bb.btooth.get_tmode()`` \n Selects the transport mode. :return: tmode: ACL | SCO | ESCO ACL Asynchronous connection-less (ACL) mode used for a point-to-point multipoint link between a Central and all Peripherals. SCO Synchronous connection-oriented (SCO) mode used for a point-to-point link between a Central and a specific Peripheral. ESCO Enhanced SCO mode used for a symmetric or asymmetric point-to-point link between a Central and a specific Peripheral. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:TMODe?') return Conversions.str_to_scalar_enum(response, enums.BtoTranMode)
# noinspection PyTypeChecker
[docs] def get_up_type(self) -> enums.BtoUlpPckType: """ ``[SOURce<HW>]:BB:BTOoth:UPTYpe`` \n Snippet: ``value: enums.BtoUlpPckType = driver.source.bb.btooth.get_up_type()`` \n Selects the packet type. The available packets depend on the selected channel type and installed options. The tables below provide an overview. R&S SMW-K60 packet/PDU types <UpType> / Packet/PDU type \n - AIND ADINd ANINd SREQ SRSP CREQ ADCind DATA CUReq CMReq TIND EREQ / ADV_IND ADV_DIRECT_IND ADV_NONCONN_IND SCAN_REQ SCAN_RSP CONNECT_IND ADV_SCAN_IND DATA LL_CONNECTION_UPDATE_IND LL_CHANNEL_MAP_IND LL_TERMINATE_IND LL_ENC_REQ - ERSP SEReq SERSp URSP FREQ FRSP TPACket PEReq PERSp VIND RIND / LL_ENC_RSP LL_START_ENC_REQ LL_START_ENC_RSP LL_UNKNONW_RSP LL_FEATURE_REQ LL_FEATURE_RSP TEST PACKET LL_PAUSE_ENC_REQ LL_PAUSE_ENC_RSP LL_VERSION_IND LL_REJECT_IND R&S SMW-K117 packet/PDU types <UpType> / Packet/PDU type \n - PREQ PRSP PUIN LREQ LRSP SFR CPR CPRS REIN PIR PIRS AEINd AAINd / LL_PHY_REQ LL_PHY_RSP LL_PHY_UPDATE_IND LL_LENGTH_REQ LL_LENGTH_RSP LL_PERIPHERAL_FEATURE_REQ LL_CONNECTION_PARAM_REQ LL_CONNECTION_PARAM_RSP LL_REJECT_EXT_IND LL_PING_REQ LL_PING_RSP ADV_EXT_IND AUX_ADV_IND - ACINd ASINd ASReq ASPSp ACRSp ACReq MUCH CONT CTEQ CTEP PSIND CAReq CARSp / AUX_CHAIN_IND AUX_SYNC_IND AUX_SCAN_REQ AUX_SCAN_RSP AUX_CONNECT_RSP AUX_CONNECT_REQ LL_MIN_USED_CHANNELS_IND CONTINUOUS LL_CTE_REQ LL_CTE_RSP LL_PERIODIC_SYNC LL_CLOCK_ACCURACY_REQ LL_CLOCK_ACCURACY_RSP R&S SMW-K178 packet/PDU types <UpType> / Packet/PDU type \n - CSSEq CSRQ CSRP CCRQ CCRP COREQ CORSP / CS_SEQUENCE LL_CS_SEC_REQ LL_CS_SEC_RSP LL_CS_CAPABILITIES_REQ LL_CS_CAPABILITIES_RSP LL_CS_CONFIG_REQ LL_CS_CONFIG_RSP - CSREQ CSRSP CSIND CTI CFRQ CFRP CCMI / LL_CS_REQ LL_CS_RSP LL_CS_IND LL_CS_TERMINATE_IND LL_CS_FAE_REQ LL_CS_FAE_RSP LL_CS_CHANNEL_MAP_IND For more information, refer to the specifications document. :return: up_type: AIND | ADINd | ANINd | SREQ | SRSP | CREQ | ADCind | DATA | CUReq | CMReq | TIND | EREQ | ERSP | SEReq | SERSp | URSP | FREQ | FRSP | TPACket | PEReq | PERSp | VIND | RIND | PREQ | PRSP | PUIN | LREQ | LRSP | SFR | CPR | CPRS | REIN | PIR | PIRS | AEINd | AAINd | ACINd | ASINd | ASReq | ASPSp | ACRSp | ACReq | MUCH | CONT | CTEQ | CTEP | PSINd | CAReq | CARSp | CSSEQ | CSRQ | CSRP | CCRQ | CCRP | COREQ | CORSP | CSREQ | CSRSP | CSIND | CTI | CFRQ | CFRP | CCMI """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:UPTYpe?') return Conversions.str_to_scalar_enum(response, enums.BtoUlpPckType)
[docs] def get_us_length(self) -> int: """ ``[SOURce<HW>]:BB:BTOoth:USLength`` \n Snippet: ``value: int = driver.source.bb.btooth.get_us_length()`` \n Selects the number of frames or events depending on the packet type. The signal repeats after the specified number of frames/events. For SCAN_REQ and CONNECT_IND packet, the sequence length is expressed in 'Frames'. For AUX_SCAN_REQ and AUX_CONNECT_REQ packet, the sequence length is expressed in 'Frames'. For LL_TERMINATE_IND packets, a default value according to the specification is given: Central: PeripheralLatency + 6 Peripheral: 6 For all other packet types the sequence length is expressed in 'Events'. :return: us_length: integer Range: depends on the number of states in dirty transmitter test to dynamic """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:USLength?') return Conversions.str_to_int(response)
[docs] def get_version(self) -> str: """ ``[SOURce<HW>]:BB:BTOoth:VERSion`` \n Snippet: ``value: str = driver.source.bb.btooth.get_version()`` \n Queries the version of the specification for Bluetooth wireless technology underlying the definitions. :return: version: string """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:VERSion?') return trim_str_response(response)
def clone(self) -> 'BtoothCls': """ 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 = BtoothCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group