from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from .....Internal.Types import DataType
from .....Internal.ArgSingleList import ArgSingleList
from .....Internal.ArgSingle import ArgSingle
from ..... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class BitCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("bit", core, parent)
[docs]
def set(self, frame: str, field: str, bit: enums.SbusBitState) -> None:
"""
``TRIGger:SBSW:I3C:BIT`` \n
Snippet: ``driver.trigger.sbsw.i3C.bit.set(frame = 'abc', field = 'abc', bit = enums.SbusBitState.DC)`` \n
Sets the bit state of a field that only consists of one bit for the software trigger.
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('frame', frame, DataType.String), ArgSingle('field', field, DataType.String), ArgSingle('bit', bit, DataType.Enum, enums.SbusBitState))
self._core.io.write(f'TRIGger:SBSW:I3C:BIT {param}'.rstrip())
# noinspection PyTypeChecker
[docs]
def get(self) -> enums.SbusBitState:
"""
``TRIGger:SBSW:I3C:BIT`` \n
Snippet: ``value: enums.SbusBitState = driver.trigger.sbsw.i3C.bit.get()`` \n
Sets the bit state of a field that only consists of one bit for the software trigger.
"""
response = self._core.io.query_str(f'TRIGger:SBSW:I3C:BIT?')
return Conversions.str_to_scalar_enum(response, enums.SbusBitState)