from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class MaxCountCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("maxCount", core, parent)
[docs]
def set(self, max_frame_count: int, math=repcap.Math.Default) -> None:
"""
``CALCulate:MATH<*>:FFT:FRAMe:MAXCount`` \n
Snippet: ``driver.calculate.math.fft.frame.maxCount.set(max_frame_count = 1, math = repcap.Math.Default)`` \n
Restricts the maximum number of frames to be calculated. Due to the other parameter settings, the required number of
frames may become very high, thus slowing performance. By restricting the number of frames, you can avoid performance
loss without changing the other parameters.
:param max_frame_count: 1 to 10000
:param math: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Math')
"""
param = Conversions.decimal_value_to_str(max_frame_count)
math_cmd_val = self._cmd_group.get_repcap_cmd_value(math, repcap.Math)
self._core.io.write_with_opc(f'CALCulate:MATH{math_cmd_val}:FFT:FRAMe:MAXCount {param}')
[docs]
def get(self, math=repcap.Math.Default) -> int:
"""
``CALCulate:MATH<*>:FFT:FRAMe:MAXCount`` \n
Snippet: ``value: int = driver.calculate.math.fft.frame.maxCount.get(math = repcap.Math.Default)`` \n
Restricts the maximum number of frames to be calculated. Due to the other parameter settings, the required number of
frames may become very high, thus slowing performance. By restricting the number of frames, you can avoid performance
loss without changing the other parameters.
:param math: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Math')
:return: max_frame_count: 1 to 10000
"""
math_cmd_val = self._cmd_group.get_repcap_cmd_value(math, repcap.Math)
response = self._core.io.query_str_with_opc(f'CALCulate:MATH{math_cmd_val}:FFT:FRAMe:MAXCount?')
return Conversions.str_to_int(response)