from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class AresetCls:
"""
| Commands in total: 4
| Subgroups: 1
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("areset", core, parent)
@property
def immediate(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_immediate'):
from .Immediate import ImmediateCls
self._immediate = ImmediateCls(self._core, self._cmd_group)
return self._immediate
# noinspection PyTypeChecker
[docs]
def get_mode(self) -> enums.StatisticMode:
"""
``ACQuire:ARESet:MODE`` \n
Snippet: ``value: enums.StatisticMode = driver.acquire.areset.get_mode()`` \n
Defines when the envelope and average evaluation restarts.
:return: artm_rst: NONE | TIME | WFMS \n
- TIME: Restarts the envelope and average calculation after the time defined with ACQuire:ARESet:TIME.
- WFMS: Restarts the envelope and average calculation after a number of acquired waveforms defined with ACQuire:ARESet:COUNt.
"""
response = self._core.io.query_str_with_opc('ACQuire:ARESet:MODE?')
return Conversions.str_to_scalar_enum(response, enums.StatisticMode)
[docs]
def set_mode(self, artm_rst: enums.StatisticMode) -> None:
"""
``ACQuire:ARESet:MODE`` \n
Snippet: ``driver.acquire.areset.set_mode(artm_rst = enums.StatisticMode.MEAS)`` \n
Defines when the envelope and average evaluation restarts.
:param artm_rst: NONE | TIME | WFMS \n
- TIME: Restarts the envelope and average calculation after the time defined with ACQuire:ARESet:TIME.
- WFMS: Restarts the envelope and average calculation after a number of acquired waveforms defined with ACQuire:ARESet:COUNt.
"""
param = Conversions.enum_scalar_to_str(artm_rst, enums.StatisticMode)
self._core.io.write_with_opc(f'ACQuire:ARESet:MODE {param}')
[docs]
def get_time(self) -> float:
"""
``ACQuire:ARESet:TIME`` \n
Snippet: ``value: float = driver.acquire.areset.get_time()`` \n
Defines the time after which the envelope and average evaluation restarts. The setting is relevant if method
``RsRtx.acquire.areset.mode()`` is set to TIME.
"""
response = self._core.io.query_str_with_opc('ACQuire:ARESet:TIME?')
return Conversions.str_to_float(response)
[docs]
def set_time(self, envlp_tout: float) -> None:
"""
``ACQuire:ARESet:TIME`` \n
Snippet: ``driver.acquire.areset.set_time(envlp_tout = 1.0)`` \n
Defines the time after which the envelope and average evaluation restarts. The setting is relevant if method
``RsRtx.acquire.areset.mode()`` is set to TIME.
:param envlp_tout: 0.1 to 10000
"""
param = Conversions.decimal_value_to_str(envlp_tout)
self._core.io.write_with_opc(f'ACQuire:ARESet:TIME {param}')
[docs]
def get_count(self) -> int:
"""
``ACQuire:ARESet:COUNt`` \n
Snippet: ``value: int = driver.acquire.areset.get_count()`` \n
Defines the number of acquired waveforms after which the envelope and average evaluation restarts.
The setting is relevant if method ``RsRtx.acquire.areset.mode()`` is set to WFMS.
:return: nof_waveforms: 2 to 16.7772E+6
"""
response = self._core.io.query_str_with_opc('ACQuire:ARESet:COUNt?')
return Conversions.str_to_int(response)
[docs]
def set_count(self, nof_waveforms: int) -> None:
"""
``ACQuire:ARESet:COUNt`` \n
Snippet: ``driver.acquire.areset.set_count(nof_waveforms = 1)`` \n
Defines the number of acquired waveforms after which the envelope and average evaluation restarts.
The setting is relevant if method ``RsRtx.acquire.areset.mode()`` is set to WFMS.
:param nof_waveforms: 2 to 16.7772E+6
"""
param = Conversions.decimal_value_to_str(nof_waveforms)
self._core.io.write_with_opc(f'ACQuire:ARESet:COUNt {param}')
def clone(self) -> 'AresetCls':
"""
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 = AresetCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group