from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class LabelCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("label", core, parent)
[docs]
def set(self, show_label: bool, cursor=repcap.Cursor.Default) -> None:
"""
``CURSor<*>:LABel[:LABel]`` \n
Snippet: ``driver.cursor.label.label.set(show_label = False, cursor = repcap.Cursor.Default)`` \n
Shows the cursor labels in the diagram.
:param show_label: OFF | ON
:param cursor: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cursor')
"""
param = Conversions.bool_to_str(show_label)
cursor_cmd_val = self._cmd_group.get_repcap_cmd_value(cursor, repcap.Cursor)
self._core.io.write_with_opc(f'CURSor{cursor_cmd_val}:LABel:LABel {param}')
[docs]
def get(self, cursor=repcap.Cursor.Default) -> bool:
"""
``CURSor<*>:LABel[:LABel]`` \n
Snippet: ``value: bool = driver.cursor.label.label.get(cursor = repcap.Cursor.Default)`` \n
Shows the cursor labels in the diagram.
:param cursor: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Cursor')
:return: show_label: OFF | ON
"""
cursor_cmd_val = self._cmd_group.get_repcap_cmd_value(cursor, repcap.Cursor)
response = self._core.io.query_str_with_opc(f'CURSor{cursor_cmd_val}:LABel:LABel?')
return Conversions.str_to_bool(response)