Source code for rsrtx.Implementations.Bus.Milstd.MinGap.Select

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


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

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

[docs] def set(self, min_gap_select: bool, bus=repcap.Bus.Default) -> None: """ ``BUS<*>:MILStd:MINGap:SELect`` \n Snippet: ``driver.bus.milstd.minGap.select.set(min_gap_select = False, bus = repcap.Bus.Default)`` \n Enables the detection of the minimum idle time between the last bit of a message and the following command word sync during decoding. To specify the minimum gap, use method ``RsRtx.bus.milstd.minGap.bits.set()`` . :param min_gap_select: OFF | ON :param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus') """ param = Conversions.bool_to_str(min_gap_select) bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus) self._core.io.write(f'BUS{bus_cmd_val}:MILStd:MINGap:SELect {param}')
[docs] def get(self, bus=repcap.Bus.Default) -> bool: """ ``BUS<*>:MILStd:MINGap:SELect`` \n Snippet: ``value: bool = driver.bus.milstd.minGap.select.get(bus = repcap.Bus.Default)`` \n Enables the detection of the minimum idle time between the last bit of a message and the following command word sync during decoding. To specify the minimum gap, use method ``RsRtx.bus.milstd.minGap.bits.set()`` . :param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus') :return: min_gap_select: OFF | ON """ bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus) response = self._core.io.query_str(f'BUS{bus_cmd_val}:MILStd:MINGap:SELect?') return Conversions.str_to_bool(response)