from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from ....... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class AddValueCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("addValue", core, parent)
[docs]
def set(self, serialBus=repcap.SerialBus.Default, frame=repcap.Frame.Default, field=repcap.Field.Default) -> None:
"""
``SBUS<*>:SWIRe:FORMat:FRAMe<*>:FLD<*>:ADDValue`` \n
Snippet: ``driver.sbus.swire.formatPy.frame.fld.addValue.set(serialBus = repcap.SerialBus.Default, frame = repcap.Frame.Default, field = repcap.Field.Default)`` \n
Creates a new hexagonal value for customization. Available if method
``RsMxo.sbus.swire.formatPy.frame.fld.formatPy.set()`` = LIST.
Related commands: SBUS<sb>:SWIRe:FORMat:FRAMe<fr>:FLD<fl>:ENUM{p}:VALue
SBUS<sb>:SWIRe:FORMat:FRAMe<fr>:FLD<fl>:ENUM{p}:LABel
:param serialBus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Sbus')
:param frame: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Frame')
:param field: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Fld')
"""
serialBus_cmd_val = self._cmd_group.get_repcap_cmd_value(serialBus, repcap.SerialBus)
frame_cmd_val = self._cmd_group.get_repcap_cmd_value(frame, repcap.Frame)
field_cmd_val = self._cmd_group.get_repcap_cmd_value(field, repcap.Field)
self._core.io.write(f'SBUS{serialBus_cmd_val}:SWIRe:FORMat:FRAMe{frame_cmd_val}:FLD{field_cmd_val}:ADDValue')
[docs]
def set_and_wait(self, serialBus=repcap.SerialBus.Default, frame=repcap.Frame.Default, field=repcap.Field.Default, opc_timeout_ms: int = -1) -> None:
serialBus_cmd_val = self._cmd_group.get_repcap_cmd_value(serialBus, repcap.SerialBus)
frame_cmd_val = self._cmd_group.get_repcap_cmd_value(frame, repcap.Frame)
field_cmd_val = self._cmd_group.get_repcap_cmd_value(field, repcap.Field)
"""
``SBUS<*>:SWIRe:FORMat:FRAMe<*>:FLD<*>:ADDValue`` \n
Snippet: ``driver.sbus.swire.formatPy.frame.fld.addValue.set_and_wait(serialBus = repcap.SerialBus.Default, frame = repcap.Frame.Default, field = repcap.Field.Default)`` \n
Creates a new hexagonal value for customization. Available if method
``RsMxo.sbus.swire.formatPy.frame.fld.formatPy.set()`` = LIST.
Related commands: SBUS<sb>:SWIRe:FORMat:FRAMe<fr>:FLD<fl>:ENUM{p}:VALue
SBUS<sb>:SWIRe:FORMat:FRAMe<fr>:FLD<fl>:ENUM{p}:LABel
Same as set, but waits for the operation to complete before continuing further. Use the RsMxo.utilities.opc_timeout_set() to set the timeout value.
:param serialBus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Sbus')
:param frame: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Frame')
:param field: optional repeated capability selector. Default value: Ix1 (settable in the interface 'Fld')
:param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.
"""
self._core.io.write_with_opc(f'SBUS{serialBus_cmd_val}:SWIRe:FORMat:FRAMe{frame_cmd_val}:FLD{field_cmd_val}:ADDValue', opc_timeout_ms)