from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SlewrateCls:
"""
| Commands in total: 15
| Subgroups: 4
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("slewrate", 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 gate(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_gate'):
from .Gate import GateCls
self._gate = GateCls(self._core, self._cmd_group)
return self._gate
@property
def result(self):
"""
| Commands in total: 8
| 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
# noinspection PyTypeChecker
[docs]
def get_auto(self) -> enums.AutoScale:
"""
``POWer:SLEWrate:AUTO`` \n
Snippet: ``value: enums.AutoScale = driver.power.slewrate.get_auto()`` \n
Selects the scaling for the display of the results.
:return: auto_scale: AUTO | MANUAL
"""
response = self._core.io.query_str('POWer:SLEWrate:AUTO?')
return Conversions.str_to_scalar_enum(response, enums.AutoScale)
[docs]
def set_auto(self, auto_scale: enums.AutoScale) -> None:
"""
``POWer:SLEWrate:AUTO`` \n
Snippet: ``driver.power.slewrate.set_auto(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:SLEWrate:AUTO {param}')
# noinspection PyTypeChecker
[docs]
def get_source(self) -> enums.PowerRippleMeasType:
"""
``POWer:SLEWrate:SOURce`` \n
Snippet: ``value: enums.PowerRippleMeasType = driver.power.slewrate.get_source()`` \n
Selects the source for the slew rate measurement.
:return: source: CURRENT | VOLTAGE
"""
response = self._core.io.query_str('POWer:SLEWrate:SOURce?')
return Conversions.str_to_scalar_enum(response, enums.PowerRippleMeasType)
[docs]
def set_source(self, source: enums.PowerRippleMeasType) -> None:
"""
``POWer:SLEWrate:SOURce`` \n
Snippet: ``driver.power.slewrate.set_source(source = enums.PowerRippleMeasType.CURRENT)`` \n
Selects the source for the slew rate measurement.
:param source: CURRENT | VOLTAGE
"""
param = Conversions.enum_scalar_to_str(source, enums.PowerRippleMeasType)
self._core.io.write(f'POWer:SLEWrate:SOURce {param}')
[docs]
def get_avg_deriv(self) -> bool:
"""
``POWer:SLEWrate:AVGDeriv`` \n
Snippet: ``value: bool = driver.power.slewrate.get_avg_deriv()`` \n
Activates or deactivates average.
:return: avg_derivative: OFF | ON
"""
response = self._core.io.query_str('POWer:SLEWrate:AVGDeriv?')
return Conversions.str_to_bool(response)
[docs]
def set_avg_deriv(self, avg_derivative: bool) -> None:
"""
``POWer:SLEWrate:AVGDeriv`` \n
Snippet: ``driver.power.slewrate.set_avg_deriv(avg_derivative = False)`` \n
Activates or deactivates average.
:param avg_derivative: OFF | ON
"""
param = Conversions.bool_to_str(avg_derivative)
self._core.io.write(f'POWer:SLEWrate:AVGDeriv {param}')
def clone(self) -> 'SlewrateCls':
"""
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 = SlewrateCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group