Source code for RsSmw.Implementations.Source.Bb.Wlnn.Fblock.User.Mac.HeControl

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


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class HeControlCls:
	"""
	| Commands in total: 4
	| Subgroups: 3
	| Direct child commands: 1
	"""

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

	@property
	def acontrol(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_acontrol'):
			from .Acontrol import AcontrolCls
			self._acontrol = AcontrolCls(self._core, self._cmd_group)
		return self._acontrol

	@property
	def heIndicator(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_heIndicator'):
			from .HeIndicator import HeIndicatorCls
			self._heIndicator = HeIndicatorCls(self._core, self._cmd_group)
		return self._heIndicator

	@property
	def state(self):
		"""
		| Commands in total: 1
		| Subgroups: 0
		| Direct child commands: 1
		"""
		if not hasattr(self, '_state'):
			from .State import StateCls
			self._state = StateCls(self._core, self._cmd_group)
		return self._state

[docs] def set(self, he_control: str, frameBlock=repcap.FrameBlock.Default, userIx=repcap.UserIx.Default) -> None: """ ``[SOURce<HW>]:BB:WLNN:FBLock<CH>:[USER<DI>]:MAC:HEControl`` \n Snippet: ``driver.source.bb.wlnn.fblock.user.mac.heControl.set(he_control = rawAbc, frameBlock = repcap.FrameBlock.Default, userIx = repcap.UserIx.Default)`` \n Sets the value with the length of 4 bytes of the HE control field. :param he_control: integer :param frameBlock: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Fblock') :param userIx: optional repeated capability selector. Default value: Nr1 (settable in the interface 'User') """ param = Conversions.value_to_str(he_control) frameBlock_cmd_val = self._cmd_group.get_repcap_cmd_value(frameBlock, repcap.FrameBlock) userIx_cmd_val = self._cmd_group.get_repcap_cmd_value(userIx, repcap.UserIx) self._core.io.write(f'SOURce<HwInstance>:BB:WLNN:FBLock{frameBlock_cmd_val}:USER{userIx_cmd_val}:MAC:HEControl {param}')
[docs] def get(self, frameBlock=repcap.FrameBlock.Default, userIx=repcap.UserIx.Default) -> str: """ ``[SOURce<HW>]:BB:WLNN:FBLock<CH>:[USER<DI>]:MAC:HEControl`` \n Snippet: ``value: str = driver.source.bb.wlnn.fblock.user.mac.heControl.get(frameBlock = repcap.FrameBlock.Default, userIx = repcap.UserIx.Default)`` \n Sets the value with the length of 4 bytes of the HE control field. :param frameBlock: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Fblock') :param userIx: optional repeated capability selector. Default value: Nr1 (settable in the interface 'User') :return: he_control: integer """ frameBlock_cmd_val = self._cmd_group.get_repcap_cmd_value(frameBlock, repcap.FrameBlock) userIx_cmd_val = self._cmd_group.get_repcap_cmd_value(userIx, repcap.UserIx) response = self._core.io.query_str(f'SOURce<HwInstance>:BB:WLNN:FBLock{frameBlock_cmd_val}:USER{userIx_cmd_val}:MAC:HEControl?') return trim_str_response(response)
def clone(self) -> 'HeControlCls': """ 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 = HeControlCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group