from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums
from ..... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class StateCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("state", core, parent)
# noinspection PyTypeChecker
[docs]
def get(self, bus=repcap.Bus.Default, busRffeSequence=repcap.BusRffeSequence.Default) -> enums.BusRffeSequenceState:
"""
``BUS<*>:RFFE:SEQuence<*>:STATe`` \n
Snippet: ``value: enums.BusRffeSequenceState = driver.bus.rffe.sequence.state.get(bus = repcap.Bus.Default, busRffeSequence = repcap.BusRffeSequence.Default)`` \n
Returns the overall state of the selected command sequence.
:param bus: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bus')
:param busRffeSequence: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Sequence')
:return: state: OK: the sequence is valid. SSC: SSC error. VERSion: RFFE version. PARity: parity error. LENGth: length error. BPERR: bus park error. NORESPONSE: No response. INComplete: The sequence is not completely contained in the acquisition. The acquired part of the sequence is valid.
"""
bus_cmd_val = self._cmd_group.get_repcap_cmd_value(bus, repcap.Bus)
busRffeSequence_cmd_val = self._cmd_group.get_repcap_cmd_value(busRffeSequence, repcap.BusRffeSequence)
response = self._core.io.query_str(f'BUS{bus_cmd_val}:RFFE:SEQuence{busRffeSequence_cmd_val}:STATe?')
return Conversions.str_to_scalar_enum(response, enums.BusRffeSequenceState)