from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class OutputCls:
"""
| Commands in total: 12
| Subgroups: 5
| Direct child commands: 2
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("output", core, parent)
@property
def afixed(self):
"""
| Commands in total: 2
| Subgroups: 1
| Direct child commands: 0
"""
if not hasattr(self, '_afixed'):
from .Afixed import AfixedCls
self._afixed = AfixedCls(self._core, self._cmd_group)
return self._afixed
@property
def all(self):
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
if not hasattr(self, '_all'):
from .All import AllCls
self._all = AllCls(self._core, self._cmd_group)
return self._all
@property
def protection(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_protection'):
from .Protection import ProtectionCls
self._protection = ProtectionCls(self._core, self._cmd_group)
return self._protection
@property
def user(self):
"""
| Commands in total: 3
| Subgroups: 3
| Direct child commands: 0
"""
if not hasattr(self, '_user'):
from .User import UserCls
self._user = UserCls(self._core, self._cmd_group)
return self._user
@property
def state(self):
"""
| Commands in total: 2
| Subgroups: 0
| Direct child commands: 2
"""
if not hasattr(self, '_state'):
from .State import StateCls
self._state = StateCls(self._core, self._cmd_group)
return self._state
# noinspection PyTypeChecker
[docs]
def get_amode(self) -> enums.PowAttMode:
"""
``OUTPut<HW>:AMODe`` \n
Snippet: ``value: enums.PowAttMode = driver.output.get_amode()`` \n
Sets the step attenuator mode at the RF output.
:return: amode: AUTO | FIXed AUTO The step attenuator adjusts the level settings automatically, within the full variation range. FIXed The step attenuator and amplifier stages are fixed at the current position, providing level settings with constant output VSWR. The resulting variation range is calculated according to the position.
"""
response = self._core.io.query_str('OUTPut<HwInstance>:AMODe?')
return Conversions.str_to_scalar_enum(response, enums.PowAttMode)
[docs]
def set_amode(self, amode: enums.PowAttMode) -> None:
"""
``OUTPut<HW>:AMODe`` \n
Snippet: ``driver.output.set_amode(amode = enums.PowAttMode.AUTO)`` \n
Sets the step attenuator mode at the RF output.
:param amode: AUTO | FIXed AUTO The step attenuator adjusts the level settings automatically, within the full variation range. FIXed The step attenuator and amplifier stages are fixed at the current position, providing level settings with constant output VSWR. The resulting variation range is calculated according to the position.
"""
param = Conversions.enum_scalar_to_str(amode, enums.PowAttMode)
self._core.io.write(f'OUTPut<HwInstance>:AMODe {param}')
# noinspection PyTypeChecker
[docs]
def get_impedance(self) -> enums.InputImpRf:
"""
``OUTPut<HW>:IMPedance`` \n
Snippet: ``value: enums.InputImpRf = driver.output.get_impedance()`` \n
Queries the impedance of the RF outputs.
:return: impedance: G1K | G50 | G10K
"""
response = self._core.io.query_str('OUTPut<HwInstance>:IMPedance?')
return Conversions.str_to_scalar_enum(response, enums.InputImpRf)
def clone(self) -> 'OutputCls':
"""
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 = OutputCls(self._core, self._cmd_group.parent)
self._cmd_group.synchronize_repcaps(new_group)
return new_group