Source code for RsSmw.Implementations.Source.Bb.Lora

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class LoraCls:
	"""
	| Commands in total: 60
	| Subgroups: 7
	| Direct child commands: 6
	"""

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

	@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 fconfiguration(self):
		"""
		| Commands in total: 16
		| Subgroups: 9
		| Direct child commands: 5
		"""
		if not hasattr(self, '_fconfiguration'):
			from .Fconfiguration import FconfigurationCls
			self._fconfiguration = FconfigurationCls(self._core, self._cmd_group)
		return self._fconfiguration

	@property
	def impairments(self):
		"""
		| Commands in total: 7
		| Subgroups: 1
		| Direct child commands: 6
		"""
		if not hasattr(self, '_impairments'):
			from .Impairments import ImpairmentsCls
			self._impairments = ImpairmentsCls(self._core, self._cmd_group)
		return self._impairments

	@property
	def setting(self):
		"""
		| Commands in total: 4
		| Subgroups: 0
		| Direct child commands: 4
		"""
		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: 1
		| Subgroups: 0
		| 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: 22
		| 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 waveform(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		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_bandwidth(self) -> enums.LoRaBw: """ ``[SOURce<HW>]:BB:LORA:BWIDth`` \n Snippet: ``value: enums.LoRaBw = driver.source.bb.lora.get_bandwidth()`` \n Sets the channel bandwidth. :return: bw: BW7 | BW10 | BW15 | BW20 | BW31 | BW41 | BW62 | BW125 | BW250 | BW500 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LORA:BWIDth?') return Conversions.str_to_scalar_enum(response, enums.LoRaBw)
[docs] def set_bandwidth(self, bw: enums.LoRaBw) -> None: """ ``[SOURce<HW>]:BB:LORA:BWIDth`` \n Snippet: ``driver.source.bb.lora.set_bandwidth(bw = enums.LoRaBw.BW10)`` \n Sets the channel bandwidth. :param bw: BW7 | BW10 | BW15 | BW20 | BW31 | BW41 | BW62 | BW125 | BW250 | BW500 """ param = Conversions.enum_scalar_to_str(bw, enums.LoRaBw) self._core.io.write(f'SOURce<HwInstance>:BB:LORA:BWIDth {param}')
[docs] def get_iinterval(self) -> float: """ ``[SOURce<HW>]:BB:LORA:IINTerval`` \n Snippet: ``value: float = driver.source.bb.lora.get_iinterval()`` \n Sets the time of the interval separating two frames. :return: iinterval: float Range: 0 to 1, Unit: s """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LORA:IINTerval?') return Conversions.str_to_float(response)
[docs] def set_iinterval(self, iinterval: float) -> None: """ ``[SOURce<HW>]:BB:LORA:IINTerval`` \n Snippet: ``driver.source.bb.lora.set_iinterval(iinterval = 1.0)`` \n Sets the time of the interval separating two frames. :param iinterval: float Range: 0 to 1, Unit: s """ param = Conversions.decimal_value_to_str(iinterval) self._core.io.write(f'SOURce<HwInstance>:BB:LORA:IINTerval {param}')
[docs] def get_osampling(self) -> int: """ ``[SOURce<HW>]:BB:LORA:OSAMpling`` \n Snippet: ``value: int = driver.source.bb.lora.get_osampling()`` \n Sets the oversampling factor of the generated waveform. A reduced sample rate saves significantly the amount of memory or allows an increased signal cycle time, and vice versa. :return: osampling: integer Range: 1 to 32 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LORA:OSAMpling?') return Conversions.str_to_int(response)
[docs] def set_osampling(self, osampling: int) -> None: """ ``[SOURce<HW>]:BB:LORA:OSAMpling`` \n Snippet: ``driver.source.bb.lora.set_osampling(osampling = 1)`` \n Sets the oversampling factor of the generated waveform. A reduced sample rate saves significantly the amount of memory or allows an increased signal cycle time, and vice versa. :param osampling: integer Range: 1 to 32 """ param = Conversions.decimal_value_to_str(osampling) self._core.io.write(f'SOURce<HwInstance>:BB:LORA:OSAMpling {param}')
[docs] def preset(self) -> None: """ ``[SOURce<HW>]:BB:LORA:PRESet`` \n Snippet: ``driver.source.bb.lora.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:LORA:STATe. """ self._core.io.write(f'SOURce<HwInstance>:BB:LORA:PRESet')
[docs] def preset_with_opc(self, opc_timeout_ms: int = -1) -> None: """ ``[SOURce<HW>]:BB:LORA:PRESet`` \n Snippet: ``driver.source.bb.lora.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:LORA: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:LORA:PRESet', opc_timeout_ms)
[docs] def get_slength(self) -> int: """ ``[SOURce<HW>]:BB:LORA:SLENgth`` \n Snippet: ``value: int = driver.source.bb.lora.get_slength()`` \n Sets the sequence length of the signal in number of frames. The signal is calculated in advance and output in the arbitrary waveform generator. :return: slength: integer Range: 1 to dynamic """ response = self._core.io.query_str('SOURce<HwInstance>:BB:LORA:SLENgth?') return Conversions.str_to_int(response)
[docs] def set_slength(self, slength: int) -> None: """ ``[SOURce<HW>]:BB:LORA:SLENgth`` \n Snippet: ``driver.source.bb.lora.set_slength(slength = 1)`` \n Sets the sequence length of the signal in number of frames. The signal is calculated in advance and output in the arbitrary waveform generator. :param slength: integer Range: 1 to dynamic """ param = Conversions.decimal_value_to_str(slength) self._core.io.write(f'SOURce<HwInstance>:BB:LORA:SLENgth {param}')
[docs] def get_state(self) -> bool: """ ``[SOURce<HW>]:BB:LORA:STATe`` \n Snippet: ``value: bool = driver.source.bb.lora.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:LORA:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, state: bool) -> None: """ ``[SOURce<HW>]:BB:LORA:STATe`` \n Snippet: ``driver.source.bb.lora.set_state(state = False)`` \n Activates the standard and deactivates all the other digital standards and digital modulation modes in the same path. :param state: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(state) self._core.io.write(f'SOURce<HwInstance>:BB:LORA:STATe {param}')
def clone(self) -> 'LoraCls': """ 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 = LoraCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group