from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ShowCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("show", core, parent)
[docs]
def set(self, shw_decode_tbl: bool, bus=repcap.Bus.Default, decTable=repcap.DecTable.Default) -> None:
"""
``BUS<*>:PARallel:DECTable<*>:SHOW`` \n
Snippet: ``driver.bus.parallel.decTable.show.set(shw_decode_tbl = False, bus = repcap.Bus.Default, decTable = repcap.DecTable.Default)`` \n
Available only if method ``RsRtx.bus.parallel.clon.set()`` is set to ON. If enabled, a results box opens with decoded
values of the bus signal and its time. You can query the number of values (method
``RsRtx.bus.parallel.decTable.count.get()`` ) and their data value (method ``RsRtx.bus.parallel.decTable.data.get()`` ) .
:param shw_decode_tbl: OFF | ON
:param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus')
:param decTable: optional repeated capability selector. Default value: Nr1 (settable in the interface 'DecTable')
"""
param = Conversions.bool_to_str(shw_decode_tbl)
bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus)
decTable_cmd_val = self._cmd_group.get_repcap_cmd_value(decTable, repcap.DecTable)
self._core.io.write(f'BUS{bus_cmd_val}:PARallel:DECTable{decTable_cmd_val}:SHOW {param}')
[docs]
def get(self, bus=repcap.Bus.Default, decTable=repcap.DecTable.Default) -> bool:
"""
``BUS<*>:PARallel:DECTable<*>:SHOW`` \n
Snippet: ``value: bool = driver.bus.parallel.decTable.show.get(bus = repcap.Bus.Default, decTable = repcap.DecTable.Default)`` \n
Available only if method ``RsRtx.bus.parallel.clon.set()`` is set to ON. If enabled, a results box opens with decoded
values of the bus signal and its time. You can query the number of values (method
``RsRtx.bus.parallel.decTable.count.get()`` ) and their data value (method ``RsRtx.bus.parallel.decTable.data.get()`` ) .
:param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus')
:param decTable: optional repeated capability selector. Default value: Nr1 (settable in the interface 'DecTable')
:return: shw_decode_tbl: OFF | ON
"""
bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus)
decTable_cmd_val = self._cmd_group.get_repcap_cmd_value(decTable, repcap.DecTable)
response = self._core.io.query_str(f'BUS{bus_cmd_val}:PARallel:DECTable{decTable_cmd_val}:SHOW?')
return Conversions.str_to_bool(response)