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

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 EconfigurationCls:
	"""
	| Commands in total: 151
	| Subgroups: 3
	| Direct child commands: 12
	"""

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

	@property
	def actable(self):
		"""
		| Commands in total: 8
		| Subgroups: 2
		| Direct child commands: 0
		"""
		if not hasattr(self, '_actable'):
			from .Actable import ActableCls
			self._actable = ActableCls(self._core, self._cmd_group)
		return self._actable

	@property
	def dcTable(self):
		"""
		| Commands in total: 8
		| Subgroups: 2
		| Direct child commands: 0
		"""
		if not hasattr(self, '_dcTable'):
			from .DcTable import DcTableCls
			self._dcTable = DcTableCls(self._core, self._cmd_group)
		return self._dcTable

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

[docs] def get_ad_interval(self) -> float: """ ``[SOURce<HW>]:BB:BTOoth:ECONfiguration:ADINterval`` \n Snippet: ``value: float = driver.source.bb.btooth.econfiguration.get_ad_interval()`` \n Sets the time interval between two consecutive advertising events for packet type 'ADV_DIRECT_IND' and duty cycle high. Command sets the values in ms. Query returns values in s. :return: ad_interval: float Range: 1.05E-3 s to 3.75E-3 s , Unit: ms """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:ECONfiguration:ADINterval?') return Conversions.str_to_float(response)
[docs] def get_ae_delay(self) -> float: """ ``[SOURce<HW>]:BB:BTOoth:ECONfiguration:AEDelay`` \n Snippet: ``value: float = driver.source.bb.btooth.econfiguration.get_ae_delay()`` \n Sets a time delay between the start times of two consecutive advertising events. The value is added to the advertising event interval. Command sets the values in ms. Query returns values in s. :return: ae_delay: float Range: 0 s to 10E-3 s , Unit: ms """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:ECONfiguration:AEDelay?') return Conversions.str_to_float(response)
[docs] def get_ae_interval(self) -> float: """ ``[SOURce<HW>]:BB:BTOoth:ECONfiguration:AEINterval`` \n Snippet: ``value: float = driver.source.bb.btooth.econfiguration.get_ae_interval()`` \n Sets the time interval between two consecutive advertising events, with regard to the starting points. Command sets the values in ms. Query returns values in s. :return: ae_interval: float Range: 5E-3 s to depends on oversampling , Unit: ms """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:ECONfiguration:AEINterval?') return Conversions.str_to_float(response)
[docs] def get_ap_interval(self) -> float: """ ``[SOURce<HW>]:BB:BTOoth:ECONfiguration:APINterval`` \n Snippet: ``value: float = driver.source.bb.btooth.econfiguration.get_ap_interval()`` \n Sets the time interval between packets starting points of two consecutive packets in the advertising channel. :return: ap_interval: float Range: 1.3E-3 to 28E-3, Unit: ms """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:ECONfiguration:APINterval?') return Conversions.str_to_float(response)
# noinspection PyTypeChecker
[docs] def get_lc_mode(self) -> enums.BtoLlCnctMod: """ ``[SOURce<HW>]:BB:BTOoth:ECONfiguration:LCMode`` \n Snippet: ``value: enums.BtoLlCnctMod = driver.source.bb.btooth.econfiguration.get_lc_mode()`` \n Selects the link layer connection mode. In order to provide safe transmission of payload data, the data in the packet can be encrypted. If activated, the payload data follows MIC (Message authentication Code) . :return: lc_mode: UENC | ENC UENC Payload data is transmitted without encoding. ENC The link layer connection runs in encrypted mode. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:ECONfiguration:LCMode?') return Conversions.str_to_scalar_enum(response, enums.BtoLlCnctMod)
# noinspection PyTypeChecker
[docs] class LtKeyStruct(StructBase): """ Structure for reading output parameters. Fields: \n - Lt_Key: str: numeric - Bitcount: int: integer Range: 128 to 128 """ __meta_args_list = [ ArgStruct.scalar_raw_str('Lt_Key'), ArgStruct.scalar_int('Bitcount')] def __init__(self): StructBase.__init__(self, self) self.Lt_Key: str=None self.Bitcount: int=None
[docs] def get_lt_key(self) -> LtKeyStruct: """ ``[SOURce<HW>]:BB:BTOoth:ECONfiguration:LTKey`` \n Snippet: ``value: LtKeyStruct = driver.source.bb.btooth.econfiguration.get_lt_key()`` \n Indicates the time the controller needs to receive the long-term key from the host. After this time, the controller is ready to enter into the last phase of encryption mode setup. :return: structure: for return value, see the help for LtKeyStruct structure arguments. """ return self._core.io.query_struct('SOURce<HwInstance>:BB:BTOoth:ECONfiguration:LTKey?', self.__class__.LtKeyStruct())
[docs] def get_pnumber(self) -> int: """ ``[SOURce<HW>]:BB:BTOoth:ECONfiguration:PNUMber`` \n Snippet: ``value: int = driver.source.bb.btooth.econfiguration.get_pnumber()`` \n Sets the number of Tx packets per event. Each connection contains at least one data channel packet. The maximum number of packets per event is determined by the duration of the connection event interval. :return: pnumber: integer Range: 1 to depends on connection event interval """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:ECONfiguration:PNUMber?') return Conversions.str_to_int(response)
[docs] def get_sdci(self) -> int: """ ``[SOURce<HW>]:BB:BTOoth:ECONfiguration:SDCI`` \n Snippet: ``value: int = driver.source.bb.btooth.econfiguration.get_sdci()`` \n Queries the number of the first active data channel. :return: selected_channel: integer Range: 0 to 36 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:ECONfiguration:SDCI?') return Conversions.str_to_int(response)
[docs] def get_sinterval(self) -> float: """ ``[SOURce<HW>]:BB:BTOoth:ECONfiguration:SINTerval`` \n Snippet: ``value: float = driver.source.bb.btooth.econfiguration.get_sinterval()`` \n Sets the time interval between the starting points of two consecutive windows during which the scanner is operating in an advertising channel. Command sets the values in ms. Query returns values in s. :return: sinterval: float Range: 10E-3 s to depends on oversampling and the number of advertsing channel table states , Unit: ms """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:ECONfiguration:SINTerval?') return Conversions.str_to_float(response)
[docs] def get_swindow(self) -> float: """ ``[SOURce<HW>]:BB:BTOoth:ECONfiguration:SWINdow`` \n Snippet: ``value: float = driver.source.bb.btooth.econfiguration.get_swindow()`` \n Sets the length of the window during which the scanner is operating in the advertising channel. Note that the scan window is less or equal to the value of the scan interval. Command sets the values in ms. Query returns values in s. :return: swindow: float Range: 10E-3 s to 10240E-3 s , Unit: ms """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:ECONfiguration:SWINdow?') return Conversions.str_to_float(response)
[docs] def get_wo_info(self) -> str: """ ``[SOURce<HW>]:BB:BTOoth:ECONfiguration:WOINfo`` \n Snippet: ``value: str = driver.source.bb.btooth.econfiguration.get_wo_info()`` \n Requires data event and advertising frame configuration with the packet type CONNECT_IND. Queries the start point of the transmit window. :return: wo_info: string """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:ECONfiguration:WOINfo?') return trim_str_response(response)
[docs] def get_ws_info(self) -> str: """ ``[SOURce<HW>]:BB:BTOoth:ECONfiguration:WSINfo`` \n Snippet: ``value: str = driver.source.bb.btooth.econfiguration.get_ws_info()`` \n Requires data event and advertising frame configuration with the packet type CONNECT_IND. Queries the size of the transmit window, regarding to the start point. :return: ws_info: string """ response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:ECONfiguration:WSINfo?') return trim_str_response(response)
def clone(self) -> 'EconfigurationCls': """ 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 = EconfigurationCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group