from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from ..... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PreambleCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("preamble", core, parent)
[docs]
def set(self, unit: enums.PreambleUnit) -> None:
"""
``UNIT:PREamble`` \n
Snippet: ``driver.applications.k91Wlan.unit.preamble.set(unit = enums.PreambleUnit.HZ)`` \n
Specifies the units for preamble error results.
:param unit: HZ | PCT
"""
param = Conversions.enum_scalar_to_str(unit, enums.PreambleUnit)
self._core.io.write(f'UNIT:PREamble {param}')
# noinspection PyTypeChecker
[docs]
def get(self) -> enums.PreambleUnit:
"""
``UNIT:PREamble`` \n
Snippet: ``value: enums.PreambleUnit = driver.applications.k91Wlan.unit.preamble.get()`` \n
Specifies the units for preamble error results.
:return: unit: HZ | PCT
"""
response = self._core.io.query_str(f'UNIT:PREamble?')
return Conversions.str_to_scalar_enum(response, enums.PreambleUnit)