from ........Internal.Core import Core
from ........Internal.CommandsGroup import CommandsGroup
from ........Internal import Conversions
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)
[docs]
def get(self, indexNull=repcap.IndexNull.Default) -> bool:
"""
``[SOURce<HW>]:BB:BTOoth:ECONfiguration:PCONfiguration:FSBit<CH0>:STATe`` \n
Snippet: ``value: bool = driver.source.bb.btooth.econfiguration.pconfiguration.fsbit.state.get(indexNull = repcap.IndexNull.Default)`` \n
Requires link layer control PDUs LL_FEATURE_REQ, LL_FEATURE_RSP or LL_PERIPHERAL_FEATURE_REQ, see method
``RsSmw.source.bb.btooth.up_type()`` . Enables features of the feature set within the link layer control PDU. See also
Table 'Link layer features: Bit number and feature'.
:param indexNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Fsbit')
:return: state: 1 | ON | 0| OFF
"""
indexNull_cmd_val = self._cmd_group.get_repcap_cmd_value(indexNull, repcap.IndexNull)
response = self._core.io.query_str(f'SOURce<HwInstance>:BB:BTOoth:ECONfiguration:PCONfiguration:FSBit{indexNull_cmd_val}:STATe?')
return Conversions.str_to_bool(response)