Source code for rsrtx.Implementations.Bus.Cmsb.Rcount

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


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

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

[docs] def get(self, bus=repcap.Bus.Default) -> int: """ ``BUS<*>:CMSB:RCOunt`` \n Snippet: ``value: int = driver.bus.cmsb.rcount.get(bus = repcap.Bus.Default)`` \n Returns the count number of decoded result frames in a custom serial bus waveform. Basically, this is the maximum result index <n> when querying results by using BUS<bb>:CMSB:RESult<n>:XXX. :param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus') """ bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus) response = self._core.io.query_str(f'BUS{bus_cmd_val}:CMSB:RCOunt?') return Conversions.str_to_int(response)