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 StFrameCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("stFrame", core, parent)
[docs]
def set(self, search: str, startup_frame: enums.BusBitCondition) -> None:
"""
``SEARch:TRIGger:FLXRay:STFRame`` \n
Snippet: ``driver.search.trigger.flxRay.stFrame.set(search = 'abc', startup_frame = enums.BusBitCondition.DC)`` \n
Searches for startup frames used for startup of the network. Only specific start nodes can send this frame type.
:param startup_frame: Bit value: 1, 0, or X (don't care)
"""
param = ArgSingleList().compose_cmd_string(ArgSingle('search', search, DataType.String), ArgSingle('startup_frame', startup_frame, DataType.Enum, enums.BusBitCondition))
self._core.io.write(f'SEARch:TRIGger:FLXRay:STFRame {param}'.rstrip())
# noinspection PyTypeChecker
[docs]
def get(self, search: str) -> enums.BusBitCondition:
"""
``SEARch:TRIGger:FLXRay:STFRame`` \n
Snippet: ``value: enums.BusBitCondition = driver.search.trigger.flxRay.stFrame.get(search = 'abc')`` \n
Searches for startup frames used for startup of the network. Only specific start nodes can send this frame type.
:return: startup_frame: Bit value: 1, 0, or X (don't care)
"""
param = Conversions.value_to_quoted_str(search)
response = self._core.io.query_str(f'SEARch:TRIGger:FLXRay:STFRame? {param}')
return Conversions.str_to_scalar_enum(response, enums.BusBitCondition)