Source code for RsSmw.Implementations.Source.Bb.Dvb.Dvbh

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DvbhCls:
	"""
	| Commands in total: 32
	| Subgroups: 6
	| Direct child commands: 4
	"""

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

	@property
	def iinterleaver(self):
		"""
		| Commands in total: 4
		| Subgroups: 2
		| Direct child commands: 0
		"""
		if not hasattr(self, '_iinterleaver'):
			from .Iinterleaver import IinterleaverCls
			self._iinterleaver = IinterleaverCls(self._core, self._cmd_group)
		return self._iinterleaver

	@property
	def ofdm(self):
		"""
		| Commands in total: 4
		| Subgroups: 0
		| Direct child commands: 4
		"""
		if not hasattr(self, '_ofdm'):
			from .Ofdm import OfdmCls
			self._ofdm = OfdmCls(self._core, self._cmd_group)
		return self._ofdm

	@property
	def sample(self):
		"""
		| Commands in total: 2
		| Subgroups: 0
		| Direct child commands: 2
		"""
		if not hasattr(self, '_sample'):
			from .Sample import SampleCls
			self._sample = SampleCls(self._core, self._cmd_group)
		return self._sample

	@property
	def tps(self):
		"""
		| Commands in total: 4
		| Subgroups: 3
		| Direct child commands: 0
		"""
		if not hasattr(self, '_tps'):
			from .Tps import TpsCls
			self._tps = TpsCls(self._core, self._cmd_group)
		return self._tps

	@property
	def hp(self):
		"""
		| Commands in total: 7
		| Subgroups: 5
		| Direct child commands: 0
		"""
		if not hasattr(self, '_hp'):
			from .Hp import HpCls
			self._hp = HpCls(self._core, self._cmd_group)
		return self._hp

	@property
	def lp(self):
		"""
		| Commands in total: 7
		| Subgroups: 5
		| Direct child commands: 0
		"""
		if not hasattr(self, '_lp'):
			from .Lp import LpCls
			self._lp = LpCls(self._core, self._cmd_group)
		return self._lp

[docs] def get_drate(self) -> float: """ ``[SOURce<HW>]:BB:DVB:DVBH:DRATe`` \n Snippet: ``value: float = driver.source.bb.dvb.dvbh.get_drate()`` \n Queries the data rate. :return: drate: float """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DVB:DVBH:DRATe?') return Conversions.str_to_float(response)
[docs] def get_duration(self) -> float: """ ``[SOURce<HW>]:BB:DVB:DVBH:DURation`` \n Snippet: ``value: float = driver.source.bb.dvb.dvbh.get_duration()`` \n Queries the signal duration. :return: duration: float """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DVB:DVBH:DURation?') return Conversions.str_to_float(response)
# noinspection PyTypeChecker
[docs] def get_hmode(self) -> enums.DvbHierarchyMode: """ ``[SOURce<HW>]:BB:DVB:DVBH:HMODe`` \n Snippet: ``value: enums.DvbHierarchyMode = driver.source.bb.dvb.dvbh.get_hmode()`` \n Queries the mode for hierarchical coding, that is non-hierachical coding. The current firmware does not support hierarchical coding. :return: hmode: NHIerarchical Non-hierchical coding using high priority input only. """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DVB:DVBH:HMODe?') return Conversions.str_to_scalar_enum(response, enums.DvbHierarchyMode)
[docs] def set_hmode(self, hmode: enums.DvbHierarchyMode) -> None: """ ``[SOURce<HW>]:BB:DVB:DVBH:HMODe`` \n Snippet: ``driver.source.bb.dvb.dvbh.set_hmode(hmode = enums.DvbHierarchyMode.HIErarchical)`` \n Queries the mode for hierarchical coding, that is non-hierachical coding. The current firmware does not support hierarchical coding. :param hmode: NHIerarchical Non-hierchical coding using high priority input only. """ param = Conversions.enum_scalar_to_str(hmode, enums.DvbHierarchyMode) self._core.io.write(f'SOURce<HwInstance>:BB:DVB:DVBH:HMODe {param}')
[docs] def get_sframes(self) -> int: """ ``[SOURce<HW>]:BB:DVB:DVBH:SFRames`` \n Snippet: ``value: int = driver.source.bb.dvb.dvbh.get_sframes()`` \n Sets the number of super-frames to be transmitted. :return: sframes: integer Range: 1 to 1633 (dynamic) """ response = self._core.io.query_str('SOURce<HwInstance>:BB:DVB:DVBH:SFRames?') return Conversions.str_to_int(response)
[docs] def set_sframes(self, sframes: int) -> None: """ ``[SOURce<HW>]:BB:DVB:DVBH:SFRames`` \n Snippet: ``driver.source.bb.dvb.dvbh.set_sframes(sframes = 1)`` \n Sets the number of super-frames to be transmitted. :param sframes: integer Range: 1 to 1633 (dynamic) """ param = Conversions.decimal_value_to_str(sframes) self._core.io.write(f'SOURce<HwInstance>:BB:DVB:DVBH:SFRames {param}')
def clone(self) -> 'DvbhCls': """ 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 = DvbhCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group