from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ......Internal.RepeatedCapability import RepeatedCapability
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class NotchCls:
"""
| Commands in total: 8
| Subgroups: 4
| Direct child commands: 3
Repeated Capability Setting:
.. code-block:: python
# Range: Nr1 .. Nr8 \n
driver.source.bb.kuiper.notch.repcap_notchFilter_set(repcap.NotchFilter.Nr1)
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("notch", core, parent)
self._cmd_group.rep_cap = RepeatedCapability(self._cmd_group.group_name, 'repcap_notchFilter_get', 'repcap_notchFilter_set', repcap.NotchFilter.Nr1)
def repcap_notchFilter_set(self, notchFilter: repcap.NotchFilter) -> None:
"""
Repeated Capability default value numeric suffix.
This value is used, if you do not explicitely set it in the child set/get methods, or if you leave it to NotchFilter.Default.
Default value after init: NotchFilter.Nr1
"""
self._cmd_group.set_repcap_enum_value(notchFilter)
def repcap_notchFilter_get(self) -> repcap.NotchFilter:
"""
Returns the current default repeated capability for the child set/get methods.
"""
# noinspection PyTypeChecker
return self._cmd_group.get_repcap_enum_value()
@property
def apply(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_apply'):
from .Apply import ApplyCls
self._apply = ApplyCls(self._core, self._cmd_group)
return self._apply
@property
def bandwidth(self):
"""
| Commands in total: 2
| Subgroups: 2
| Direct child commands: 0
"""
if not hasattr(self, '_bandwidth'):
from .Bandwidth import BandwidthCls
self._bandwidth = BandwidthCls(self._core, self._cmd_group)
return self._bandwidth
@property
def frequency(self):
"""
| Commands in total: 1
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_frequency'):
from .Frequency import FrequencyCls
self._frequency = FrequencyCls(self._core, self._cmd_group)
return self._frequency
@property
def state(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_state'):
from .State import StateCls
self._state = StateCls(self._core, self._cmd_group)
return self._state
[docs]
def get_clock(self) -> int:
"""
``[SOURce<HW>]:BB:KUIPer:NOTCh:CLOCk`` \n
Snippet: ``value: int = driver.source.bb.kuiper.notch.get_clock()`` \n
Queries the current clock frequency of the waveform signal. Works like the command method
``RsSmw.source.bb.arbitrary.clock.value()`` .
:return: clock_freq: integer Range: 400 to 2000E6
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:KUIPer:NOTCh:CLOCk?')
return Conversions.str_to_int(response)
[docs]
def get_count(self) -> int:
"""
``[SOURce<HW>]:BB:KUIPer:NOTCh:COUNt`` \n
Snippet: ``value: int = driver.source.bb.kuiper.notch.get_count()`` \n
Sets the number of notches.
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:KUIPer:NOTCh:COUNt?')
return Conversions.str_to_int(response)
[docs]
def get_value(self) -> bool:
"""
``[SOURce<HW>]:BB:KUIPer:NOTCh`` \n
Snippet: ``value: bool = driver.source.bb.kuiper.notch.get_value()`` \n
Enables or disables the notch filter.
:return: notch_state: 1 | ON | 0| OFF
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:KUIPer:NOTCh?')
return Conversions.str_to_bool(response)
def clone(self) -> 'NotchCls':
"""
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 = NotchCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group