from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal import Conversions
from ...... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class GlcCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("glc", core, parent)
[docs]
def set(self, gen_level_control: enums.GenLevelControl) -> None:
"""
``[SENSe]:PSERvoing[:GLC]`` \n
Snippet: ``driver.applications.k18AmplifierEt.sense.pservoing.glc.set(gen_level_control = enums.GenLevelControl.DATT)`` \n
Selects if the generator level is modified using input power or digital attenuation.
:param gen_level_control: RFL | DATT RFL Input power DATT Digital attenuation
"""
param = Conversions.enum_scalar_to_str(gen_level_control, enums.GenLevelControl)
self._core.io.write(f'SENSe:PSERvoing:GLC {param}')
# noinspection PyTypeChecker
[docs]
def get(self) -> enums.GenLevelControl:
"""
``[SENSe]:PSERvoing[:GLC]`` \n
Snippet: ``value: enums.GenLevelControl = driver.applications.k18AmplifierEt.sense.pservoing.glc.get()`` \n
Selects if the generator level is modified using input power or digital attenuation.
:return: gen_level_control: RFL | DATT RFL Input power DATT Digital attenuation
"""
response = self._core.io.query_str(f'SENSe:PSERvoing:GLC?')
return Conversions.str_to_scalar_enum(response, enums.GenLevelControl)