Source code for rsmxo.Implementations.Sbus.Can.Newlist

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


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

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

[docs] def set(self, filename: str, serialBus=repcap.SerialBus.Default) -> None: """ ``SBUS<*>:CAN:NEWList`` \n Snippet: ``driver.sbus.can.newlist.set(filename = 'abc', serialBus = repcap.SerialBus.Default)`` \n Loads a symbol list file. :param filename: String parameter with path and file name. :param serialBus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Sbus') """ param = Conversions.value_to_quoted_str(filename) serialBus_cmd_val = self._cmd_group.get_repcap_cmd_value(serialBus, repcap.SerialBus) self._core.io.write(f'SBUS{serialBus_cmd_val}:CAN:NEWList {param}')