from typing import List
from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal.Types import DataType
from ......Internal.StructBase import StructBase
from ......Internal.ArgStruct import ArgStruct
from ...... import repcap
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]
class CurrentCls:
"""Current commands group definition. 1 total commands, 0 Subgroups, 1 group commands"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("current", core, parent)
# noinspection PyTypeChecker
[docs]
class FetchStruct(StructBase):
"""Response structure. Fields: \n
- Reliability: int: decimal 'Reliability indicator' In list mode, a zero reliability indicator indicates that the results in all measured segments are valid. A non-zero value indicates that an error occurred in at least one of the measured segments.
- Seg_Reliability: int: decimal Reliability indicator for the segment. The meaning of the returned values is the same as for the common reliability indicator, see previous parameter.
- Out_Of_Tol: float: float Out of tolerance result, i.e. percentage of measurement intervals of the statistic count for spectrum emission measurements exceeding the specified transmit spectrum mask limits. Range: 0 % to 100 % , Unit: %
- Margins: List[float]: No parameter help available"""
__meta_args_list = [
ArgStruct.scalar_int('Reliability', 'Reliability'),
ArgStruct.scalar_int('Seg_Reliability'),
ArgStruct.scalar_float('Out_Of_Tol'),
ArgStruct('Margins', DataType.FloatList, None, False, True, 1)]
def __init__(self):
StructBase.__init__(self, self)
self.Reliability: int = None
self.Seg_Reliability: int = None
self.Out_Of_Tol: float = None
self.Margins: List[float] = None
[docs]
def fetch(self, segmentB=repcap.SegmentB.Default) -> FetchStruct:
"""SCPI: FETCh:WLAN:MEASurement<Instance>:MEValuation:LIST:SEGMent<segment>:TSMask:CURRent \n
Snippet: value: FetchStruct = driver.multiEval.listPy.segment.tsMask.current.fetch(segmentB = repcap.SegmentB.Default) \n
Return limit line margin results for segment <no> in list mode. A positive result indicates that the trace is located
above the limit line, i.e. the limit is exceeded. Margins for the current, average, minimum, maximum and standard
deviation results are returned. \n
:param segmentB: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Segment')
:return: structure: for return value, see the help for FetchStruct structure arguments."""
segmentB_cmd_val = self._cmd_group.get_repcap_cmd_value(segmentB, repcap.SegmentB)
return self._core.io.query_struct(f'FETCh:WLAN:MEASurement<Instance>:MEValuation:LIST:SEGMent{segmentB_cmd_val}:TSMask:CURRent?', self.__class__.FetchStruct())