from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class RippleCls:
"""
| Commands in total: 69
| Subgroups: 3
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("ripple", core, parent)
@property
def execute(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_execute'):
from .Execute import ExecuteCls
self._execute = ExecuteCls(self._core, self._cmd_group)
return self._execute
@property
def report(self):
"""
| Commands in total: 1
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_report'):
from .Report import ReportCls
self._report = ReportCls(self._core, self._cmd_group)
return self._report
@property
def result(self):
"""
| Commands in total: 64
| Subgroups: 8
| Direct child commands: 0
"""
if not hasattr(self, '_result'):
from .Result import ResultCls
self._result = ResultCls(self._core, self._cmd_group)
return self._result
[docs]
def get_frequency(self) -> float:
"""
``POWer:RIPPle:FREQuency`` \n
Snippet: ``value: float = driver.power.ripple.get_frequency()`` \n
Sets the SMPS switching frequency.
:return: smps_frequency: 1 to 100E+9
"""
response = self._core.io.query_str('POWer:RIPPle:FREQuency?')
return Conversions.str_to_float(response)
[docs]
def set_frequency(self, smps_frequency: float) -> None:
"""
``POWer:RIPPle:FREQuency`` \n
Snippet: ``driver.power.ripple.set_frequency(smps_frequency = 1.0)`` \n
Sets the SMPS switching frequency.
:param smps_frequency: 1 to 100E+9
"""
param = Conversions.decimal_value_to_str(smps_frequency)
self._core.io.write(f'POWer:RIPPle:FREQuency {param}')
# noinspection PyTypeChecker
[docs]
def get_auto_scale(self) -> enums.AutoScale:
"""
``POWer:RIPPle:AUToscale`` \n
Snippet: ``value: enums.AutoScale = driver.power.ripple.get_auto_scale()`` \n
Selects the scaling for the display of the results.
:return: auto_scale: AUTO | MANUAL
"""
response = self._core.io.query_str('POWer:RIPPle:AUToscale?')
return Conversions.str_to_scalar_enum(response, enums.AutoScale)
[docs]
def set_auto_scale(self, auto_scale: enums.AutoScale) -> None:
"""
``POWer:RIPPle:AUToscale`` \n
Snippet: ``driver.power.ripple.set_auto_scale(auto_scale = enums.AutoScale.AUTO)`` \n
Selects the scaling for the display of the results.
:param auto_scale: AUTO | MANUAL
"""
param = Conversions.enum_scalar_to_str(auto_scale, enums.AutoScale)
self._core.io.write(f'POWer:RIPPle:AUToscale {param}')
[docs]
def get_current(self) -> bool:
"""
``POWer:RIPPle:CURRent`` \n
Snippet: ``value: bool = driver.power.ripple.get_current()`` \n
Activates or deactivates the input current.
:return: two_ch_meas: OFF | ON
"""
response = self._core.io.query_str('POWer:RIPPle:CURRent?')
return Conversions.str_to_bool(response)
[docs]
def set_current(self, two_ch_meas: bool) -> None:
"""
``POWer:RIPPle:CURRent`` \n
Snippet: ``driver.power.ripple.set_current(two_ch_meas = False)`` \n
Activates or deactivates the input current.
:param two_ch_meas: OFF | ON
"""
param = Conversions.bool_to_str(two_ch_meas)
self._core.io.write(f'POWer:RIPPle:CURRent {param}')
def clone(self) -> 'RippleCls':
"""
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 = RippleCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group