Source code for RsSmbv.Implementations.Source.Bb.W3Gpp.Mstation.Hsupa.Dpcch.E.Frc.Harq.Simulation.Pattern

from ............Internal.Core import Core
from ............Internal.CommandsGroup import CommandsGroup
from ............Internal import Conversions
from ............Internal.Utilities import trim_str_response
from ............Internal.RepeatedCapability import RepeatedCapability
from ............ import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class PatternCls: """Pattern commands group definition. 1 total commands, 0 Subgroups, 1 group commands Repeated Capability: PatternIx, default value after init: PatternIx.Nr1""" def __init__(self, core: Core, parent): self._core = core self._cmd_group = CommandsGroup("pattern", core, parent) self._cmd_group.rep_cap = RepeatedCapability(self._cmd_group.group_name, 'repcap_patternIx_get', 'repcap_patternIx_set', repcap.PatternIx.Nr1) def repcap_patternIx_set(self, patternIx: repcap.PatternIx) -> None: """Repeated Capability default value numeric suffix. This value is used, if you do not explicitely set it in the child set/get methods, or if you leave it to PatternIx.Default Default value after init: PatternIx.Nr1""" self._cmd_group.set_repcap_enum_value(patternIx) def repcap_patternIx_get(self) -> repcap.PatternIx: """Returns the current default repeated capability for the child set/get methods""" # noinspection PyTypeChecker return self._cmd_group.get_repcap_enum_value()
[docs] def set(self, pattern: str, mobileStation=repcap.MobileStation.Default, patternIx=repcap.PatternIx.Default) -> None: """SCPI: [SOURce<HW>]:BB:W3GPp:MSTation<ST>:[HSUPa]:DPCCh:E:FRC:HARQ:[SIMulation]:PATTern<CH> \n Snippet: driver.source.bb.w3Gpp.mstation.hsupa.dpcch.e.frc.harq.simulation.pattern.set(pattern = 'abc', mobileStation = repcap.MobileStation.Default, patternIx = repcap.PatternIx.Default) \n Sets the HARQ Pattern. The maximum length of the pattern is 32 bits. \n :param pattern: string :param mobileStation: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Mstation') :param patternIx: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Pattern') """ param = Conversions.value_to_quoted_str(pattern) mobileStation_cmd_val = self._cmd_group.get_repcap_cmd_value(mobileStation, repcap.MobileStation) patternIx_cmd_val = self._cmd_group.get_repcap_cmd_value(patternIx, repcap.PatternIx) self._core.io.write(f'SOURce<HwInstance>:BB:W3GPp:MSTation{mobileStation_cmd_val}:HSUPa:DPCCh:E:FRC:HARQ:SIMulation:PATTern{patternIx_cmd_val} {param}')
[docs] def get(self, mobileStation=repcap.MobileStation.Default, patternIx=repcap.PatternIx.Default) -> str: """SCPI: [SOURce<HW>]:BB:W3GPp:MSTation<ST>:[HSUPa]:DPCCh:E:FRC:HARQ:[SIMulation]:PATTern<CH> \n Snippet: value: str = driver.source.bb.w3Gpp.mstation.hsupa.dpcch.e.frc.harq.simulation.pattern.get(mobileStation = repcap.MobileStation.Default, patternIx = repcap.PatternIx.Default) \n Sets the HARQ Pattern. The maximum length of the pattern is 32 bits. \n :param mobileStation: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Mstation') :param patternIx: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Pattern') :return: pattern: string""" mobileStation_cmd_val = self._cmd_group.get_repcap_cmd_value(mobileStation, repcap.MobileStation) patternIx_cmd_val = self._cmd_group.get_repcap_cmd_value(patternIx, repcap.PatternIx) response = self._core.io.query_str(f'SOURce<HwInstance>:BB:W3GPp:MSTation{mobileStation_cmd_val}:HSUPa:DPCCh:E:FRC:HARQ:SIMulation:PATTern{patternIx_cmd_val}?') return trim_str_response(response)
def clone(self) -> 'PatternCls': """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 = PatternCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group