from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class MultipleCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("multiple", core, parent)
[docs]
def set(self, global_meass_all: bool, measIndex=repcap.MeasIndex.Default) -> None:
"""
``MEASurement<*>:MULTiple`` \n
Snippet: ``driver.measurement.multiple.set(global_meass_all = False, measIndex = repcap.MeasIndex.Default)`` \n
If ON, the measurement is performed repeatedly if the measured parameter occurs several times inside the acquisition or
defined gate. All results are included in evaluation, e.g. in statistics. To set the number of results to be considered,
use method ``RsMxo.measurement.mnoMeas.set()`` .
:param global_meass_all: OFF | ON
:param measIndex: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement')
"""
param = Conversions.bool_to_str(global_meass_all)
measIndex_cmd_val = self._cmd_group.get_repcap_cmd_value(measIndex, repcap.MeasIndex)
self._core.io.write(f'MEASurement{measIndex_cmd_val}:MULTiple {param}')
[docs]
def get(self, measIndex=repcap.MeasIndex.Default) -> bool:
"""
``MEASurement<*>:MULTiple`` \n
Snippet: ``value: bool = driver.measurement.multiple.get(measIndex = repcap.MeasIndex.Default)`` \n
If ON, the measurement is performed repeatedly if the measured parameter occurs several times inside the acquisition or
defined gate. All results are included in evaluation, e.g. in statistics. To set the number of results to be considered,
use method ``RsMxo.measurement.mnoMeas.set()`` .
:param measIndex: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Measurement')
:return: global_meass_all: OFF | ON
"""
measIndex_cmd_val = self._cmd_group.get_repcap_cmd_value(measIndex, repcap.MeasIndex)
response = self._core.io.query_str(f'MEASurement{measIndex_cmd_val}:MULTiple?')
return Conversions.str_to_bool(response)