Source code for RsSmbv.Implementations.Source.Bb.W3Gpp.Bstation.Channel.Dpcch.Tfci

from .........Internal.Core import Core
from .........Internal.CommandsGroup import CommandsGroup
from .........Internal import Conversions
from ......... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
[docs]class TfciCls: """Tfci commands group definition. 2 total commands, 1 Subgroups, 1 group commands""" def __init__(self, core: Core, parent): self._core = core self._cmd_group = CommandsGroup("tfci", core, parent) @property def state(self): """state commands group. 0 Sub-classes, 1 commands.""" if not hasattr(self, '_state'): from .State import StateCls self._state = StateCls(self._core, self._cmd_group) return self._state
[docs] def set(self, tfci: int, baseStation=repcap.BaseStation.Default, channelNull=repcap.ChannelNull.Default) -> None: """SCPI: [SOURce<HW>]:BB:W3GPp:BSTation<ST>:CHANnel<CH0>:DPCCh:TFCI \n Snippet: driver.source.bb.w3Gpp.bstation.channel.dpcch.tfci.set(tfci = 1, baseStation = repcap.BaseStation.Default, channelNull = repcap.ChannelNull.Default) \n The command enters the value of the TFCI field (Transport Format Combination Indicator) for the selected channel of the specified base station. The TFCI field is always filled with exactly 10 bits with leading zeros. \n :param tfci: integer Range: 0 to 1023 :param baseStation: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bstation') :param channelNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Channel') """ param = Conversions.decimal_value_to_str(tfci) baseStation_cmd_val = self._cmd_group.get_repcap_cmd_value(baseStation, repcap.BaseStation) channelNull_cmd_val = self._cmd_group.get_repcap_cmd_value(channelNull, repcap.ChannelNull) self._core.io.write(f'SOURce<HwInstance>:BB:W3GPp:BSTation{baseStation_cmd_val}:CHANnel{channelNull_cmd_val}:DPCCh:TFCI {param}')
[docs] def get(self, baseStation=repcap.BaseStation.Default, channelNull=repcap.ChannelNull.Default) -> int: """SCPI: [SOURce<HW>]:BB:W3GPp:BSTation<ST>:CHANnel<CH0>:DPCCh:TFCI \n Snippet: value: int = driver.source.bb.w3Gpp.bstation.channel.dpcch.tfci.get(baseStation = repcap.BaseStation.Default, channelNull = repcap.ChannelNull.Default) \n The command enters the value of the TFCI field (Transport Format Combination Indicator) for the selected channel of the specified base station. The TFCI field is always filled with exactly 10 bits with leading zeros. \n :param baseStation: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Bstation') :param channelNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Channel') :return: tfci: integer Range: 0 to 1023""" baseStation_cmd_val = self._cmd_group.get_repcap_cmd_value(baseStation, repcap.BaseStation) channelNull_cmd_val = self._cmd_group.get_repcap_cmd_value(channelNull, repcap.ChannelNull) response = self._core.io.query_str(f'SOURce<HwInstance>:BB:W3GPp:BSTation{baseStation_cmd_val}:CHANnel{channelNull_cmd_val}:DPCCh:TFCI?') return Conversions.str_to_int(response)
def clone(self) -> 'TfciCls': """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 = TfciCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group