Source code for rsrtx.Implementations.Bus.Parallel.Bit.Deskew

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


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

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

[docs] def set(self, deskew: float, bus=repcap.Bus.Default, bitNull=repcap.BitNull.Default) -> None: """ ``BUS<*>:PARallel:BIT<*>:DESKew`` \n Snippet: ``driver.bus.parallel.bit.deskew.set(deskew = 1.0, bus = repcap.Bus.Default, bitNull = repcap.BitNull.Default)`` \n Sets an individual delay for each digital channel to time-align it with other digital channels. The deskew value compensates delays that are known from the circuit specifics or caused by the different length of cables. For the parallel bus 1, you can also use method ``RsRtx.digital.deskew.set()`` . :param deskew: -200E-9 to 200E-9 :param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus') :param bitNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Bit') """ param = Conversions.decimal_value_to_str(deskew) bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus) bitNull_cmd_val = self._cmd_group.get_repcap_cmd_value(bitNull, repcap.BitNull) self._core.io.write(f'BUS{bus_cmd_val}:PARallel:BIT{bitNull_cmd_val}:DESKew {param}')
[docs] def get(self, bus=repcap.Bus.Default, bitNull=repcap.BitNull.Default) -> float: """ ``BUS<*>:PARallel:BIT<*>:DESKew`` \n Snippet: ``value: float = driver.bus.parallel.bit.deskew.get(bus = repcap.Bus.Default, bitNull = repcap.BitNull.Default)`` \n Sets an individual delay for each digital channel to time-align it with other digital channels. The deskew value compensates delays that are known from the circuit specifics or caused by the different length of cables. For the parallel bus 1, you can also use method ``RsRtx.digital.deskew.set()`` . :param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus') :param bitNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Bit') :return: deskew: -200E-9 to 200E-9 """ bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus) bitNull_cmd_val = self._cmd_group.get_repcap_cmd_value(bitNull, repcap.BitNull) response = self._core.io.query_str(f'BUS{bus_cmd_val}:PARallel:BIT{bitNull_cmd_val}:DESKew?') return Conversions.str_to_float(response)