Source code for RsFsw.Implementations.Configure.Generator.Power.Level.Offset

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


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

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

[docs] def set(self, level_offset: float) -> None: """ ``CONFigure:GENerator:POWer:LEVel:OFFSet`` \n Snippet: ``driver.configure.generator.power.level.offset.set(level_offset = 1.0)`` \n Defines a fixed offset in the power level used by the generator, for example due to a gain from the DUT. :param level_offset: numeric value Unit: DBM """ param = Conversions.decimal_value_to_str(level_offset) self._core.io.write(f'CONFigure:GENerator:POWer:LEVel:OFFSet {param}')
[docs] def get(self) -> float: """ ``CONFigure:GENerator:POWer:LEVel:OFFSet`` \n Snippet: ``value: float = driver.configure.generator.power.level.offset.get()`` \n Defines a fixed offset in the power level used by the generator, for example due to a gain from the DUT. :return: level_offset: numeric value Unit: DBM """ response = self._core.io.query_str(f'CONFigure:GENerator:POWer:LEVel:OFFSet?') return Conversions.str_to_float(response)