from .........Internal.Core import Core
from .........Internal.CommandsGroup import CommandsGroup
from .........Internal import Conversions
from .........Internal.Utilities import trim_str_response
from ......... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class Apf1Cls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("apf1", core, parent)
[docs]
def set(self, apf_1: str, testMode=repcap.TestMode.Default, slot=repcap.Slot.Default, channel=repcap.Channel.Default) -> None:
"""
``[SOURce<HW>]:BB:TETRa:SCONfiguration:TMODe<DI>:SLOT<ST>:LDIRection<CH>:APF1`` \n
Snippet: ``driver.source.bb.tetra.sconfiguration.tmode.slot.ldirection.apf1.set(apf_1 = rawAbc, testMode = repcap.TestMode.Default, slot = repcap.Slot.Default, channel = repcap.Channel.Default)`` \n
Sets the value for the information element Field 1 of the Access-Assign PDU.
:param apf_1: 8 bits
: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.value_to_str(apf_1)
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}:APF1 {param}')
[docs]
def get(self, testMode=repcap.TestMode.Default, slot=repcap.Slot.Default, channel=repcap.Channel.Default) -> str:
"""
``[SOURce<HW>]:BB:TETRa:SCONfiguration:TMODe<DI>:SLOT<ST>:LDIRection<CH>:APF1`` \n
Snippet: ``value: str = driver.source.bb.tetra.sconfiguration.tmode.slot.ldirection.apf1.get(testMode = repcap.TestMode.Default, slot = repcap.Slot.Default, channel = repcap.Channel.Default)`` \n
Sets the value for the information element Field 1 of the Access-Assign PDU.
: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: apf_1: 8 bits
"""
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}:APF1?')
return trim_str_response(response)