from ........Internal.Core import Core
from ........Internal.CommandsGroup import CommandsGroup
from ........Internal import Conversions
# 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 set(self, state: bool) -> None:
"""
``[SENSe]:ADJust:NCANcel:AVERage:STATe`` \n
Snippet: ``driver.applications.k14Xnr5G.sense.adjust.ncancel.average.state.set(state = False)`` \n
Enables and disables I/Q noise cancellation. Requires the R&S FSW-K575 option and a synchronized, repetitive input signal.
The number of initial measurements performed is defined by method ``RsFsw.sense.adjust.ncancel.average.count.set()`` .
For details, see 'Concept of I/Q noise cancellation'.
:param state: ON | OFF | 0 | 1 OFF | 0 Switches the function off ON | 1 Switches the function on If synchronization fails, the noise cancellation process is not started, and an error message is provided. Status bit 7 in the STATus:QUEStionable:SYNC:CONDition status register is set (BIT_K575_FAILED) . See method ``RsFsw.status.questionable.sync.condition.get()``
"""
param = Conversions.bool_to_str(state)
self._core.io.write(f'SENSe:ADJust:NCANcel:AVERage:STATe {param}')
[docs]
def get(self) -> bool:
"""
``[SENSe]:ADJust:NCANcel:AVERage:STATe`` \n
Snippet: ``value: bool = driver.applications.k14Xnr5G.sense.adjust.ncancel.average.state.get()`` \n
Enables and disables I/Q noise cancellation. Requires the R&S FSW-K575 option and a synchronized, repetitive input signal.
The number of initial measurements performed is defined by method ``RsFsw.sense.adjust.ncancel.average.count.set()`` .
For details, see 'Concept of I/Q noise cancellation'.
:return: state: ON | OFF | 0 | 1 OFF | 0 Switches the function off ON | 1 Switches the function on If synchronization fails, the noise cancellation process is not started, and an error message is provided. Status bit 7 in the STATus:QUEStionable:SYNC:CONDition status register is set (BIT_K575_FAILED) . See method ``RsFsw.status.questionable.sync.condition.get()``
"""
response = self._core.io.query_str(f'SENSe:ADJust:NCANcel:AVERage:STATe?')
return Conversions.str_to_bool(response)