from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class OverloadCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("overload", core, parent)
[docs]
def set(self, overload: bool, trigger=repcap.Trigger.Default) -> None:
"""
``TRIGger<*>:EXTern:OVERload`` \n
Snippet: ``driver.trigger.extern.overload.set(overload = False, trigger = repcap.Trigger.Default)`` \n
The query returns the overload status of the external trigger input. TRIGger:EXTern:OVERload 0 confirms the information
in the message box, it has same effect as OK.
:param overload: \n
- ON | 1: Iindicates an overload of the probe
- OFF | 0: In a query: no overlaod.Ssetting: confirms the information in the message box
:param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger')
"""
param = Conversions.bool_to_str(overload)
trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger)
self._core.io.write_with_opc(f'TRIGger{trigger_cmd_val}:EXTern:OVERload {param}')
[docs]
def get(self, trigger=repcap.Trigger.Default) -> bool:
"""
``TRIGger<*>:EXTern:OVERload`` \n
Snippet: ``value: bool = driver.trigger.extern.overload.get(trigger = repcap.Trigger.Default)`` \n
The query returns the overload status of the external trigger input. TRIGger:EXTern:OVERload 0 confirms the information
in the message box, it has same effect as OK.
:param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger')
:return: overload: \n
- ON | 1: Iindicates an overload of the probe
- OFF | 0: In a query: no overlaod.Ssetting: confirms the information in the message box
"""
trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger)
response = self._core.io.query_str_with_opc(f'TRIGger{trigger_cmd_val}:EXTern:OVERload?')
return Conversions.str_to_bool(response)