from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal.StructBase import StructBase
from ......Internal.ArgStruct import ArgStruct
from ......Internal.RepeatedCapability import RepeatedCapability
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class Ulink:
"""Ulink commands group definition. 2 total commands, 0 Sub-groups, 2 group commands
Repeated Capability: Slot, default value after init: Slot.Nr1"""
def __init__(self, core: Core, parent):
self._core = core
self._base = CommandsGroup("ulink", core, parent)
self._base.rep_cap = RepeatedCapability(self._base.group_name, 'repcap_slot_get', 'repcap_slot_set', repcap.Slot.Nr1)
def repcap_slot_set(self, enum_value: repcap.Slot) -> None:
"""Repeated Capability default value numeric suffix.
This value is used, if you do not explicitely set it in the child set/get methods, or if you leave it to Slot.Default
Default value after init: Slot.Nr1"""
self._base.set_repcap_enum_value(enum_value)
def repcap_slot_get(self) -> repcap.Slot:
"""Returns the current default repeated capability for the child set/get methods"""
# noinspection PyTypeChecker
return self._base.get_repcap_enum_value()
# noinspection PyTypeChecker
[docs] class ResultData(StructBase):
"""Response structure. Fields: \n
- Reliability: int: See 'Reliability Indicator'
- Th_Curr_Up_Link: float: Current throughput Unit: bit/s
- Th_Min_Up_Link: float: Minimum throughput Unit: bit/s
- Th_Max_Up_Link: float: Maximum throughput Unit: bit/s
- Th_Avg_Up_Link: float: Average throughput Unit: bit/s"""
__meta_args_list = [
ArgStruct.scalar_int('Reliability', 'Reliability'),
ArgStruct.scalar_float('Th_Curr_Up_Link'),
ArgStruct.scalar_float('Th_Min_Up_Link'),
ArgStruct.scalar_float('Th_Max_Up_Link'),
ArgStruct.scalar_float('Th_Avg_Up_Link')]
def __init__(self):
StructBase.__init__(self, self)
self.Reliability: int = None
self.Th_Curr_Up_Link: float = None
self.Th_Min_Up_Link: float = None
self.Th_Max_Up_Link: float = None
self.Th_Avg_Up_Link: float = None
[docs] def read(self, slot=repcap.Slot.Default) -> ResultData:
"""SCPI: READ:DATA:MEASurement<Instance>:THRoughput:RAN:ULINk<Index> \n
Snippet: value: ResultData = driver.data.measurement.throughput.ran.ulink.read(slot = repcap.Slot.Default) \n
Query the statistical results of the throughput measurement for RAN slot number <Index> in uplink direction. \n
:param slot: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Ulink')
:return: structure: for return value, see the help for ResultData structure arguments."""
slot_cmd_val = self._base.get_repcap_cmd_value(slot, repcap.Slot)
return self._core.io.query_struct(f'READ:DATA:MEASurement<MeasInstance>:THRoughput:RAN:ULINk{slot_cmd_val}?', self.__class__.ResultData())
[docs] def fetch(self, slot=repcap.Slot.Default) -> ResultData:
"""SCPI: FETCh:DATA:MEASurement<Instance>:THRoughput:RAN:ULINk<Index> \n
Snippet: value: ResultData = driver.data.measurement.throughput.ran.ulink.fetch(slot = repcap.Slot.Default) \n
Query the statistical results of the throughput measurement for RAN slot number <Index> in uplink direction. \n
:param slot: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Ulink')
:return: structure: for return value, see the help for ResultData structure arguments."""
slot_cmd_val = self._base.get_repcap_cmd_value(slot, repcap.Slot)
return self._core.io.query_struct(f'FETCh:DATA:MEASurement<MeasInstance>:THRoughput:RAN:ULINk{slot_cmd_val}?', self.__class__.ResultData())
def clone(self) -> 'Ulink':
"""Clones the group by creating new object from it and its whole existing sub-groups
Also copies all the existing default Repeated Capabilities setting,
which you can change independently without affecting the original group"""
new_group = Ulink(self._core, self._base.parent)
self._base.synchronize_repcaps(new_group)
return new_group