Source code for RsFsw.Implementations.Applications.K14x_Nr5G.Unit.Opower

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class OpowerCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

[docs] def set(self, unit: enums.OffPowerUnit) -> None: """ ``UNIT:OPOWer`` \n Snippet: ``driver.applications.k14Xnr5G.unit.opower.set(unit = enums.OffPowerUnit.DBM)`` \n Selects the unit the off power (transmit on / off power measurements) is displayed in. :param unit: DBM Displays the power as an absolute value in dBm. DMHZ Displays the power as a relative value in dBm/MHz. """ param = Conversions.enum_scalar_to_str(unit, enums.OffPowerUnit) self._core.io.write(f'UNIT:OPOWer {param}')
# noinspection PyTypeChecker
[docs] def get(self) -> enums.OffPowerUnit: """ ``UNIT:OPOWer`` \n Snippet: ``value: enums.OffPowerUnit = driver.applications.k14Xnr5G.unit.opower.get()`` \n Selects the unit the off power (transmit on / off power measurements) is displayed in. :return: unit: DBM Displays the power as an absolute value in dBm. DMHZ Displays the power as a relative value in dBm/MHz. """ response = self._core.io.query_str(f'UNIT:OPOWer?') return Conversions.str_to_scalar_enum(response, enums.OffPowerUnit)