from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class IndexCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("index", core, parent)
[docs]
def set(self, index: int, marker=repcap.Marker.Default) -> None:
"""
``FRANalysis:MARKer<*>:INDex`` \n
Snippet: ``driver.franalysis.marker.index.set(index = 1, marker = repcap.Marker.Default)`` \n
Returns the point index in the plot where the specified marker is positioned.
:param index: The lowest index is 0, which corresponds to line 1 in the result table. PointIndex = # in result table - 1
:param marker: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Marker')
"""
param = Conversions.decimal_value_to_str(index)
marker_cmd_val = self._cmd_group.get_repcap_cmd_value(marker, repcap.Marker)
self._core.io.write(f'FRANalysis:MARKer{marker_cmd_val}:INDex {param}')
[docs]
def get(self, marker=repcap.Marker.Default) -> int:
"""
``FRANalysis:MARKer<*>:INDex`` \n
Snippet: ``value: int = driver.franalysis.marker.index.get(marker = repcap.Marker.Default)`` \n
Returns the point index in the plot where the specified marker is positioned.
:param marker: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Marker')
:return: index: The lowest index is 0, which corresponds to line 1 in the result table. PointIndex = # in result table - 1
"""
marker_cmd_val = self._cmd_group.get_repcap_cmd_value(marker, repcap.Marker)
response = self._core.io.query_str(f'FRANalysis:MARKer{marker_cmd_val}:INDex?')
return Conversions.str_to_int(response)