from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from .....Internal.Utilities import trim_str_response
from ..... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class WlnnCls:
"""
| Commands in total: 335
| Subgroups: 9
| Direct child commands: 8
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("wlnn", core, parent)
@property
def antenna(self):
"""
| Commands in total: 10
| Subgroups: 1
| Direct child commands: 4
"""
if not hasattr(self, '_antenna'):
from .Antenna import AntennaCls
self._antenna = AntennaCls(self._core, self._cmd_group)
return self._antenna
@property
def clipping(self):
"""
| Commands in total: 4
| Subgroups: 0
| Direct child commands: 4
"""
if not hasattr(self, '_clipping'):
from .Clipping import ClippingCls
self._clipping = ClippingCls(self._core, self._cmd_group)
return self._clipping
@property
def clock(self):
"""
| Commands in total: 3
| Subgroups: 0
| Direct child commands: 3
"""
if not hasattr(self, '_clock'):
from .Clock import ClockCls
self._clock = ClockCls(self._core, self._cmd_group)
return self._clock
@property
def fblock(self):
"""
| Commands in total: 258
| Subgroups: 68
| Direct child commands: 2
"""
if not hasattr(self, '_fblock'):
from .Fblock import FblockCls
self._fblock = FblockCls(self._core, self._cmd_group)
return self._fblock
@property
def filterPy(self):
"""
| Commands in total: 16
| Subgroups: 4
| Direct child commands: 2
"""
if not hasattr(self, '_filterPy'):
from .FilterPy import FilterPyCls
self._filterPy = FilterPyCls(self._core, self._cmd_group)
return self._filterPy
@property
def setting(self):
"""
| Commands in total: 4
| Subgroups: 0
| Direct child commands: 4
"""
if not hasattr(self, '_setting'):
from .Setting import SettingCls
self._setting = SettingCls(self._core, self._cmd_group)
return self._setting
@property
def symbolRate(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_symbolRate'):
from .SymbolRate import SymbolRateCls
self._symbolRate = SymbolRateCls(self._core, self._cmd_group)
return self._symbolRate
@property
def trigger(self):
"""
| Commands in total: 29
| Subgroups: 6
| Direct child commands: 5
"""
if not hasattr(self, '_trigger'):
from .Trigger import TriggerCls
self._trigger = TriggerCls(self._core, self._cmd_group)
return self._trigger
@property
def waveform(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_waveform'):
from .Waveform import WaveformCls
self._waveform = WaveformCls(self._core, self._cmd_group)
return self._waveform
# noinspection PyTypeChecker
[docs]
def get_bandwidth(self) -> enums.WlannTxBw:
"""
``[SOURce<HW>]:BB:WLNN:BWidth`` \n
Snippet: ``value: enums.WlannTxBw = driver.source.bb.wlnn.get_bandwidth()`` \n
The command selects the transmission bandwidth. Whenever the bandwidth changes from a higher to a lower one, the frame
blocks are validated because some of them could be invalid in the lower bandwidth (invalid TX Mode) .
:return: bwidth: BW20 | BW40 | BW80 | BW160 | BW320 Unit: MHz
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:WLNN:BWidth?')
return Conversions.str_to_scalar_enum(response, enums.WlannTxBw)
[docs]
def set_bandwidth(self, bwidth: enums.WlannTxBw) -> None:
"""
``[SOURce<HW>]:BB:WLNN:BWidth`` \n
Snippet: ``driver.source.bb.wlnn.set_bandwidth(bwidth = enums.WlannTxBw.BW160)`` \n
The command selects the transmission bandwidth. Whenever the bandwidth changes from a higher to a lower one, the frame
blocks are validated because some of them could be invalid in the lower bandwidth (invalid TX Mode) .
:param bwidth: BW20 | BW40 | BW80 | BW160 | BW320 Unit: MHz
"""
param = Conversions.enum_scalar_to_str(bwidth, enums.WlannTxBw)
self._core.io.write(f'SOURce<HwInstance>:BB:WLNN:BWidth {param}')
[docs]
def set_cf_block(self, cf_block: int) -> None:
"""
``[SOURce<HW>]:BB:WLNN:CFBLock`` \n
Snippet: ``driver.source.bb.wlnn.set_cf_block(cf_block = 1)`` \n
No help available
"""
param = Conversions.decimal_value_to_str(cf_block)
self._core.io.write(f'SOURce<HwInstance>:BB:WLNN:CFBLock {param}')
[docs]
def set_df_block(self, df_block: int) -> None:
"""
``[SOURce<HW>]:BB:WLNN:DFBLock`` \n
Snippet: ``driver.source.bb.wlnn.set_df_block(df_block = 1)`` \n
No help available
"""
param = Conversions.decimal_value_to_str(df_block)
self._core.io.write(f'SOURce<HwInstance>:BB:WLNN:DFBLock {param}')
[docs]
def set_if_block(self, if_block: int) -> None:
"""
``[SOURce<HW>]:BB:WLNN:IFBLock`` \n
Snippet: ``driver.source.bb.wlnn.set_if_block(if_block = 1)`` \n
No help available
"""
param = Conversions.decimal_value_to_str(if_block)
self._core.io.write(f'SOURce<HwInstance>:BB:WLNN:IFBLock {param}')
[docs]
def set_pf_block(self, pf_block: int) -> None:
"""
``[SOURce<HW>]:BB:WLNN:PFBLock`` \n
Snippet: ``driver.source.bb.wlnn.set_pf_block(pf_block = 1)`` \n
No help available
"""
param = Conversions.decimal_value_to_str(pf_block)
self._core.io.write(f'SOURce<HwInstance>:BB:WLNN:PFBLock {param}')
[docs]
def preset(self) -> None:
"""
``[SOURce<HW>]:BB:WLNN:PRESet`` \n
Snippet: ``driver.source.bb.wlnn.preset()`` \n
Sets all parameters of the application to their default values. These values are the ``*RST`` values of the commands of
the application.
"""
self._core.io.write(f'SOURce<HwInstance>:BB:WLNN:PRESet')
[docs]
def preset_with_opc(self, opc_timeout_ms: int = -1) -> None:
"""
``[SOURce<HW>]:BB:WLNN:PRESet`` \n
Snippet: ``driver.source.bb.wlnn.preset_with_opc()`` \n
Sets all parameters of the application to their default values. These values are the ``*RST`` values of the commands of
the application.
Same as preset, but waits for the operation to complete before continuing further. Use the RsSmw.utilities.opc_timeout_set() to set the timeout value.
:param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.
"""
self._core.io.write_with_opc(f'SOURce<HwInstance>:BB:WLNN:PRESet', opc_timeout_ms)
[docs]
def get_state(self) -> bool:
"""
``[SOURce<HW>]:BB:WLNN:STATe`` \n
Snippet: ``value: bool = driver.source.bb.wlnn.get_state()`` \n
Enables the baseband signal application and disables all the other baseband signal applications in the same signal path.
:return: state: 1 | ON | 0| OFF
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:WLNN:STATe?')
return Conversions.str_to_bool(response)
[docs]
def set_state(self, state: bool) -> None:
"""
``[SOURce<HW>]:BB:WLNN:STATe`` \n
Snippet: ``driver.source.bb.wlnn.set_state(state = False)`` \n
Enables the baseband signal application and disables all the other baseband signal applications in the same signal path.
:param state: 1 | ON | 0| OFF
"""
param = Conversions.bool_to_str(state)
self._core.io.write(f'SOURce<HwInstance>:BB:WLNN:STATe {param}')
[docs]
def get_version(self) -> str:
"""
``[SOURce<HW>]:BB:WLNN:VERSion`` \n
Snippet: ``value: str = driver.source.bb.wlnn.get_version()`` \n
Queries the version of the IEEE 802.11 WLAN standard underlying the definitions.
:return: version: string
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:WLNN:VERSion?')
return trim_str_response(response)
def clone(self) -> 'WlnnCls':
"""
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 = WlnnCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group