Source code for rsrtx.Implementations.Bus.Cxpi.Dord

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

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

[docs] def set(self, display_order: enums.BusCxpiDisplayOrder, bus=repcap.Bus.Default) -> None: """ ``BUS<*>:CXPI:DORD`` \n Snippet: ``driver.bus.cxpi.dord.set(display_order = enums.BusCxpiDisplayOrder.LOGical, bus = repcap.Bus.Default)`` \n Selects the order in which the signal is displayed in the honeycomb. If TRANsmitted is selected, the signal is displayed in the order it occurs. If LOGical is selected, the signal is displayed according to the definition of the standard (MSB bit order) . :param display_order: TRANsmitted | LOGical :param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus') """ param = Conversions.enum_scalar_to_str(display_order, enums.BusCxpiDisplayOrder) bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus) self._core.io.write(f'BUS{bus_cmd_val}:CXPI:DORD {param}')
# noinspection PyTypeChecker
[docs] def get(self, bus=repcap.Bus.Default) -> enums.BusCxpiDisplayOrder: """ ``BUS<*>:CXPI:DORD`` \n Snippet: ``value: enums.BusCxpiDisplayOrder = driver.bus.cxpi.dord.get(bus = repcap.Bus.Default)`` \n Selects the order in which the signal is displayed in the honeycomb. If TRANsmitted is selected, the signal is displayed in the order it occurs. If LOGical is selected, the signal is displayed according to the definition of the standard (MSB bit order) . :param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus') :return: display_order: TRANsmitted | LOGical """ bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus) response = self._core.io.query_str(f'BUS{bus_cmd_val}:CXPI:DORD?') return Conversions.str_to_scalar_enum(response, enums.BusCxpiDisplayOrder)