Source code for RsCmwGsmMeas.Implementations.Route_.Scenario

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
[docs]class Scenario: """Scenario commands group definition. 4 total commands, 1 Sub-groups, 3 group commands""" def __init__(self, core: Core, parent): self._core = core self._base = CommandsGroup("scenario", core, parent) @property def maProtocol(self): """maProtocol commands group. 0 Sub-classes, 1 commands.""" if not hasattr(self, '_maProtocol'): from .Scenario_.MaProtocol import MaProtocol self._maProtocol = MaProtocol(self._core, self._base) return self._maProtocol
[docs] def get_cspath(self) -> str: """SCPI: ROUTe:GSM:MEASurement<Instance>:SCENario:CSPath \n Snippet: value: str = driver.route.scenario.get_cspath() \n Activates the combined signal path scenario and selects a master firmware application for the GSM measurements. The master controls the signal routing settings and analyzer settings while the combined signal path scenario is active. \n :return: master: string String parameter containing the master application, e.g. 'GSM Sig1' or 'GSM Sig2' """ response = self._core.io.query_str('ROUTe:GSM:MEASurement<Instance>:SCENario:CSPath?') return trim_str_response(response)
[docs] def set_cspath(self, master: str) -> None: """SCPI: ROUTe:GSM:MEASurement<Instance>:SCENario:CSPath \n Snippet: driver.route.scenario.set_cspath(master = '1') \n Activates the combined signal path scenario and selects a master firmware application for the GSM measurements. The master controls the signal routing settings and analyzer settings while the combined signal path scenario is active. \n :param master: string String parameter containing the master application, e.g. 'GSM Sig1' or 'GSM Sig2' """ param = Conversions.value_to_quoted_str(master) self._core.io.write(f'ROUTe:GSM:MEASurement<Instance>:SCENario:CSPath {param}')
# noinspection PyTypeChecker
[docs] class SaloneStruct(StructBase): """Structure for reading output parameters. Fields: \n - Rx_Connector: enums.RxConnector: RF connector for the input path - Rf_Converter: enums.RfConverter: RX module for the input path""" __meta_args_list = [ ArgStruct.scalar_enum('Rx_Connector', enums.RxConnector), ArgStruct.scalar_enum('Rf_Converter', enums.RfConverter)] def __init__(self): StructBase.__init__(self, self) self.Rx_Connector: enums.RxConnector = None self.Rf_Converter: enums.RfConverter = None
# noinspection PyTypeChecker
[docs] def get_salone(self) -> SaloneStruct: """SCPI: ROUTe:GSM:MEASurement<Instance>:SCENario:SALone \n Snippet: value: SaloneStruct = driver.route.scenario.get_salone() \n Activates the standalone scenario and selects the RF input path for the measured RF signal. For possible connector and converter values, see 'Values for RF Path Selection'. \n :return: structure: for return value, see the help for SaloneStruct structure arguments. """ return self._core.io.query_struct('ROUTe:GSM:MEASurement<Instance>:SCENario:SALone?', self.__class__.SaloneStruct())
[docs] def set_salone(self, value: SaloneStruct) -> None: """SCPI: ROUTe:GSM:MEASurement<Instance>:SCENario:SALone \n Snippet: driver.route.scenario.set_salone(value = SaloneStruct()) \n Activates the standalone scenario and selects the RF input path for the measured RF signal. For possible connector and converter values, see 'Values for RF Path Selection'. \n :param value: see the help for SaloneStruct structure arguments. """ self._core.io.write_struct('ROUTe:GSM:MEASurement<Instance>:SCENario:SALone', value)
# noinspection PyTypeChecker
[docs] def get_value(self) -> enums.Scenario: """SCPI: ROUTe:GSM:MEASurement<Instance>:SCENario \n Snippet: value: enums.Scenario = driver.route.scenario.get_value() \n Queries the active scenario. \n :return: scenario: SALone | CSPath | MAPRotocol Standalone, combined signal path, measure at protocol test """ response = self._core.io.query_str('ROUTe:GSM:MEASurement<Instance>:SCENario?') return Conversions.str_to_scalar_enum(response, enums.Scenario)
def clone(self) -> 'Scenario': """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 = Scenario(self._core, self._base.parent) self._base.synchronize_repcaps(new_group) return new_group