from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from .....Internal.StructBase import StructBase
from .....Internal.ArgStruct import ArgStruct
from ..... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class IvalCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("ival", core, parent)
# noinspection PyTypeChecker
[docs]
class TimeSpan(StructBase):
"""
Response structure. Fields: \n
- 1 Start: float: No parameter help available
- 2 Stop: float: No parameter help available
"""
__meta_args_list = [
ArgStruct.scalar_float('Start'),
ArgStruct.scalar_float('Stop')]
def __init__(self):
StructBase.__init__(self, self)
self.Start: float = None
self.Stop: float = None
[docs]
def get(self, stimulus: float, window=repcap.Window.Default) -> TimeSpan:
"""
``CALCulate<n>:RTMS:WINDow:IVAL`` \n
Snippet: ``value: TimeSpan = driver.calculate.rtms.window.ival.get(stimulus = 1.0, window = repcap.Window.Default)`` \n
Returns the current analysis interval for applications in MSRT operating mode.
:param window: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Calculate')
:return: structure: for return value, see the help for TimeSpan structure arguments.
"""
param = Conversions.decimal_value_to_str(stimulus)
window_cmd_val = self._cmd_group.get_repcap_cmd_value(window, repcap.Window)
return self._core.io.query_struct(f'CALCulate{window_cmd_val}:RTMS:WINDow:IVAL? {param}', self.__class__.TimeSpan())