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

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 CfgtCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

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

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