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 PhyCls:
"""Phy commands group definition. 1 total commands, 0 Subgroups, 1 group commands"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("phy", core, parent)
[docs]
def set(self, le_phy_type: enums.LePhysicalTypeB, segment=repcap.Segment.Default) -> None:
"""SCPI: CONFigure:BLUetooth:MEASurement<Instance>:MEValuation:LIST:SEGMent<nr>[:SETup]:PHY \n
Snippet: driver.configure.multiEval.listPy.segment.setup.phy.set(le_phy_type = enums.LePhysicalTypeB.LE1M, segment = repcap.Segment.Default) \n
Defines the physical layer (PHY) for segment. \n
:param le_phy_type: LE1M | LE2M | LELR LE1M: LE 1 Msymbol/s uncoded PHY LE2M: LE 2 Msymbol/s uncoded PHY LELR: LE 1 Msymbol/s long range (LE coded PHY)
:param segment: optional repeated capability selector. Default value: S1 (settable in the interface 'Segment')
"""
param = Conversions.enum_scalar_to_str(le_phy_type, enums.LePhysicalTypeB)
segment_cmd_val = self._cmd_group.get_repcap_cmd_value(segment, repcap.Segment)
self._core.io.write(f'CONFigure:BLUetooth:MEASurement<Instance>:MEValuation:LIST:SEGMent{segment_cmd_val}:SETup:PHY {param}')
# noinspection PyTypeChecker
[docs]
def get(self, segment=repcap.Segment.Default) -> enums.LePhysicalTypeB:
"""SCPI: CONFigure:BLUetooth:MEASurement<Instance>:MEValuation:LIST:SEGMent<nr>[:SETup]:PHY \n
Snippet: value: enums.LePhysicalTypeB = driver.configure.multiEval.listPy.segment.setup.phy.get(segment = repcap.Segment.Default) \n
Defines the physical layer (PHY) for segment. \n
:param segment: optional repeated capability selector. Default value: S1 (settable in the interface 'Segment')
:return: le_phy_type: LE1M | LE2M | LELR LE1M: LE 1 Msymbol/s uncoded PHY LE2M: LE 2 Msymbol/s uncoded PHY LELR: LE 1 Msymbol/s long range (LE coded PHY)"""
segment_cmd_val = self._cmd_group.get_repcap_cmd_value(segment, repcap.Segment)
response = self._core.io.query_str(f'CONFigure:BLUetooth:MEASurement<Instance>:MEValuation:LIST:SEGMent{segment_cmd_val}:SETup:PHY?')
return Conversions.str_to_scalar_enum(response, enums.LePhysicalTypeB)