Source code for RsCmwEvdoMeas.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. 5 total commands, 2 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 @property def catalog(self): """catalog commands group. 0 Sub-classes, 1 commands.""" if not hasattr(self, '_catalog'): from .Scenario_.Catalog import Catalog self._catalog = Catalog(self._core, self._base) return self._catalog # noinspection PyTypeChecker
[docs] class SaloneStruct(StructBase): """Structure for reading output parameters. Fields: \n - Rx_Connector: enums.RxConnector: RF connector for the input path - Rx_Converter: enums.RxConverter: RX module for the input path""" __meta_args_list = [ ArgStruct.scalar_enum('Rx_Connector', enums.RxConnector), ArgStruct.scalar_enum('Rx_Converter', enums.RxConverter)] def __init__(self): StructBase.__init__(self, self) self.Rx_Connector: enums.RxConnector = None self.Rx_Converter: enums.RxConverter = None
# noinspection PyTypeChecker
[docs] def get_salone(self) -> SaloneStruct: """SCPI: ROUTe:EVDO: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:EVDO:MEASurement<Instance>:SCENario:SALone?', self.__class__.SaloneStruct())
[docs] def set_salone(self, value: SaloneStruct) -> None: """SCPI: ROUTe:EVDO: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:EVDO:MEASurement<Instance>:SCENario:SALone', value)
[docs] def get_cspath(self) -> str: """SCPI: ROUTe:EVDO:MEASurement<instance>:SCENario:CSPath \n Snippet: value: str = driver.route.scenario.get_cspath() \n Activates the combined signal path scenario and selects a master. The master controls the signal routing, analyzer settings and AT signal info settings while the combined signal path scenario is active. Configure the connector and converter settings via ROUTe:EVDO:SIGN<i>:SCENario:.... Depending on the installed options, the set of masters available at your instrument can differ from the values listed below. A complete list of all supported values can be displayed using method RsCmwEvdoMeas.Route.Scenario.Catalog.cspath. \n :return: master: string String parameter containing the master application, e.g. '1xEV-DO Sig1' or '1xEV-DO Sig2' """ response = self._core.io.query_str('ROUTe:EVDO:MEASurement<Instance>:SCENario:CSPath?') return trim_str_response(response)
[docs] def set_cspath(self, master: str) -> None: """SCPI: ROUTe:EVDO:MEASurement<instance>:SCENario:CSPath \n Snippet: driver.route.scenario.set_cspath(master = '1') \n Activates the combined signal path scenario and selects a master. The master controls the signal routing, analyzer settings and AT signal info settings while the combined signal path scenario is active. Configure the connector and converter settings via ROUTe:EVDO:SIGN<i>:SCENario:.... Depending on the installed options, the set of masters available at your instrument can differ from the values listed below. A complete list of all supported values can be displayed using method RsCmwEvdoMeas.Route.Scenario.Catalog.cspath. \n :param master: string String parameter containing the master application, e.g. '1xEV-DO Sig1' or '1xEV-DO Sig2' """ param = Conversions.value_to_quoted_str(master) self._core.io.write(f'ROUTe:EVDO:MEASurement<Instance>:SCENario:CSPath {param}')
# noinspection PyTypeChecker
[docs] def get_value(self) -> enums.TestScenarioB: """SCPI: ROUTe:EVDO:MEASurement<instance>:SCENario \n Snippet: value: enums.TestScenarioB = driver.route.scenario.get_value() \n Returns the active scenario. \n :return: scenario: SALone | CSPath SALone: Standalone (non-signaling) CSPath: Combined signal path """ response = self._core.io.query_str('ROUTe:EVDO:MEASurement<Instance>:SCENario?') return Conversions.str_to_scalar_enum(response, enums.TestScenarioB)
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