Source code for RsSmbv.Implementations.Source.Bb.Mccw.Cfactor

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


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

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

[docs] def get_actual(self) -> float: """ ``[SOURce<HW>]:BB:MCCW:CFACtor:ACTual`` \n Snippet: ``value: float = driver.source.bb.mccw.cfactor.get_actual()`` \n Queries the actual Crest Factor for optimization mode target crest. :return: actual: float Range: 0 to 100 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:MCCW:CFACtor:ACTual?') return Conversions.str_to_float(response)
# noinspection PyTypeChecker
[docs] def get_mode(self) -> enums.MccwCrestFactMode: """ ``[SOURce<HW>]:BB:MCCW:CFACtor:MODE`` \n Snippet: ``value: enums.MccwCrestFactMode = driver.source.bb.mccw.cfactor.get_mode()`` \n Sets the mode by which automatic settings minimize the crest factor or hold it at a chosen value. :return: mode: OFF | CHIRp | SLOW SLOW corresponds to the manual control 'Target Crest' """ response = self._core.io.query_str('SOURce<HwInstance>:BB:MCCW:CFACtor:MODE?') return Conversions.str_to_scalar_enum(response, enums.MccwCrestFactMode)
[docs] def set_mode(self, mode: enums.MccwCrestFactMode) -> None: """ ``[SOURce<HW>]:BB:MCCW:CFACtor:MODE`` \n Snippet: ``driver.source.bb.mccw.cfactor.set_mode(mode = enums.MccwCrestFactMode.CHIRp)`` \n Sets the mode by which automatic settings minimize the crest factor or hold it at a chosen value. :param mode: OFF | CHIRp | SLOW SLOW corresponds to the manual control 'Target Crest' """ param = Conversions.enum_scalar_to_str(mode, enums.MccwCrestFactMode) self._core.io.write(f'SOURce<HwInstance>:BB:MCCW:CFACtor:MODE {param}')
[docs] def get_value(self) -> float: """ ``[SOURce<HW>]:BB:MCCW:CFACtor`` \n Snippet: ``value: float = driver.source.bb.mccw.cfactor.get_value()`` \n Sets the desired crest factor, if the optimization mode target crest factor is used. :return: cfactor: float Range: 0 to 30 """ response = self._core.io.query_str('SOURce<HwInstance>:BB:MCCW:CFACtor?') return Conversions.str_to_float(response)
[docs] def set_value(self, cfactor: float) -> None: """ ``[SOURce<HW>]:BB:MCCW:CFACtor`` \n Snippet: ``driver.source.bb.mccw.cfactor.set_value(cfactor = 1.0)`` \n Sets the desired crest factor, if the optimization mode target crest factor is used. :param cfactor: float Range: 0 to 30 """ param = Conversions.decimal_value_to_str(cfactor) self._core.io.write(f'SOURce<HwInstance>:BB:MCCW:CFACtor {param}')