Source code for RsFsw.Implementations.System.ShImmediate

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from .... import enums


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

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

	@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, hw_update: enums.EventOnce) -> None: """ ``SYSTem:SHIMmediate`` \n Snippet: ``driver.system.shImmediate.set(hw_update = enums.EventOnce.ONCE)`` \n Executes any received remote commands that cause changes to the hardware and have not been executed yet due to a SYST:SHIM:STAT OFF command. """ param = Conversions.enum_scalar_to_str(hw_update, enums.EventOnce) self._core.io.write(f'SYSTem:SHIMmediate {param}')
# noinspection PyTypeChecker
[docs] def get(self) -> enums.EventOnce: """ ``SYSTem:SHIMmediate`` \n Snippet: ``value: enums.EventOnce = driver.system.shImmediate.get()`` \n Executes any received remote commands that cause changes to the hardware and have not been executed yet due to a SYST:SHIM:STAT OFF command. """ response = self._core.io.query_str(f'SYSTem:SHIMmediate?') return Conversions.str_to_scalar_enum(response, enums.EventOnce)
def clone(self) -> 'ShImmediateCls': """ 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 = ShImmediateCls(self._core, self._cmd_group.parent) self._cmd_group.synchronize_repcaps(new_group) return new_group