from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ... import enums
from ... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class EatScaleCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("eatScale", core, parent)
[docs]
def set(self, ext_att_scl: enums.AxisMode, channel=repcap.Channel.Default) -> None:
"""
``CHANnel<*>:EATScale`` \n
Snippet: ``driver.channel.eatScale.set(ext_att_scl = enums.AxisMode.LIN, channel = repcap.Channel.Default)`` \n
Sets the attenuation scale for an external divider: linear or logarithmic.
:param ext_att_scl: LIN | LOG
:param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel')
"""
param = Conversions.enum_scalar_to_str(ext_att_scl, enums.AxisMode)
channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel)
self._core.io.write(f'CHANnel{channel_cmd_val}:EATScale {param}')
# noinspection PyTypeChecker
[docs]
def get(self, channel=repcap.Channel.Default) -> enums.AxisMode:
"""
``CHANnel<*>:EATScale`` \n
Snippet: ``value: enums.AxisMode = driver.channel.eatScale.get(channel = repcap.Channel.Default)`` \n
Sets the attenuation scale for an external divider: linear or logarithmic.
:param channel: optional repeated capability selector. Default value: Ch1 (settable in the interface 'Channel')
:return: ext_att_scl: LIN | LOG
"""
channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel)
response = self._core.io.query_str(f'CHANnel{channel_cmd_val}:EATScale?')
return Conversions.str_to_scalar_enum(response, enums.AxisMode)