from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class SoaCls:
"""
| Commands in total: 17
| Subgroups: 4
| Direct child commands: 3
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("soa", core, parent)
@property
def execute(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_execute'):
from .Execute import ExecuteCls
self._execute = ExecuteCls(self._core, self._cmd_group)
return self._execute
@property
def report(self):
"""
| Commands in total: 1
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_report'):
from .Report import ReportCls
self._report = ReportCls(self._core, self._cmd_group)
return self._report
@property
def logarithmic(self):
"""
| Commands in total: 6
| Subgroups: 2
| Direct child commands: 3
"""
if not hasattr(self, '_logarithmic'):
from .Logarithmic import LogarithmicCls
self._logarithmic = LogarithmicCls(self._core, self._cmd_group)
return self._logarithmic
@property
def linear(self):
"""
| Commands in total: 6
| Subgroups: 2
| Direct child commands: 3
"""
if not hasattr(self, '_linear'):
from .Linear import LinearCls
self._linear = LinearCls(self._core, self._cmd_group)
return self._linear
# noinspection PyTypeChecker
[docs]
def get_scale(self) -> enums.PwrSoaScale:
"""
``POWer:SOA:SCALe`` \n
Snippet: ``value: enums.PwrSoaScale = driver.power.soa.get_scale()`` \n
Sets the scale for the measurement.
:return: scale: LOG | LINEAR
"""
response = self._core.io.query_str('POWer:SOA:SCALe?')
return Conversions.str_to_scalar_enum(response, enums.PwrSoaScale)
[docs]
def set_scale(self, scale: enums.PwrSoaScale) -> None:
"""
``POWer:SOA:SCALe`` \n
Snippet: ``driver.power.soa.set_scale(scale = enums.PwrSoaScale.LINEAR)`` \n
Sets the scale for the measurement.
:param scale: LOG | LINEAR
"""
param = Conversions.enum_scalar_to_str(scale, enums.PwrSoaScale)
self._core.io.write(f'POWer:SOA:SCALe {param}')
[docs]
def get_mask(self) -> bool:
"""
``POWer:SOA:MASK`` \n
Snippet: ``value: bool = driver.power.soa.get_mask()`` \n
Activates or deactivates a mask.
"""
response = self._core.io.query_str('POWer:SOA:MASK?')
return Conversions.str_to_bool(response)
[docs]
def set_mask(self, enable_mask_tst: bool) -> None:
"""
``POWer:SOA:MASK`` \n
Snippet: ``driver.power.soa.set_mask(enable_mask_tst = False)`` \n
Activates or deactivates a mask.
:param enable_mask_tst: OFF | ON
"""
param = Conversions.bool_to_str(enable_mask_tst)
self._core.io.write(f'POWer:SOA:MASK {param}')
# noinspection PyTypeChecker
[docs]
def get_switch(self) -> enums.PwrSoaSwitch:
"""
``POWer:SOA:SWITch`` \n
Snippet: ``value: enums.PwrSoaSwitch = driver.power.soa.get_switch()`` \n
Switches between linear and logarithmic scale.
:return: switch: LOGLINEAR | LINEARLOG
"""
response = self._core.io.query_str('POWer:SOA:SWITch?')
return Conversions.str_to_scalar_enum(response, enums.PwrSoaSwitch)
[docs]
def set_switch(self, switch: enums.PwrSoaSwitch) -> None:
"""
``POWer:SOA:SWITch`` \n
Snippet: ``driver.power.soa.set_switch(switch = enums.PwrSoaSwitch.LINEARLOG)`` \n
Switches between linear and logarithmic scale.
:param switch: LOGLINEAR | LINEARLOG
"""
param = Conversions.enum_scalar_to_str(switch, enums.PwrSoaSwitch)
self._core.io.write(f'POWer:SOA:SWITch {param}')
def clone(self) -> 'SoaCls':
"""
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 = SoaCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group