from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class StatisticsCls:
"""
| Commands in total: 8
| Subgroups: 7
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("statistics", core, parent)
@property
def enable(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_enable'):
from .Enable import EnableCls
self._enable = EnableCls(self._core, self._cmd_group)
return self._enable
@property
def mode(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_mode'):
from .Mode import ModeCls
self._mode = ModeCls(self._core, self._cmd_group)
return self._mode
@property
def rcount(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_rcount'):
from .Rcount import RcountCls
self._rcount = RcountCls(self._core, self._cmd_group)
return self._rcount
@property
def rmeasCount(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_rmeasCount'):
from .RmeasCount import RmeasCountCls
self._rmeasCount = RmeasCountCls(self._core, self._cmd_group)
return self._rmeasCount
@property
def rtime(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_rtime'):
from .Rtime import RtimeCls
self._rtime = RtimeCls(self._core, self._cmd_group)
return self._rtime
@property
def histogram(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_histogram'):
from .Histogram import HistogramCls
self._histogram = HistogramCls(self._core, self._cmd_group)
return self._histogram
@property
def hbIns(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_hbIns'):
from .HbIns import HbInsCls
self._hbIns = HbInsCls(self._core, self._cmd_group)
return self._hbIns
[docs]
def reset(self, measurement=repcap.Measurement.Default, opc_timeout_ms: int = -1) -> None:
"""
``MEASurement<*>:STATistics:RESet`` \n
Snippet: ``driver.measurement.statistics.reset(measurement = repcap.Measurement.Default)`` \n
Resets the histogram, the long term measurement and the statistics.
:param measurement: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement')
:param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.
"""
measurement_cmd_val = self._cmd_group.get_repcap_cmd_value(measurement, repcap.Measurement)
self._core.io.write_with_opc(f'MEASurement{measurement_cmd_val}:STATistics:RESet', opc_timeout_ms)
def clone(self) -> 'StatisticsCls':
"""
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 = StatisticsCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group