Source code for rsrtx.Implementations.Search.Trigger.Pcie.Tlp.AddRt

from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ......Internal.Types import DataType
from ......Internal.ArgSingleList import ArgSingleList
from ......Internal.ArgSingle import ArgSingle
from ...... import enums


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

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

[docs] def set(self, search: str, tlp_address_typ: enums.BusPcieAddressType) -> None: """ ``SEARch:TRIGger:PCIE:TLP:ADRT`` \n Snippet: ``driver.search.trigger.pcie.tlp.addRt.set(search = 'abc', tlp_address_typ = enums.BusPcieAddressType.ANY)`` \n Sets the address type to be searched for in the transaction layer type. """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('tlp_address_typ', tlp_address_typ, DataType.Enum, enums.BusPcieAddressType)) self._core.io.write(f'SEARch:TRIGger:PCIE:TLP:ADRT {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self, search: str) -> enums.BusPcieAddressType: """ ``SEARch:TRIGger:PCIE:TLP:ADRT`` \n Snippet: ``value: enums.BusPcieAddressType = driver.search.trigger.pcie.tlp.addRt.get(search = 'abc')`` \n Sets the address type to be searched for in the transaction layer type. :param search: ANY | X32 | X64 """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str(f'SEARch:TRIGger:PCIE:TLP:ADRT? {param}') return Conversions.str_to_scalar_enum(response, enums.BusPcieAddressType)