Source code for rsmxo.Implementations.Digital.Data.Values

from typing import List

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from .... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class ValuesCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("values", core, parent)

[docs] def get(self, digital=repcap.Digital.Default) -> List[int]: """ ``DIGital<0..15>:DATA[:VALues]`` \n Snippet: ``value: List[int] = driver.digital.data.values.get(digital = repcap.Digital.Default)`` \n Returns the data of the specified digital channel. :param digital: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Digital') :return: digital_data: List of values according to the format and content settings. """ digital_cmd_val = self._cmd_group.get_repcap_cmd_value(digital, repcap.Digital) response = self._core.io.query_bin_or_ascii_int_list(f'FORMAT ASC;DIGital{digital_cmd_val}:DATA:VALues?') return response