from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ......Internal.Types import DataType
from ......Internal.ArgSingleList import ArgSingleList
from ......Internal.ArgSingle import ArgSingle
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, search: str, enable: bool, busFrameNull=repcap.BusFrameNull.Default) -> None:
"""
``SEARch:TRIGger:I3C:FRAMe<*>:ENABle`` \n
Snippet: ``driver.search.trigger.i3C.frame.enable.set(search = 'abc', enable = False, busFrameNull = repcap.BusFrameNull.Default)`` \n
Enables or disables the specific frame to be filtered on.
:param enable: OFF | ON
:param busFrameNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Frame')
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('enable', enable, DataType.Boolean))
busFrameNull_cmd_val = self._cmd_group.get_repcap_cmd_value(busFrameNull, repcap.BusFrameNull)
self._core.io.write(f'SEARch:TRIGger:I3C:FRAMe{busFrameNull_cmd_val}:ENABle {param}'.rstrip())
[docs]
def get(self, search: str, busFrameNull=repcap.BusFrameNull.Default) -> bool:
"""
``SEARch:TRIGger:I3C:FRAMe<*>:ENABle`` \n
Snippet: ``value: bool = driver.search.trigger.i3C.frame.enable.get(search = 'abc', busFrameNull = repcap.BusFrameNull.Default)`` \n
Enables or disables the specific frame to be filtered on.
:param busFrameNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Frame')
:return: enable: OFF | ON
"""
param = Conversions.value_to_quoted_str(search)
busFrameNull_cmd_val = self._cmd_group.get_repcap_cmd_value(busFrameNull, repcap.BusFrameNull)
response = self._core.io.query_str(f'SEARch:TRIGger:I3C:FRAMe{busFrameNull_cmd_val}:ENABle? {param}')
return Conversions.str_to_bool(response)