from .......Internal.Core import Core
from .......Internal.CommandsGroup import CommandsGroup
from .......Internal import Conversions
from ....... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PhrtCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("phrt", core, parent)
# noinspection PyTypeChecker
[docs]
def get_bitrate(self) -> enums.HrpUwbPhr2BitRate:
"""
``[SOURce<HW>]:BB:LRWPan:EMLLd:FCONfig:PHRT:BITRate`` \n
Snippet: ``value: enums.HrpUwbPhr2BitRate = driver.source.bb.lrWpan.emlld.fconfig.phrt.get_bitrate()`` \n
Requires [:SOURce<hw>]:BB:LRWPan:EMLLd | SENS:PHR:DRM MDR. Sets the PHR2 bit rate depending on the PHR1 codeword.
:return: phr_2_bit_rate: R1M95H | R1M95 | R7M8H | R7M8 | R31M2H | R31M2 | R62M4H | R62M4 | R124M8H | R124M8
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:LRWPan:EMLLd:FCONfig:PHRT:BITRate?')
return Conversions.str_to_scalar_enum(response, enums.HrpUwbPhr2BitRate)
[docs]
def set_bitrate(self, phr_2_bit_rate: enums.HrpUwbPhr2BitRate) -> None:
"""
``[SOURce<HW>]:BB:LRWPan:EMLLd:FCONfig:PHRT:BITRate`` \n
Snippet: ``driver.source.bb.lrWpan.emlld.fconfig.phrt.set_bitrate(phr_2_bit_rate = enums.HrpUwbPhr2BitRate.R124M8)`` \n
Requires [:SOURce<hw>]:BB:LRWPan:EMLLd | SENS:PHR:DRM MDR. Sets the PHR2 bit rate depending on the PHR1 codeword.
:param phr_2_bit_rate: R1M95H | R1M95 | R7M8H | R7M8 | R31M2H | R31M2 | R62M4H | R62M4 | R124M8H | R124M8
"""
param = Conversions.enum_scalar_to_str(phr_2_bit_rate, enums.HrpUwbPhr2BitRate)
self._core.io.write(f'SOURce<HwInstance>:BB:LRWPan:EMLLd:FCONfig:PHRT:BITRate {param}')