from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ThCouplingCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("thCoupling", core, parent)
[docs]
def set(self, state: bool, digitalNull=repcap.DigitalNull.Default) -> None:
"""
``DIGital<*>:THCoupling`` \n
Snippet: ``driver.digital.thCoupling.set(state = False, digitalNull = repcap.DigitalNull.Default)`` \n
Sets the threshold and the hysteresis for all digital channels of parallel bus 1 to the same value. The command method
``RsRtx.bus.parallel.thCoupling.set()`` is used to set all buses.
:param state: ON | OFF
:param digitalNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Digital')
"""
param = Conversions.bool_to_str(state)
digitalNull_cmd_val = self._cmd_group.get_repcap_cmd_value(digitalNull, repcap.DigitalNull)
self._core.io.write(f'DIGital{digitalNull_cmd_val}:THCoupling {param}')
[docs]
def get(self, digitalNull=repcap.DigitalNull.Default) -> bool:
"""
``DIGital<*>:THCoupling`` \n
Snippet: ``value: bool = driver.digital.thCoupling.get(digitalNull = repcap.DigitalNull.Default)`` \n
Sets the threshold and the hysteresis for all digital channels of parallel bus 1 to the same value. The command method
``RsRtx.bus.parallel.thCoupling.set()`` is used to set all buses.
:param digitalNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Digital')
:return: state: ON | OFF
"""
digitalNull_cmd_val = self._cmd_group.get_repcap_cmd_value(digitalNull, repcap.DigitalNull)
response = self._core.io.query_str(f'DIGital{digitalNull_cmd_val}:THCoupling?')
return Conversions.str_to_bool(response)