Source code for RsSmbv.Implementations.Source.Iq.Output.Digital.Power

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class PowerCls: """Power commands group definition. 6 total commands, 1 Subgroups, 4 group commands""" def __init__(self, core: Core, parent): self._core = core self._cmd_group = CommandsGroup("power", core, parent) @property def step(self): """step commands group. 0 Sub-classes, 2 commands.""" if not hasattr(self, '_step'): from .Step import StepCls self._step = StepCls(self._core, self._cmd_group) return self._step
[docs] def get_level(self) -> float: """SCPI: [SOURce<HW>]:IQ:OUTPut:DIGital:POWer:LEVel \n Snippet: value: float = driver.source.iq.output.digital.power.get_level() \n Sets the RMS level of digital I/Q output signal or of the channel of the HS digital I/Q output signal. The level is relative to full scale of 0.5 V (in terms of dB full scale) . \n :return: level: No help available """ response = self._core.io.query_str('SOURce<HwInstance>:IQ:OUTPut:DIGital:POWer:LEVel?') return Conversions.str_to_float(response)
[docs] def set_level(self, level: float) -> None: """SCPI: [SOURce<HW>]:IQ:OUTPut:DIGital:POWer:LEVel \n Snippet: driver.source.iq.output.digital.power.set_level(level = 1.0) \n Sets the RMS level of digital I/Q output signal or of the channel of the HS digital I/Q output signal. The level is relative to full scale of 0.5 V (in terms of dB full scale) . \n :param level: float Range: -60 to 0 """ param = Conversions.decimal_value_to_str(level) self._core.io.write(f'SOURce<HwInstance>:IQ:OUTPut:DIGital:POWer:LEVel {param}')
[docs] def get_pep(self) -> float: """SCPI: [SOURce<HW>]:IQ:OUTPut:DIGital:POWer:PEP \n Snippet: value: float = driver.source.iq.output.digital.power.get_pep() \n Sets the peak level of digital I/Q output signal or of the channel of the HS digital I/Q output signal. The level is relative to full scale of 0.5 V (in terms of dB full scale) . \n :return: pep: No help available """ response = self._core.io.query_str('SOURce<HwInstance>:IQ:OUTPut:DIGital:POWer:PEP?') return Conversions.str_to_float(response)
[docs] def set_pep(self, pep: float) -> None: """SCPI: [SOURce<HW>]:IQ:OUTPut:DIGital:POWer:PEP \n Snippet: driver.source.iq.output.digital.power.set_pep(pep = 1.0) \n Sets the peak level of digital I/Q output signal or of the channel of the HS digital I/Q output signal. The level is relative to full scale of 0.5 V (in terms of dB full scale) . \n :param pep: float Range: -60 to 0 """ param = Conversions.decimal_value_to_str(pep) self._core.io.write(f'SOURce<HwInstance>:IQ:OUTPut:DIGital:POWer:PEP {param}')
[docs] def get_state(self) -> bool: """SCPI: [SOURce]:IQ:OUTPut:DIGital:POWer:STATe \n Snippet: value: bool = driver.source.iq.output.digital.power.get_state() \n No command help available \n :return: state: No help available """ response = self._core.io.query_str('SOURce:IQ:OUTPut:DIGital:POWer:STATe?') return Conversions.str_to_bool(response)
[docs] def set_state(self, state: bool) -> None: """SCPI: [SOURce]:IQ:OUTPut:DIGital:POWer:STATe \n Snippet: driver.source.iq.output.digital.power.set_state(state = False) \n No command help available \n :param state: No help available """ param = Conversions.bool_to_str(state) self._core.io.write(f'SOURce:IQ:OUTPut:DIGital:POWer:STATe {param}')
# noinspection PyTypeChecker
[docs] def get_via(self) -> enums.IqOutDispViaType: """SCPI: [SOURce]:IQ:OUTPut:DIGital:POWer:VIA \n Snippet: value: enums.IqOutDispViaType = driver.source.iq.output.digital.power.get_via() \n Selects the respective level entry field for the I/Q output. \n :return: via: PEP| LEVel """ response = self._core.io.query_str('SOURce:IQ:OUTPut:DIGital:POWer:VIA?') return Conversions.str_to_scalar_enum(response, enums.IqOutDispViaType)
[docs] def set_via(self, via: enums.IqOutDispViaType) -> None: """SCPI: [SOURce]:IQ:OUTPut:DIGital:POWer:VIA \n Snippet: driver.source.iq.output.digital.power.set_via(via = enums.IqOutDispViaType.LEVel) \n Selects the respective level entry field for the I/Q output. \n :param via: PEP| LEVel """ param = Conversions.enum_scalar_to_str(via, enums.IqOutDispViaType) self._core.io.write(f'SOURce:IQ:OUTPut:DIGital:POWer:VIA {param}')
def clone(self) -> 'PowerCls': """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 = PowerCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group