Source code for RsSmw.Implementations.Source.Bbin

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 BbinCls:
	"""
	| Commands in total: 33
	| Subgroups: 7
	| Direct child commands: 9
	"""

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

	@property
	def alevel(self):
		"""
		| Commands in total: 1
		| Subgroups: 1
		| Direct child commands: 0
		"""
		if not hasattr(self, '_alevel'):
			from .Alevel import AlevelCls
			self._alevel = AlevelCls(self._core, self._cmd_group)
		return self._alevel

	@property
	def channel(self):
		"""
		| Commands in total: 7
		| Subgroups: 4
		| Direct child commands: 0
		"""
		if not hasattr(self, '_channel'):
			from .Channel import ChannelCls
			self._channel = ChannelCls(self._core, self._cmd_group)
		return self._channel

	@property
	def digital(self):
		"""
		| Commands in total: 5
		| Subgroups: 2
		| Direct child commands: 2
		"""
		if not hasattr(self, '_digital'):
			from .Digital import DigitalCls
			self._digital = DigitalCls(self._core, self._cmd_group)
		return self._digital

	@property
	def iqswap(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_iqswap'):
			from .Iqswap import IqswapCls
			self._iqswap = IqswapCls(self._core, self._cmd_group)
		return self._iqswap

	@property
	def oload(self):
		"""
		| Commands in total: 3
		| Subgroups: 1
		| Direct child commands: 1
		"""
		if not hasattr(self, '_oload'):
			from .Oload import OloadCls
			self._oload = OloadCls(self._core, self._cmd_group)
		return self._oload

	@property
	def power(self):
		"""
		| Commands in total: 3
		| Subgroups: 0
		| Direct child commands: 3
		"""
		if not hasattr(self, '_power'):
			from .Power import PowerCls
			self._power = PowerCls(self._core, self._cmd_group)
		return self._power

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

[docs] def get_cdevice(self) -> str: """ ``[SOURce<HW>]:BBIN:CDEVice`` \n Snippet: ``value: str = driver.source.bbin.get_cdevice()`` \n Indicates the ID of an externally connected Rohde & Schwarz Instrument or Rohde & Schwarz device. :return: cdevice: string 'None' - no device is connected. """ response = self._core.io.query_str('SOURce<HwInstance>:BBIN:CDEVice?') return trim_str_response(response)
[docs] def get_cfactor(self) -> float: """ ``[SOURce<HW>]:BBIN:CFACtor`` \n Snippet: ``value: float = driver.source.bbin.get_cfactor()`` \n No help available """ response = self._core.io.query_str('SOURce<HwInstance>:BBIN:CFACtor?') return Conversions.str_to_float(response)
[docs] def set_cfactor(self, cfactor: float) -> None: """ ``[SOURce<HW>]:BBIN:CFACtor`` \n Snippet: ``driver.source.bbin.set_cfactor(cfactor = 1.0)`` \n No help available """ param = Conversions.decimal_value_to_str(cfactor) self._core.io.write(f'SOURce<HwInstance>:BBIN:CFACtor {param}')
[docs] def get_foffset(self) -> float: """ ``[SOURce<HW>]:BBIN:FOFFset`` \n Snippet: ``value: float = driver.source.bbin.get_foffset()`` \n Sets a frequency offset for the internal or external baseband signal. The offset affects the generated baseband signal. :return: foffset: float Range: depends on options , Unit: Hz E.g. -60 MHz to +60 MHz (R&S SMW-B10) """ response = self._core.io.query_str('SOURce<HwInstance>:BBIN:FOFFset?') return Conversions.str_to_float(response)
[docs] def set_foffset(self, foffset: float) -> None: """ ``[SOURce<HW>]:BBIN:FOFFset`` \n Snippet: ``driver.source.bbin.set_foffset(foffset = 1.0)`` \n Sets a frequency offset for the internal or external baseband signal. The offset affects the generated baseband signal. :param foffset: float Range: depends on options , Unit: Hz E.g. -60 MHz to +60 MHz (R&S SMW-B10) """ param = Conversions.decimal_value_to_str(foffset) self._core.io.write(f'SOURce<HwInstance>:BBIN:FOFFset {param}')
# noinspection PyTypeChecker
[docs] def get_mode(self) -> enums.BbinModeDigital: """ ``[SOURce<HW>]:BBIN:MODE`` \n Snippet: ``value: enums.BbinModeDigital = driver.source.bbin.get_mode()`` \n Defines that a digital external signal is applied. :return: mode: DIGital """ response = self._core.io.query_str('SOURce<HwInstance>:BBIN:MODE?') return Conversions.str_to_scalar_enum(response, enums.BbinModeDigital)
[docs] def set_mode(self, mode: enums.BbinModeDigital) -> None: """ ``[SOURce<HW>]:BBIN:MODE`` \n Snippet: ``driver.source.bbin.set_mode(mode = enums.BbinModeDigital.DIGital)`` \n Defines that a digital external signal is applied. :param mode: DIGital """ param = Conversions.enum_scalar_to_str(mode, enums.BbinModeDigital) self._core.io.write(f'SOURce<HwInstance>:BBIN:MODE {param}')
[docs] def get_mperiod(self) -> int: """ ``[SOURce<HW>]:BBIN:MPERiod`` \n Snippet: ``value: int = driver.source.bbin.get_mperiod()`` \n For method ``RsSmw.source.bbin.digital.source()`` CODER1 | CODER2 Sets the recording duration for measuring the baseband input signal by executed method ``RsSmw.source.bbin.alevel.execute.set()`` . :return: mperiod: integer Range: 1 to 32, Unit: s """ response = self._core.io.query_str('SOURce<HwInstance>:BBIN:MPERiod?') return Conversions.str_to_int(response)
[docs] def set_mperiod(self, mperiod: int) -> None: """ ``[SOURce<HW>]:BBIN:MPERiod`` \n Snippet: ``driver.source.bbin.set_mperiod(mperiod = 1)`` \n For method ``RsSmw.source.bbin.digital.source()`` CODER1 | CODER2 Sets the recording duration for measuring the baseband input signal by executed method ``RsSmw.source.bbin.alevel.execute.set()`` . :param mperiod: integer Range: 1 to 32, Unit: s """ param = Conversions.decimal_value_to_str(mperiod) self._core.io.write(f'SOURce<HwInstance>:BBIN:MPERiod {param}')
[docs] def get_pgain(self) -> float: """ ``[SOURce<HW>]:BBIN:PGAin`` \n Snippet: ``value: float = driver.source.bbin.get_pgain()`` \n Sets the relative gain for the internal or external baseband signal compared with the signals of the other baseband sources. :return: pgain: float Range: -50 to 50, Unit: dB """ response = self._core.io.query_str('SOURce<HwInstance>:BBIN:PGAin?') return Conversions.str_to_float(response)
[docs] def set_pgain(self, pgain: float) -> None: """ ``[SOURce<HW>]:BBIN:PGAin`` \n Snippet: ``driver.source.bbin.set_pgain(pgain = 1.0)`` \n Sets the relative gain for the internal or external baseband signal compared with the signals of the other baseband sources. :param pgain: float Range: -50 to 50, Unit: dB """ param = Conversions.decimal_value_to_str(pgain) self._core.io.write(f'SOURce<HwInstance>:BBIN:PGAin {param}')
[docs] def get_poffset(self) -> float: """ ``[SOURce<HW>]:BBIN:POFFset`` \n Snippet: ``value: float = driver.source.bbin.get_poffset()`` \n Sets the relative phase offset for the external baseband signal. :return: poffset: float Range: -999.99 to 999.99, Unit: DEG """ response = self._core.io.query_str('SOURce<HwInstance>:BBIN:POFFset?') return Conversions.str_to_float(response)
[docs] def set_poffset(self, poffset: float) -> None: """ ``[SOURce<HW>]:BBIN:POFFset`` \n Snippet: ``driver.source.bbin.set_poffset(poffset = 1.0)`` \n Sets the relative phase offset for the external baseband signal. :param poffset: float Range: -999.99 to 999.99, Unit: DEG """ param = Conversions.decimal_value_to_str(poffset) self._core.io.write(f'SOURce<HwInstance>:BBIN:POFFset {param}')
# noinspection PyTypeChecker
[docs] def get_route(self) -> enums.PathUniCodBbin: """ ``[SOURce<HW>]:BBIN:ROUTe`` \n Snippet: ``value: enums.PathUniCodBbin = driver.source.bbin.get_route()`` \n Selects the signal route for the internal/external baseband signal. The internal and external signals are summed, if necessary. :return: route: A | B| AB """ response = self._core.io.query_str('SOURce<HwInstance>:BBIN:ROUTe?') return Conversions.str_to_scalar_enum(response, enums.PathUniCodBbin)
[docs] def set_route(self, route: enums.PathUniCodBbin) -> None: """ ``[SOURce<HW>]:BBIN:ROUTe`` \n Snippet: ``driver.source.bbin.set_route(route = enums.PathUniCodBbin.A)`` \n Selects the signal route for the internal/external baseband signal. The internal and external signals are summed, if necessary. :param route: A | B| AB """ param = Conversions.enum_scalar_to_str(route, enums.PathUniCodBbin) self._core.io.write(f'SOURce<HwInstance>:BBIN:ROUTe {param}')
[docs] def get_state(self) -> bool: """ ``[SOURce<HW>]:BBIN:STATe`` \n Snippet: ``value: bool = driver.source.bbin.get_state()`` \n Enables feeding of an external digital signal into the signal path. :return: state: 1 | ON | 0| OFF """ response = self._core.io.query_str('SOURce<HwInstance>:BBIN:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, state: bool) -> None: """ ``[SOURce<HW>]:BBIN:STATe`` \n Snippet: ``driver.source.bbin.set_state(state = False)`` \n Enables feeding of an external digital signal into the signal path. :param state: 1 | ON | 0| OFF """ param = Conversions.bool_to_str(state) self._core.io.write(f'SOURce<HwInstance>:BBIN:STATe {param}')
def clone(self) -> 'BbinCls': """ 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 = BbinCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group