from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
from ....... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class BbPowerCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("bbPower", core, parent)
[docs]
def set(self, level: float, instrument=repcap.Instrument.Default) -> None:
"""
``TRIGger[:SEQuence]:LEVel<ant>:BBPower`` \n
Snippet: ``driver.applications.k10Xlte.trigger.sequence.level.bbPower.set(level = 1.0, instrument = repcap.Instrument.Default)`` \n
Sets the level of the baseband power trigger. Is available for the optional Digital Baseband Interface and the optional
Analog Baseband Interface.
:param level: numeric value Range: -50 dBm to +20 dBm, Unit: dBm
:param instrument: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Level')
"""
param = Conversions.decimal_value_to_str(level)
instrument_cmd_val = self._cmd_group.get_repcap_cmd_value(instrument, repcap.Instrument)
self._core.io.write(f'TRIGger:SEQuence:LEVel{instrument_cmd_val}:BBPower {param}')
[docs]
def get(self, instrument=repcap.Instrument.Default) -> float:
"""
``TRIGger[:SEQuence]:LEVel<ant>:BBPower`` \n
Snippet: ``value: float = driver.applications.k10Xlte.trigger.sequence.level.bbPower.get(instrument = repcap.Instrument.Default)`` \n
Sets the level of the baseband power trigger. Is available for the optional Digital Baseband Interface and the optional
Analog Baseband Interface.
:param instrument: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Level')
:return: level: numeric value Range: -50 dBm to +20 dBm, Unit: dBm
"""
instrument_cmd_val = self._cmd_group.get_repcap_cmd_value(instrument, repcap.Instrument)
response = self._core.io.query_str(f'TRIGger:SEQuence:LEVel{instrument_cmd_val}:BBPower?')
return Conversions.str_to_float(response)