Source code for rsrtx.Implementations.Search.Trigger.Can.Fdata.Dpto

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


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

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

[docs] def set(self, search: str, data_position_to: int) -> None: """ ``SEARch:TRIGger:CAN:FDATa:DPTO`` \n Snippet: ``driver.search.trigger.can.fdata.dpto.set(search = 'abc', data_position_to = 1)`` \n Defines the last possible start position of the data pattern if the position operator method ``RsRtx.search.trigger.can.fdata.dpoperator.set()`` defines a range. The setting is available in CAN FD option R&S RTP-K9. :param search: String with the search name :param data_position_to: 8 to 64 """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('data_position_to', data_position_to, DataType.Integer)) self._core.io.write(f'SEARch:TRIGger:CAN:FDATa:DPTO {param}'.rstrip())
[docs] def get(self, search: str) -> int: """ ``SEARch:TRIGger:CAN:FDATa:DPTO`` \n Snippet: ``value: int = driver.search.trigger.can.fdata.dpto.get(search = 'abc')`` \n Defines the last possible start position of the data pattern if the position operator method ``RsRtx.search.trigger.can.fdata.dpoperator.set()`` defines a range. The setting is available in CAN FD option R&S RTP-K9. :param search: String with the search name :return: data_position_to: 8 to 64 """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str(f'SEARch:TRIGger:CAN:FDATa:DPTO? {param}') return Conversions.str_to_int(response)