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 TlptCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("tlpt", core, parent)
[docs]
def set(self, search: str, dllp_mrdllp_tlp_typ: enums.DllpInitFcCreditType) -> None:
"""
``SEARch:TRIGger:PCIE:DLLP:MULT:TLPT`` \n
Snippet: ``driver.search.trigger.pcie.dllp.mult.tlpt.set(search = 'abc', dllp_mrdllp_tlp_typ = enums.DllpInitFcCreditType.ANY)`` \n
Sets the multi-root type to be searched for, for the data link layer.
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('dllp_mrdllp_tlp_typ', dllp_mrdllp_tlp_typ, DataType.Enum, enums.DllpInitFcCreditType))
self._core.io.write(f'SEARch:TRIGger:PCIE:DLLP:MULT:TLPT {param}'.rstrip())
# noinspection PyTypeChecker
[docs]
def get(self, search: str) -> enums.DllpInitFcCreditType:
"""
``SEARch:TRIGger:PCIE:DLLP:MULT:TLPT`` \n
Snippet: ``value: enums.DllpInitFcCreditType = driver.search.trigger.pcie.dllp.mult.tlpt.get(search = 'abc')`` \n
Sets the multi-root type to be searched for, for the data link layer.
:param search: ANY | P | NP | CPL \n
- P: Posted credit.
- NP: Non posted credit.
- CL: Completion credit.
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:PCIE:DLLP:MULT:TLPT? {param}')
return Conversions.str_to_scalar_enum(response, enums.DllpInitFcCreditType)