Source code for RsSmw.Implementations.Source.Bb.Gsm

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class GsmCls:
	"""
	| Commands in total: 111
	| Subgroups: 19
	| Direct child commands: 8
	"""

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

	@property
	def aqPsk(self):
		"""
		| Commands in total: 3
		| Subgroups: 2
		| Direct child commands: 1
		"""
		if not hasattr(self, '_aqPsk'):
			from .AqPsk import AqPskCls
			self._aqPsk = AqPskCls(self._core, self._cmd_group)
		return self._aqPsk

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

	@property
	def edge(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_edge'):
			from .Edge import EdgeCls
			self._edge = EdgeCls(self._core, self._cmd_group)
		return self._edge

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

	@property
	def foffset(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_foffset'):
			from .Foffset import FoffsetCls
			self._foffset = FoffsetCls(self._core, self._cmd_group)
		return self._foffset

	@property
	def frame(self):
		"""
		| Commands in total: 38
		| Subgroups: 5
		| Direct child commands: 0
		"""
		if not hasattr(self, '_frame'):
			from .Frame import FrameCls
			self._frame = FrameCls(self._core, self._cmd_group)
		return self._frame

	@property
	def fsk(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_fsk'):
			from .Fsk import FskCls
			self._fsk = FskCls(self._core, self._cmd_group)
		return self._fsk

	@property
	def h16Qam(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_h16Qam'):
			from .H16Qam import H16QamCls
			self._h16Qam = H16QamCls(self._core, self._cmd_group)
		return self._h16Qam

	@property
	def h32Qam(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_h32Qam'):
			from .H32Qam import H32QamCls
			self._h32Qam = H32QamCls(self._core, self._cmd_group)
		return self._h32Qam

	@property
	def hqpsk(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_hqpsk'):
			from .Hqpsk import HqpskCls
			self._hqpsk = HqpskCls(self._core, self._cmd_group)
		return self._hqpsk

	@property
	def mframe(self):
		"""
		| Commands in total: 1
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_mframe'):
			from .Mframe import MframeCls
			self._mframe = MframeCls(self._core, self._cmd_group)
		return self._mframe

	@property
	def n16Qam(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_n16Qam'):
			from .N16Qam import N16QamCls
			self._n16Qam = N16QamCls(self._core, self._cmd_group)
		return self._n16Qam

	@property
	def n32Qam(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_n32Qam'):
			from .N32Qam import N32QamCls
			self._n32Qam = N32QamCls(self._core, self._cmd_group)
		return self._n32Qam

	@property
	def pramp(self):
		"""
		| Commands in total: 5
		| Subgroups: 1
		| Direct child commands: 4
		"""
		if not hasattr(self, '_pramp'):
			from .Pramp import PrampCls
			self._pramp = PrampCls(self._core, self._cmd_group)
		return self._pramp

	@property
	def sattenuation(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_sattenuation'):
			from .Sattenuation import SattenuationCls
			self._sattenuation = SattenuationCls(self._core, self._cmd_group)
		return self._sattenuation

	@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: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		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: 26
		| 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

[docs] def get_flength(self) -> int: """ ``[SOURce<HW>]:BB:GSM:FLENgth`` \n Snippet: ``value: int = driver.source.bb.gsm.get_flength()`` \n Sets the sequence length of the generated arbitrary waveform file in number of frames. This parameter applies to GSM modes Single or Double framed. For GSM mode Framed Double, this command is query only, since the length of the generated ARB file is determined by the parameter Frame Repetition (method ``RsSmw.source.bb.gsm.frame.repetitions.set()`` ) for both frames: Sequence Length = Frame Repetition of Frame 1 + Frame Repetition of Frame 2. For GSM mode (BB:GSM:MODE) set to Unframed, the length of the generated ARB file is set in symbols with the command [:SOURce<hw>]:BB:GSM:SLENgth. :return: flength: integer Range: 1 to max """ response = self._core.io.query_str('SOURce<HwInstance>:BB:GSM:FLENgth?') return Conversions.str_to_int(response)
[docs] def set_flength(self, flength: int) -> None: """ ``[SOURce<HW>]:BB:GSM:FLENgth`` \n Snippet: ``driver.source.bb.gsm.set_flength(flength = 1)`` \n Sets the sequence length of the generated arbitrary waveform file in number of frames. This parameter applies to GSM modes Single or Double framed. For GSM mode Framed Double, this command is query only, since the length of the generated ARB file is determined by the parameter Frame Repetition (method ``RsSmw.source.bb.gsm.frame.repetitions.set()`` ) for both frames: Sequence Length = Frame Repetition of Frame 1 + Frame Repetition of Frame 2. For GSM mode (BB:GSM:MODE) set to Unframed, the length of the generated ARB file is set in symbols with the command [:SOURce<hw>]:BB:GSM:SLENgth. :param flength: integer Range: 1 to max """ param = Conversions.decimal_value_to_str(flength) self._core.io.write(f'SOURce<HwInstance>:BB:GSM:FLENgth {param}')
[docs] def get_fone(self) -> bool: """ ``[SOURce<HW>]:BB:GSM:FONE`` \n Snippet: ``value: bool = driver.source.bb.gsm.get_fone()`` \n A modulating bit stream consisting of consecutive ones is used for inactive slots (according to GSM 05.04) . If this parameter is disabled, the inactive slots are filled in with 0. :return: fone: 1 | ON | 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:BB:GSM:FONE?') return Conversions.str_to_bool(response)
[docs] def set_fone(self, fone: bool) -> None: """ ``[SOURce<HW>]:BB:GSM:FONE`` \n Snippet: ``driver.source.bb.gsm.set_fone(fone = False)`` \n A modulating bit stream consisting of consecutive ones is used for inactive slots (according to GSM 05.04) . If this parameter is disabled, the inactive slots are filled in with 0. :param fone: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(fone) self._core.io.write(f'SOURce<HwInstance>:BB:GSM:FONE {param}')
# noinspection PyTypeChecker
[docs] def get_format_py(self) -> enums.GsmModTypeGsm: """ ``[SOURce<HW>]:BB:GSM:FORMat`` \n Snippet: ``value: enums.GsmModTypeGsm = driver.source.bb.gsm.get_format_py()`` \n The command selects the modulation type. :return: format_py: MSK | FSK2 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:GSM:FORMat?') return Conversions.str_to_scalar_enum(response, enums.GsmModTypeGsm)
[docs] def set_format_py(self, format_py: enums.GsmModTypeGsm) -> None: """ ``[SOURce<HW>]:BB:GSM:FORMat`` \n Snippet: ``driver.source.bb.gsm.set_format_py(format_py = enums.GsmModTypeGsm.FSK2)`` \n The command selects the modulation type. :param format_py: MSK | FSK2 """ param = Conversions.enum_scalar_to_str(format_py, enums.GsmModTypeGsm) self._core.io.write(f'SOURce<HwInstance>:BB:GSM:FORMat {param}')
[docs] def get_is_length(self) -> bool: """ ``[SOURce<HW>]:BB:GSM:ISLength`` \n Snippet: ``value: bool = driver.source.bb.gsm.get_is_length()`` \n Selects constant slot length. :return: is_length: 1 | ON | 0| OFF For normal symbol rate mode: The command selects whether the 1/4 symbol of a GSM slot is ignored or compensated for by an extra symbol every 4th slot. For higher symbol rate mode: The command selects whether the 1/2 symbol of an average slot with a length of 187.5 symbols are ignored or compensated for by an extra symbol every second slot. ON In normal symbol rate mode, all slots are 156 symbols long In higher symbol rate mode, all slots are 187 symbols long OFF In normal symbol rate mode, some slots are 157 symbols long In higher symbol rate mode, some slots are 188 symbols long """ response = self._core.io.query_str('SOURce<HwInstance>:BB:GSM:ISLength?') return Conversions.str_to_bool(response)
[docs] def set_is_length(self, is_length: bool) -> None: """ ``[SOURce<HW>]:BB:GSM:ISLength`` \n Snippet: ``driver.source.bb.gsm.set_is_length(is_length = False)`` \n Selects constant slot length. :param is_length: 1 | ON | 0| OFF For normal symbol rate mode: The command selects whether the 1/4 symbol of a GSM slot is ignored or compensated for by an extra symbol every 4th slot. For higher symbol rate mode: The command selects whether the 1/2 symbol of an average slot with a length of 187.5 symbols are ignored or compensated for by an extra symbol every second slot. ON In normal symbol rate mode, all slots are 156 symbols long In higher symbol rate mode, all slots are 187 symbols long OFF In normal symbol rate mode, some slots are 157 symbols long In higher symbol rate mode, some slots are 188 symbols long """ param = Conversions.bool_to_str(is_length) self._core.io.write(f'SOURce<HwInstance>:BB:GSM:ISLength {param}')
# noinspection PyTypeChecker
[docs] def get_mode(self) -> enums.GsmMode: """ ``[SOURce<HW>]:BB:GSM:MODE`` \n Snippet: ``value: enums.GsmMode = driver.source.bb.gsm.get_mode()`` \n The command selects GSM mode. :return: mode: UNFRamed | SINGle | DOUBle | MULTiframe UNFRamed Modulation signal without slot and frame structure. SINGle Modulation signal consisting of one frame. DOUBle Modulation signal in which two frames are defined and then combined by some method into a single multiframe signal. MULTiframe Multiframe signal. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:GSM:MODE?') return Conversions.str_to_scalar_enum(response, enums.GsmMode)
[docs] def set_mode(self, mode: enums.GsmMode) -> None: """ ``[SOURce<HW>]:BB:GSM:MODE`` \n Snippet: ``driver.source.bb.gsm.set_mode(mode = enums.GsmMode.DOUBle)`` \n The command selects GSM mode. :param mode: UNFRamed | SINGle | DOUBle | MULTiframe UNFRamed Modulation signal without slot and frame structure. SINGle Modulation signal consisting of one frame. DOUBle Modulation signal in which two frames are defined and then combined by some method into a single multiframe signal. MULTiframe Multiframe signal. """ param = Conversions.enum_scalar_to_str(mode, enums.GsmMode) self._core.io.write(f'SOURce<HwInstance>:BB:GSM:MODE {param}')
[docs] def preset(self) -> None: """ ``[SOURce<HW>]:BB:GSM:PRESet`` \n Snippet: ``driver.source.bb.gsm.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:GSM:STATe. """ self._core.io.write(f'SOURce<HwInstance>:BB:GSM:PRESet')
[docs] def preset_with_opc(self, opc_timeout_ms: int = -1) -> None: """ ``[SOURce<HW>]:BB:GSM:PRESet`` \n Snippet: ``driver.source.bb.gsm.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:GSM: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:GSM:PRESet', opc_timeout_ms)
# noinspection PyTypeChecker
[docs] def get_smode(self) -> enums.GsmSimMode: """ ``[SOURce<HW>]:BB:GSM:SMODe`` \n Snippet: ``value: enums.GsmSimMode = driver.source.bb.gsm.get_smode()`` \n Selects the modulation signal for the mode Unframed (BB:GSM:MODE UNFR) . The modulation type and filter type are set in accordance with the selection. The available simulation modes depend on the selected symbol rate: \n - Normal Symbol Rate - GSM, EDGE (8PSK) , AQPSK, 16QAM and 32QAM - Higher Symbol Rate - HSR QPSK, HSR 16QAM and HSR 32QAM. Note:'Higher Symbol Rate' Mode and 'Simulation Modes' AQPSK, 16QAM, 32QAM, HSR QPSK, HSR 16QAM and HSR 32QAM are available for instruments equipped with option R&S SMW-K41 only. :return: smode: GSM | EDGE | N16Qam | N32Qam | HQPSk | H16Qam | H32Qam | AQPSk """ response = self._core.io.query_str('SOURce<HwInstance>:BB:GSM:SMODe?') return Conversions.str_to_scalar_enum(response, enums.GsmSimMode)
[docs] def set_smode(self, smode: enums.GsmSimMode) -> None: """ ``[SOURce<HW>]:BB:GSM:SMODe`` \n Snippet: ``driver.source.bb.gsm.set_smode(smode = enums.GsmSimMode.AQPSk)`` \n Selects the modulation signal for the mode Unframed (BB:GSM:MODE UNFR) . The modulation type and filter type are set in accordance with the selection. The available simulation modes depend on the selected symbol rate: \n - Normal Symbol Rate - GSM, EDGE (8PSK) , AQPSK, 16QAM and 32QAM - Higher Symbol Rate - HSR QPSK, HSR 16QAM and HSR 32QAM. Note:'Higher Symbol Rate' Mode and 'Simulation Modes' AQPSK, 16QAM, 32QAM, HSR QPSK, HSR 16QAM and HSR 32QAM are available for instruments equipped with option R&S SMW-K41 only. :param smode: GSM | EDGE | N16Qam | N32Qam | HQPSk | H16Qam | H32Qam | AQPSk """ param = Conversions.enum_scalar_to_str(smode, enums.GsmSimMode) self._core.io.write(f'SOURce<HwInstance>:BB:GSM:SMODe {param}')
[docs] def get_state(self) -> bool: """ ``[SOURce<HW>]:BB:GSM:STATe`` \n Snippet: ``value: bool = driver.source.bb.gsm.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:GSM:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, state: bool) -> None: """ ``[SOURce<HW>]:BB:GSM:STATe`` \n Snippet: ``driver.source.bb.gsm.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:GSM:STATe {param}')
def clone(self) -> 'GsmCls': """ 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 = GsmCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group