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

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

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

[docs] def set(self, search: str, fdf_bit: enums.BusBitCondition) -> None: """ ``SEARch:TRIGger:CAN:FDATa[:FDF]`` \n Snippet: ``driver.search.trigger.can.fdata.fdf.set(search = 'abc', fdf_bit = enums.BusBitCondition.DC)`` \n Sets the EDL bit (extended data length) , which determines whether a frame is CAN or CAN-FD. The setting is available in CAN FD option R&S RTP-K9. :param search: String with the search name :param fdf_bit: ONE: CAN FD. ZERO: CAN. DC: don't care, the format is not relevant. """ param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('fdf_bit', fdf_bit, DataType.Enum, enums.BusBitCondition)) self._core.io.write(f'SEARch:TRIGger:CAN:FDATa:FDF {param}'.rstrip())
# noinspection PyTypeChecker
[docs] def get(self, search: str) -> enums.BusBitCondition: """ ``SEARch:TRIGger:CAN:FDATa[:FDF]`` \n Snippet: ``value: enums.BusBitCondition = driver.search.trigger.can.fdata.fdf.get(search = 'abc')`` \n Sets the EDL bit (extended data length) , which determines whether a frame is CAN or CAN-FD. The setting is available in CAN FD option R&S RTP-K9. :param search: String with the search name :return: fdf_bit: ONE: CAN FD. ZERO: CAN. DC: don't care, the format is not relevant. """ param = Conversions.value_to_quoted_str(search) response = self._core.io.query_str(f'SEARch:TRIGger:CAN:FDATa:FDF? {param}') return Conversions.str_to_scalar_enum(response, enums.BusBitCondition)