Source code for RsCmwWlanSig.Implementations.Per

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs] class PerCls: """Per commands group definition. 7 total commands, 1 Subgroups, 5 group commands""" def __init__(self, core: Core, parent): self._core = core self._cmd_group = CommandsGroup("per", core, parent) @property def state(self): """state commands group. 1 Sub-classes, 1 commands.""" if not hasattr(self, '_state'): from .State import StateCls self._state = StateCls(self._core, self._cmd_group) return self._state # noinspection PyTypeChecker
[docs] class ReadStruct(StructBase): """Response structure. Fields: \n - Reliability: int: decimal 'Reliability indicator' - Per: float: float Range: 0 % to 100 % - Current_No_Frames: int: No parameter help available - Frames_Lost: int: No parameter help available - Frame_Transmitted: int: No parameter help available - Rx_Burst_Power: float: float Average received burst power of uplink ACK frames Unit: dBm""" __meta_args_list = [ ArgStruct.scalar_int('Reliability', 'Reliability'), ArgStruct.scalar_float('Per'), ArgStruct.scalar_int('Current_No_Frames'), ArgStruct.scalar_int('Frames_Lost'), ArgStruct.scalar_int('Frame_Transmitted'), ArgStruct.scalar_float('Rx_Burst_Power')] def __init__(self): StructBase.__init__(self, self) self.Reliability: int = None self.Per: float = None self.Current_No_Frames: int = None self.Frames_Lost: int = None self.Frame_Transmitted: int = None self.Rx_Burst_Power: float = None
[docs] def read(self) -> ReadStruct: """SCPI: READ:WLAN:SIGNaling<instance>:PER \n Snippet: value: ReadStruct = driver.per.read() \n Returns all results of the PER measurement. \n :return: structure: for return value, see the help for ReadStruct structure arguments.""" return self._core.io.query_struct(f'READ:WLAN:SIGNaling<Instance>:PER?', self.__class__.ReadStruct())
# noinspection PyTypeChecker
[docs] class FetchStruct(StructBase): """Response structure. Fields: \n - Reliability: int: decimal 'Reliability indicator' - Per: float: float Range: 0 % to 100 % - Current_No_Frames: int: No parameter help available - Frames_Lost: int: No parameter help available - Rx_Burst_Power: float: float Average received burst power of uplink ACK frames Unit: dBm""" __meta_args_list = [ ArgStruct.scalar_int('Reliability', 'Reliability'), ArgStruct.scalar_float('Per'), ArgStruct.scalar_int('Current_No_Frames'), ArgStruct.scalar_int('Frames_Lost'), ArgStruct.scalar_float('Rx_Burst_Power')] def __init__(self): StructBase.__init__(self, self) self.Reliability: int = None self.Per: float = None self.Current_No_Frames: int = None self.Frames_Lost: int = None self.Rx_Burst_Power: float = None
[docs] def fetch(self) -> FetchStruct: """SCPI: FETCh:WLAN:SIGNaling<instance>:PER \n Snippet: value: FetchStruct = driver.per.fetch() \n Returns all results of the PER measurement. \n :return: structure: for return value, see the help for FetchStruct structure arguments.""" return self._core.io.query_struct(f'FETCh:WLAN:SIGNaling<Instance>:PER?', self.__class__.FetchStruct())
[docs] def stop(self) -> None: """SCPI: STOP:WLAN:SIGNaling<instance>:PER \n Snippet: driver.per.stop() \n INTRO_CMD_HELP: Starts, stops, or aborts the measurement: \n - INITiate... starts or restarts the measurement. The measurement enters the 'RUN' state. - STOP... halts the measurement immediately. The measurement enters the 'RDY' state. Measurement results are kept. The resources remain allocated to the measurement. - ABORt... halts the measurement immediately. The measurement enters the 'OFF' state. All measurement values are set to NAV. Allocated resources are released. Use FETCh...STATe? to query the current measurement state. \n """ self._core.io.write(f'STOP:WLAN:SIGNaling<Instance>:PER')
[docs] def stop_with_opc(self, opc_timeout_ms: int = -1) -> None: """SCPI: STOP:WLAN:SIGNaling<instance>:PER \n Snippet: driver.per.stop_with_opc() \n INTRO_CMD_HELP: Starts, stops, or aborts the measurement: \n - INITiate... starts or restarts the measurement. The measurement enters the 'RUN' state. - STOP... halts the measurement immediately. The measurement enters the 'RDY' state. Measurement results are kept. The resources remain allocated to the measurement. - ABORt... halts the measurement immediately. The measurement enters the 'OFF' state. All measurement values are set to NAV. Allocated resources are released. Use FETCh...STATe? to query the current measurement state. \n Same as stop, but waits for the operation to complete before continuing further. Use the RsCmwWlanSig.utilities.opc_timeout_set() to set the timeout value. \n :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.""" self._core.io.write_with_opc(f'STOP:WLAN:SIGNaling<Instance>:PER', opc_timeout_ms)
[docs] def abort(self, opc_timeout_ms: int = -1) -> None: """SCPI: ABORt:WLAN:SIGNaling<instance>:PER \n Snippet: driver.per.abort() \n INTRO_CMD_HELP: Starts, stops, or aborts the measurement: \n - INITiate... starts or restarts the measurement. The measurement enters the 'RUN' state. - STOP... halts the measurement immediately. The measurement enters the 'RDY' state. Measurement results are kept. The resources remain allocated to the measurement. - ABORt... halts the measurement immediately. The measurement enters the 'OFF' state. All measurement values are set to NAV. Allocated resources are released. Use FETCh...STATe? to query the current measurement state. \n :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.""" self._core.io.write_with_opc(f'ABORt:WLAN:SIGNaling<Instance>:PER', opc_timeout_ms)
[docs] def initiate(self, opc_timeout_ms: int = -1) -> None: """SCPI: INITiate:WLAN:SIGNaling<instance>:PER \n Snippet: driver.per.initiate() \n INTRO_CMD_HELP: Starts, stops, or aborts the measurement: \n - INITiate... starts or restarts the measurement. The measurement enters the 'RUN' state. - STOP... halts the measurement immediately. The measurement enters the 'RDY' state. Measurement results are kept. The resources remain allocated to the measurement. - ABORt... halts the measurement immediately. The measurement enters the 'OFF' state. All measurement values are set to NAV. Allocated resources are released. Use FETCh...STATe? to query the current measurement state. \n :param opc_timeout_ms: Maximum time to wait in milliseconds, valid only for this call.""" self._core.io.write_with_opc(f'INITiate:WLAN:SIGNaling<Instance>:PER', opc_timeout_ms)
def clone(self) -> 'PerCls': """Clones the group by creating new object from it and its whole existing subgroups Also copies all the existing default Repeated Capabilities setting, which you can change independently without affecting the original group""" new_group = PerCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group