from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal.Types import DataType
from .....Internal.StructBase import StructBase
from .....Internal.ArgStruct import ArgStruct
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, summary_bit: int, app_name: str=None, window=repcap.Window.Default) -> None:
"""
``STATus:QUEStionable:LIMit<1 | 2|3 | 4>:ENABle`` \n
Snippet: ``driver.status.questionable.limit.enable.set(summary_bit = 1, app_name = 'abc', window = repcap.Window.Default)`` \n
These commands control the ENABle part of a register. The ENABle part allows true conditions in the EVENt part of the
status register to bereported in the summary bit. If a bit is 1 in the enable register and its associated event bit
transitions to true, a positive transition will occur in the summary bit reported to the next higher level.
:param window: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Limit')
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('summary_bit', summary_bit, DataType.Integer), ArgSingle('app_name', app_name, DataType.String, None, is_optional=True))
window_cmd_val = self._cmd_group.get_repcap_cmd_value(window, repcap.Window)
self._core.io.write(f'STATus:QUEStionable:LIMit{window_cmd_val}:ENABle {param}'.rstrip())
# noinspection PyTypeChecker
[docs]
class EnableStruct(StructBase):
"""
Response structure. Fields: \n
- 1 Summary_Bit: int: No parameter help available
- 2 App_Name: str: No parameter help available
"""
__meta_args_list = [
ArgStruct.scalar_int('Summary_Bit'),
ArgStruct.scalar_str('App_Name')]
def __init__(self):
StructBase.__init__(self, self)
self.Summary_Bit: int = None
self.App_Name: str = None
[docs]
def get(self, window=repcap.Window.Default) -> EnableStruct:
"""
``STATus:QUEStionable:LIMit<1 | 2|3 | 4>:ENABle`` \n
Snippet: ``value: EnableStruct = driver.status.questionable.limit.enable.get(window = repcap.Window.Default)`` \n
These commands control the ENABle part of a register. The ENABle part allows true conditions in the EVENt part of the
status register to bereported in the summary bit. If a bit is 1 in the enable register and its associated event bit
transitions to true, a positive transition will occur in the summary bit reported to the next higher level.
:param window: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Limit')
:return: structure: for return value, see the help for EnableStruct structure arguments.
"""
window_cmd_val = self._cmd_group.get_repcap_cmd_value(window, repcap.Window)
return self._core.io.query_struct(f'STATus:QUEStionable:LIMit{window_cmd_val}:ENABle?', self.__class__.EnableStruct())