Source code for rsrtx.Implementations.Trigger.Lin.Border

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
from .... import repcap


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

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

[docs] def set(self, endianness: enums.Endianness, trigger=repcap.Trigger.Default) -> None: """ ``TRIGger<*>:LIN:BORDer`` \n Snippet: ``driver.trigger.lin.border.set(endianness = enums.Endianness.BENDian, trigger = repcap.Trigger.Default)`` \n Sets the byte order (endianness) of the data transfer. According to the standard, LIN data is transmitted in little endian transfer order. :param endianness: BENDian | LENDian \n - BENDian: Big endian, data is analyzed and evaluated in the order of reception. - LENDian: Little endian, the instrument reads the complete data, reverses the byte order of the data, and compares it with the specified data word. :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') """ param = Conversions.enum_scalar_to_str(endianness, enums.Endianness) trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) self._core.io.write(f'TRIGger{trigger_cmd_val}:LIN:BORDer {param}')
# noinspection PyTypeChecker
[docs] def get(self, trigger=repcap.Trigger.Default) -> enums.Endianness: """ ``TRIGger<*>:LIN:BORDer`` \n Snippet: ``value: enums.Endianness = driver.trigger.lin.border.get(trigger = repcap.Trigger.Default)`` \n Sets the byte order (endianness) of the data transfer. According to the standard, LIN data is transmitted in little endian transfer order. :param trigger: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Trigger') :return: endianness: BENDian | LENDian \n - BENDian: Big endian, data is analyzed and evaluated in the order of reception. - LENDian: Little endian, the instrument reads the complete data, reverses the byte order of the data, and compares it with the specified data word. """ trigger_cmd_val = self._cmd_group.get_repcap_cmd_value(trigger, repcap.Trigger) response = self._core.io.query_str(f'TRIGger{trigger_cmd_val}:LIN:BORDer?') return Conversions.str_to_scalar_enum(response, enums.Endianness)