from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class AwgnCls:
"""
| Commands in total: 6
| Subgroups: 3
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("awgn", core, parent)
@property
def power(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_power'):
from .Power import PowerCls
self._power = PowerCls(self._core, self._cmd_group)
return self._power
@property
def rblock(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_rblock'):
from .Rblock import RblockCls
self._rblock = RblockCls(self._core, self._cmd_group)
return self._rblock
@property
def rpDetection(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_rpDetection'):
from .RpDetection import RpDetectionCls
self._rpDetection = RpDetectionCls(self._core, self._cmd_group)
return self._rpDetection
[docs]
def get_cn_ratio(self) -> float:
"""
``[SOURce]:BB:W3GPp:TS25141:AWGN:CNRatio`` \n
Snippet: ``value: float = driver.source.bb.w3Gpp.ts25141.awgn.get_cn_ratio()`` \n
Sets/queries the carrier/noise ratio.
:return: cn_ratio: float Range: -50 to 45
"""
response = self._core.io.query_str('SOURce:BB:W3GPp:TS25141:AWGN:CNRatio?')
return Conversions.str_to_float(response)
[docs]
def set_cn_ratio(self, cn_ratio: float) -> None:
"""
``[SOURce]:BB:W3GPp:TS25141:AWGN:CNRatio`` \n
Snippet: ``driver.source.bb.w3Gpp.ts25141.awgn.set_cn_ratio(cn_ratio = 1.0)`` \n
Sets/queries the carrier/noise ratio.
:param cn_ratio: float Range: -50 to 45
"""
param = Conversions.decimal_value_to_str(cn_ratio)
self._core.io.write(f'SOURce:BB:W3GPp:TS25141:AWGN:CNRatio {param}')
[docs]
def get_en_ratio(self) -> float:
"""
``[SOURce]:BB:W3GPp:TS25141:AWGN:ENRatio`` \n
Snippet: ``value: float = driver.source.bb.w3Gpp.ts25141.awgn.get_en_ratio()`` \n
Sets/queries the ratio of bit energy to noise power density.
:return: en_ratio: float Range: 0 to 20
"""
response = self._core.io.query_str('SOURce:BB:W3GPp:TS25141:AWGN:ENRatio?')
return Conversions.str_to_float(response)
[docs]
def set_en_ratio(self, en_ratio: float) -> None:
"""
``[SOURce]:BB:W3GPp:TS25141:AWGN:ENRatio`` \n
Snippet: ``driver.source.bb.w3Gpp.ts25141.awgn.set_en_ratio(en_ratio = 1.0)`` \n
Sets/queries the ratio of bit energy to noise power density.
:param en_ratio: float Range: 0 to 20
"""
param = Conversions.decimal_value_to_str(en_ratio)
self._core.io.write(f'SOURce:BB:W3GPp:TS25141:AWGN:ENRatio {param}')
[docs]
def get_state(self) -> bool:
"""
``[SOURce]:BB:W3GPp:TS25141:AWGN:STATe`` \n
Snippet: ``value: bool = driver.source.bb.w3Gpp.ts25141.awgn.get_state()`` \n
Enables/disables the generation of the AWGN signal.
:return: state: 1 | ON | 0| OFF
"""
response = self._core.io.query_str('SOURce:BB:W3GPp:TS25141:AWGN:STATe?')
return Conversions.str_to_bool(response)
[docs]
def set_state(self, state: bool) -> None:
"""
``[SOURce]:BB:W3GPp:TS25141:AWGN:STATe`` \n
Snippet: ``driver.source.bb.w3Gpp.ts25141.awgn.set_state(state = False)`` \n
Enables/disables the generation of the AWGN signal.
:param state: 1 | ON | 0| OFF
"""
param = Conversions.bool_to_str(state)
self._core.io.write(f'SOURce:BB:W3GPp:TS25141:AWGN:STATe {param}')
def clone(self) -> 'AwgnCls':
"""
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 = AwgnCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group