Source code for RsSmw.Implementations.Source.Bb.Eutra.Downlink.Mbsfn.Pmch.State

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class StateCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("state", core, parent)

[docs] def set(self, pmch_state: bool, indexNull=repcap.IndexNull.Default) -> None: """ ``[SOURce<HW>]:BB:EUTRa:DL:MBSFn:PMCH<CH0>:STATe`` \n Snippet: ``driver.source.bb.eutra.downlink.mbsfn.pmch.state.set(pmch_state = False, indexNull = repcap.IndexNull.Default)`` \n Enables/disables the selected PMCH/MTCH. :param pmch_state: 1 | ON | 0| OFF :param indexNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Pmch') """ param = Conversions.bool_to_str(pmch_state) indexNull_cmd_val = self._cmd_group.get_repcap_cmd_value(indexNull, repcap.IndexNull) self._core.io.write(f'SOURce<HwInstance>:BB:EUTRa:DL:MBSFn:PMCH{indexNull_cmd_val}:STATe {param}')
[docs] def get(self, indexNull=repcap.IndexNull.Default) -> bool: """ ``[SOURce<HW>]:BB:EUTRa:DL:MBSFn:PMCH<CH0>:STATe`` \n Snippet: ``value: bool = driver.source.bb.eutra.downlink.mbsfn.pmch.state.get(indexNull = repcap.IndexNull.Default)`` \n Enables/disables the selected PMCH/MTCH. :param indexNull: optional repeated capability selector. Default value: Nr0 (settable in the interface 'Pmch') :return: pmch_state: 1 | ON | 0| OFF """ indexNull_cmd_val = self._cmd_group.get_repcap_cmd_value(indexNull, repcap.IndexNull) response = self._core.io.query_str(f'SOURce<HwInstance>:BB:EUTRa:DL:MBSFn:PMCH{indexNull_cmd_val}:STATe?') return Conversions.str_to_bool(response)