from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class StateCls:
"""
| Commands in total: 2
| Subgroups: 1
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("state", core, parent)
@property
def cstate(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_cstate'):
from .Cstate import CstateCls
self._cstate = CstateCls(self._core, self._cmd_group)
return self._cstate
[docs]
def set(self, state: bool) -> None:
"""
``CONFigure:GENerator:NPRatio[:STATe]`` \n
Snippet: ``driver.configure.generator.npratio.state.set(state = False)`` \n
Activates or deactivates a notch filter on the signal generator.
:param state: ON | OFF | 0 | 1 OFF | 0 Switches the function off ON | 1 Switches the function on
"""
param = Conversions.bool_to_str(state)
self._core.io.write(f'CONFigure:GENerator:NPRatio:STATe {param}')
[docs]
def get(self) -> bool:
"""
``CONFigure:GENerator:NPRatio[:STATe]`` \n
Snippet: ``value: bool = driver.configure.generator.npratio.state.get()`` \n
Activates or deactivates a notch filter on the signal generator.
:return: state: ON | OFF | 0 | 1 OFF | 0 Switches the function off ON | 1 Switches the function on
"""
response = self._core.io.query_str(f'CONFigure:GENerator:NPRatio:STATe?')
return Conversions.str_to_bool(response)
def clone(self) -> 'StateCls':
"""
Clones the group by creating new object from it and its whole existing subgroups.
Also copies all the existing default Repeated Capabilities setting,
which you can change independently without affecting the original group.
"""
new_group = StateCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group