from .....Internal.Core import Core
from .....Internal.CommandsGroup import CommandsGroup
from .....Internal import Conversions
from .....Internal.Utilities import trim_str_response
from .....Internal.StructBase import StructBase
from .....Internal.ArgStruct import ArgStruct
from ..... import enums
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class PhymacCfgCls:
"""
| Commands in total: 7
| Subgroups: 0
| Direct child commands: 7
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("phymacCfg", core, parent)
# noinspection PyTypeChecker
[docs]
def get_coderate(self) -> enums.BtoCodeRate:
"""
``[SOURce<HW>]:BB:BTOoth:PHYMacCfg:CODERate`` \n
Snippet: ``value: enums.BtoCodeRate = driver.source.bb.btooth.phymacCfg.get_coderate()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:PHYMacCfg:CODERate?')
return Conversions.str_to_scalar_enum(response, enums.BtoCodeRate)
# noinspection PyTypeChecker
[docs]
class DpatternStruct(StructBase):
"""
Structure for reading output parameters. Fields: \n
- Dpattern: str: No parameter help available
- Bitcount: int: No parameter help available
"""
__meta_args_list = [
ArgStruct.scalar_raw_str('Dpattern'),
ArgStruct.scalar_int('Bitcount')]
def __init__(self):
StructBase.__init__(self, self)
self.Dpattern: str=None
self.Bitcount: int=None
[docs]
def get_dpattern(self) -> DpatternStruct:
"""
``[SOURce<HW>]:BB:BTOoth:PHYMacCfg:DPAttern`` \n
Snippet: ``value: DpatternStruct = driver.source.bb.btooth.phymacCfg.get_dpattern()`` \n
No help available
:return: structure: for return value, see the help for DpatternStruct structure arguments.
"""
return self._core.io.query_struct('SOURce<HwInstance>:BB:BTOoth:PHYMacCfg:DPAttern?', self.__class__.DpatternStruct())
[docs]
def get_dselection(self) -> str:
"""
``[SOURce<HW>]:BB:BTOoth:PHYMacCfg:DSELection`` \n
Snippet: ``value: str = driver.source.bb.btooth.phymacCfg.get_dselection()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:PHYMacCfg:DSELection?')
return trim_str_response(response)
# noinspection PyTypeChecker
# noinspection PyTypeChecker
[docs]
def get_payload_cod(self) -> enums.BtoHdrpPayload:
"""
``[SOURce<HW>]:BB:BTOoth:PHYMacCfg:PAYLoadCod`` \n
Snippet: ``value: enums.BtoHdrpPayload = driver.source.bb.btooth.phymacCfg.get_payload_cod()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:PHYMacCfg:PAYLoadCod?')
return Conversions.str_to_scalar_enum(response, enums.BtoHdrpPayload)
[docs]
def get_payload_len(self) -> int:
"""
``[SOURce<HW>]:BB:BTOoth:PHYMacCfg:PAYLoadLen`` \n
Snippet: ``value: int = driver.source.bb.btooth.phymacCfg.get_payload_len()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:PHYMacCfg:PAYLoadLen?')
return Conversions.str_to_int(response)
[docs]
def get_prt_aggre(self) -> bool:
"""
``[SOURce<HW>]:BB:BTOoth:PHYMacCfg:PRTAggre`` \n
Snippet: ``value: bool = driver.source.bb.btooth.phymacCfg.get_prt_aggre()`` \n
No help available
"""
response = self._core.io.query_str('SOURce<HwInstance>:BB:BTOoth:PHYMacCfg:PRTAggre?')
return Conversions.str_to_bool(response)