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 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)