from .........Internal.Core import Core
from .........Internal.CommandsGroup import CommandsGroup
from .........Internal import Conversions
from ......... import enums
from ......... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class SsLevelCls:
"""SsLevel commands group definition. 1 total commands, 0 Subgroups, 1 group commands"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("ssLevel", core, parent)
[docs] def set(self, ss_level: enums.TetraSlotLevel, testMode=repcap.TestMode.Default, slot=repcap.Slot.Default, channel=repcap.Channel.Default) -> None:
"""SCPI: [SOURce<HW>]:BB:TETRa:SCONfiguration:TMODe<DI>:SLOT<ST>:LDIRection<CH>:SSLevel \n
Snippet: driver.source.bb.tetra.sconfiguration.tmode.slot.ldirection.ssLevel.set(ss_level = enums.TetraSlotLevel.ATTenuated, testMode = repcap.TestMode.Default, slot = repcap.Slot.Default, channel = repcap.Channel.Default) \n
Sets the level for the second sub-slot. \n
:param ss_level: OFF| ATTenuated| FULL OFF Attenuation is maximum. The slot is inactive. ATT Level is reduced by the level attenuation set in 'Slot Attenuation'. FULL The level corresponds to the level indicated in the display.
:param testMode: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Tmode')
:param slot: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Slot')
:param channel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Ldirection')
"""
param = Conversions.enum_scalar_to_str(ss_level, enums.TetraSlotLevel)
testMode_cmd_val = self._cmd_group.get_repcap_cmd_value(testMode, repcap.TestMode)
slot_cmd_val = self._cmd_group.get_repcap_cmd_value(slot, repcap.Slot)
channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel)
self._core.io.write(f'SOURce<HwInstance>:BB:TETRa:SCONfiguration:TMODe{testMode_cmd_val}:SLOT{slot_cmd_val}:LDIRection{channel_cmd_val}:SSLevel {param}')
# noinspection PyTypeChecker
[docs] def get(self, testMode=repcap.TestMode.Default, slot=repcap.Slot.Default, channel=repcap.Channel.Default) -> enums.TetraSlotLevel:
"""SCPI: [SOURce<HW>]:BB:TETRa:SCONfiguration:TMODe<DI>:SLOT<ST>:LDIRection<CH>:SSLevel \n
Snippet: value: enums.TetraSlotLevel = driver.source.bb.tetra.sconfiguration.tmode.slot.ldirection.ssLevel.get(testMode = repcap.TestMode.Default, slot = repcap.Slot.Default, channel = repcap.Channel.Default) \n
Sets the level for the second sub-slot. \n
:param testMode: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Tmode')
:param slot: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Slot')
:param channel: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Ldirection')
:return: ss_level: OFF| ATTenuated| FULL OFF Attenuation is maximum. The slot is inactive. ATT Level is reduced by the level attenuation set in 'Slot Attenuation'. FULL The level corresponds to the level indicated in the display."""
testMode_cmd_val = self._cmd_group.get_repcap_cmd_value(testMode, repcap.TestMode)
slot_cmd_val = self._cmd_group.get_repcap_cmd_value(slot, repcap.Slot)
channel_cmd_val = self._cmd_group.get_repcap_cmd_value(channel, repcap.Channel)
response = self._core.io.query_str(f'SOURce<HwInstance>:BB:TETRa:SCONfiguration:TMODe{testMode_cmd_val}:SLOT{slot_cmd_val}:LDIRection{channel_cmd_val}:SSLevel?')
return Conversions.str_to_scalar_enum(response, enums.TetraSlotLevel)