from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SymbolRateCls:
"""
| Commands in total: 4
| Subgroups: 0
| Direct child commands: 4
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("symbolRate", core, parent)
[docs]
def get_max(self) -> int:
"""
``[SOURce<HW>]:BBIN:SRATe:MAX`` \n
Snippet: ``value: int = driver.source.bbin.symbolRate.get_max()`` \n
Queries the maximum sample rate.
:return: dig_iq_hs_out_sr_max: integer Range: 400 to 600E6
"""
response = self._core.io.query_str('SOURce<HwInstance>:BBIN:SRATe:MAX?')
return Conversions.str_to_int(response)
# noinspection PyTypeChecker
[docs]
def get_source(self) -> enums.BbinSampRateMode:
"""
``[SOURce<HW>]:BBIN:SRATe:SOURce`` \n
Snippet: ``value: enums.BbinSampRateMode = driver.source.bbin.symbolRate.get_source()`` \n
Sets the digital interface used to estimate the sample rate.
:return: source: DIN | HSDin DIN Estimates the sample rate based on the digital input signal. HSDin Enabled for method ``RsSmbv.source.bbin.digital.interface()`` HSDin.
"""
response = self._core.io.query_str('SOURce<HwInstance>:BBIN:SRATe:SOURce?')
return Conversions.str_to_scalar_enum(response, enums.BbinSampRateMode)
[docs]
def set_source(self, source: enums.BbinSampRateMode) -> None:
"""
``[SOURce<HW>]:BBIN:SRATe:SOURce`` \n
Snippet: ``driver.source.bbin.symbolRate.set_source(source = enums.BbinSampRateMode.DIN)`` \n
Sets the digital interface used to estimate the sample rate.
:param source: DIN | HSDin DIN Estimates the sample rate based on the digital input signal. HSDin Enabled for method ``RsSmbv.source.bbin.digital.interface()`` HSDin.
"""
param = Conversions.enum_scalar_to_str(source, enums.BbinSampRateMode)
self._core.io.write(f'SOURce<HwInstance>:BBIN:SRATe:SOURce {param}')
[docs]
def get_sum(self) -> int:
"""
``[SOURce<HW>]:BBIN:SRATe:SUM`` \n
Snippet: ``value: int = driver.source.bbin.symbolRate.get_sum()`` \n
Queries the sum of the sample rates of all active channels.
:return: dig_iq_hs_out_sr_sum: integer Range: 0 to depends on settings
"""
response = self._core.io.query_str('SOURce<HwInstance>:BBIN:SRATe:SUM?')
return Conversions.str_to_int(response)
[docs]
def get_actual(self) -> float:
"""
``[SOURce<HW>]:BBIN:SRATe:[ACTual]`` \n
Snippet: ``value: float = driver.source.bbin.symbolRate.get_actual()`` \n
Queries the sample rate of the external digital baseband signal.
:return: actual: float Range: 400 to 100E6
"""
response = self._core.io.query_str('SOURce<HwInstance>:BBIN:SRATe:ACTual?')
return Conversions.str_to_float(response)
[docs]
def set_actual(self, actual: float) -> None:
"""
``[SOURce<HW>]:BBIN:SRATe:[ACTual]`` \n
Snippet: ``driver.source.bbin.symbolRate.set_actual(actual = 1.0)`` \n
Queries the sample rate of the external digital baseband signal.
:param actual: float Range: 400 to 100E6
"""
param = Conversions.decimal_value_to_str(actual)
self._core.io.write(f'SOURce<HwInstance>:BBIN:SRATe:ACTual {param}')