from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ShbuCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("shbu", core, parent)
[docs]
def set(self, show_bus: bool, pwrBus=repcap.PwrBus.Default) -> None:
"""
``PBUS<*>:DISPlay:SHBU`` \n
Snippet: ``driver.pbus.display.shbu.set(show_bus = False, pwrBus = repcap.PwrBus.Default)`` \n
If enabled, the resulting bus signal and bus values are displayed in the diagram.
:param show_bus: OFF | ON
:param pwrBus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Pbus')
"""
param = Conversions.bool_to_str(show_bus)
pwrBus_cmd_val = self._cmd_group.get_repcap_cmd_value(pwrBus, repcap.PwrBus)
self._core.io.write(f'PBUS{pwrBus_cmd_val}:DISPlay:SHBU {param}')
[docs]
def get(self, pwrBus=repcap.PwrBus.Default) -> bool:
"""
``PBUS<*>:DISPlay:SHBU`` \n
Snippet: ``value: bool = driver.pbus.display.shbu.get(pwrBus = repcap.PwrBus.Default)`` \n
If enabled, the resulting bus signal and bus values are displayed in the diagram.
:param pwrBus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Pbus')
:return: show_bus: OFF | ON
"""
pwrBus_cmd_val = self._cmd_group.get_repcap_cmd_value(pwrBus, repcap.PwrBus)
response = self._core.io.query_str(f'PBUS{pwrBus_cmd_val}:DISPlay:SHBU?')
return Conversions.str_to_bool(response)