Source code for rsrtx.Implementations.Search.Result.Usb.Packet.Sc

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


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

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

[docs] def get(self, search: str, busUsbPacket=repcap.BusUsbPacket.Default) -> int: """ ``SEARch:RESult:USB:PACKet<*>:SC`` \n Snippet: ``value: int = driver.search.result.usb.packet.sc.get(search = 'abc', busUsbPacket = repcap.BusUsbPacket.Default)`` \n Returns the Start- / Complete-split transaction (SSPLIT / CSPLIT) flag bits for the selected packet number within the search result. :param busUsbPacket: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Packet') """ param = Conversions.value_to_quoted_str(search) busUsbPacket_cmd_val = self._cmd_group.get_repcap_cmd_value(busUsbPacket, repcap.BusUsbPacket) response = self._core.io.query_str(f'SEARch:RESult:USB:PACKet{busUsbPacket_cmd_val}:SC? {param}') return Conversions.str_to_int(response)