from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class DataCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("data", core, parent)
[docs]
def get(self, bus=repcap.Bus.Default, decTable=repcap.DecTable.Default) -> float:
"""
``BUS<*>:PARallel:DECTable<*>:DATA`` \n
Snippet: ``value: float = driver.bus.parallel.decTable.data.get(bus = repcap.Bus.Default, decTable = repcap.DecTable.Default)`` \n
Returns the data of the decoded values of the bus signal and its time.
: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')
"""
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}:DATA?')
return Conversions.str_to_float(response)