Source code for RsCmwCdma2kMeas.Implementations.MultiEval_.ListPy_.Segment_.Obw_.Current

from ......Internal.Core import Core
from ......Internal.CommandsGroup import CommandsGroup
from ......Internal.StructBase import StructBase
from ......Internal.ArgStruct import ArgStruct
from ...... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class Current: """Current commands group definition. 2 total commands, 0 Sub-groups, 2 group commands""" def __init__(self, core: Core, parent): self._core = core self._base = 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 The segment reliability indicates whether one of the following exceptions occurred in this segment: 0: No error 3: Signal overflow 4: Signal low 8: Synchronization error If a combination of exceptions occurs, the most severe error is indicated. Range: 0 | 3 | 4 | 8 - Obw: float: float Occupied bandwidth Range: 0 MHz to 8 MHz , Unit: Hz - Lower_Freq: float: float Lower frequency of the occupied bandwidth. Range: -8 MHz to 0 MHz , Unit: Hz - Upper_Freq: float: float Upper frequency of the occupied bandwidth. Range: 0 MHz to 8 MHz , Unit: Hz""" __meta_args_list = [ ArgStruct.scalar_int('Reliability', 'Reliability'), ArgStruct.scalar_int('Seg_Reliability'), ArgStruct.scalar_float('Obw'), ArgStruct.scalar_float('Lower_Freq'), ArgStruct.scalar_float('Upper_Freq')] def __init__(self): StructBase.__init__(self, self) self.Reliability: int = None self.Seg_Reliability: int = None self.Obw: float = None self.Lower_Freq: float = None self.Upper_Freq: float = None
[docs] def fetch(self, segment=repcap.Segment.Default) -> FetchStruct: """SCPI: FETCh:CDMA:MEASurement<Instance>:MEValuation:LIST:SEGMent<nr>:OBW:CURRent \n Snippet: value: FetchStruct = driver.multiEval.listPy.segment.obw.current.fetch(segment = repcap.Segment.Default) \n Returns CURRent occupied bandwidth (OBW) results for the segment <no> in list mode (see method RsCmwCdma2kMeas.Configure. MultiEval.ListPy.value) . The values described below are returned by FETCh commands. CALCulate commands return limit check results instead, one value for each result listed below. \n :param segment: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Segment') :return: structure: for return value, see the help for FetchStruct structure arguments.""" segment_cmd_val = self._base.get_repcap_cmd_value(segment, repcap.Segment) return self._core.io.query_struct(f'FETCh:CDMA:MEASurement<Instance>:MEValuation:LIST:SEGMent{segment_cmd_val}:OBW:CURRent?', self.__class__.FetchStruct())
# noinspection PyTypeChecker
[docs] class CalculateStruct(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 The segment reliability indicates whether one of the following exceptions occurred in this segment: 0: No error 3: Signal overflow 4: Signal low 8: Synchronization error If a combination of exceptions occurs, the most severe error is indicated. Range: 0 | 3 | 4 | 8 - Obw: float: float Occupied bandwidth Range: 0 MHz to 8 MHz , Unit: Hz - Lower_Freq: float: float Lower frequency of the occupied bandwidth. Range: -8 MHz to 0 MHz , Unit: Hz - Upper_Freq: float: float Upper frequency of the occupied bandwidth. Range: 0 MHz to 8 MHz , Unit: Hz""" __meta_args_list = [ ArgStruct.scalar_int('Reliability', 'Reliability'), ArgStruct.scalar_int('Seg_Reliability'), ArgStruct.scalar_float('Obw'), ArgStruct.scalar_float('Lower_Freq'), ArgStruct.scalar_float('Upper_Freq')] def __init__(self): StructBase.__init__(self, self) self.Reliability: int = None self.Seg_Reliability: int = None self.Obw: float = None self.Lower_Freq: float = None self.Upper_Freq: float = None
[docs] def calculate(self, segment=repcap.Segment.Default) -> CalculateStruct: """SCPI: CALCulate:CDMA:MEASurement<Instance>:MEValuation:LIST:SEGMent<nr>:OBW:CURRent \n Snippet: value: CalculateStruct = driver.multiEval.listPy.segment.obw.current.calculate(segment = repcap.Segment.Default) \n Returns CURRent occupied bandwidth (OBW) results for the segment <no> in list mode (see method RsCmwCdma2kMeas.Configure. MultiEval.ListPy.value) . The values described below are returned by FETCh commands. CALCulate commands return limit check results instead, one value for each result listed below. \n :param segment: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Segment') :return: structure: for return value, see the help for CalculateStruct structure arguments.""" segment_cmd_val = self._base.get_repcap_cmd_value(segment, repcap.Segment) return self._core.io.query_struct(f'CALCulate:CDMA:MEASurement<Instance>:MEValuation:LIST:SEGMent{segment_cmd_val}:OBW:CURRent?', self.__class__.CalculateStruct())