from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class EnableCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("enable", core, parent)
[docs]
def set(self, enable: bool, frame=repcap.Frame.Default) -> None:
"""
``TRIGger:SBSW:HBTO:FRAMe<*>:ENABle`` \n
Snippet: ``driver.trigger.sbsw.hbto.frame.enable.set(enable = False, frame = repcap.Frame.Default)`` \n
Enables or disables the checking condition for the selected frame for the software trigger.
:param enable: OFF | ON
:param frame: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Frame')
"""
param = Conversions.bool_to_str(enable)
frame_cmd_val = self._cmd_group.get_repcap_cmd_value(frame, repcap.Frame)
self._core.io.write(f'TRIGger:SBSW:HBTO:FRAMe{frame_cmd_val}:ENABle {param}')
[docs]
def get(self, frame=repcap.Frame.Default) -> bool:
"""
``TRIGger:SBSW:HBTO:FRAMe<*>:ENABle`` \n
Snippet: ``value: bool = driver.trigger.sbsw.hbto.frame.enable.get(frame = repcap.Frame.Default)`` \n
Enables or disables the checking condition for the selected frame for the software trigger.
:param frame: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Frame')
:return: enable: OFF | ON
"""
frame_cmd_val = self._cmd_group.get_repcap_cmd_value(frame, repcap.Frame)
response = self._core.io.query_str(f'TRIGger:SBSW:HBTO:FRAMe{frame_cmd_val}:ENABle?')
return Conversions.str_to_bool(response)