Source code for RsFsw.Implementations.Applications.K149_Uwb.Sense.Window.Display.Table.Item

from ........Internal.Core import Core
from ........Internal.CommandsGroup import CommandsGroup
from ........Internal import Conversions
from ........Internal.Types import DataType
from ........Internal.ArgSingleList import ArgSingleList
from ........Internal.ArgSingle import ArgSingle
from ........ import enums
from ........ import repcap


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

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

[docs] def set(self, item: enums.TableItemK149, state: bool, window=repcap.Window.Default) -> None: """ ``SENSe[:WINDow<n>]:DISPlay:TABLe:ITEM`` \n Snippet: ``driver.applications.k149Uwb.sense.window.display.table.item.set(item = enums.TableItemK149.CENTerfreqhz, state = False, window = repcap.Window.Default)`` \n No help available :param window: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Window') """ param = ArgSingleList().compose_cmd_string(ArgSingle('item', item, DataType.Enum, enums.TableItemK149), ArgSingle('state', state, DataType.Boolean)) window_cmd_val = self._cmd_group.get_repcap_cmd_value(window, repcap.Window) self._core.io.write(f'SENSe:WINDow{window_cmd_val}:DISPlay:TABLe:ITEM {param}'.rstrip())
[docs] def get(self, item: enums.TableItemK149, window=repcap.Window.Default) -> bool: """ ``SENSe[:WINDow<n>]:DISPlay:TABLe:ITEM`` \n Snippet: ``value: bool = driver.applications.k149Uwb.sense.window.display.table.item.get(item = enums.TableItemK149.CENTerfreqhz, window = repcap.Window.Default)`` \n No help available :param window: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Window') """ param = Conversions.enum_scalar_to_str(item, enums.TableItemK149) window_cmd_val = self._cmd_group.get_repcap_cmd_value(window, repcap.Window) response = self._core.io.query_str(f'SENSe:WINDow{window_cmd_val}:DISPlay:TABLe:ITEM? {param}') return Conversions.str_to_bool(response)